ETH Price: $3,647.71 (+1.93%)

Token

ERC20 ***
 

Overview

Max Total Supply

0 ERC20 ***

Holders

1

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 6 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
YVaultV4AssetProxy

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 7500 runs

Other Settings:
default evmVersion
File 1 of 9 : YVaultV4AssetProxy.sol
// SPDX-License-Identifier: Apache-2.0
// WARNING: This has been validated for yearn vaults version 4.2, do not use for lower or higher
//          versions without review
pragma solidity ^0.8.0;

import "./interfaces/IERC20.sol";
import "./interfaces/IYearnVault.sol";
import "./YVaultAssetProxy.sol";

/// @author Element Finance
/// @title Yearn Vault Asset Proxy
contract YVaultV4AssetProxy is YVaultAssetProxy {
    /// @notice Constructs this contract by calling into the super constructor
    /// @param vault_ The yearn v2 vault, must be version 0.4.2
    /// @param _token The underlying token.
    ///               This token should revert in the event of a transfer failure.
    /// @param _name The name of the token created
    /// @param _symbol The symbol of the token created
    constructor(
        address vault_,
        IERC20 _token,
        string memory _name,
        string memory _symbol
    ) YVaultAssetProxy(vault_, _token, _name, _symbol) {}

    /// @notice Overrides the version checking to check for 0.4.2 instead
    /// @param _vault The yearn vault address
    /// @dev This function can be overridden by an inheriting upgrade contract
    function _versionCheck(IYearnVault _vault) internal view override {
        string memory apiVersion = _vault.apiVersion();
        require(
            _stringEq(apiVersion, "0.4.2") || _stringEq(apiVersion, "0.4.3"),
            "Unsupported Version"
        );
    }

    /// @notice Converts an input of shares to it's output of underlying or an input
    ///      of underlying to an output of shares, using yearn 's deposit pricing
    /// @param amount the amount of input, shares if 'sharesIn == true' underlying if not
    /// @param sharesIn true to convert from yearn shares to underlying, false to convert from
    ///                 underlying to yearn shares
    /// @dev WARNING - Fails for 0.3.2-0.3.5, please only use with 0.4.2
    /// @return The converted output of either underlying or yearn shares
    function _yearnDepositConverter(uint256 amount, bool sharesIn)
        internal
        view
        override
        returns (uint256)
    {
        // Load the yearn price per share
        uint256 pricePerShare = vault.pricePerShare();
        // If we are converted shares to underlying
        if (sharesIn) {
            // If the input is shares we multiply by the price per share
            return (pricePerShare * amount) / 10**vaultDecimals;
        } else {
            // If the input is in underlying we divide by price per share
            return (amount * 10**vaultDecimals) / (pricePerShare + 1);
        }
    }
}

File 2 of 9 : IERC20.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

interface IERC20 {
    function symbol() external view returns (string memory);

    function balanceOf(address account) external view returns (uint256);

    // Note this is non standard but nearly all ERC20 have exposed decimal functions
    function decimals() external view returns (uint8);

