Contract 0x58c13a9091f7a533b24de7e8827a2cbebdffb693

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb10d93a26ecdb2ddc9237403795cfa821db7e3f330e085da857103f1e8e0c9bb0x6080604076277242021-05-22 10:20:59123 days 22 hrs agoBitcoin Standard Hashrate: Deployer IN  Contract Creation0 BNB0.02228237
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
tDOGE

Compiler Version
v0.6.9+commit.3e3065ac

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 21 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
    uint256[50] private __gap;
}

File 2 of 21 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/EnumerableSetUpgradeable.sol";
import "../utils/AddressUpgradeable.sol";
import "../GSN/ContextUpgradeable.sol";
import "../proxy/Initializable.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable {
    function __AccessControl_init() internal initializer {
        __Context_init_unchained();
        __AccessControl_init_unchained();
    }

    function __AccessControl_init_unchained() internal initializer {
    }
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;
    using AddressUpgradeable for address;

    struct RoleData {
        EnumerableSetUpgradeable.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
    uint256[49] private __gap;
}

File 3 of 21 : SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMathUpgradeable {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 4 of 21 : ERC20PresetMinterPauserUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../access/AccessControlUpgradeable.sol";
import "../GSN/ContextUpgradeable.sol";
import "../token/ERC20/ERC20Upgradeable.sol";
import "../token/ERC20/ERC20BurnableUpgradeable.sol";
import "../token/ERC20/ERC20PausableUpgradeable.sol";
import "../proxy/Initializable.sol";

/**
 * @dev {ERC20} token, including:
 *
 *  - ability for holders to burn (destroy) their tokens
 *  - a minter role that allows for token minting (creation)
 *  - a pauser role that allows to stop all token transfers
 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the minter and pauser
 * roles, as well as the default admin role, which will let it grant both minter
 * and pauser roles to other accounts.
 */
contract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable {
    function initialize(string memory name, string memory symbol) public virtual initializer {
        __ERC20PresetMinterPauser_init(name, symbol);
    }
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
     * account that deploys the contract.
     *
     * See {ERC20-constructor}.
     */
    function __ERC20PresetMinterPauser_init(string memory name, string memory symbol) internal initializer {
        __Context_init_unchained();
        __AccessControl_init_unchained();
        __ERC20_init_unchained(name, symbol);
        __ERC20Burnable_init_unchained();
        __Pausable_init_unchained();
        __ERC20Pausable_init_unchained();
        __ERC20PresetMinterPauser_init_unchained(name, symbol);
    }

    function __ERC20PresetMinterPauser_init_unchained(string memory name, string memory symbol) internal initializer {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());

        _setupRole(MINTER_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());
    }

    /**
     * @dev Creates `amount` new tokens for `to`.
     *
     * See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint256 amount) public virtual {
        require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint");
        _mint(to, amount);
    }

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause");
        _pause();
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause");
        _unpause();
    }

    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20Upgradeable, ERC20PausableUpgradeable) {
        super._beforeTokenTransfer(from, to, amount);
    }
    uint256[50] private __gap;
}

File 5 of 21 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;


/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 * 
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 * 
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        // solhint-disable-next-line no-inline-assembly
        assembly { cs := extcodesize(self) }
        return cs == 0;
    }
}

File 6 of 21 : ERC20BurnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../GSN/ContextUpgradeable.sol";
import "./ERC20Upgradeable.sol";
import "../../proxy/Initializable.sol";

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {
    function __ERC20Burnable_init() internal initializer {
        __Context_init_unchained();
        __ERC20Burnable_init_unchained();
    }

    function __ERC20Burnable_init_unchained() internal initializer {
    }
    using SafeMathUpgradeable for uint256;

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance");

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }
    uint256[50] private __gap;
}

File 7 of 21 : ERC20PausableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./ERC20Upgradeable.sol";
import "../../utils/PausableUpgradeable.sol";
import "../../proxy/Initializable.sol";

/**
 * @dev ERC20 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable {
    function __ERC20Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
        __ERC20Pausable_init_unchained();
    }

    function __ERC20Pausable_init_unchained() internal initializer {
    }
    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }
    uint256[50] private __gap;
}

File 8 of 21 : ERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../GSN/ContextUpgradeable.sol";
import "./IERC20Upgradeable.sol";
import "../../math/SafeMathUpgradeable.sol";
import "../../proxy/Initializable.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable {
    using SafeMathUpgradeable for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    function __ERC20_init(string memory name_, string memory symbol_) internal initializer {
        __Context_init_unchained();
        __ERC20_init_unchained(name_, symbol_);
    }

    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    function _transferDirect(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
    uint256[44] private __gap;
}

File 9 of 21 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 10 of 21 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20Upgradeable.sol";
import "../../math/SafeMathUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using SafeMathUpgradeable for uint256;
    using AddressUpgradeable for address;

    function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 11 of 21 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 21 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 13 of 21 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../GSN/ContextUpgradeable.sol";
import "../proxy/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal initializer {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!_paused, "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(_paused, "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
    uint256[49] private __gap;
}

File 14 of 21 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
    uint256[49] private __gap;
}

File 15 of 21 : OwnableContract.sol
// SPDX-License-Identifier: MIT
pragma solidity>=0.6.9;

// import "../../3rdParty/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "../../3rdParty/@openzeppelin/contracts-upgradeable/GSN/ContextUpgradeable.sol";
import "../../3rdParty/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "../../3rdParty/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";

import "../../3rdParty/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "../../3rdParty/@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";

// File: openzeppelin-solidity/contracts/ownership/Claimable.sol

/**
 * @title Claimable
 * @dev Extension for the Ownable contract, where the ownership needs to be claimed.
 * This allows the new owner to accept the transfer.
 */

contract OwnableContract is Initializable, ContextUpgradeable,ReentrancyGuardUpgradeable {
    using SafeERC20Upgradeable for IERC20Upgradeable;
    address public pendingOwner;
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function initializeOwnable(address owner) internal initializer {
        __Context_init_unchained();
        require(owner != address(0), "Ownable: new owner is the zero address");
        _owner = owner;
        emit OwnershipTransferred(address(0), owner);
    }

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }
    /**
     * @dev confirms to BEP20
     */
    function getOwner() external view returns (address){
        return _owner;
    }
    /**
     * @dev Modifier throws if called by any account other than the pendingOwner.
     */
    modifier onlyPendingOwner() {
        require(msg.sender == pendingOwner);
        _;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to set the pendingOwner address.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        pendingOwner = newOwner;
    }

    /**
     * @dev Allows the current owner to set the pendingOwner address.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnershipImmediately(address newOwner) public onlyOwner {
        require(address(0)!=newOwner,"not allowed to transfer owner to address(0)");
        _owner = newOwner;
        emit OwnershipTransferred(_owner, newOwner);
    }
    /**
     * @dev Allows the pendingOwner address to finalize the transfer.
     */
    function claimOwnership() public onlyPendingOwner {
        emit OwnershipTransferred(_owner, pendingOwner);
        _owner = pendingOwner;
        pendingOwner = address(0);
    }
    // File: openzeppelin-solidity/contracts/ownership/CanReclaimToken.sol

    /**
    * @title Contracts that should be able to recover tokens
    * @author SylTi
    * @dev This allow a contract to recover any ERC20 token received in a contract by transferring the balance to the contract owner.
    * This will prevent any accidental loss of tokens.
    */
    /**
     * @dev Reclaim all IERC20 compatible tokens
     * @param _token IERC20 The address of the token contract
     */
    function reclaimToken(IERC20Upgradeable _token) public virtual onlyOwner {
        uint256 balance = _token.balanceOf(address(this));
        _token.safeTransfer(owner(), balance);
    }
    
    uint256[49] private __gap;
}

