ETH Price: $3,132.24 (-0.14%)

Token

xRULER (xRULER)
 

Overview

Max Total Supply

54,553.312355988633724349 xRULER

Holders

341 (0.00%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
131.485564290836914157 xRULER

Value
$0.00
0x54Bcd31Ca05680f24F9Ad644187E06C5DeAEc649
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The yield bearing wrapping token of RULER, the governance token of Ruler Protocol.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
xRULER

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 13 : xRULER.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./interfaces/IxRULER.sol";
import "./ERC20/IERC20Permit.sol";
import "./ERC20/ERC20.sol";
import "./ERC20/IERC20.sol";
import "./utils/Ownable.sol";
import "./ERC20/ERC20Permit.sol";
import "./ERC20/SafeERC20.sol";

contract xRULER is ERC20("xRULER", "xRULER"), ERC20Permit("xRULER"), IxRULER, Ownable {
    using SafeERC20 for IERC20;
    IERC20 public immutable ruler;

    constructor(IERC20 _ruler) {
        ruler = _ruler;
    }

    function getShareValue() external view override returns (uint256) {
        return totalSupply() > 0
            ? 1e18 * ruler.balanceOf(address(this)) / totalSupply()
            : 1e18;
    }

    function deposit(uint256 _amount) public override {
        uint256 totalRuler = ruler.balanceOf(address(this));
        uint256 totalShares = totalSupply();
        // if user is first depositer, mint _amount of xRULER
        if (totalShares == 0 || totalRuler == 0) {
            _mint(msg.sender, _amount);
        } else {
            // loss of precision if totalRuler is significantly greater than totalShares
            // seeding the pool with decent amount of RULER prevents this
            uint256 myShare = _amount * totalShares / totalRuler;
            _mint(msg.sender, myShare);
        }
        ruler.safeTransferFrom(msg.sender, address(this), _amount);
        emit Deposit(msg.sender, _amount);
    }

    function depositWithPermit(uint256 _amount, Permit calldata permit) external override {
        IERC20Permit(address(ruler)).permit(
            permit.owner,
            permit.spender,
            permit.amount,
            permit.deadline,
            permit.v,
            permit.r,
            permit.s
        );
        deposit(_amount);
    }

    function withdraw(uint256 _share) external override {
        uint256 totalShares = totalSupply();
        uint256 shareInRuler = _share * ruler.balanceOf(address(this)) / totalShares;
        _burn(msg.sender, _share);
        ruler.safeTransfer(msg.sender, shareInRuler);
        emit Withdraw(msg.sender, _share, shareInRuler);
    }

    /// @notice Tokens that are accidentally sent to this contract can be recovered
    function collect(IERC20 _token) external override onlyOwner {
        if (totalSupply() > 0) {
            require(_token != ruler, "xRULER: cannot collect RULER");
        }
        uint256 balance = _token.balanceOf(address(this));
        require(balance > 0, "xRULER: _token balance is 0");
        _token.safeTransfer(msg.sender, balance);
    }
}

File 2 of 13 : IxRULER.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC20/IERC20.sol";

interface IxRULER {
    event Deposit(address user, uint256 _ruler);
    event Withdraw(address, uint256 _shares, uint256 _ruler);

    struct Permit {
        address owner;
        address spender;
        uint256 amount;
        uint256 deadline;
        uint8 v;
        bytes32 r;
        bytes32 s;
    }
    
    function getShareValue() external returns (uint256);
    function deposit(uint256 _amount) external;
    function depositWithPermit(uint256 _amount, Permit calldata permit) external;
    function withdraw(uint256 _amount) external;
    function collect(IERC20 _token) external;
}

File 3 of 13 : IERC20Permit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `amount` as the allowance of `spender` over `owner`'s tokens,
     * given `owner`'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for `permit`, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 4 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import "./IERC20.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 ERC20 is Context, IERC20 {
    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.
     */
    constructor (string memory name_, string memory symbol_) {
        _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()] - amount);
        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] + 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] - subtractedValue);
        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] - amount;
        _balances[recipient] = _balances[recipient] + 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 + amount;
        _balances[account] = _balances[account] + 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] - amount;
        _totalSupply = _totalSupply - 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 { }
}