    function transfer(address recipient, uint256 amount)
        external
        returns (bool);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

File 3 of 9 : IYearnVault.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IYearnVault is IERC20 {
    function deposit(uint256, address) external returns (uint256);

    function withdraw(
        uint256,
        address,
        uint256
    ) external returns (uint256);

    // Returns the amount of underlying per each unit [1e18] of yearn shares
    function pricePerShare() external view returns (uint256);

    function governance() external view returns (address);

    function setDepositLimit(uint256) external;

    function totalSupply() external view returns (uint256);

    function totalAssets() external view returns (uint256);

    function apiVersion() external view returns (string memory);
}

File 4 of 9 : YVaultAssetProxy.sol
// SPDX-License-Identifier: Apache-2.0
// WARNING: This has been validated for yearn vaults up to version 0.2.11.
// Using this code with any later version can be unsafe.
pragma solidity ^0.8.0;

import "./interfaces/IERC20.sol";
import "./interfaces/IYearnVault.sol";
import "./WrappedPosition.sol";

/// @author Element Finance
/// @title Yearn Vault v1 Asset Proxy
contract YVaultAssetProxy is WrappedPosition {
    IYearnVault public immutable vault;
    uint8 public immutable vaultDecimals;

    // This contract allows deposits to a reserve which can
    // be used to short circuit the deposit process and save gas

    // The following mapping tracks those non-transferable deposits
    mapping(address => uint256) public reserveBalances;
    // These variables store the token balances of this contract and
    // should be packed by solidity into a single slot.
    uint128 public reserveUnderlying;
    uint128 public reserveShares;
    // This is the total amount of reserve deposits
    uint256 public reserveSupply;

    /// @notice Constructs this contract and stores needed data
    /// @param vault_ The yearn v2 vault
    /// @param _token The underlying token.
    ///               This token should revert in the event of a transfer failure.
    /// @param _name The name of the token created
    /// @param _symbol The symbol of the token created
    constructor(
        address vault_,
        IERC20 _token,
        string memory _name,
        string memory _symbol
    ) WrappedPosition(_token, _name, _symbol) {
        vault = IYearnVault(vault_);
        _token.approve(vault_, type(uint256).max);
        uint8 localVaultDecimals = IERC20(vault_).decimals();
        vaultDecimals = localVaultDecimals;
        require(
            uint8(_token.decimals()) == localVaultDecimals,
            "Inconsistent decimals"
        );
        // We check that this is a compatible yearn version
        _versionCheck(IYearnVault(vault_));
    }

    /// @notice An override-able version checking function, reverts if the vault has the wrong version
    /// @param _vault The yearn vault address
    /// @dev This function can be overridden by an inheriting upgrade contract
    function _versionCheck(IYearnVault _vault) internal view virtual {
        string memory apiVersion = _vault.apiVersion();
        require(
            _stringEq(apiVersion, "0.3.0") ||
                _stringEq(apiVersion, "0.3.1") ||
                _stringEq(apiVersion, "0.3.2") ||
                _stringEq(apiVersion, "0.3.3") ||
                _stringEq(apiVersion, "0.3.4") ||
                _stringEq(apiVersion, "0.3.5"),
            "Unsupported Version"
        );
    }

    /// @notice checks if two strings are equal
    /// @param s1 string one
    /// @param s2 string two
    /// @return bool whether they are equal
    function _stringEq(string memory s1, string memory s2)
        internal
        pure
        returns (bool)
    {
        bytes32 h1 = keccak256(abi.encodePacked(s1));
        bytes32 h2 = keccak256(abi.encodePacked(s2));
        return (h1 == h2);
    }

    /// @notice This function allows a user to deposit to the reserve
    ///      Note - there's no incentive to do so. You could earn some
    ///      interest but less interest than yearn. All deposits use
    ///      the underlying token.
    /// @param _amount The amount of underlying to deposit
    function reserveDeposit(uint256 _amount) external {
        // Transfer from user, note variable 'token' is the immutable
        // inherited from the abstract WrappedPosition contract.
        token.transferFrom(msg.sender, address(this), _amount);
        // Load the reserves
        (uint256 localUnderlying, uint256 localShares) = _getReserves();
        // Calculate the total reserve value
        uint256 totalValue = localUnderlying;
        totalValue += _yearnDepositConverter(localShares, true);
        // If this is the first deposit we need different logic
        uint256 localReserveSupply = reserveSupply;
        uint256 mintAmount;
        if (localReserveSupply == 0) {
            // If this is the first mint the tokens are exactly the supplied underlying
            mintAmount = _amount;
        } else {
            // Otherwise we mint the proportion that this increases the value held by this contract
            mintAmount = (localReserveSupply * _amount) / totalValue;
        }

        // This hack means that the contract will never have zero balance of underlying
        // which levels the gas expenditure of the transfer to this contract. Permanently locks
        // the smallest possible unit of the underlying.
        if (localUnderlying == 0 && localShares == 0) {
            _amount -= 1;
        }
        // Set the reserves that this contract has more underlying
        _setReserves(localUnderlying + _amount, localShares);
        // Note that the sender has deposited and increase reserveSupply
        reserveBalances[msg.sender] += mintAmount;
        reserveSupply = localReserveSupply + mintAmount;
    }

    /// @notice This function allows a holder of reserve balance to withdraw their share
    /// @param _amount The number of reserve shares to withdraw
    function reserveWithdraw(uint256 _amount) external {
        // Remove 'amount' from the balances of the sender. Because this is 8.0 it will revert on underflow
        reserveBalances[msg.sender] -= _amount;
        // We load the reserves
        (uint256 localUnderlying, uint256 localShares) = _getReserves();
        uint256 localReserveSupply = reserveSupply;
        // Then we calculate the proportion of the shares to redeem
        uint256 userShares = (localShares * _amount) / localReserveSupply;
        // First we withdraw the proportion of shares tokens belonging to the caller
        uint256 freedUnderlying = vault.withdraw(userShares, address(this), 0);
        // We calculate the amount of underlying to send
        uint256 userUnderlying = (localUnderlying * _amount) /
            localReserveSupply;

        // We then store the updated reserve amounts
        _setReserves(
            localUnderlying - userUnderlying,
            localShares - userShares
        );
        // We note a reduction in local supply
        reserveSupply = localReserveSupply - _amount;

        // We send the redemption underlying to the caller
        // Note 'token' is an immutable from shares
        token.transfer(msg.sender, freedUnderlying + userUnderlying);
    }

    /// @notice Makes the actual deposit into the yearn vault
    ///         Tries to use the local balances before depositing
    /// @return Tuple (the shares minted, amount underlying used)
    function _deposit() internal override returns (uint256, uint256) {
        //Load reserves
        (uint256 localUnderlying, uint256 localShares) = _getReserves();
        // Get the amount deposited
        uint256 amount = token.balanceOf(address(this)) - localUnderlying;
        // fixing for the fact there's an extra underlying
        if (localUnderlying != 0 || localShares != 0) {
            amount -= 1;
        }
        // Calculate the amount of shares the amount deposited is worth
        uint256 neededShares = _yearnDepositConverter(amount, false);

        // If we have enough in local reserves we don't call out for deposits
        if (localShares > neededShares) {
            // We set the reserves
            _setReserves(localUnderlying + amount, localShares - neededShares);
            // And then we short circuit execution and return
            return (neededShares, amount);
        }
        // Deposit and get the shares that were minted to this
        uint256 shares = vault.deposit(localUnderlying + amount, address(this));

        // calculate the user share
        uint256 userShare = (amount * shares) / (localUnderlying + amount);

        // We set the reserves
        _setReserves(0, localShares + shares - userShare);
        // Return the amount of shares the user has produced, and the amount used for it.
        return (userShare, amount);
    }

    /// @notice Withdraw the number of shares and will short circuit if it can
    /// @param _shares The number of shares to withdraw
    /// @param _destination The address to send the output funds
    /// @param _underlyingPerShare The possibly precomputed underlying per share
    function _withdraw(
        uint256 _shares,
        address _destination,
        uint256 _underlyingPerShare
    ) internal override returns (uint256) {
        // If we do not have it we load the price per share
        if (_underlyingPerShare == 0) {
            _underlyingPerShare = _pricePerShare();
        }
        // We load the reserves
        (uint256 localUnderlying, uint256 localShares) = _getReserves();
        // Calculate the amount of shares the amount deposited is worth
        uint256 needed = (_shares * _pricePerShare()) / (10**vaultDecimals);
        // If we have enough underlying we don't have to actually withdraw
        if (needed < localUnderlying) {
            // We set the reserves to be the new reserves
            _setReserves(localUnderlying - needed, localShares + _shares);
            // Then transfer needed underlying to the destination
            // 'token' is an immutable in WrappedPosition
            token.transfer(_destination, needed);
            // Short circuit and return
            return (needed);
        }
        // If we don't have enough local reserves we do the actual withdraw
        // Withdraws shares from the vault. Max loss is set at 100% as
        // the minimum output value is enforced by the calling
        // function in the WrappedPosition contract.
        uint256 amountReceived = vault.withdraw(
            _shares + localShares,
            address(this),
            10000
        );

        // calculate the user share
        uint256 userShare = (_shares * amountReceived) /
            (localShares + _shares);

        _setReserves(localUnderlying + amountReceived - userShare, 0);
        // Transfer the underlying to the destination 'token' is an immutable in WrappedPosition
        token.transfer(_destination, userShare);
        // Return the amount of underlying
        return userShare;
    }

    /// @notice Get the underlying amount of tokens per shares given
    /// @param _amount The amount of shares you want to know the value of
    /// @return Value of shares in underlying token
    function _underlying(uint256 _amount)
        internal
        view
        override
        returns (uint256)
    {
        return (_amount * _pricePerShare()) / (10**vaultDecimals);
    }

    /// @notice Get the price per share in the vault
    /// @return The price per share in units of underlying;
    function _pricePerShare() internal view returns (uint256) {
        return vault.pricePerShare();
    }

    /// @notice Function to reset approvals for the proxy
    function approve() external {
        token.approve(address(vault), 0);
        token.approve(address(vault), type(uint256).max);
    }

    /// @notice Helper to get the reserves with one sload
    /// @return Tuple (reserve underlying, reserve shares)
    function _getReserves() internal view returns (uint256, uint256) {
        return (uint256(reserveUnderlying), uint256(reserveShares));
    }

    /// @notice Helper to set reserves using one sstore
    /// @param _newReserveUnderlying The new reserve of underlying
    /// @param _newReserveShares The new reserve of wrapped position shares
    function _setReserves(
        uint256 _newReserveUnderlying,
        uint256 _newReserveShares
    ) internal {
        reserveUnderlying = uint128(_newReserveUnderlying);
        reserveShares = uint128(_newReserveShares);
    }

    /// @notice Converts an input of shares to it's output of underlying or an input
    ///      of underlying to an output of shares, using yearn 's deposit pricing
    /// @param amount the amount of input, shares if 'sharesIn == true' underlying if not
    /// @param sharesIn true to convert from yearn shares to underlying, false to convert from
    ///                 underlying to yearn shares
    /// @dev WARNING - In yearn 0.3.1 - 0.3.5 this is an exact match for deposit logic
    ///                but not withdraw logic in versions 0.3.2-0.3.5. In versions 0.4.0+
    ///                it is not a match for yearn deposit ratios.
    /// @return The converted output of either underlying or yearn shares
    function _yearnDepositConverter(uint256 amount, bool sharesIn)
        internal
        view
        virtual
        returns (uint256)
    {
        // Load the yearn total supply and assets
        uint256 yearnTotalSupply = vault.totalSupply();
        uint256 yearnTotalAssets = vault.totalAssets();
        // If we are converted shares to underlying
        if (sharesIn) {
            // then we get the fraction of yearn shares this is and multiply by assets
            return (yearnTotalAssets * amount) / yearnTotalSupply;
        } else {
            // otherwise we figure out the faction of yearn assets this is and see how
            // many assets we get out.
            return (yearnTotalSupply * amount) / yearnTotalAssets;
        }
    }
}

File 5 of 9 : WrappedPosition.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./interfaces/IERC20.sol";
import "./interfaces/IWETH.sol";
import "./interfaces/IWrappedPosition.sol";

import "./libraries/ERC20Permit.sol";

/// @author Element Finance
/// @title Wrapped Position Core
abstract contract WrappedPosition is ERC20Permit, IWrappedPosition {
    IERC20 public immutable override token;

    /// @notice Constructs this contract
    /// @param _token The underlying token.
    ///               This token should revert in the event of a transfer failure.
    /// @param _name the name of this contract
    /// @param _symbol the symbol for this contract
    constructor(
        IERC20 _token,
        string memory _name,
        string memory _symbol
    ) ERC20Permit(_name, _symbol) {
        token = _token;
        // We set our decimals to be the same as the underlying
        _setupDecimals(_token.decimals());
    }

    /// We expect that the following logic will be present in an integration implementation
    /// which inherits from this contract

    /// @dev Makes the actual deposit into the 'vault'
    /// @return Tuple (shares minted, amount underlying used)
    function _deposit() internal virtual returns (uint256, uint256);

    /// @dev Makes the actual withdraw from the 'vault'
    /// @return returns the amount produced
    function _withdraw(
        uint256,
        address,
        uint256
    ) internal virtual returns (uint256);

    /// @dev Converts between an internal balance representation
    ///      and underlying tokens.
    /// @return The amount of underlying the input is worth
    function _underlying(uint256) internal view virtual returns (uint256);

    /// @notice Get the underlying balance of an address
    /// @param _who The address to query
    /// @return The underlying token balance of the address
    function balanceOfUnderlying(address _who)
        external
        view
        override
        returns (uint256)
    {
        return _underlying(balanceOf[_who]);
    }

    /// @notice Returns the amount of the underlying asset a certain amount of shares is worth
    /// @param _shares Shares to calculate underlying value for
    /// @return The value of underlying assets for the given shares
    function getSharesToUnderlying(uint256 _shares)
        external
        view
        override
        returns (uint256)
    {
        return _underlying(_shares);
    }

    /// @notice Entry point to deposit tokens into the Wrapped Position contract
    ///         Transfers tokens on behalf of caller so the caller must set
    ///         allowance on the contract prior to call.
    /// @param _amount The amount of underlying tokens to deposit
    /// @param _destination The address to mint to
    /// @return Returns the number of Wrapped Position tokens minted
    function deposit(address _destination, uint256 _amount)
        external
        override
        returns (uint256)
    {
        // Send tokens to the proxy
        token.transferFrom(msg.sender, address(this), _amount);
        // Calls our internal deposit function
        (uint256 shares, ) = _deposit();
        // Mint them internal ERC20 tokens corresponding to the deposit
        _mint(_destination, shares);
        return shares;
    }

    /// @notice Entry point to deposit tokens into the Wrapped Position contract
    ///         Assumes the tokens were transferred before this was called
    /// @param _destination the destination of this deposit
    /// @return Returns (WP tokens minted, used underlying,
    ///                  senders WP balance before mint)
    /// @dev WARNING - The call which funds this method MUST be in the same transaction
    //                 as the call to this method or you risk loss of funds
    function prefundedDeposit(address _destination)
        external
        override
        returns (
            uint256,
            uint256,
            uint256
        )
    {
        // Calls our internal deposit function
        (uint256 shares, uint256 usedUnderlying) = _deposit();

        uint256 balanceBefore = balanceOf[_destination];

        // Mint them internal ERC20 tokens corresponding to the deposit
        _mint(_destination, shares);
        return (shares, usedUnderlying, balanceBefore);
    }

    /// @notice Exit point to withdraw tokens from the Wrapped Position contract
    /// @param _destination The address which is credited with tokens
    /// @param _shares The amount of shares the user is burning to withdraw underlying
    /// @param _minUnderlying The min output the caller expects
    /// @return The amount of underlying transferred to the destination
    function withdraw(
        address _destination,
        uint256 _shares,
        uint256 _minUnderlying
    ) public override returns (uint256) {
        return _positionWithdraw(_destination, _shares, _minUnderlying, 0);
    }

    /// @notice This function burns enough tokens from the sender to send _amount
    ///          of underlying to the _destination.
    /// @param _destination The address to send the output to
    /// @param _amount The amount of underlying to try to redeem for
    /// @param _minUnderlying The minium underlying to receive
    /// @return The amount of underlying released, and shares used
    function withdrawUnderlying(
        address _destination,
        uint256 _amount,
        uint256 _minUnderlying
    ) external override returns (uint256, uint256) {
        // First we load the number of underlying per unit of Wrapped Position token
        uint256 oneUnit = 10**decimals;
        uint256 underlyingPerShare = _underlying(oneUnit);
        // Then we calculate the number of shares we need
        uint256 shares = (_amount * oneUnit) / underlyingPerShare;
        // Using this we call the normal withdraw function
        uint256 underlyingReceived = _positionWithdraw(
            _destination,
            shares,
            _minUnderlying,
            underlyingPerShare
        );
        return (underlyingReceived, shares);
    }

    /// @notice This internal function allows the caller to provide a precomputed 'underlyingPerShare'
    ///         so that we can avoid calling it again in the internal function
    /// @param _destination The destination to send the output to
    /// @param _shares The number of shares to withdraw
    /// @param _minUnderlying The min amount of output to produce
    /// @param _underlyingPerShare The precomputed shares per underlying
    /// @return The amount of underlying released
    function _positionWithdraw(
        address _destination,
        uint256 _shares,
        uint256 _minUnderlying,
        uint256 _underlyingPerShare
    ) internal returns (uint256) {
        // Burn users shares
        _burn(msg.sender, _shares);

        // Withdraw that many shares from the vault
        uint256 withdrawAmount = _withdraw(
            _shares,
            _destination,
            _underlyingPerShare
        );

        // We revert if this call doesn't produce enough underlying
        // This security feature is useful in some edge cases
        require(withdrawAmount >= _minUnderlying, "Not enough underlying");
        return withdrawAmount;
    }
}

File 6 of 9 : IWETH.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint256 wad) external;

    event Deposit(address indexed dst, uint256 wad);
    event Withdrawal(address indexed src, uint256 wad);
}