File 16 of 21 : PeggyToken.sol
// SPDX-License-Identifier: MIT
pragma solidity>=0.6.9;

import "../../3rdParty/@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import "../../3rdParty/@openzeppelin/contracts-upgradeable/presets/ERC20PresetMinterPauserUpgradeable.sol";
import "./OwnableContract.sol";

contract PeggyToken is ERC20PresetMinterPauserUpgradeable, OwnableContract{
    using SafeMathUpgradeable for uint256;
    event Lock(address indexed account,uint256 amount);
    event UnLock(address indexed account,uint256 amount);
    uint internal constant  _lockMagicNum = 16;
    uint internal constant  _unLockMagicNum = 0;
    /**
     * @dev store a lock map for compiance work whether allow one user to transfer his coins
     *
     */
    mapping (address => uint) private _lockMap;

    // Dev address.
    address public devaddr;
    // INITIALIZATION DATA
    bool public initialized;
    
    /**
     * @dev statistic data total supply which was locked by compliance officer
     */
    uint256 private _totalSupplyLocked;

    string public icon;

    string public meta;
    /**
     * @dev sets 0 initials tokens, the owner, and the supplyController.
     * this serves as the constructor for the proxy but compiles to the
     * memory model of the Implementation contract.
     */
    function initialize(string memory name, string memory symbol, address owner) public virtual initializer {
        require(!initialized, "already initialized");
        __ERC20PresetMinterPauser_init(name, symbol);
        initializeOwnable(owner);
        devaddr = owner;

        initialized = true;
    }

    function changeIcon(string memory value) public onlyOwner{
        icon = value;
    }
    function changeMeta(string memory value) public onlyOwner{
        meta = value;
    }

    function burn(uint value) override public onlyOwner {
        super.burn(value);
    }

    function finishMinting() public view onlyOwner returns (bool) {
        return false;
    }

    function renounceOwnership() override public onlyOwner {
        revert("renouncing ownership is blocked");
    }

    // Update dev address by the previous dev.
    function dev(address _devaddr) public {
        require(msg.sender == devaddr, "dev: wtf?");
        devaddr = _devaddr;
    }

    function lockAccount(address account) public onlyOwner {
        uint256 bal = balanceOf(account);
        _totalSupplyLocked = _totalSupplyLocked.add(bal);
        _lockMap[account] = _lockMagicNum;
        emit Lock(account,bal);
    }

    function unLockAccount(address account) public onlyOwner {
        uint256 bal = balanceOf(account);
        _totalSupplyLocked = _totalSupplyLocked.sub(bal,"bal>_totalSupplyLocked");
        _lockMap[account] = _unLockMagicNum;
        emit UnLock(account,bal);
    }

    /**
     * @dev check about the compliance lock
     *
     */
    function _beforeTokenTransfer(address account, address to, uint256 amount) internal virtual override(ERC20PresetMinterPauserUpgradeable) {
        super._beforeTokenTransfer(account, to, amount);
        uint lock = _lockMap[account];
        require(lock<10,"you are not allowed to move coins atm");
        lock = _lockMap[to];
        if (lock>=10){
            _totalSupplyLocked = _totalSupplyLocked.add(amount);
        }
    }

}

File 17 of 21 : SafeMathInt.sol
// SPDX-License-Identifier: MIT
pragma solidity>=0.6.9;


/**
 * @title SafeMathInt
 * @dev Math operations for int256 with overflow safety checks.
 */
library SafeMathInt {
    int256 private constant MIN_INT256 = int256(1) << 255;
    int256 private constant MAX_INT256 = ~(int256(1) << 255);

    /**
     * @dev Multiplies two int256 variables and fails on overflow.
     */
    function mul(int256 a, int256 b)
        internal
        pure
        returns (int256)
    {
        int256 c = a * b;

        // Detect overflow when multiplying MIN_INT256 with -1
        require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
        require((b == 0) || (c / b == a));
        return c;
    }

    /**
     * @dev Division of two int256 variables and fails on overflow.
     */
    function div(int256 a, int256 b)
        internal
        pure
        returns (int256)
    {
        // Prevent overflow when dividing MIN_INT256 by -1
        require(b != -1 || a != MIN_INT256);

        // Solidity already throws when dividing by 0.
        return a / b;
    }

    /**
     * @dev Subtracts two int256 variables and fails on overflow.
     */
    function sub(int256 a, int256 b)
        internal
        pure
        returns (int256)
    {
        int256 c = a - b;
        require((b >= 0 && c <= a) || (b < 0 && c > a));
        return c;
    }

    /**
     * @dev Adds two int256 variables and fails on overflow.
     */
    function add(int256 a, int256 b)
        internal
        pure
        returns (int256)
    {
        int256 c = a + b;
        require((b >= 0 && c >= a) || (b < 0 && c < a));
        return c;
    }

    /**
     * @dev Converts to absolute value, and fails on overflow.
     */
    function abs(int256 a)
        internal
        pure
        returns (int256)
    {
        require(a != MIN_INT256);
        return a < 0 ? -a : a;
    }
}

File 18 of 21 : PlainElasticToken.sol
// SPDX-License-Identifier: MIT
pragma solidity>=0.6.9;

import "../../libraries/PeggyToken.sol";
import "../../libraries/SafeMathInt.sol";

contract PlainElasticToken is PeggyToken{

    address public monetaryPolicy;
    uint256 public rebaseStartTime;

    bool public started;
    event LogRebase(uint256 indexed epoch, uint256 totalSupply);
    event LogMonetaryPolicyUpdated(address monetaryPolicy);
    modifier onlyAfterRebaseStart() {
        require(now >= rebaseStartTime);
        _;
    }
    modifier validRecipient(address to) {
        require(to != address(this));
        _;
    }
    modifier onlyMonetaryPolicy() {
        require(msg.sender == monetaryPolicy);
        _;
    }
    function initialize(string memory name, string memory symbol) override public virtual initializer {
        initialize(name, symbol,_msgSender());
        pause();
    }
    
    function startWithInitialSupply(uint256 initialSupply,uint256 rebaseStartTime_) public onlyOwner{
        require(!started,"started");
        require(initialSupply>1,"initalSupply should >1");
        _unpause();
        rebaseStartTime = rebaseStartTime_;

        _mint(owner(), initialSupply);
        started = true;
    }
    // authed method
    function setMonetaryPolicy(address plolicy) external{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()),"have no right");
        monetaryPolicy = plolicy;
        emit LogMonetaryPolicyUpdated(plolicy);
    }

    function __expandBurn(address account, uint256 amount) internal virtual {
        _burn(account, amount);
    }
    function __expandTransferDirect(address sender, address recipient, uint256 amount) internal virtual{
        _transferDirect(sender, recipient, amount);
    }

    function __expandTransfer(address sender, address recipient, uint256 amount) internal virtual {       
        __expandBeforeTokenTransfer(sender,recipient,amount);
        _transfer(sender, recipient, amount);
    }

    function __expandBeforeTokenTransfer(address account, address to, uint256 amount) internal virtual {

    }
    function _beforeTokenTransfer(address from, address to, uint256 amount) validRecipient(to) internal virtual override(PeggyToken) {
        super._beforeTokenTransfer(from, to, amount);
        __expandBeforeTokenTransfer(from,to,amount);
    }
    uint256[50] private __gap;
}