File 5 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 6 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        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 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 Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 7 of 13 : ERC20Permit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC20.sol";
import "./IERC20Permit.sol";
import "./ECDSA.sol";
import "./EIP712.sol";
import "../utils/Counters.sol";

/**
 * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
    using Counters for Counters.Counter;

    mapping (address => Counters.Counter) private _nonces;

    // solhint-disable-next-line var-name-mixedcase
    bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {
    }

    /**
     * @dev See {IERC20Permit-permit}.
     */
    function permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual override {
        // solhint-disable-next-line not-rely-on-time
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(
            abi.encode(
                _PERMIT_TYPEHASH,
                owner,
                spender,
                amount,
                _nonces[owner].current(),
                deadline
            )
        );

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        require(signer == owner, "ERC20Permit: invalid signature");

        _nonces[owner].increment();
        _approve(owner, spender, amount);
    }

    /**
     * @dev See {IERC20Permit-nonces}.
     */
    function nonces(address owner) public view override returns (uint256) {
        return _nonces[owner].current();
    }

    /**
     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view override returns (bytes32) {
        return _domainSeparatorV4();
    }
}

File 8 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "../utils/Address.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 SafeERC20 {
    using Address for address;

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

    function safeTransferFrom(IERC20 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(IERC20 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(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender) - value;
        _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(IERC20 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 9 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @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 Context {
    function _msgSender() internal view virtual returns (address) {
        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;
    }
}

File 10 of 13 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        if (signature.length != 65) {
            revert("ECDSA: invalid signature length");
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * replicates the behavior of the
     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
     * JSON-RPC method.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}

File 11 of 13 : EIP712.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;
    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); 
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(bytes32 typeHash, bytes32 name, bytes32 version) private view returns (bytes32) {
        return keccak256(
            abi.encode(
                typeHash,
                name,
                version,
                block.chainid,
                address(this)
            )
        );
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", _domainSeparatorV4(), structHash));
    }
}

File 12 of 13 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value - 1;
    }
}

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

pragma solidity ^0.8.0;

library Address {
    /**
     * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_ruler","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_ruler","type":"uint256"}],"name":"Deposit","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":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":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"_shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ruler","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","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":"contract IERC20","name":"_token","type":"address"}],"name":"collect","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":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct IxRULER.Permit","name":"permit","type":"tuple"}],"name":"depositWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getShareValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ruler","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"_share","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101606040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b50604051620023ba380380620023ba8339810160408190526200005a91620002c6565b604051806040016040528060068152602001653c292aa622a960d11b81525080604051806040016040528060018152602001603160f81b815250604051806040016040528060068152602001653c292aa622a960d11b815250604051806040016040528060068152602001653c292aa622a960d11b8152508160039080519060200190620000ea92919062000220565b5080516200010090600490602084019062000220565b50506005805460ff1916601217905550815160208084019190912082519183019190912060c082905260e08190524660a0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f62000160818484620001e0565b6080526101005250600093506200017b9250506200021c9050565b600780546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060601b6001600160601b031916610140526200035f565b60008383834630604051602001620001fd959493929190620002f6565b6040516020818303038152906040528051906020012090509392505050565b3390565b8280546200022e9062000322565b90600052602060002090601f0160209004810192826200025257600085556200029d565b82601f106200026d57805160ff19168380011785556200029d565b828001600101855582156200029d579182015b828111156200029d57825182559160200191906001019062000280565b50620002ab929150620002af565b5090565b5b80821115620002ab5760008155600101620002b0565b600060208284031215620002d8578081fd5b81516001600160a01b0381168114620002ef578182fd5b9392505050565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b6002810460018216806200033757607f821691505b602082108114156200035957634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e05161010051610120516101405160601c611fcc620003ee60003960008181610380015281816105be01528181610692015281816107590152818161086401528181610a5101528181610aa10152610b8501526000610c1801526000611152015260006111940152600061117301526000611100015260006111290152611fcc6000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063a51dd75d1161008c578063d505accf11610066578063d505accf146102f7578063dd62ed3e1461030a578063f2fde38b1461031d5761018d565b8063a51dd75d146102c9578063a9059cbb146102d1578063b6b55f25146102e45761018d565b80638da5cb5b116100bd5780638da5cb5b1461029957806395d89b41146102ae578063a457c2d7146102b65761018d565b806370a082311461026b578063715018a61461027e5780637ecebe00146102865761018d565b8063255ae750116101455780633644e5151161011f5780633644e515146102485780633950935114610250578063437c3289146102635761018d565b8063255ae7501461020d5780632e1a7d4d14610220578063313ce567146102335761018d565b8063095ea7b311610176578063095ea7b3146101c557806318160ddd146101e557806323b872dd146101fa5761018d565b806306ec16f81461019257806306fdde03146101a7575b600080fd5b6101a56101a03660046115ce565b610330565b005b6101af610489565b6040516101bc9190611939565b60405180910390f35b6101d86101d33660046116d6565b61051c565b6040516101bc91906118a7565b6101ed610539565b6040516101bc91906118b2565b6101d8610208366004611629565b61053f565b6101a561021b366004611751565b6105b4565b6101a561022e366004611721565b610681565b61023b6107c0565b6040516101bc9190611e67565b6101ed6107c9565b6101d861025e3660046116d6565b6107d8565b6101ed610827565b6101ed6102793660046115ce565b610905565b6101a5610924565b6101ed6102943660046115ce565b6109bb565b6102a16109e2565b6040516101bc91906117f4565b6101af6109f1565b6101d86102c43660046116d6565b610a00565b6102a1610a4f565b6101d86102df3660046116d6565b610a73565b6101a56102f2366004611721565b610a87565b6101a5610305366004611669565b610bde565b6101ed6103183660046115f1565b610cfb565b6101a561032b3660046115ce565b610d26565b610338610df5565b6007546001600160a01b0390811691161461036e5760405162461bcd60e51b815260040161036590611c19565b60405180910390fd5b6000610378610539565b11156103d0577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614156103d05760405162461bcd60e51b815260040161036590611cab565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906103ff9030906004016117f4565b60206040518083038186803b15801561041757600080fd5b505afa15801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190611739565b9050600081116104715760405162461bcd60e51b815260040161036590611a00565b6104856001600160a01b0383163383610df9565b5050565b60606003805461049890611f2d565b80601f01602080910402602001604051908101604052809291908181526020018280546104c490611f2d565b80156105115780601f106104e657610100808354040283529160200191610511565b820191906000526020600020905b8154815290600101906020018083116104f457829003601f168201915b505050505090505b90565b6000610530610529610df5565b8484610e81565b50600192915050565b60025490565b600061054c848484610f35565b6105aa84610558610df5565b6001600160a01b0387166000908152600160205260408120869161057a610df5565b6001600160a01b03166001600160a01b03168152602001908152602001600020546105a59190611eea565b610e81565b5060019392505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663d505accf6105f060208401846115ce565b61060060408501602086016115ce565b6040850135606086013561061a60a0880160808901611788565b8760a001358860c001356040518863ffffffff1660e01b8152600401610646979695949392919061182c565b600060405180830381600087803b15801561066057600080fd5b505af1158015610674573d6000803e3d6000fd5b5050505061048582610a87565b600061068b610539565b90506000817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106dc91906117f4565b60206040518083038186803b1580156106f457600080fd5b505afa158015610708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072c9190611739565b6107369085611ead565b6107409190611e8d565b905061074c3384611032565b6107806001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610df9565b7ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5683384836040516107b393929190611886565b60405180910390a1505050565b60055460ff1690565b60006107d36110fc565b905090565b60006105306107e5610df5565b8484600160006107f3610df5565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546105a59190611e75565b600080610832610539565b1161084557670de0b6b3a76400006107d3565b61084d610539565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906108999030906004016117f4565b60206040518083038186803b1580156108b157600080fd5b505afa1580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e99190611739565b6108fb90670de0b6b3a7640000611ead565b6107d39190611e8d565b6001600160a01b0381166000908152602081905260409020545b919050565b61092c610df5565b6007546001600160a01b039081169116146109595760405162461bcd60e51b815260040161036590611c19565b6007546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6001600160a01b03811660009081526006602052604081206109dc906111bf565b92915050565b6007546001600160a01b031690565b60606004805461049890611f2d565b6000610530610a0d610df5565b848460016000610a1b610df5565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546105a59190611eea565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610530610a80610df5565b8484610f35565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610ad69030906004016117f4565b60206040518083038186803b158015610aee57600080fd5b505afa158015610b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b269190611739565b90506000610b32610539565b9050801580610b3f575081155b15610b5357610b4e33846111c3565b610b78565b600082610b608386611ead565b610b6a9190611e8d565b9050610b7633826111c3565b505b610bad6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333086611279565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c33846040516107b392919061186d565b83421115610bfe5760405162461bcd60e51b815260040161036590611af1565b6001600160a01b03871660009081526006602052604081207f000000000000000000000000000000000000000000000000000000000000000090899089908990610c47906111bf565b89604051602001610c5d969594939291906118bb565b6040516020818303038152906040528051906020012090506000610c80826112a0565b90506000610c90828787876112d9565b9050896001600160a01b0316816001600160a01b031614610cc35760405162461bcd60e51b815260040161036590611be2565b6001600160a01b038a166000908152600660205260409020610ce4906113d1565b610cef8a8a8a610e81565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610d2e610df5565b6007546001600160a01b03908116911614610d5b5760405162461bcd60e51b815260040161036590611c19565b6001600160a01b038116610d815760405162461bcd60e51b815260040161036590611a37565b6007546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3390565b610e7c8363a9059cbb60e01b8484604051602401610e1892919061186d565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113ee565b505050565b6001600160a01b038316610ea75760405162461bcd60e51b815260040161036590611d3f565b6001600160a01b038216610ecd5760405162461bcd60e51b815260040161036590611a94565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610f289085906118b2565b60405180910390a3505050565b6001600160a01b038316610f5b5760405162461bcd60e51b815260040161036590611ce2565b6001600160a01b038216610f815760405162461bcd60e51b8152600401610365906119a3565b610f8c838383610e7c565b6001600160a01b038316600090815260208190526040902054610fb0908290611eea565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610fe0908290611e75565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f289085906118b2565b6001600160a01b0382166110585760405162461bcd60e51b815260040161036590611c4e565b61106482600083610e7c565b6001600160a01b038216600090815260208190526040902054611088908290611eea565b6001600160a01b0383166000908152602081905260409020556002546110af908290611eea565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f09085906118b2565b60405180910390a35050565b60007f000000000000000000000000000000000000000000000000000000000000000046141561114d57507f0000000000000000000000000000000000000000000000000000000000000000610519565b6111b87f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061147d565b9050610519565b5490565b6001600160a01b0382166111e95760405162461bcd60e51b815260040161036590611e30565b6111f560008383610e7c565b806002546112039190611e75565b6002556001600160a01b03821660009081526020819052604090205461122a908290611e75565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f09085906118b2565b61129a846323b872dd60e01b858585604051602401610e1893929190611808565b50505050565b60006112aa6110fc565b826040516020016112bc9291906117be565b604051602081830303815290604052805190602001209050919050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561131b5760405162461bcd60e51b815260040161036590611b28565b8360ff16601b148061133057508360ff16601c145b61134c5760405162461bcd60e51b815260040161036590611b85565b600060018686868660405160008152602001604052604051611371949392919061191b565b6020604051602081039080840390855afa158015611393573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113c65760405162461bcd60e51b81526004016103659061196c565b90505b949350505050565b60018160000160008282546113e69190611e75565b909155505050565b6000611443826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114b79092919063ffffffff16565b805190915015610e7c57808060200190518101906114619190611701565b610e7c5760405162461bcd60e51b815260040161036590611dd3565b600083838346306040516020016114989594939291906118ef565b6040516020818303038152906040528051906020012090509392505050565b60606113c9848460008560606114cc85611584565b6114e85760405162461bcd60e51b815260040161036590611d9c565b600080866001600160a01b0316858760405161150491906117a2565b60006040518083038185875af1925050503d8060008114611541576040519150601f19603f3d011682016040523d82523d6000602084013e611546565b606091505b5091509150811561155a5791506113c99050565b80511561156a5780518082602001fd5b8360405162461bcd60e51b81526004016103659190611939565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906113c9575050151592915050565b803560ff8116811461091f57600080fd5b6000602082840312156115df578081fd5b81356115ea81611f7e565b9392505050565b60008060408385031215611603578081fd5b823561160e81611f7e565b9150602083013561161e81611f7e565b809150509250929050565b60008060006060848603121561163d578081fd5b833561164881611f7e565b9250602084013561165881611f7e565b929592945050506040919091013590565b600080600080600080600060e0888a031215611683578283fd5b873561168e81611f7e565b9650602088013561169e81611f7e565b955060408801359450606088013593506116ba608089016115bd565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156116e8578182fd5b82356116f381611f7e565b946020939093013593505050565b600060208284031215611712578081fd5b815180151581146115ea578182fd5b600060208284031215611732578081fd5b5035919050565b60006020828403121561174a578081fd5b5051919050565b600080828403610100811215611765578283fd5b8335925060e0601f198201121561177a578182fd5b506020830190509250929050565b600060208284031215611799578081fd5b6115ea826115bd565b600082516117b4818460208701611f01565b9190910192915050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611958816040850160208701611f01565b601f01601f19169190910160400192915050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201527f6573730000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f7852554c45523a205f746f6b656e2062616c616e636520697320300000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f45524332305065726d69743a206578706972656420646561646c696e65000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f7852554c45523a2063616e6e6f7420636f6c6c6563742052554c455200000000604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b60ff91909116815260200190565b60008219821115611e8857611e88611f68565b500190565b600082611ea857634e487b7160e01b81526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611ee557611ee5611f68565b500290565b600082821015611efc57611efc611f68565b500390565b60005b83811015611f1c578181015183820152602001611f04565b8381111561129a5750506000910152565b600281046001821680611f4157607f821691505b60208210811415611f6257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611f9357600080fd5b5056fea2646970667358221220dd2c30d8098ee39f7f185aa24649771610a4461709e180ce341f46a0a4e72d7464736f6c634300080000330000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f8

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806370a08231116100e3578063a51dd75d1161008c578063d505accf11610066578063d505accf146102f7578063dd62ed3e1461030a578063f2fde38b1461031d5761018d565b8063a51dd75d146102c9578063a9059cbb146102d1578063b6b55f25146102e45761018d565b80638da5cb5b116100bd5780638da5cb5b1461029957806395d89b41146102ae578063a457c2d7146102b65761018d565b806370a082311461026b578063715018a61461027e5780637ecebe00146102865761018d565b8063255ae750116101455780633644e5151161011f5780633644e515146102485780633950935114610250578063437c3289146102635761018d565b8063255ae7501461020d5780632e1a7d4d14610220578063313ce567146102335761018d565b8063095ea7b311610176578063095ea7b3146101c557806318160ddd146101e557806323b872dd146101fa5761018d565b806306ec16f81461019257806306fdde03146101a7575b600080fd5b6101a56101a03660046115ce565b610330565b005b6101af610489565b6040516101bc9190611939565b60405180910390f35b6101d86101d33660046116d6565b61051c565b6040516101bc91906118a7565b6101ed610539565b6040516101bc91906118b2565b6101d8610208366004611629565b61053f565b6101a561021b366004611751565b6105b4565b6101a561022e366004611721565b610681565b61023b6107c0565b6040516101bc9190611e67565b6101ed6107c9565b6101d861025e3660046116d6565b6107d8565b6101ed610827565b6101ed6102793660046115ce565b610905565b6101a5610924565b6101ed6102943660046115ce565b6109bb565b6102a16109e2565b6040516101bc91906117f4565b6101af6109f1565b6101d86102c43660046116d6565b610a00565b6102a1610a4f565b6101d86102df3660046116d6565b610a73565b6101a56102f2366004611721565b610a87565b6101a5610305366004611669565b610bde565b6101ed6103183660046115f1565b610cfb565b6101a561032b3660046115ce565b610d26565b610338610df5565b6007546001600160a01b0390811691161461036e5760405162461bcd60e51b815260040161036590611c19565b60405180910390fd5b6000610378610539565b11156103d0577f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f86001600160a01b0316816001600160a01b031614156103d05760405162461bcd60e51b815260040161036590611cab565b6040516370a0823160e01b81526000906001600160a01b038316906370a08231906103ff9030906004016117f4565b60206040518083038186803b15801561041757600080fd5b505afa15801561042b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044f9190611739565b9050600081116104715760405162461bcd60e51b815260040161036590611a00565b6104856001600160a01b0383163383610df9565b5050565b60606003805461049890611f2d565b80601f01602080910402602001604051908101604052809291908181526020018280546104c490611f2d565b80156105115780601f106104e657610100808354040283529160200191610511565b820191906000526020600020905b8154815290600101906020018083116104f457829003601f168201915b505050505090505b90565b6000610530610529610df5565b8484610e81565b50600192915050565b60025490565b600061054c848484610f35565b6105aa84610558610df5565b6001600160a01b0387166000908152600160205260408120869161057a610df5565b6001600160a01b03166001600160a01b03168152602001908152602001600020546105a59190611eea565b610e81565b5060019392505050565b6001600160a01b037f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f81663d505accf6105f060208401846115ce565b61060060408501602086016115ce565b6040850135606086013561061a60a0880160808901611788565b8760a001358860c001356040518863ffffffff1660e01b8152600401610646979695949392919061182c565b600060405180830381600087803b15801561066057600080fd5b505af1158015610674573d6000803e3d6000fd5b5050505061048582610a87565b600061068b610539565b90506000817f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f86001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016106dc91906117f4565b60206040518083038186803b1580156106f457600080fd5b505afa158015610708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072c9190611739565b6107369085611ead565b6107409190611e8d565b905061074c3384611032565b6107806001600160a01b037f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f8163383610df9565b7ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5683384836040516107b393929190611886565b60405180910390a1505050565b60055460ff1690565b60006107d36110fc565b905090565b60006105306107e5610df5565b8484600160006107f3610df5565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546105a59190611e75565b600080610832610539565b1161084557670de0b6b3a76400006107d3565b61084d610539565b6040516370a0823160e01b81526001600160a01b037f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f816906370a08231906108999030906004016117f4565b60206040518083038186803b1580156108b157600080fd5b505afa1580156108c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e99190611739565b6108fb90670de0b6b3a7640000611ead565b6107d39190611e8d565b6001600160a01b0381166000908152602081905260409020545b919050565b61092c610df5565b6007546001600160a01b039081169116146109595760405162461bcd60e51b815260040161036590611c19565b6007546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6001600160a01b03811660009081526006602052604081206109dc906111bf565b92915050565b6007546001600160a01b031690565b60606004805461049890611f2d565b6000610530610a0d610df5565b848460016000610a1b610df5565b6001600160a01b03908116825260208083019390935260409182016000908120918b16815292529020546105a59190611eea565b7f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f881565b6000610530610a80610df5565b8484610f35565b6040516370a0823160e01b81526000906001600160a01b037f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f816906370a0823190610ad69030906004016117f4565b60206040518083038186803b158015610aee57600080fd5b505afa158015610b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b269190611739565b90506000610b32610539565b9050801580610b3f575081155b15610b5357610b4e33846111c3565b610b78565b600082610b608386611ead565b610b6a9190611e8d565b9050610b7633826111c3565b505b610bad6001600160a01b037f0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f816333086611279565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c33846040516107b392919061186d565b83421115610bfe5760405162461bcd60e51b815260040161036590611af1565b6001600160a01b03871660009081526006602052604081207f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c990899089908990610c47906111bf565b89604051602001610c5d969594939291906118bb565b6040516020818303038152906040528051906020012090506000610c80826112a0565b90506000610c90828787876112d9565b9050896001600160a01b0316816001600160a01b031614610cc35760405162461bcd60e51b815260040161036590611be2565b6001600160a01b038a166000908152600660205260409020610ce4906113d1565b610cef8a8a8a610e81565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610d2e610df5565b6007546001600160a01b03908116911614610d5b5760405162461bcd60e51b815260040161036590611c19565b6001600160a01b038116610d815760405162461bcd60e51b815260040161036590611a37565b6007546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3390565b610e7c8363a9059cbb60e01b8484604051602401610e1892919061186d565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526113ee565b505050565b6001600160a01b038316610ea75760405162461bcd60e51b815260040161036590611d3f565b6001600160a01b038216610ecd5760405162461bcd60e51b815260040161036590611a94565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610f289085906118b2565b60405180910390a3505050565b6001600160a01b038316610f5b5760405162461bcd60e51b815260040161036590611ce2565b6001600160a01b038216610f815760405162461bcd60e51b8152600401610365906119a3565b610f8c838383610e7c565b6001600160a01b038316600090815260208190526040902054610fb0908290611eea565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610fe0908290611e75565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f289085906118b2565b6001600160a01b0382166110585760405162461bcd60e51b815260040161036590611c4e565b61106482600083610e7c565b6001600160a01b038216600090815260208190526040902054611088908290611eea565b6001600160a01b0383166000908152602081905260409020556002546110af908290611eea565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f09085906118b2565b60405180910390a35050565b60007f000000000000000000000000000000000000000000000000000000000000000146141561114d57507f676b1e610dcee5de1fe427249d3241dc6cac728edf7e62d62b38e4854d9647ff610519565b6111b87f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f96373db80e4d53b858dd1d8dd4fba188042842532fa4187674161628fb01e8377fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc661147d565b9050610519565b5490565b6001600160a01b0382166111e95760405162461bcd60e51b815260040161036590611e30565b6111f560008383610e7c565b806002546112039190611e75565b6002556001600160a01b03821660009081526020819052604090205461122a908290611e75565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906110f09085906118b2565b61129a846323b872dd60e01b858585604051602401610e1893929190611808565b50505050565b60006112aa6110fc565b826040516020016112bc9291906117be565b604051602081830303815290604052805190602001209050919050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561131b5760405162461bcd60e51b815260040161036590611b28565b8360ff16601b148061133057508360ff16601c145b61134c5760405162461bcd60e51b815260040161036590611b85565b600060018686868660405160008152602001604052604051611371949392919061191b565b6020604051602081039080840390855afa158015611393573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113c65760405162461bcd60e51b81526004016103659061196c565b90505b949350505050565b60018160000160008282546113e69190611e75565b909155505050565b6000611443826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114b79092919063ffffffff16565b805190915015610e7c57808060200190518101906114619190611701565b610e7c5760405162461bcd60e51b815260040161036590611dd3565b600083838346306040516020016114989594939291906118ef565b6040516020818303038152906040528051906020012090509392505050565b60606113c9848460008560606114cc85611584565b6114e85760405162461bcd60e51b815260040161036590611d9c565b600080866001600160a01b0316858760405161150491906117a2565b60006040518083038185875af1925050503d8060008114611541576040519150601f19603f3d011682016040523d82523d6000602084013e611546565b606091505b5091509150811561155a5791506113c99050565b80511561156a5780518082602001fd5b8360405162461bcd60e51b81526004016103659190611939565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906113c9575050151592915050565b803560ff8116811461091f57600080fd5b6000602082840312156115df578081fd5b81356115ea81611f7e565b9392505050565b60008060408385031215611603578081fd5b823561160e81611f7e565b9150602083013561161e81611f7e565b809150509250929050565b60008060006060848603121561163d578081fd5b833561164881611f7e565b9250602084013561165881611f7e565b929592945050506040919091013590565b600080600080600080600060e0888a031215611683578283fd5b873561168e81611f7e565b9650602088013561169e81611f7e565b955060408801359450606088013593506116ba608089016115bd565b925060a0880135915060c0880135905092959891949750929550565b600080604083850312156116e8578182fd5b82356116f381611f7e565b946020939093013593505050565b600060208284031215611712578081fd5b815180151581146115ea578182fd5b600060208284031215611732578081fd5b5035919050565b60006020828403121561174a578081fd5b5051919050565b600080828403610100811215611765578283fd5b8335925060e0601f198201121561177a578182fd5b506020830190509250929050565b600060208284031215611799578081fd5b6115ea826115bd565b600082516117b4818460208701611f01565b9190910192915050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611958816040850160208701611f01565b601f01601f19169190910160400192915050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201527f6573730000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f7852554c45523a205f746f6b656e2062616c616e636520697320300000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f45524332305065726d69743a206578706972656420646561646c696e65000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601c908201527f7852554c45523a2063616e6e6f7420636f6c6c6563742052554c455200000000604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b60ff91909116815260200190565b60008219821115611e8857611e88611f68565b500190565b600082611ea857634e487b7160e01b81526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611ee557611ee5611f68565b500290565b600082821015611efc57611efc611f68565b500390565b60005b83811015611f1c578181015183820152602001611f04565b8381111561129a5750506000910152565b600281046001821680611f4157607f821691505b60208210811415611f6257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611f9357600080fd5b5056fea2646970667358221220dd2c30d8098ee39f7f185aa24649771610a4461709e180ce341f46a0a4e72d7464736f6c63430008000033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f8

-----Decoded View---------------
Arg [0] : _ruler (address): 0x2aECCB42482cc64E087b6D2e5Da39f5A7A7001f8

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002aeccb42482cc64e087b6d2e5da39f5a7a7001f8


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.