File 7 of 9 : IWrappedPosition.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "./IERC20Permit.sol";
import "./IERC20.sol";

interface IWrappedPosition is IERC20Permit {
    function token() external view returns (IERC20);

    function balanceOfUnderlying(address who) external view returns (uint256);

    function getSharesToUnderlying(uint256 shares)
        external
        view
        returns (uint256);

    function deposit(address sender, uint256 amount) external returns (uint256);

    function withdraw(
        address sender,
        uint256 _shares,
        uint256 _minUnderlying
    ) external returns (uint256);

    function withdrawUnderlying(
        address _destination,
        uint256 _amount,
        uint256 _minUnderlying
    ) external returns (uint256, uint256);

    function prefundedDeposit(address _destination)
        external
        returns (
            uint256,
            uint256,
            uint256
        );
}

File 8 of 9 : ERC20Permit.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.0;

import "../interfaces/IERC20Permit.sol";

// This default erc20 library is designed for max efficiency and security.
// WARNING: By default it does not include totalSupply which breaks the ERC20 standard
//          to use a fully standard compliant ERC20 use 'ERC20PermitWithSupply"
abstract contract ERC20Permit is IERC20Permit {
    // --- ERC20 Data ---
    // The name of the erc20 token
    string public name;
    // The symbol of the erc20 token
    string public override symbol;
    // The decimals of the erc20 token, should default to 18 for new tokens
    uint8 public override decimals;

    // A mapping which tracks user token balances
    mapping(address => uint256) public override balanceOf;
    // A mapping which tracks which addresses a user allows to move their tokens
    mapping(address => mapping(address => uint256)) public override allowance;
    // A mapping which tracks the permit signature nonces for users
    mapping(address => uint256) public override nonces;

    // --- EIP712 niceties ---
    // solhint-disable-next-line var-name-mixedcase
    bytes32 public override DOMAIN_SEPARATOR;
    // bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH =
        0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;

    /// @notice Initializes the erc20 contract
    /// @param name_ the value 'name' will be set to
    /// @param symbol_ the value 'symbol' will be set to
    /// @dev decimals default to 18 and must be reset by an inheriting contract for
    ///      non standard decimal values
    constructor(string memory name_, string memory symbol_) {
        // Set the state variables
        name = name_;
        symbol = symbol_;
        decimals = 18;

        // By setting these addresses to 0 attempting to execute a transfer to
        // either of them will revert. This is a gas efficient way to prevent
        // a common user mistake where they transfer to the token address.
        // These values are not considered 'real' tokens and so are not included
        // in 'total supply' which only contains minted tokens.
        balanceOf[address(0)] = type(uint256).max;
        balanceOf[address(this)] = type(uint256).max;

        // Optional extra state manipulation
        _extraConstruction();

        // Computes the EIP 712 domain separator which prevents user signed messages for
        // this contract to be replayed in other contracts.
        // https://eips.ethereum.org/EIPS/eip-712
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256(
                    "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
                ),
                keccak256(bytes(name)),
                keccak256(bytes("1")),
                block.chainid,
                address(this)
            )
        );
    }

    /// @notice An optional override function to execute and change state before immutable assignment
    function _extraConstruction() internal virtual {}

    // --- Token ---
    /// @notice Allows a token owner to send tokens to another address
    /// @param recipient The address which will be credited with the tokens
    /// @param amount The amount user token to send
    /// @return returns true on success, reverts on failure so cannot return false.
    /// @dev transfers to this contract address or 0 will fail
    function transfer(address recipient, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        // We forward this call to 'transferFrom'
        return transferFrom(msg.sender, recipient, amount);
    }

    /// @notice Transfers an amount of erc20 from a spender to a receipt
    /// @param spender The source of the ERC20 tokens
    /// @param recipient The destination of the ERC20 tokens
    /// @param amount the number of tokens to send
    /// @return returns true on success and reverts on failure
    /// @dev will fail transfers which send funds to this contract or 0
    function transferFrom(
        address spender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        // Load balance and allowance
        uint256 balance = balanceOf[spender];
        require(balance >= amount, "ERC20: insufficient-balance");
        // We potentially have to change allowances
        if (spender != msg.sender) {
            // Loading the allowance in the if block prevents vanilla transfers
            // from paying for the sload.
            uint256 allowed = allowance[spender][msg.sender];
            // If the allowance is max we do not reduce it
            // Note - This means that max allowances will be more gas efficient
            // by not requiring a sstore on 'transferFrom'
            if (allowed != type(uint256).max) {
                require(allowed >= amount, "ERC20: insufficient-allowance");
                allowance[spender][msg.sender] = allowed - amount;
            }
        }
        // Update the balances
        balanceOf[spender] = balance - amount;
        // Note - In the constructor we initialize the 'balanceOf' of address 0 and
        //        the token address to uint256.max and so in 8.0 transfers to those
        //        addresses revert on this step.
        balanceOf[recipient] = balanceOf[recipient] + amount;
        // Emit the needed event
        emit Transfer(spender, recipient, amount);
        // Return that this call succeeded
        return true;
    }

    /// @notice This internal minting function allows inheriting contracts
    ///         to mint tokens in the way they wish.
    /// @param account the address which will receive the token.
    /// @param amount the amount of token which they will receive
    /// @dev This function is virtual so that it can be overridden, if you
    ///      are reviewing this contract for security you should ensure to
    ///      check for overrides
    function _mint(address account, uint256 amount) internal virtual {
        // Add tokens to the account
        balanceOf[account] = balanceOf[account] + amount;
        // Emit an event to track the minting
        emit Transfer(address(0), account, amount);
    }

    /// @notice This internal burning function allows inheriting contracts to
    ///         burn tokens in the way they see fit.
    /// @param account the account to remove tokens from
    /// @param amount  the amount of tokens to remove
    /// @dev This function is virtual so that it can be overridden, if you
    ///      are reviewing this contract for security you should ensure to
    ///      check for overrides
    function _burn(address account, uint256 amount) internal virtual {
        // Reduce the balance of the account
        balanceOf[account] = balanceOf[account] - amount;
        // Emit an event tracking transfers
        emit Transfer(account, address(0), amount);
    }

    /// @notice This function allows a user to approve an account which can transfer
    ///         tokens on their behalf.
    /// @param account The account which will be approve to transfer tokens
    /// @param amount The approval amount, if set to uint256.max the allowance does not go down on transfers.
    /// @return returns true for compatibility with the ERC20 standard
    function approve(address account, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        // Set the senders allowance for account to amount
        allowance[msg.sender][account] = amount;
        // Emit an event to track approvals
        emit Approval(msg.sender, account, amount);
        return true;
    }

    /// @notice This function allows a caller who is not the owner of an account to execute the functionality of 'approve' with the owners signature.
    /// @param owner the owner of the account which is having the new approval set
    /// @param spender the address which will be allowed to spend owner's tokens
    /// @param value the new allowance value
    /// @param deadline the timestamp which the signature must be submitted by to be valid
    /// @param v Extra ECDSA data which allows public key recovery from signature assumed to be 27 or 28
    /// @param r The r component of the ECDSA signature
    /// @param s The s component of the ECDSA signature
    /// @dev The signature for this function follows EIP 712 standard and should be generated with the
    ///      eth_signTypedData JSON RPC call instead of the eth_sign JSON RPC call. If using out of date
    ///      parity signing libraries the v component may need to be adjusted. Also it is very rare but possible
    ///      for v to be other values, those values are not supported.
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external override {
        // The EIP 712 digest for this function
        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                DOMAIN_SEPARATOR,
                keccak256(
                    abi.encode(
                        PERMIT_TYPEHASH,
                        owner,
                        spender,
                        value,
                        nonces[owner],
                        deadline
                    )
                )
            )
        );
        // Require that the owner is not zero
        require(owner != address(0), "ERC20: invalid-address-0");
        // Require that we have a valid signature from the owner
        require(owner == ecrecover(digest, v, r, s), "ERC20: invalid-permit");
        // Require that the signature is not expired
        require(
            deadline == 0 || block.timestamp <= deadline,
            "ERC20: permit-expired"
        );
        // Format the signature to the default format
        require(
            uint256(s) <=
                0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
            "ERC20: invalid signature 's' value"
        );
        // Increment the signature nonce to prevent replay
        nonces[owner]++;
        // Set the allowance to the new value
        allowance[owner][spender] = value;
        // Emit an approval event to be able to track this happening
        emit Approval(owner, spender, value);
    }

    /// @notice Internal function which allows inheriting contract to set custom decimals
    /// @param decimals_ the new decimal value
    function _setupDecimals(uint8 decimals_) internal {
        // Set the decimals
        decimals = decimals_;
    }
}