File 19 of 21 : tDOGE.sol
// SPDX-License-Identifier: MIT
pragma solidity>=0.6.9;

import '../../tauElastic/v2/PlainElasticTokenWFixedRate.sol';

contract tDOGE is PlainElasticTokenWFixedRate{
    using SafeMathUpgradeable for uint256;
    uint8 public constant DEFAULT_DOGEN_DECIMALS = 8;
    function initialize() public initializer{
        super.initialize("τDogecoin","τDOGE");
        _setupDecimals(DEFAULT_DOGEN_DECIMALS);
    }
}

File 20 of 21 : PlainElasticTokenWBase.sol
// SPDX-License-Identifier: MIT
pragma solidity>=0.6.9;

import '../../base/PlainElasticToken.sol';
import "../../../../3rdParty/@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";

interface PlainIRewardVault{
    function noticeUnderWaterSell(uint256 inputReward,uint256 sellAmount,uint256 logIndex) external;
    function noticeUnderWaterBuy(uint256 index,address buyer,uint256 amount)external;
}

abstract contract PlainElasticTokenWBase is PlainElasticToken{
    using SafeMathInt for int256;
    using SafeMathUpgradeable for uint256;
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;

    bool public usingStrategy;
    EnumerableSetUpgradeable.AddressSet private fromWhitelist;
    EnumerableSetUpgradeable.AddressSet private toWhitelist;
    EnumerableSetUpgradeable.AddressSet private testList;
    EnumerableSetUpgradeable.AddressSet private swapPairs;
    uint256 public totalBurned;

    struct RebaseLog{
        uint256 epoch;
        uint256 time;
        uint256 initTotal;
        int256  supplyDelta;
        uint256 absDelta;
        uint256 burned;
        uint256 rewards;   
    }

    RebaseLog[] public logs;
    uint256 public factor;
    uint256 public burnSplit;
    address public rewardVault;
    uint256 public constant FACTOR_BASE = 1e18;
    uint256[50] private __gap;
    
    function viewFromWhiteList()public view returns(address[] memory,address[] memory){
        uint256 len = fromWhitelist.length();
        address[] memory list = new address[](len);
        for (uint256 x=0;x<len;x++){
            list[x] = fromWhitelist.at(x);
        }
        len = swapPairs.length();
        address[] memory list1 = new address[](len);
        for (uint256 x=0;x<len;x++){
            list1[x] = swapPairs.at(x);
        }
        return (list,list1);
    }
    function viewToWhiteList()public view returns(address[] memory,address[] memory){
        uint256 len = toWhitelist.length();
        address[] memory list = new address[](len);
        for (uint256 x=0;x<len;x++){
            list[x] = toWhitelist.at(x);
        }
        len = swapPairs.length();
        address[] memory list1 = new address[](len);
        for (uint256 x=0;x<len;x++){
            list1[x] = swapPairs.at(x);
        }
        return (list,list1);
    }
    function viewLogsLen()public view returns(uint256){
        return logs.length;
    }

    function isAboveWater() public view returns(bool){
        if (logs.length>0){
            uint256 index = logs.length-1;
            RebaseLog memory lastLog = logs[index];
            if (lastLog.supplyDelta<0){
                return false;
            }
        }
        return true;
    }
    function isUnderWater() public view returns(bool){
        if (logs.length>0){
            uint256 index = logs.length-1;
            RebaseLog memory lastLog = logs[index];
            if (lastLog.supplyDelta<0){
                return true;
            }
        }
        return false;
    }
    function adminSwitchStrategy(bool _switch) public onlyOwner{
        usingStrategy = _switch;
    }
    function adminChangeStrategyFactors(bool _st,uint256 factor_,uint256 split_,address vault_) public onlyOwner{
        require(burnSplit<=FACTOR_BASE,"check uppass");
        usingStrategy = _st;
        factor = factor_;
        burnSplit = split_;
        rewardVault = vault_;
    }

    function adminAddFromWhiteList(address white)public onlyOwner{
        if (!fromWhitelist.contains(white)){
            fromWhitelist.add(white);
        }
    }
    function adminDelFromWhiteList(address white)public onlyOwner{
        if (fromWhitelist.contains(white)){
            fromWhitelist.remove(white);
        }
    }
    function adminAddTestList(address white)public onlyOwner{
        if (!testList.contains(white)){
            testList.add(white);
        }
    }
    function adminDelTestList(address white)public onlyOwner{
        if (testList.contains(white)){
            testList.remove(white);
        }
    }
    function adminAddToWhiteList(address white)public onlyOwner{
        if (!toWhitelist.contains(white)){
            toWhitelist.add(white);
        }
    }
    function adminDelToWhiteList(address white)public onlyOwner{
        if (toWhitelist.contains(white)){
            toWhitelist.remove(white);
        }
    }
    function adminAddSwapPair(address pair)public onlyOwner{
        if (!swapPairs.contains(pair)){
            swapPairs.add(pair);
        }
    }
    function adminRemoveSwapPair(address pair)public onlyOwner{
        if (swapPairs.contains(pair)){
            swapPairs.remove(pair);
        }
    }
    
    function restorativeRebase(uint256 epoch,int256 supplyDelta) external
        onlyMonetaryPolicy onlyAfterRebaseStart nonReentrant returns(uint256){
        uint256 totalSupply = totalSupply();
        logs.push(
            RebaseLog({
                epoch:epoch,
                time:block.timestamp,
                initTotal:totalSupply,
                supplyDelta:supplyDelta,
                absDelta:uint256(supplyDelta.abs()),
                burned:0,
                rewards:0
            })
        );
        emit LogRebase(epoch, totalSupply);
        return totalSupply;
    }

    function _inTestList(address account) public view returns(bool){
        return testList.contains(account);
    }

    function _inFromWhiteList(address account)public view returns(bool){
        return ( fromWhitelist.contains(account) || account == rewardVault || account==address(0) );
    }
    function _inToWhiteList(address account)public view returns(bool){
        return ( toWhitelist.contains(account) || account == rewardVault || account==address(0) );
    }
    function _inSwapPair(address account)public view  returns(bool){
        return swapPairs.contains(account);
    }

    function viewTryBurnTransfer(address account,address to,uint256 amount)virtual public view returns(bool,uint256,uint256);    
}

File 21 of 21 : PlainElasticTokenWFixedRate.sol
// SPDX-License-Identifier: MIT
pragma solidity>=0.6.9;

import "./PlainElasticTokenWBase.sol";