File 9 of 9 : IERC20Permit.sol
// Forked from openzepplin
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";

/**
 * @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 is IERC20 {
    /**
     * @dev Sets `value` 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 value,
        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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"vault_","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"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":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"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_who","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"getSharesToUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","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":[{"internalType":"address","name":"_destination","type":"address"}],"name":"prefundedDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reserveBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"reserveDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveShares","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveUnderlying","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"reserveWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":"spender","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":[],"name":"vault","outputs":[{"internalType":"contract IYearnVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"uint256","name":"_minUnderlying","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_minUnderlying","type":"uint256"}],"name":"withdrawUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162002c9938038062002c99833981016040819052620000349162000688565b83838383828282818181600090805190602001906200005592919062000559565b5080516200006b90600190602084019062000559565b506002805460ff1916601217905560036020526000197f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff8190553060009081526040902055620000ba620003d5565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051620000ec9190620007a4565b60408051918290038220828201825260018352603160f81b60209384015290516200013f93927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc691469130910162000880565b60408051601f1981840301815282825280516020918201206006556001600160601b0319606089901b1660805263313ce56760e01b83529051620001ee94506001600160a01b038816935063313ce567926004808201939291829003018186803b158015620001ad57600080fd5b505afa158015620001c2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e8919062000781565b620003d7565b5050506001600160601b0319606085901b1660a05260405163095ea7b360e01b81526001600160a01b0384169063095ea7b390620002359087906000199060040162000867565b602060405180830381600087803b1580156200025057600080fd5b505af115801562000265573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200028b91906200071a565b506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015620002c857600080fd5b505afa158015620002dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000303919062000781565b90508060ff1660c08160ff1660f81b815250508060ff16846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200035457600080fd5b505afa15801562000369573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200038f919062000781565b60ff1614620003bb5760405162461bcd60e51b8152600401620003b290620008ac565b60405180910390fd5b620003c685620003ed565b505050505050505050620009c5565b565b6002805460ff191660ff92909216919091179055565b6000816001600160a01b031663258294106040518163ffffffff1660e01b815260040160006040518083038186803b1580156200042957600080fd5b505afa1580156200043e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000468919081019062000743565b905062000499816040518060400160405280600581526020016418171a171960d91b815250620004f260201b60201c565b80620004cf5750620004cf8160405180604001604052806005815260200164302e342e3360d81b815250620004f260201b60201c565b620004ee5760405162461bcd60e51b8152600401620003b290620008e3565b5050565b6000808360405160200162000508919062000849565b60405160208183030381529060405280519060200120905060008360405160200162000535919062000849565b60408051601f19818403018152919052805160209091012091909114949350505050565b828054620005679062000959565b90600052602060002090601f0160209004810192826200058b5760008555620005d6565b82601f10620005a657805160ff1916838001178555620005d6565b82800160010185558215620005d6579182015b82811115620005d6578251825591602001919060010190620005b9565b50620005e4929150620005e8565b5090565b5b80821115620005e45760008155600101620005e9565b600082601f83011262000610578081fd5b81516001600160401b03808211156200062d576200062d62000996565b604051601f8301601f19168101602001828111828210171562000654576200065462000996565b6040528281528483016020018610156200066c578384fd5b6200067f83602083016020880162000926565b95945050505050565b600080600080608085870312156200069e578384fd5b8451620006ab81620009ac565b6020860151909450620006be81620009ac565b60408601519093506001600160401b0380821115620006db578384fd5b620006e988838901620005ff565b93506060870151915080821115620006ff578283fd5b506200070e87828801620005ff565b91505092959194509250565b6000602082840312156200072c578081fd5b815180151581146200073c578182fd5b9392505050565b60006020828403121562000755578081fd5b81516001600160401b038111156200076b578182fd5b6200077984828501620005ff565b949350505050565b60006020828403121562000793578081fd5b815160ff811681146200073c578182fd5b8154600090819060028104600180831680620007c157607f831692505b6020808410821415620007e257634e487b7160e01b87526022600452602487fd5b818015620007f957600181146200080b576200083b565b60ff198616895284890196506200083b565b620008168a6200091a565b885b86811015620008335781548b82015290850190830162000818565b505084890196505b509498975050505050505050565b600082516200085d81846020870162000926565b9190910192915050565b6001600160a01b03929092168252602082015260400190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60208082526015908201527f496e636f6e73697374656e7420646563696d616c730000000000000000000000604082015260600190565b60208082526013908201527f556e737570706f727465642056657273696f6e00000000000000000000000000604082015260600190565b60009081526020902090565b60005b838110156200094357818101518382015260200162000929565b8381111562000953576000848401525b50505050565b6002810460018216806200096e57607f821691505b602082108114156200099057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620009c257600080fd5b50565b60805160601c60a05160601c60c05160f81c61221662000a8360003960008181610beb0152818161123d0152818161128f0152818161132401526117810152600081816106a40152818161077f01528181610f8a01528181611124015281816111a1015281816114890152818161165401526118b40152600081816103fe015281816106770152818161075201528181610a3501528181611079015281816111480152818161137d0152818161181401526119ca01526122166000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80637e2fb9f4116100f9578063d505accf11610097578063e613deb211610071578063e613deb21461038b578063ec5e5e7d1461039e578063fbfa77cf146103b1578063fc0c546a146103c6576101c3565b8063d505accf1461035d578063d6b1aaaf14610370578063dd62ed3e14610378576101c3565b806395d89b41116100d357806395d89b41146103275780639d6179c31461032f578063a9059cbb14610337578063b5c5f6721461034a576101c3565b80637e2fb9f4146102df5780637ecebe00146102f257806385f45c8814610305576101c3565b8063313ce5671161016657806347e7ef241161014057806347e7ef241461028357806358c7aa0f1461029657806367caf871146102ab57806370a08231146102cc576101c3565b8063313ce567146102535780633644e515146102685780633af9e66914610270576101c3565b8063095ea7b3116101a2578063095ea7b31461021057806312424e3f1461023057806323b872dd1461023857806330adf81f1461024b576101c3565b806291a446146101c857806303d41eb6146101dd57806306fdde03146101fb575b600080fd5b6101db6101d6366004611bea565b6103ce565b005b6101e5610548565b6040516101f29190611cac565b60405180910390f35b61020361054e565b6040516101f29190611d07565b61022361021e366004611b6f565b6105dc565b6040516101f29190611ca1565b6101db610647565b610223610246366004611ac3565b610800565b6101e56109a5565b61025b6109c9565b6040516101f29190611f96565b6101e56109d2565b6101e561027e366004611a77565b6109d8565b6101e5610291366004611b6f565b610a02565b61029e610ad8565b6040516101f29190611f1f565b6102be6102b9366004611b98565b610b04565b6040516101f2929190611f72565b6101e56102da366004611a77565b610b61565b6101e56102ed366004611a77565b610b73565b6101e5610300366004611a77565b610b85565b610318610313366004611a77565b610b97565b6040516101f293929190611f80565b610203610bdc565b61025b610be9565b610223610345366004611b6f565b610c0d565b6101e5610358366004611b98565b610c1a565b6101db61036b366004611afe565b610c31565b61029e610ef5565b6101e5610386366004611a91565b610f0d565b6101e5610399366004611bea565b610f2a565b6101db6103ac366004611bea565b610f35565b6103b9611122565b6040516101f29190611c50565b6103b9611146565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061043790339030908690600401611c64565b602060405180830381600087803b15801561045157600080fd5b505af1158015610465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104899190611bca565b5060008061049561116a565b9092509050816104a682600161119c565b6104b09082611fa4565b6009549091506000816104c45750846104dc565b826104cf878461210c565b6104d99190611fbc565b90505b841580156104e8575083155b156104fb576104f860018761212b565b95505b61050e6105088787611fa4565b856112bf565b336000908152600760205260408120805483929061052d908490611fa4565b9091555061053d90508183611fa4565b600955505050505050565b60095481565b6000805461055b90612142565b80601f016020809104026020016040519081016040528092919081815260200182805461058790612142565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610635908690611cac565b60405180910390a35060015b92915050565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906106cf907f000000000000000000000000000000000000000000000000000000000000000090600090600401611c88565b602060405180830381600087803b1580156106e957600080fd5b505af11580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190611bca565b506040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906107ab907f00000000000000000000000000000000000000000000000000000000000000009060001990600401611c88565b602060405180830381600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fd9190611bca565b50565b6001600160a01b0383166000908152600360205260408120548281101561085c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611ee8565b60405180910390fd5b6001600160a01b0385163314610904576001600160a01b0385166000908152600460209081526040808320338452909152902054600019811461090257838110156108d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611d78565b6108dd848261212b565b6001600160a01b03871660009081526004602090815260408083203384529091529020555b505b61090e838261212b565b6001600160a01b03808716600090815260036020526040808220939093559086168152205461093e908490611fa4565b6001600160a01b0380861660008181526003602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610990908790611cac565b60405180910390a360019150505b9392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b6001600160a01b0381166000908152600360205260408120546109fa9061131d565b90505b919050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610a6e90339030908790600401611c64565b602060405180830381600087803b158015610a8857600080fd5b505af1158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac09190611bca565b506000610acb611366565b50905061099e8482611573565b60085470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1681565b60025460009081908190610b1c9060ff16600a61203b565b90506000610b298261131d565b9050600081610b38848961210c565b610b429190611fbc565b90506000610b52898389866115f2565b99919850909650505050505050565b60036020526000908152604090205481565b60076020526000908152604090205481565b60056020526000908152604090205481565b6000806000806000610ba7611366565b6001600160a01b0388166000908152600360205260409020549193509150610bcf8784611573565b9196909550909350915050565b6001805461055b90612142565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061099e338484610800565b6000610c2984848460006115f2565b949350505050565b6006546001600160a01b0388166000908152600560209081526040808320549051929392610c8a927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d92918d9101611cb5565b60405160208183030381529060405280519060200120604051602001610cb1929190611c1a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012090506001600160a01b038816610d29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e0c565b60018185858560405160008152602001604052604051610d4c9493929190611ce9565b6020604051602081039080840390855afa158015610d6e573d6000803e3d6000fd5b505050602060405103516001600160a01b0316886001600160a01b031614610dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e43565b841580610dcf5750844211155b610e05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611eb1565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611daf565b6001600160a01b0388166000908152600560205260408120805491610e8383612196565b90915550506001600160a01b038089166000818152600460209081526040808320948c168084529490915290819020899055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610ee3908a90611cac565b60405180910390a35050505050505050565b6008546fffffffffffffffffffffffffffffffff1681565b600460209081526000928352604080842090915290825290205481565b60006109fa8261131d565b3360009081526007602052604081208054839290610f5490849061212b565b909155506000905080610f6561116a565b6009549193509150600081610f7a868561210c565b610f849190611fbc565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e63697c8833060006040518463ffffffff1660e01b8152600401610fd993929190611f53565b602060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190611c02565b905060008361103a888861210c565b6110449190611fbc565b9050611062611053828861212b565b61105d858861212b565b6112bf565b61106c878561212b565b6009556001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb336110a98486611fa4565b6040518363ffffffff1660e01b81526004016110c6929190611c88565b602060405180830381600087803b1580156110e057600080fd5b505af11580156110f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111189190611bca565b5050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6008546fffffffffffffffffffffffffffffffff808216917001000000000000000000000000000000009004165b9091565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f857600080fd5b505afa15801561120c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112309190611c02565b9050821561127f576112637f0000000000000000000000000000000000000000000000000000000000000000600a61203b565b61126d858361210c565b6112779190611fbc565b915050610641565b61128a816001611fa4565b6112b57f0000000000000000000000000000000000000000000000000000000000000000600a61203b565b61126d908661210c565b600880546fffffffffffffffffffffffffffffffff928316700100000000000000000000000000000000029383167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617909116919091179055565b600061134a7f0000000000000000000000000000000000000000000000000000000000000000600a61203b565b611352611650565b61135c908461210c565b6109fa9190611fbc565b60008060008061137461116a565b915091506000827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016113c79190611c50565b60206040518083038186803b1580156113df57600080fd5b505afa1580156113f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114179190611c02565b611421919061212b565b90508215158061143057508115155b156114435761144060018261212b565b90505b600061145082600061119c565b90508083111561147d576114716114678386611fa4565b61105d838661212b565b94509250611198915050565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016636e553f656114b88588611fa4565b306040518363ffffffff1660e01b81526004016114d6929190611f3c565b602060405180830381600087803b1580156114f057600080fd5b505af1158015611504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115289190611c02565b905060006115368487611fa4565b611540838661210c565b61154a9190611fbc565b905061156660008261155c8589611fa4565b61105d919061212b565b9650919450505050509091565b6001600160a01b038216600090815260036020526040902054611597908290611fa4565b6001600160a01b0383166000818152600360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115e6908590611cac565b60405180910390a35050565b60006115fe33856116e8565b600061160b858785611758565b905083811015611647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e7a565b95945050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156116ab57600080fd5b505afa1580156116bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e39190611c02565b905090565b6001600160a01b03821660009081526003602052604090205461170c90829061212b565b6001600160a01b0383166000818152600360205260408082209390935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115e6908590611cac565b60008161176a57611767611650565b91505b60008061177561116a565b909250905060006117a77f0000000000000000000000000000000000000000000000000000000000000000600a61203b565b6117af611650565b6117b9908961210c565b6117c39190611fbc565b9050828110156118a8576117e46117da828561212b565b61105d8985611fa4565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb9061184b9089908590600401611c88565b602060405180830381600087803b15801561186557600080fd5b505af1158015611879573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189d9190611bca565b50925061099e915050565b60006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e63697c86118e3858b611fa4565b306127106040518463ffffffff1660e01b815260040161190593929190611f53565b602060405180830381600087803b15801561191f57600080fd5b505af1158015611933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119579190611c02565b905060006119658985611fa4565b61196f838b61210c565b6119799190611fbc565b905061199a816119898488611fa4565b611993919061212b565b60006112bf565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90611a01908b908590600401611c88565b602060405180830381600087803b158015611a1b57600080fd5b505af1158015611a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a539190611bca565b5098975050505050505050565b80356001600160a01b03811681146109fd57600080fd5b600060208284031215611a88578081fd5b61099e82611a60565b60008060408385031215611aa3578081fd5b611aac83611a60565b9150611aba60208401611a60565b90509250929050565b600080600060608486031215611ad7578081fd5b611ae084611a60565b9250611aee60208501611a60565b9150604084013590509250925092565b600080600080600080600060e0888a031215611b18578283fd5b611b2188611a60565b9650611b2f60208901611a60565b95506040880135945060608801359350608088013560ff81168114611b52578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611b81578182fd5b611b8a83611a60565b946020939093013593505050565b600080600060608486031215611bac578283fd5b611bb584611a60565b95602085013595506040909401359392505050565b600060208284031215611bdb578081fd5b8151801515811461099e578182fd5b600060208284031215611bfb578081fd5b5035919050565b600060208284031215611c13578081fd5b5051919050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015611d3357858101830151858201604001528201611d17565b81811115611d445783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6020808252601d908201527f45524332303a20696e73756666696369656e742d616c6c6f77616e6365000000604082015260600190565b60208082526022908201527f45524332303a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f45524332303a20696e76616c69642d616464726573732d300000000000000000604082015260600190565b60208082526015908201527f45524332303a20696e76616c69642d7065726d69740000000000000000000000604082015260600190565b60208082526015908201527f4e6f7420656e6f75676820756e6465726c79696e670000000000000000000000604082015260600190565b60208082526015908201527f45524332303a207065726d69742d657870697265640000000000000000000000604082015260600190565b6020808252601b908201527f45524332303a20696e73756666696369656e742d62616c616e63650000000000604082015260600190565b6fffffffffffffffffffffffffffffffff91909116815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b03919091166020830152604082015260600190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b60008219821115611fb757611fb76121b1565b500190565b600082611ff0577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b80825b60018086116120075750612032565b818704821115612019576120196121b1565b8086161561202657918102915b9490941c938002611ff8565b94509492505050565b600061099e60001960ff8516846000826120575750600161099e565b816120645750600061099e565b816001811461207a5760028114612084576120b1565b600191505061099e565b60ff841115612095576120956121b1565b6001841b9150848211156120ab576120ab6121b1565b5061099e565b5060208310610133831016604e8410600b84101617156120e4575081810a838111156120df576120df6121b1565b61099e565b6120f18484846001611ff5565b808604821115612103576121036121b1565b02949350505050565b6000816000190483118215151615612126576121266121b1565b500290565b60008282101561213d5761213d6121b1565b500390565b60028104600182168061215657607f821691505b60208210811415612190577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006000198214156121aa576121aa6121b1565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212206daf1cf595e47e8cb4889d096d75e70b4317c72cc6ac738b30fd2590144248ba64736f6c63430008000033000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000e656c656d656e742079765553444300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067976555344430000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c35760003560e01c80637e2fb9f4116100f9578063d505accf11610097578063e613deb211610071578063e613deb21461038b578063ec5e5e7d1461039e578063fbfa77cf146103b1578063fc0c546a146103c6576101c3565b8063d505accf1461035d578063d6b1aaaf14610370578063dd62ed3e14610378576101c3565b806395d89b41116100d357806395d89b41146103275780639d6179c31461032f578063a9059cbb14610337578063b5c5f6721461034a576101c3565b80637e2fb9f4146102df5780637ecebe00146102f257806385f45c8814610305576101c3565b8063313ce5671161016657806347e7ef241161014057806347e7ef241461028357806358c7aa0f1461029657806367caf871146102ab57806370a08231146102cc576101c3565b8063313ce567146102535780633644e515146102685780633af9e66914610270576101c3565b8063095ea7b3116101a2578063095ea7b31461021057806312424e3f1461023057806323b872dd1461023857806330adf81f1461024b576101c3565b806291a446146101c857806303d41eb6146101dd57806306fdde03146101fb575b600080fd5b6101db6101d6366004611bea565b6103ce565b005b6101e5610548565b6040516101f29190611cac565b60405180910390f35b61020361054e565b6040516101f29190611d07565b61022361021e366004611b6f565b6105dc565b6040516101f29190611ca1565b6101db610647565b610223610246366004611ac3565b610800565b6101e56109a5565b61025b6109c9565b6040516101f29190611f96565b6101e56109d2565b6101e561027e366004611a77565b6109d8565b6101e5610291366004611b6f565b610a02565b61029e610ad8565b6040516101f29190611f1f565b6102be6102b9366004611b98565b610b04565b6040516101f2929190611f72565b6101e56102da366004611a77565b610b61565b6101e56102ed366004611a77565b610b73565b6101e5610300366004611a77565b610b85565b610318610313366004611a77565b610b97565b6040516101f293929190611f80565b610203610bdc565b61025b610be9565b610223610345366004611b6f565b610c0d565b6101e5610358366004611b98565b610c1a565b6101db61036b366004611afe565b610c31565b61029e610ef5565b6101e5610386366004611a91565b610f0d565b6101e5610399366004611bea565b610f2a565b6101db6103ac366004611bea565b610f35565b6103b9611122565b6040516101f29190611c50565b6103b9611146565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906323b872dd9061043790339030908690600401611c64565b602060405180830381600087803b15801561045157600080fd5b505af1158015610465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104899190611bca565b5060008061049561116a565b9092509050816104a682600161119c565b6104b09082611fa4565b6009549091506000816104c45750846104dc565b826104cf878461210c565b6104d99190611fbc565b90505b841580156104e8575083155b156104fb576104f860018761212b565b95505b61050e6105088787611fa4565b856112bf565b336000908152600760205260408120805483929061052d908490611fa4565b9091555061053d90508183611fa4565b600955505050505050565b60095481565b6000805461055b90612142565b80601f016020809104026020016040519081016040528092919081815260200182805461058790612142565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610635908690611cac565b60405180910390a35060015b92915050565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063095ea7b3906106cf907f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de90600090600401611c88565b602060405180830381600087803b1580156106e957600080fd5b505af11580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190611bca565b506040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063095ea7b3906107ab907f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de9060001990600401611c88565b602060405180830381600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fd9190611bca565b50565b6001600160a01b0383166000908152600360205260408120548281101561085c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611ee8565b60405180910390fd5b6001600160a01b0385163314610904576001600160a01b0385166000908152600460209081526040808320338452909152902054600019811461090257838110156108d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611d78565b6108dd848261212b565b6001600160a01b03871660009081526004602090815260408083203384529091529020555b505b61090e838261212b565b6001600160a01b03808716600090815260036020526040808220939093559086168152205461093e908490611fa4565b6001600160a01b0380861660008181526003602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610990908790611cac565b60405180910390a360019150505b9392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b6001600160a01b0381166000908152600360205260408120546109fa9061131d565b90505b919050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906323b872dd90610a6e90339030908790600401611c64565b602060405180830381600087803b158015610a8857600080fd5b505af1158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac09190611bca565b506000610acb611366565b50905061099e8482611573565b60085470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1681565b60025460009081908190610b1c9060ff16600a61203b565b90506000610b298261131d565b9050600081610b38848961210c565b610b429190611fbc565b90506000610b52898389866115f2565b99919850909650505050505050565b60036020526000908152604090205481565b60076020526000908152604090205481565b60056020526000908152604090205481565b6000806000806000610ba7611366565b6001600160a01b0388166000908152600360205260409020549193509150610bcf8784611573565b9196909550909350915050565b6001805461055b90612142565b7f000000000000000000000000000000000000000000000000000000000000000681565b600061099e338484610800565b6000610c2984848460006115f2565b949350505050565b6006546001600160a01b0388166000908152600560209081526040808320549051929392610c8a927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d92918d9101611cb5565b60405160208183030381529060405280519060200120604051602001610cb1929190611c1a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012090506001600160a01b038816610d29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e0c565b60018185858560405160008152602001604052604051610d4c9493929190611ce9565b6020604051602081039080840390855afa158015610d6e573d6000803e3d6000fd5b505050602060405103516001600160a01b0316886001600160a01b031614610dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e43565b841580610dcf5750844211155b610e05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611eb1565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611daf565b6001600160a01b0388166000908152600560205260408120805491610e8383612196565b90915550506001600160a01b038089166000818152600460209081526040808320948c168084529490915290819020899055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610ee3908a90611cac565b60405180910390a35050505050505050565b6008546fffffffffffffffffffffffffffffffff1681565b600460209081526000928352604080842090915290825290205481565b60006109fa8261131d565b3360009081526007602052604081208054839290610f5490849061212b565b909155506000905080610f6561116a565b6009549193509150600081610f7a868561210c565b610f849190611fbc565b905060007f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b031663e63697c8833060006040518463ffffffff1660e01b8152600401610fd993929190611f53565b602060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190611c02565b905060008361103a888861210c565b6110449190611fbc565b9050611062611053828861212b565b61105d858861212b565b6112bf565b61106c878561212b565b6009556001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481663a9059cbb336110a98486611fa4565b6040518363ffffffff1660e01b81526004016110c6929190611c88565b602060405180830381600087803b1580156110e057600080fd5b505af11580156110f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111189190611bca565b5050505050505050565b7f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de81565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6008546fffffffffffffffffffffffffffffffff808216917001000000000000000000000000000000009004165b9091565b6000807f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f857600080fd5b505afa15801561120c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112309190611c02565b9050821561127f576112637f0000000000000000000000000000000000000000000000000000000000000006600a61203b565b61126d858361210c565b6112779190611fbc565b915050610641565b61128a816001611fa4565b6112b57f0000000000000000000000000000000000000000000000000000000000000006600a61203b565b61126d908661210c565b600880546fffffffffffffffffffffffffffffffff928316700100000000000000000000000000000000029383167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617909116919091179055565b600061134a7f0000000000000000000000000000000000000000000000000000000000000006600a61203b565b611352611650565b61135c908461210c565b6109fa9190611fbc565b60008060008061137461116a565b915091506000827f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016113c79190611c50565b60206040518083038186803b1580156113df57600080fd5b505afa1580156113f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114179190611c02565b611421919061212b565b90508215158061143057508115155b156114435761144060018261212b565b90505b600061145082600061119c565b90508083111561147d576114716114678386611fa4565b61105d838661212b565b94509250611198915050565b60006001600160a01b037f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de16636e553f656114b88588611fa4565b306040518363ffffffff1660e01b81526004016114d6929190611f3c565b602060405180830381600087803b1580156114f057600080fd5b505af1158015611504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115289190611c02565b905060006115368487611fa4565b611540838661210c565b61154a9190611fbc565b905061156660008261155c8589611fa4565b61105d919061212b565b9650919450505050509091565b6001600160a01b038216600090815260036020526040902054611597908290611fa4565b6001600160a01b0383166000818152600360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115e6908590611cac565b60405180910390a35050565b60006115fe33856116e8565b600061160b858785611758565b905083811015611647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e7a565b95945050505050565b60007f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de6001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156116ab57600080fd5b505afa1580156116bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e39190611c02565b905090565b6001600160a01b03821660009081526003602052604090205461170c90829061212b565b6001600160a01b0383166000818152600360205260408082209390935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115e6908590611cac565b60008161176a57611767611650565b91505b60008061177561116a565b909250905060006117a77f0000000000000000000000000000000000000000000000000000000000000006600a61203b565b6117af611650565b6117b9908961210c565b6117c39190611fbc565b9050828110156118a8576117e46117da828561212b565b61105d8985611fa4565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063a9059cbb9061184b9089908590600401611c88565b602060405180830381600087803b15801561186557600080fd5b505af1158015611879573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189d9190611bca565b50925061099e915050565b60006001600160a01b037f000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de1663e63697c86118e3858b611fa4565b306127106040518463ffffffff1660e01b815260040161190593929190611f53565b602060405180830381600087803b15801561191f57600080fd5b505af1158015611933573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119579190611c02565b905060006119658985611fa4565b61196f838b61210c565b6119799190611fbc565b905061199a816119898488611fa4565b611993919061212b565b60006112bf565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063a9059cbb90611a01908b908590600401611c88565b602060405180830381600087803b158015611a1b57600080fd5b505af1158015611a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a539190611bca565b5098975050505050505050565b80356001600160a01b03811681146109fd57600080fd5b600060208284031215611a88578081fd5b61099e82611a60565b60008060408385031215611aa3578081fd5b611aac83611a60565b9150611aba60208401611a60565b90509250929050565b600080600060608486031215611ad7578081fd5b611ae084611a60565b9250611aee60208501611a60565b9150604084013590509250925092565b600080600080600080600060e0888a031215611b18578283fd5b611b2188611a60565b9650611b2f60208901611a60565b95506040880135945060608801359350608088013560ff81168114611b52578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611b81578182fd5b611b8a83611a60565b946020939093013593505050565b600080600060608486031215611bac578283fd5b611bb584611a60565b95602085013595506040909401359392505050565b600060208284031215611bdb578081fd5b8151801515811461099e578182fd5b600060208284031215611bfb578081fd5b5035919050565b600060208284031215611c13578081fd5b5051919050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015611d3357858101830151858201604001528201611d17565b81811115611d445783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6020808252601d908201527f45524332303a20696e73756666696369656e742d616c6c6f77616e6365000000604082015260600190565b60208082526022908201527f45524332303a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f45524332303a20696e76616c69642d616464726573732d300000000000000000604082015260600190565b60208082526015908201527f45524332303a20696e76616c69642d7065726d69740000000000000000000000604082015260600190565b60208082526015908201527f4e6f7420656e6f75676820756e6465726c79696e670000000000000000000000604082015260600190565b60208082526015908201527f45524332303a207065726d69742d657870697265640000000000000000000000604082015260600190565b6020808252601b908201527f45524332303a20696e73756666696369656e742d62616c616e63650000000000604082015260600190565b6fffffffffffffffffffffffffffffffff91909116815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b03919091166020830152604082015260600190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b60008219821115611fb757611fb76121b1565b500190565b600082611ff0577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b80825b60018086116120075750612032565b818704821115612019576120196121b1565b8086161561202657918102915b9490941c938002611ff8565b94509492505050565b600061099e60001960ff8516846000826120575750600161099e565b816120645750600061099e565b816001811461207a5760028114612084576120b1565b600191505061099e565b60ff841115612095576120956121b1565b6001841b9150848211156120ab576120ab6121b1565b5061099e565b5060208310610133831016604e8410600b84101617156120e4575081810a838111156120df576120df6121b1565b61099e565b6120f18484846001611ff5565b808604821115612103576121036121b1565b02949350505050565b6000816000190483118215151615612126576121266121b1565b500290565b60008282101561213d5761213d6121b1565b500390565b60028104600182168061215657607f821691505b60208210811415612190577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006000198214156121aa576121aa6121b1565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212206daf1cf595e47e8cb4889d096d75e70b4317c72cc6ac738b30fd2590144248ba64736f6c63430008000033

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

000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000e656c656d656e742079765553444300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067976555344430000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : vault_ (address): 0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE
Arg [1] : _token (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [2] : _name (string): element yvUSDC
Arg [3] : _symbol (string): yvUSDC

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000a354f35829ae975e850e23e9615b11da1b3dc4de
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [5] : 656c656d656e7420797655534443000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 7976555344430000000000000000000000000000000000000000000000000000


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.