contract PlainElasticTokenWFixedRate is PlainElasticTokenWBase{
    using SafeMathInt for int256;
    using SafeMathUpgradeable for uint256;
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;

    function __rebaseBurn(address account,uint256 amount) internal view returns(bool,uint256,uint256){
        uint256 toBeLocked = amount.mul(factor).div(FACTOR_BASE);
        uint256 balance = balanceOf(account);
        bool pass = true;
        if (balance < toBeLocked.add(amount)){
            pass = false;
        }
        uint256 toBeBurned = toBeLocked.mul(burnSplit).div(FACTOR_BASE);
        uint256 tobeRewarded = toBeLocked.sub(toBeBurned);
        return (pass,toBeBurned,tobeRewarded);
    }

    function viewTryBurnTransfer(address account,address to,uint256 amount)public override  view returns(bool,uint256,uint256){
        if (account == to) return (true,0,0);
        if (!usingStrategy) return(true,0,0);
        if (_inFromWhiteList(account) || _inToWhiteList(to)){
            return (true,0,0);
        }
        bool needBurn = false;
        if (logs.length>0){
            uint256 index = logs.length-1;
            RebaseLog memory lastLog = logs[index];
            if (lastLog.supplyDelta<0){
                needBurn = true;
                
            }
        }
        if (needBurn || _inTestList(account) ){
            if (_inSwapPair(account)){
                //transfer from swap,means remove liquidity or buy from swap
                return (true,0,0);
            }else{
                //others burn
                return __rebaseBurn(tx.origin, amount);
            }
        }
        return (true,0,0);
    }

    function __expandBeforeTokenTransfer(address account, address to, uint256 amount) internal override virtual {
        if (account == to) return;
        if (!usingStrategy) return;
        if (_inFromWhiteList(account) || _inToWhiteList(to)){
            return;
        }
        bool needBurn = false;
        uint256 index=0;
        if (logs.length>0){
            index = logs.length-1;
            RebaseLog memory lastLog = logs[index];
            if (lastLog.supplyDelta<0){
                needBurn = true;
            } 
        }
        if (needBurn || _inTestList(account) ){
            if (_inSwapPair(account)){
                //transfer from swap,means remove liquidity or buy from swap
                return;
                //use tx.origin ignore why he made this happen, just give prize to the initiator not the msg sender
                // if (rewardVault!=address(0)){
                //     PlainIRewardVault(rewardVault).noticeUnderWaterBuy(index,tx.origin,amount);
                // }
            }else{
                //others burn and add mining rewards when above water
                //use tx.origin ignore why he made this happen, just punish the initiator not the msg sender
                uint256 toBeLocked = amount.mul(factor).div(FACTOR_BASE);
                if (rewardVault==address(0)){
                    __expandBurn(tx.origin,toBeLocked);
                    totalBurned = totalBurned.add(toBeLocked);
                    logs[index].burned = logs[index].burned.add(toBeLocked);
                    return;
                }
                uint256 toBeBurned = toBeLocked.mul(burnSplit).div(FACTOR_BASE);
                uint256 tobeRewarded = toBeLocked.sub(toBeBurned);
                __expandBurn(tx.origin, toBeBurned);
                totalBurned = totalBurned.add(toBeBurned);
                __expandTransferDirect(tx.origin,rewardVault,tobeRewarded);
                
                logs[index].burned = logs[index].burned.add(toBeBurned);
                logs[index].rewards = logs[index].rewards.add(tobeRewarded);
            }
        }
    }

}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Lock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"monetaryPolicy","type":"address"}],"name":"LogMonetaryPolicyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"LogRebase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_DOGEN_DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FACTOR_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"_inFromWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"_inSwapPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"_inTestList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"_inToWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"white","type":"address"}],"name":"adminAddFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"}],"name":"adminAddSwapPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"white","type":"address"}],"name":"adminAddTestList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"white","type":"address"}],"name":"adminAddToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_st","type":"bool"},{"internalType":"uint256","name":"factor_","type":"uint256"},{"internalType":"uint256","name":"split_","type":"uint256"},{"internalType":"address","name":"vault_","type":"address"}],"name":"adminChangeStrategyFactors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"white","type":"address"}],"name":"adminDelFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"white","type":"address"}],"name":"adminDelTestList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"white","type":"address"}],"name":"adminDelToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"}],"name":"adminRemoveSwapPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_switch","type":"bool"}],"name":"adminSwitchStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnSplit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"value","type":"string"}],"name":"changeIcon","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"value","type":"string"}],"name":"changeMeta","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devaddr","type":"address"}],"name":"dev","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finishMinting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"icon","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAboveWater","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isUnderWater","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"lockAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"logs","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"initTotal","type":"uint256"},{"internalType":"int256","name":"supplyDelta","type":"int256"},{"internalType":"uint256","name":"absDelta","type":"uint256"},{"internalType":"uint256","name":"burned","type":"uint256"},{"internalType":"uint256","name":"rewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"meta","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"monetaryPolicy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebaseStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"_token","type":"address"}],"name":"reclaimToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"int256","name":"supplyDelta","type":"int256"}],"name":"restorativeRebase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"plolicy","type":"address"}],"name":"setMonetaryPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"initialSupply","type":"uint256"},{"internalType":"uint256","name":"rebaseStartTime_","type":"uint256"}],"name":"startWithInitialSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnershipImmediately","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"unLockAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usingStrategy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewFromWhiteList","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewLogsLen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewToWhiteList","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"viewTryBurnTransfer","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50614fa3806100206000396000f3fe608060405234801561001057600080fd5b50600436106104965760003560e01c80638129fc1c11610262578063c7aecf9911610151578063dcc4a192116100ce578063e30c397811610092578063e30c3978146110df578063e63ab1e9146110e7578063e79899bd146110ef578063edec32cd14611144578063f2fde38b1461114c578063f7a4f8f01461117257610496565b8063dcc4a19214610fa5578063dd62ed3e14611049578063df1a246414611077578063e1f4791e1461109d578063e29f1a22146110a557610496565b8063d49e77cd11610115578063d49e77cd14610f3b578063d539139314610f43578063d547741f14610f4b578063d89135cd14610f77578063da5c268f14610f7f57610496565b8063c7aecf9914610efe578063c885044e14610f06578063ca15c87314610f0e578063cd279e8314610f2b578063cf29122814610f3357610496565b806395d89b41116101df578063b38d2273116101a3578063b38d227314610e9d578063b8fd8e7314610ec3578063bcd3350a14610ecb578063bd7ee54314610ed3578063c557b98514610ef657610496565b806395d89b4114610d94578063a217fddf14610d9c578063a457c2d714610da4578063a9059cbb14610dd0578063b328b97114610dfc57610496565b80638da5cb5b116102265780638da5cb5b14610cc35780638e27d7d714610d175780639010d07c14610d1f57806391d1485414610d42578063947389a214610d6e57610496565b80638129fc1c14610cb35780638456cb5914610cbb578063893d20e814610cc35780638b5a6a0814610ccb5780638d88a90e14610cf157610496565b80633834b7d81161038957806347a64f441161030657806370a08231116102ca57806370a0823114610b87578063715018a614610bad578063723373ed14610bb557806379cc679014610c595780637d64bcb414610c855780637e71fb0914610c8d57610496565b806347a64f4414610a205780634cd88b7614610a465780634e71e0c814610b6f57806354f703f814610b775780635c975abb14610b7f57610496565b80633f4ba83a1161034d5780633f4ba83a14610983578063409cb6d11461098b57806340c10f19146109b157806342966c68146109dd578063470508af146109fa57610496565b80633834b7d81461089157806339509351146108b75780633a2c6777146108e35780633b6894fc146109075780633c5129001461095d57610496565b806318160ddd11610417578063248a9ca3116103db578063248a9ca3146107f65780632ed93c78146108135780632f2ff15d1461081b578063313ce5671461084757806336568abe1461086557610496565b806318160ddd146107825780631ecf65fb1461078a5780631f2698ab1461079257806321010be41461079a57806323b872dd146107c057610496565b80630a9c254d1161045e5780630a9c254d146106e95780630ff1b0c5146107085780631333f8d21461072e578063158ef93e1461075457806317ffc3201461075c57610496565b806302b61daa1461049b57806306fdde03146104c3578063077f224a1461054057806307efb64f14610674578063095ea7b3146106a9575b600080fd5b6104c1600480360360208110156104b157600080fd5b50356001600160a01b0316611198565b005b6104cb61121f565b6040805160208082528351818301528351919283929083019185019080838360005b838110156105055781810151838201526020016104ed565b50505050905090810190601f1680156105325780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104c16004803603606081101561055657600080fd5b810190602081018135600160201b81111561057057600080fd5b82018360208201111561058257600080fd5b803590602001918460018302840111600160201b831117156105a357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156105f557600080fd5b82018360208201111561060757600080fd5b803590602001918460018302840111600160201b8311171561062857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550505090356001600160a01b031691506112b69050565b6106976004803603604081101561068a57600080fd5b50803590602001356113ef565b60408051918252519081900360200190f35b6106d5600480360360408110156106bf57600080fd5b506001600160a01b038135169060200135611562565b604080519115158252519081900360200190f35b6104c1600480360360208110156106ff57600080fd5b50351515611580565b6106d56004803603602081101561071e57600080fd5b50356001600160a01b03166115ed565b6106d56004803603602081101561074457600080fd5b50356001600160a01b031661162e565b6106d5611642565b6104c16004803603602081101561077257600080fd5b50356001600160a01b0316611653565b610697611746565b6106d561174c565b6106d5611756565b6106d5600480360360208110156107b057600080fd5b50356001600160a01b0316611760565b6106d5600480360360608110156107d657600080fd5b506001600160a01b03813581169160208101359091169060400135611774565b6106976004803603602081101561080c57600080fd5b5035611802565b6106d5611817565b6104c16004803603604081101561083157600080fd5b50803590602001356001600160a01b03166118c3565b61084f61192b565b6040805160ff9092168252519081900360200190f35b6104c16004803603604081101561087b57600080fd5b50803590602001356001600160a01b0316611934565b6104c1600480360360208110156108a757600080fd5b50356001600160a01b0316611995565b6106d5600480360360408110156108cd57600080fd5b506001600160a01b038135169060200135611a16565b6108eb611a6a565b604080516001600160a01b039092168252519081900360200190f35b61093d6004803603606081101561091d57600080fd5b506001600160a01b03813581169160208101359091169060400135611a7a565b604080519315158452602084019290925282820152519081900360600190f35b6104c16004803603602081101561097357600080fd5b50356001600160a01b0316611bee565b6104c1611cf3565b6104c1600480360360208110156109a157600080fd5b50356001600160a01b0316611d64565b6104c1600480360360408110156109c757600080fd5b506001600160a01b038135169060200135611de5565b6104c1600480360360208110156109f357600080fd5b5035611e56565b6104c160048036036020811015610a1057600080fd5b50356001600160a01b0316611eb8565b6104c160048036036020811015610a3657600080fd5b50356001600160a01b0316611f3a565b6104c160048036036040811015610a5c57600080fd5b810190602081018135600160201b811115610a7657600080fd5b820183602082011115610a8857600080fd5b803590602001918460018302840111600160201b83111715610aa957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610afb57600080fd5b820183602082011115610b0d57600080fd5b803590602001918460018302840111600160201b83111715610b2e57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061200f945050505050565b6104c16120cd565b61069761213d565b6106d5612144565b61069760048036036020811015610b9d57600080fd5b50356001600160a01b031661214d565b6104c1612168565b6104c160048036036020811015610bcb57600080fd5b810190602081018135600160201b811115610be557600080fd5b820183602082011115610bf757600080fd5b803590602001918460018302840111600160201b83111715610c1857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061220e945050505050565b6104c160048036036040811015610c6f57600080fd5b506001600160a01b03813516906020013561227b565b6106d56122d6565b6104c160048036036020811015610ca357600080fd5b50356001600160a01b0316612331565b6104c161240e565b6104c1612503565b6108eb612572565b6104c160048036036020811015610ce157600080fd5b50356001600160a01b0316612582565b6104c160048036036020811015610d0757600080fd5b50356001600160a01b0316612625565b6108eb612694565b6108eb60048036036040811015610d3557600080fd5b50803590602001356126a4565b6106d560048036036040811015610d5857600080fd5b50803590602001356001600160a01b03166126c2565b6104c160048036036020811015610d8457600080fd5b50356001600160a01b03166126e0565b6104cb612761565b6106976127c2565b6106d560048036036040811015610dba57600080fd5b506001600160a01b0381351690602001356127c7565b6106d560048036036040811015610de657600080fd5b506001600160a01b038135169060200135612835565b610e04612849565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610e48578181015183820152602001610e30565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610e87578181015183820152602001610e6f565b5050505090500194505050505060405180910390f35b6106d560048036036020811015610eb357600080fd5b50356001600160a01b0316612992565b6106976129a6565b61084f6129ad565b6104c160048036036040811015610ee957600080fd5b50803590602001356129b2565b6104cb612acd565b610e04612b5c565b6104cb612c9a565b61069760048036036020811015610f2457600080fd5b5035612cf6565b610697612d0d565b6106d5612d14565b6108eb612dc0565b610697612dd0565b6104c160048036036040811015610f6157600080fd5b50803590602001356001600160a01b0316612df3565b610697612e4c565b6104c160048036036020811015610f9557600080fd5b50356001600160a01b0316612e53565b6104c160048036036020811015610fbb57600080fd5b810190602081018135600160201b811115610fd557600080fd5b820183602082011115610fe757600080fd5b803590602001918460018302840111600160201b8311171561100857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612ed5945050505050565b6106976004803603604081101561105f57600080fd5b506001600160a01b0381358116916020013516612f42565b6104c16004803603602081101561108d57600080fd5b50356001600160a01b0316612f6d565b610697612fef565b6104c1600480360360808110156110bb57600080fd5b508035151590602081013590604081013590606001356001600160a01b0316612ffb565b6108eb6130e3565b6106976130f3565b61110c6004803603602081101561110557600080fd5b5035613116565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b610697613166565b6104c16004803603602081101561116257600080fd5b50356001600160a01b031661316d565b6104c16004803603602081101561118857600080fd5b50356001600160a01b03166131e9565b6111a061326a565b610192546001600160a01b039081169116146111f1576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6112036102018263ffffffff61326e16565b1561121c5761121a6102018263ffffffff61328316565b505b50565b60688054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156112ab5780601f10611280576101008083540402835291602001916112ab565b820191906000526020600020905b81548152906001019060200180831161128e57829003601f168201915b505050505090505b90565b600054610100900460ff16806112cf57506112cf613298565b806112dd575060005460ff16155b6113185760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff16158015611343576000805460ff1961ff0019909116610100171660011790555b6101c554600160a01b900460ff1615611399576040805162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b6113a3848461329e565b6113ac82613367565b6101c58054600160a01b6001600160a01b03199091166001600160a01b0385161760ff60a01b191617905580156113e9576000805461ff00191690555b50505050565b6101c9546000906001600160a01b0316331461140a57600080fd5b6101ca5442101561141a57600080fd5b600261015f541415611473576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600261015f556000611483611746565b90506102086040518060e001604052808681526020014281526020018381526020018581526020016114b48661348e565b81526000602080830182905260409283018290528454600181810187559583529181902084516007909302019182558381015194820194909455828201516002820155606083015160038201556080830151600482015560a0830151600582015560c0909201516006909201919091558051838152905186927f72725a3b1e5bd622d6bcd1339bb31279c351abe8f541ac7fd320f24e1b1641f2928290030190a2600161015f559392505050565b600061157661156f61326a565b84846134b6565b5060015b92915050565b61158861326a565b610192546001600160a01b039081169116146115d9576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6101fe805460ff1916911515919091179055565b60006116016102018363ffffffff61326e16565b8061161a575061020b546001600160a01b038381169116145b8061157a5750506001600160a01b03161590565b60006116016101ff8363ffffffff61326e16565b6101c554600160a01b900460ff1681565b61165b61326a565b610192546001600160a01b039081169116146116ac576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b1580156116f657600080fd5b505afa15801561170a573d6000803e3d6000fd5b505050506040513d602081101561172057600080fd5b5051905061121a61172f612572565b6001600160a01b038416908363ffffffff6135a216565b60675490565b6101fe5460ff1681565b6101cb5460ff1681565b600061157a6102058363ffffffff61326e16565b60006117818484846135f4565b6117f78461178d61326a565b6117f285604051806060016040528060288152602001614d18602891396001600160a01b038a166000908152606660205260408120906117cb61326a565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61374b16565b6134b6565b5060015b9392505050565b60009081526033602052604090206002015490565b61020854600090156118bd576102085460001901611833614a3b565b610208828154811061184157fe5b90600052602060002090600702016040518060e001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152505090506000816060015112156118ba576001925050506112b3565b50505b50600090565b6000828152603360205260409020600201546118e6906118e161326a565b6126c2565b6119215760405162461bcd60e51b815260040180806020018281038252602f815260200180614b56602f913960400191505060405180910390fd5b61121a82826137e2565b606a5460ff1690565b61193c61326a565b6001600160a01b0316816001600160a01b03161461198b5760405162461bcd60e51b815260040180806020018281038252602f815260200180614f15602f913960400191505060405180910390fd5b61121a8282613851565b61199d61326a565b610192546001600160a01b039081169116146119ee576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b611a006102038263ffffffff61326e16565b61121c5761121a6102038263ffffffff6138c016565b6000611576611a2361326a565b846117f28560666000611a3461326a565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6138d516565b61020b546001600160a01b031681565b6000806000846001600160a01b0316866001600160a01b03161415611aa85750600191506000905080611be5565b6101fe5460ff16611ac25750600191506000905080611be5565b611acb8661162e565b80611ada5750611ada856115ed565b15611aee5750600191506000905080611be5565b6102085460009015611b8e576102085460001901611b0a614a3b565b6102088281548110611b1857fe5b90600052602060002090600702016040518060e00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820154815250509050600081606001511215611b8b57600192505b50505b8080611b9e5750611b9e87612992565b15611bd857611bac87611760565b15611bc257506001925060009150819050611be5565b611bcc328661392f565b93509350935050611be5565b5060019250600091508190505b93509350939050565b611bf661326a565b610192546001600160a01b03908116911614611c47576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6000611c528261214d565b9050611c9a816040518060400160405280601681526020017518985b0f97dd1bdd185b14dd5c1c1b1e531bd8dad95960521b8152506101c65461374b9092919063ffffffff16565b6101c6556001600160a01b03821660008181526101c46020908152604080832092909255815184815291517fb371d42b3715509a27f3109f6ac1ef6b7d7e7f8e9232b738ed17338be6cf95809281900390910190a25050565b604080516a5041555345525f524f4c4560a81b8152905190819003600b019020611d1f906118e161326a565b611d5a5760405162461bcd60e51b8152600401808060200182810382526039815260200180614ba76039913960400191505060405180910390fd5b611d626139d8565b565b611d6c61326a565b610192546001600160a01b03908116911614611dbd576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b611dcf6102058263ffffffff61326e16565b61121c5761121a6102058263ffffffff6138c016565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b019020611e11906118e161326a565b611e4c5760405162461bcd60e51b8152600401808060200182810382526036815260200180614d806036913960400191505060405180910390fd5b61121a8282613a76565b611e5e61326a565b610192546001600160a01b03908116911614611eaf576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b61121c81613b62565b611ec061326a565b610192546001600160a01b03908116911614611f11576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b611f236102038263ffffffff61326e16565b1561121c5761121a6102038263ffffffff61328316565b611f4261326a565b610192546001600160a01b03908116911614611f93576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6000611f9e8261214d565b6101c654909150611fb5908263ffffffff6138d516565b6101c6556001600160a01b03821660008181526101c4602090815260409182902060109055815184815291517f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d4279281900390910190a25050565b600054610100900460ff16806120285750612028613298565b80612036575060005460ff16155b6120715760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff1615801561209c576000805460ff1961ff0019909116610100171660011790555b6120ae83836120a961326a565b6112b6565b6120b6612503565b80156120c8576000805461ff00191690555b505050565b610191546001600160a01b031633146120e557600080fd5b61019154610192546040516001600160a01b039283169290911690600080516020614d6083398151915290600090a3610191805461019280546001600160a01b03199081166001600160a01b03841617909155169055565b6102095481565b60c95460ff1690565b6001600160a01b031660009081526065602052604090205490565b61217061326a565b610192546001600160a01b039081169116146121c1576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6040805162461bcd60e51b815260206004820152601f60248201527f72656e6f756e63696e67206f776e65727368697020697320626c6f636b656400604482015290519081900360640190fd5b61221661326a565b610192546001600160a01b03908116911614612267576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b805161121a906101c8906020840190614a78565b60006122b882604051806060016040528060248152602001614db6602491396122ab866122a661326a565b612f42565b919063ffffffff61374b16565b90506122cc836122c661326a565b836134b6565b6120c88383613b6f565b60006122e061326a565b610192546001600160a01b039081169116146118bd576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b61233961326a565b610192546001600160a01b0390811691161461238a576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6001600160a01b0381166123cf5760405162461bcd60e51b815260040180806020018281038252602b815260200180614ec5602b913960400191505060405180910390fd5b61019280546001600160a01b0319166001600160a01b038381169182179283905560405191921690600080516020614d6083398151915290600090a350565b600054610100900460ff16806124275750612427613298565b80612435575060005460ff16155b6124705760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff1615801561249b576000805460ff1961ff0019909116610100171660011790555b6124e56040518060400160405280600a81526020016967c22237b3b2b1b7b4b760b11b81525060405180604001604052806006815260200165cf84444f474560d01b81525061200f565b6124ef6008613c65565b801561121c576000805461ff001916905550565b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902061252f906118e161326a565b61256a5760405162461bcd60e51b8152600401808060200182810382526037815260200180614e646037913960400191505060405180910390fd5b611d62613c7b565b610192546001600160a01b031690565b61258f60006118e161326a565b6125d0576040805162461bcd60e51b815260206004820152600d60248201526c1a185d99481b9bc81c9a59da1d609a1b604482015290519081900360640190fd5b6101c980546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f0e6961f1a1afb87eaf51fd64f22ddc10062e23aa7838eac5d0bdf140bfd389729181900360200190a150565b6101c5546001600160a01b03163314612671576040805162461bcd60e51b81526020600482015260096024820152686465763a207774663f60b81b604482015290519081900360640190fd5b6101c580546001600160a01b0319166001600160a01b0392909216919091179055565b6101c9546001600160a01b031681565b60008281526033602052604081206117fb908363ffffffff613cfc16565b60008281526033602052604081206117fb908363ffffffff61326e16565b6126e861326a565b610192546001600160a01b03908116911614612739576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b61274b6101ff8263ffffffff61326e16565b61121c5761121a6101ff8263ffffffff6138c016565b60698054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156112ab5780601f10611280576101008083540402835291602001916112ab565b600081565b60006115766127d461326a565b846117f285604051806060016040528060258152602001614ef060259139606660006127fe61326a565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61374b16565b600061157661284261326a565b84846135f4565b6060806000612859610201613d08565b905060608167ffffffffffffffff8111801561287457600080fd5b5060405190808252806020026020018201604052801561289e578160200160208202803683370190505b50905060005b828110156128ea576128be6102018263ffffffff613cfc16565b8282815181106128ca57fe5b6001600160a01b03909216602092830291909101909101526001016128a4565b506128f6610205613d08565b915060608267ffffffffffffffff8111801561291157600080fd5b5060405190808252806020026020018201604052801561293b578160200160208202803683370190505b50905060005b838110156129875761295b6102058263ffffffff613cfc16565b82828151811061296757fe5b6001600160a01b0390921660209283029190910190910152600101612941565b509093509150509091565b600061157a6102038363ffffffff61326e16565b6101ca5481565b600881565b6129ba61326a565b610192546001600160a01b03908116911614612a0b576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6101cb5460ff1615612a4e576040805162461bcd60e51b81526020600482015260076024820152661cdd185c9d195960ca1b604482015290519081900360640190fd5b60018211612a9c576040805162461bcd60e51b8152602060048201526016602482015275696e6974616c537570706c792073686f756c64203e3160501b604482015290519081900360640190fd5b612aa46139d8565b6101ca819055612abb612ab5612572565b83613a76565b50506101cb805460ff19166001179055565b6101c7805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015612b545780601f10612b2957610100808354040283529160200191612b54565b820191906000526020600020905b815481529060010190602001808311612b3757829003601f168201915b505050505081565b6060806000612b6c6101ff613d08565b905060608167ffffffffffffffff81118015612b8757600080fd5b50604051908082528060200260200182016040528015612bb1578160200160208202803683370190505b50905060005b82811015612bfd57612bd16101ff8263ffffffff613cfc16565b828281518110612bdd57fe5b6001600160a01b0390921660209283029190910190910152600101612bb7565b50612c09610205613d08565b915060608267ffffffffffffffff81118015612c2457600080fd5b50604051908082528060200260200182016040528015612c4e578160200160208202803683370190505b50905060005b8381101561298757612c6e6102058263ffffffff613cfc16565b828281518110612c7a57fe5b6001600160a01b0390921660209283029190910190910152600101612c54565b6101c8805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015612b545780601f10612b2957610100808354040283529160200191612b54565b600081815260336020526040812061157a90613d08565b61020a5481565b6102085460009015612dba576102085460001901612d30614a3b565b6102088281548110612d3e57fe5b90600052602060002090600702016040518060e00160405290816000820154815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820154815250509050600081606001511215612db7576000925050506112b3565b50505b50600190565b6101c5546001600160a01b031681565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b01902081565b600082815260336020526040902060020154612e11906118e161326a565b61198b5760405162461bcd60e51b8152600401808060200182810382526030815260200180614c746030913960400191505060405180910390fd5b6102075481565b612e5b61326a565b610192546001600160a01b03908116911614612eac576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b612ebe6101ff8263ffffffff61326e16565b1561121c5761121a6101ff8263ffffffff61328316565b612edd61326a565b610192546001600160a01b03908116911614612f2e576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b805161121a906101c7906020840190614a78565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205490565b612f7561326a565b610192546001600160a01b03908116911614612fc6576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b612fd86102058263ffffffff61326e16565b1561121c5761121a6102058263ffffffff61328316565b670de0b6b3a764000081565b61300361326a565b610192546001600160a01b03908116911614613054576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b670de0b6b3a764000061020a5411156130a3576040805162461bcd60e51b815260206004820152600c60248201526b636865636b2075707061737360a01b604482015290519081900360640190fd5b6101fe805460ff1916941515949094179093556102099190915561020a5561020b80546001600160a01b0319166001600160a01b03909216919091179055565b610191546001600160a01b031681565b604080516a5041555345525f524f4c4560a81b8152905190819003600b01902081565b610208818154811061312457fe5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b6102085490565b61317561326a565b610192546001600160a01b039081169116146131c6576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b61019180546001600160a01b0319166001600160a01b0392909216919091179055565b6131f161326a565b610192546001600160a01b03908116911614613242576040805162461bcd60e51b81526020600482018190526024820152600080516020614d40833981519152604482015290519081900360640190fd5b6132546102018263ffffffff61326e16565b61121c5761121a6102018263ffffffff6138c016565b3390565b60006117fb836001600160a01b038416613d13565b60006117fb836001600160a01b038416613d2b565b303b1590565b600054610100900460ff16806132b757506132b7613298565b806132c5575060005460ff16155b6133005760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff1615801561332b576000805460ff1961ff0019909116610100171660011790555b613333613df1565b61333b613df1565b6133458383613e91565b61334d613df1565b613355613f69565b61335d613df1565b6120b68383614014565b600054610100900460ff16806133805750613380613298565b8061338e575060005460ff16155b6133c95760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff161580156133f4576000805460ff1961ff0019909116610100171660011790555b6133fc613df1565b6001600160a01b0382166134415760405162461bcd60e51b8152600401808060200182810382526026815260200180614be06026913960400191505060405180910390fd5b61019280546001600160a01b0319166001600160a01b038416908117909155604051600090600080516020614d60833981519152908290a3801561121a576000805461ff00191690555050565b6000600160ff1b8214156134a157600080fd5b600082126134af578161157a565b5060000390565b6001600160a01b0383166134fb5760405162461bcd60e51b8152600401808060200182810382526024815260200180614e406024913960400191505060405180910390fd5b6001600160a01b0382166135405760405162461bcd60e51b8152600401808060200182810382526022815260200180614c066022913960400191505060405180910390fd5b6001600160a01b03808416600081815260666020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526120c890849061410b565b6001600160a01b0383166136395760405162461bcd60e51b8152600401808060200182810382526025815260200180614e1b6025913960400191505060405180910390fd5b6001600160a01b03821661367e5760405162461bcd60e51b8152600401808060200182810382526023815260200180614b336023913960400191505060405180910390fd5b6136898383836141bc565b6136cc81604051806060016040528060268152602001614c28602691396001600160a01b038616600090815260656020526040902054919063ffffffff61374b16565b6001600160a01b038085166000908152606560205260408082209390935590841681522054613701908263ffffffff6138d516565b6001600160a01b038084166000818152606560209081526040918290209490945580518581529051919392871692600080516020614dda83398151915292918290030190a3505050565b600081848411156137da5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561379f578181015183820152602001613787565b50505050905090810190601f1680156137cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828152603360205260409020613800908263ffffffff6138c016565b1561121a5761380d61326a565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260336020526040902061386f908263ffffffff61328316565b1561121a5761387c61326a565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60006117fb836001600160a01b0384166141e9565b6000828201838110156117fb576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080600080613963670de0b6b3a7640000613957610209548861423390919063ffffffff16565b9063ffffffff61428c16565b905060006139708761214d565b90506001613984838863ffffffff6138d516565b82101561398f575060005b60006139b3670de0b6b3a764000061395761020a548761423390919063ffffffff16565b905060006139c7858363ffffffff6142ce16565b929a91995091975095505050505050565b60c95460ff16613a26576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa613a5961326a565b604080516001600160a01b039092168252519081900360200190a1565b6001600160a01b038216613ad1576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b613add600083836141bc565b606754613af0908263ffffffff6138d516565b6067556001600160a01b038216600090815260656020526040902054613b1c908263ffffffff6138d516565b6001600160a01b0383166000818152606560209081526040808320949094558351858152935192939192600080516020614dda8339815191529281900390910190a35050565b61121c613b6d61326a565b825b6001600160a01b038216613bb45760405162461bcd60e51b8152600401808060200182810382526021815260200180614dfa6021913960400191505060405180910390fd5b613bc0826000836141bc565b613c0381604051806060016040528060228152602001614b85602291396001600160a01b038516600090815260656020526040902054919063ffffffff61374b16565b6001600160a01b038316600090815260656020526040902055606754613c2f908263ffffffff6142ce16565b6067556040805182815290516000916001600160a01b03851691600080516020614dda8339815191529181900360200190a35050565b606a805460ff191660ff92909216919091179055565b60c95460ff1615613cc6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613a5961326a565b60006117fb8383614310565b600061157a82614374565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015613de75783546000198083019190810190600090879083908110613d5e57fe5b9060005260206000200154905080876000018481548110613d7b57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080613dab57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061157a565b600091505061157a565b600054610100900460ff1680613e0a5750613e0a613298565b80613e18575060005460ff16155b613e535760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff161580156124ef576000805460ff1961ff001990911661010017166001179055801561121c576000805461ff001916905550565b600054610100900460ff1680613eaa5750613eaa613298565b80613eb8575060005460ff16155b613ef35760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff16158015613f1e576000805460ff1961ff0019909116610100171660011790555b8251613f31906068906020860190614a78565b508151613f45906069906020850190614a78565b50606a805460ff1916601217905580156120c8576000805461ff0019169055505050565b600054610100900460ff1680613f825750613f82613298565b80613f90575060005460ff16155b613fcb5760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff16158015613ff6576000805460ff1961ff0019909116610100171660011790555b60c9805460ff19169055801561121c576000805461ff001916905550565b600054610100900460ff168061402d575061402d613298565b8061403b575060005460ff16155b6140765760405162461bcd60e51b815260040180806020018281038252602e815260200180614cc9602e913960400191505060405180910390fd5b600054610100900460ff161580156140a1576000805460ff1961ff0019909116610100171660011790555b6140b360006140ae61326a565b611921565b604080516a4d494e5445525f524f4c4560a81b8152905190819003600b0190206140df906140ae61326a565b604080516a5041555345525f524f4c4560a81b8152905190819003600b0190206120b6906140ae61326a565b6060614160826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166143789092919063ffffffff16565b8051909150156120c85780806020019051602081101561417f57600080fd5b50516120c85760405162461bcd60e51b815260040180806020018281038252602a815260200180614e9b602a913960400191505060405180910390fd5b816001600160a01b0381163014156141d357600080fd5b6141de84848461438f565b6113e9848484614434565b60006141f58383613d13565b61422b5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561157a565b50600061157a565b6000826142425750600061157a565b8282028284828161424f57fe5b04146117fb5760405162461bcd60e51b8152600401808060200182810382526021815260200180614cf76021913960400191505060405180910390fd5b60006117fb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614715565b60006117fb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061374b565b815460009082106143525760405162461bcd60e51b8152600401808060200182810382526022815260200180614b116022913960400191505060405180910390fd5b82600001828154811061436157fe5b9060005260206000200154905092915050565b5490565b6060614387848460008561477a565b949350505050565b61439a8383836148d6565b6001600160a01b03831660009081526101c46020526040902054600a81106143f35760405162461bcd60e51b8152600401808060200182810382526025815260200180614ca46025913960400191505060405180910390fd5b506001600160a01b03821660009081526101c46020526040902054600a81106113e9576101c65461442a908363ffffffff6138d516565b6101c65550505050565b816001600160a01b0316836001600160a01b03161415614453576120c8565b6101fe5460ff16614463576120c8565b61446c8361162e565b8061447b575061447b826115ed565b15614485576120c8565b61020854600090819015614527575061020854600019016144a4614a3b565b61020882815481106144b257fe5b90600052602060002090600702016040518060e0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481525050905060008160600151121561452557600192505b505b8180614537575061453785612992565b1561470e5761454585611760565b156145515750506120c8565b6000614575670de0b6b3a7640000613957610209548761423390919063ffffffff16565b61020b549091506001600160a01b031661460b5761459332826148e1565b610207546145a7908263ffffffff6138d516565b610207819055506145e08161020884815481106145c057fe5b9060005260206000209060070201600501546138d590919063ffffffff16565b61020883815481106145ee57fe5b9060005260206000209060070201600501819055505050506120c8565b600061462f670de0b6b3a764000061395761020a548561423390919063ffffffff16565b90506000614643838363ffffffff6142ce16565b905061464f32836148e1565b61020754614663908363ffffffff6138d516565b6102075561020b546146809032906001600160a01b0316836148eb565b6146928261020886815481106145c057fe5b61020885815481106146a057fe5b9060005260206000209060070201600501819055506146e78161020886815481106146c757fe5b9060005260206000209060070201600601546138d590919063ffffffff16565b61020885815481106146f557fe5b9060005260206000209060070201600601819055505050505b5050505050565b600081836147645760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561379f578181015183820152602001613787565b50600083858161477057fe5b0495945050505050565b6060824710156147bb5760405162461bcd60e51b8152600401808060200182810382526026815260200180614c4e6026913960400191505060405180910390fd5b6147c4856148f6565b614815576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106148545780518252601f199092019160209182019101614835565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146148b6576040519150601f19603f3d011682016040523d82523d6000602084013e6148bb565b606091505b50915091506148cb8282866148fc565b979650505050505050565b6120c8838383614962565b61121a8282613b6f565b6120c88383836149b1565b3b151590565b6060831561490b5750816117fb565b82511561491b5782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561379f578181015183820152602001613787565b61496d8383836120c8565b614975612144565b156120c85760405162461bcd60e51b815260040180806020018281038252602a815260200180614f44602a913960400191505060405180910390fd5b6001600160a01b0383166149f65760405162461bcd60e51b8152600401808060200182810382526025815260200180614e1b6025913960400191505060405180910390fd5b6001600160a01b0382166136895760405162461bcd60e51b8152600401808060200182810382526023815260200180614b336023913960400191505060405180910390fd5b6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614ab957805160ff1916838001178555614ae6565b82800160010185558215614ae6579182015b82811115614ae6578251825591602001919060010190614acb565b50614af2929150614af6565b5090565b6112b391905b80821115614af25760008155600101614afc56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332305072657365744d696e7465725061757365723a206d75737420686176652070617573657220726f6c6520746f20756e70617573654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65796f7520617265206e6f7420616c6c6f77656420746f206d6f766520636f696e732061746d496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e045524332305072657365744d696e7465725061757365723a206d7573742068617665206d696e74657220726f6c6520746f206d696e7445524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e6365ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332305072657365744d696e7465725061757365723a206d75737420686176652070617573657220726f6c6520746f2070617573655361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565646e6f7420616c6c6f77656420746f207472616e73666572206f776e657220746f206164647265737328302945524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c6645524332305061757361626c653a20746f6b656e207472616e73666572207768696c6520706175736564a2646970667358221220a7e0d4a25c7a80d64f12fefe9809ecde34e9c0641a7590724b9eb1edea99b64d64736f6c63430006090033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.