ETH Price: $3,365.99 (+0.54%)

Token

ERC20 ***
 

Overview

Max Total Supply

0 ERC20 ***

Holders

3

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 6 Decimals)

Filtered by Token Holder
Null: 0x000...000
Balance
115792089237316195423570985008687907853... ERC20 ***

Value
$0.00
0x0000000000000000000000000000000000000000
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:
YVaultAssetProxy

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 7500 runs

Other Settings:
default evmVersion
File 1 of 8 : 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 virtual view {
        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
        override
        view
        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
        virtual
        view
        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 2 of 8 : 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 8 : 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 8 : 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 virtual view 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
        override
        view
        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
        override
        view
        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 5 of 8 : 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 6 of 8 : 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 7 of 8 : 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 8 of 8 : 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",
        "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"}]

60e06040523480156200001157600080fd5b5060405162002d9938038062002d99833981016040819052620000349162000758565b828282818181600090805190602001906200005192919062000629565b5080516200006790600190602084019062000629565b506002805460ff1916601217905560036020526000197f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff8190553060009081526040902055620000b6620003cd565b7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051620000e8919062000874565b60408051918290038220828201825260018352603160f81b60209384015290516200013b93927fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc691469130910162000950565b60408051601f1981840301815282825280516020918201206006556001600160601b0319606089901b1660805263313ce56760e01b83529051620001ea94506001600160a01b038816935063313ce567926004808201939291829003018186803b158015620001a957600080fd5b505afa158015620001be573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e4919062000851565b620003cf565b5050506001600160601b0319606085901b1660a05260405163095ea7b360e01b81526001600160a01b0384169063095ea7b390620002319087906000199060040162000937565b602060405180830381600087803b1580156200024c57600080fd5b505af115801562000261573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002879190620007ea565b506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015620002c457600080fd5b505afa158015620002d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002ff919062000851565b90508060ff1660c08160ff1660f81b815250508060ff16846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200035057600080fd5b505afa15801562000365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200038b919062000851565b60ff1614620003b75760405162461bcd60e51b8152600401620003ae906200097c565b60405180910390fd5b620003c285620003e5565b505050505062000a95565b565b6002805460ff191660ff92909216919091179055565b6000816001600160a01b031663258294106040518163ffffffff1660e01b815260040160006040518083038186803b1580156200042157600080fd5b505afa15801562000436573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000460919081019062000813565b90506200049181604051806040016040528060058152602001640302e332e360dc1b815250620005c260201b60201c565b80620004c75750620004c78160405180604001604052806005815260200164302e332e3160d81b815250620005c260201b60201c565b80620004fd5750620004fd8160405180604001604052806005815260200164181719971960d91b815250620005c260201b60201c565b80620005335750620005338160405180604001604052806005815260200164302e332e3360d81b815250620005c260201b60201c565b806200056957506200056981604051806040016040528060058152602001640c0b8ccb8d60da1b815250620005c260201b60201c565b806200059f57506200059f8160405180604001604052806005815260200164302e332e3560d81b815250620005c260201b60201c565b620005be5760405162461bcd60e51b8152600401620003ae90620009b3565b5050565b60008083604051602001620005d8919062000919565b60405160208183030381529060405280519060200120905060008360405160200162000605919062000919565b60408051601f19818403018152919052805160209091012091909114949350505050565b828054620006379062000a29565b90600052602060002090601f0160209004810192826200065b5760008555620006a6565b82601f106200067657805160ff1916838001178555620006a6565b82800160010185558215620006a6579182015b82811115620006a657825182559160200191906001019062000689565b50620006b4929150620006b8565b5090565b5b80821115620006b45760008155600101620006b9565b600082601f830112620006e0578081fd5b81516001600160401b0380821115620006fd57620006fd62000a66565b604051601f8301601f19168101602001828111828210171562000724576200072462000a66565b6040528281528483016020018610156200073c578384fd5b6200074f836020830160208801620009f6565b95945050505050565b600080600080608085870312156200076e578384fd5b84516200077b8162000a7c565b60208601519094506200078e8162000a7c565b60408601519093506001600160401b0380821115620007ab578384fd5b620007b988838901620006cf565b93506060870151915080821115620007cf578283fd5b50620007de87828801620006cf565b91505092959194509250565b600060208284031215620007fc578081fd5b815180151581146200080c578182fd5b9392505050565b60006020828403121562000825578081fd5b81516001600160401b038111156200083b578182fd5b6200084984828501620006cf565b949350505050565b60006020828403121562000863578081fd5b815160ff811681146200080c578182fd5b81546000908190600281046001808316806200089157607f831692505b6020808410821415620008b257634e487b7160e01b87526022600452602487fd5b818015620008c95760018114620008db576200090b565b60ff198616895284890196506200090b565b620008e68a620009ea565b885b86811015620009035781548b820152908501908301620008e8565b505084890196505b509498975050505050505050565b600082516200092d818460208701620009f6565b9190910192915050565b6001600160a01b03929092168252602082015260400190565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60208082526015908201527f496e636f6e73697374656e7420646563696d616c730000000000000000000000604082015260600190565b60208082526013908201527f556e737570706f727465642056657273696f6e00000000000000000000000000604082015260600190565b60009081526020902090565b60005b8381101562000a13578181015183820152602001620009f9565b8381111562000a23576000848401525b50505050565b60028104600182168062000a3e57607f821691505b6020821081141562000a6057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811462000a9257600080fd5b50565b60805160601c60a05160601c60c05160f81c61224d62000b4c60003960008181610beb0152818161135b01526117b80152600081816106a40152818161077f01528181610f8a01528181611124015281816111a101528181611236015281816114c00152818161168b01526118eb0152600081816103fe015281816106770152818161075201528181610a350152818161107901528181611148015281816113b40152818161184b0152611a01015261224d6000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80637e2fb9f4116100f9578063d505accf11610097578063e613deb211610071578063e613deb21461038b578063ec5e5e7d1461039e578063fbfa77cf146103b1578063fc0c546a146103c6576101c3565b8063d505accf1461035d578063d6b1aaaf14610370578063dd62ed3e14610378576101c3565b806395d89b41116100d357806395d89b41146103275780639d6179c31461032f578063a9059cbb14610337578063b5c5f6721461034a576101c3565b80637e2fb9f4146102df5780637ecebe00146102f257806385f45c8814610305576101c3565b8063313ce5671161016657806347e7ef241161014057806347e7ef241461028357806358c7aa0f1461029657806367caf871146102ab57806370a08231146102cc576101c3565b8063313ce567146102535780633644e515146102685780633af9e66914610270576101c3565b8063095ea7b3116101a2578063095ea7b31461021057806312424e3f1461023057806323b872dd1461023857806330adf81f1461024b576101c3565b806291a446146101c857806303d41eb6146101dd57806306fdde03146101fb575b600080fd5b6101db6101d6366004611c21565b6103ce565b005b6101e5610548565b6040516101f29190611ce3565b60405180910390f35b61020361054e565b6040516101f29190611d3e565b61022361021e366004611ba6565b6105dc565b6040516101f29190611cd8565b6101db610647565b610223610246366004611afa565b610800565b6101e56109a5565b61025b6109c9565b6040516101f29190611fcd565b6101e56109d2565b6101e561027e366004611aae565b6109d8565b6101e5610291366004611ba6565b610a02565b61029e610ad8565b6040516101f29190611f56565b6102be6102b9366004611bcf565b610b04565b6040516101f2929190611fa9565b6101e56102da366004611aae565b610b61565b6101e56102ed366004611aae565b610b73565b6101e5610300366004611aae565b610b85565b610318610313366004611aae565b610b97565b6040516101f293929190611fb7565b610203610bdc565b61025b610be9565b610223610345366004611ba6565b610c0d565b6101e5610358366004611bcf565b610c1a565b6101db61036b366004611b35565b610c31565b61029e610ef5565b6101e5610386366004611ac8565b610f0d565b6101e5610399366004611c21565b610f2a565b6101db6103ac366004611c21565b610f35565b6103b9611122565b6040516101f29190611c87565b6103b9611146565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061043790339030908690600401611c9b565b602060405180830381600087803b15801561045157600080fd5b505af1158015610465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104899190611c01565b5060008061049561116a565b9092509050816104a682600161119c565b6104b09082611fdb565b6009549091506000816104c45750846104dc565b826104cf8784612143565b6104d99190611ff3565b90505b841580156104e8575083155b156104fb576104f8600187612162565b95505b61050e6105088787611fdb565b856112f6565b336000908152600760205260408120805483929061052d908490611fdb565b9091555061053d90508183611fdb565b600955505050505050565b60095481565b6000805461055b90612179565b80601f016020809104026020016040519081016040528092919081815260200182805461058790612179565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610635908690611ce3565b60405180910390a35060015b92915050565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906106cf907f000000000000000000000000000000000000000000000000000000000000000090600090600401611cbf565b602060405180830381600087803b1580156106e957600080fd5b505af11580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190611c01565b506040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906107ab907f00000000000000000000000000000000000000000000000000000000000000009060001990600401611cbf565b602060405180830381600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fd9190611c01565b50565b6001600160a01b0383166000908152600360205260408120548281101561085c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611f1f565b60405180910390fd5b6001600160a01b0385163314610904576001600160a01b0385166000908152600460209081526040808320338452909152902054600019811461090257838110156108d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611daf565b6108dd8482612162565b6001600160a01b03871660009081526004602090815260408083203384529091529020555b505b61090e8382612162565b6001600160a01b03808716600090815260036020526040808220939093559086168152205461093e908490611fdb565b6001600160a01b0380861660008181526003602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610990908790611ce3565b60405180910390a360019150505b9392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b6001600160a01b0381166000908152600360205260408120546109fa90611354565b90505b919050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610a6e90339030908790600401611c9b565b602060405180830381600087803b158015610a8857600080fd5b505af1158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac09190611c01565b506000610acb61139d565b50905061099e84826115aa565b60085470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1681565b60025460009081908190610b1c9060ff16600a612072565b90506000610b2982611354565b9050600081610b388489612143565b610b429190611ff3565b90506000610b5289838986611629565b99919850909650505050505050565b60036020526000908152604090205481565b60076020526000908152604090205481565b60056020526000908152604090205481565b6000806000806000610ba761139d565b6001600160a01b0388166000908152600360205260409020549193509150610bcf87846115aa565b9196909550909350915050565b6001805461055b90612179565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061099e338484610800565b6000610c298484846000611629565b949350505050565b6006546001600160a01b0388166000908152600560209081526040808320549051929392610c8a927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d92918d9101611cec565b60405160208183030381529060405280519060200120604051602001610cb1929190611c51565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012090506001600160a01b038816610d29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e43565b60018185858560405160008152602001604052604051610d4c9493929190611d20565b6020604051602081039080840390855afa158015610d6e573d6000803e3d6000fd5b505050602060405103516001600160a01b0316886001600160a01b031614610dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e7a565b841580610dcf5750844211155b610e05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611ee8565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611de6565b6001600160a01b0388166000908152600560205260408120805491610e83836121cd565b90915550506001600160a01b038089166000818152600460209081526040808320948c168084529490915290819020899055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610ee3908a90611ce3565b60405180910390a35050505050505050565b6008546fffffffffffffffffffffffffffffffff1681565b600460209081526000928352604080842090915290825290205481565b60006109fa82611354565b3360009081526007602052604081208054839290610f54908490612162565b909155506000905080610f6561116a565b6009549193509150600081610f7a8685612143565b610f849190611ff3565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e63697c8833060006040518463ffffffff1660e01b8152600401610fd993929190611f8a565b602060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190611c39565b905060008361103a8888612143565b6110449190611ff3565b90506110626110538288612162565b61105d8588612162565b6112f6565b61106c8785612162565b6009556001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb336110a98486611fdb565b6040518363ffffffff1660e01b81526004016110c6929190611cbf565b602060405180830381600087803b1580156110e057600080fd5b505af11580156110f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111189190611c01565b5050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6008546fffffffffffffffffffffffffffffffff808216917001000000000000000000000000000000009004165b9091565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f857600080fd5b505afa15801561120c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112309190611c39565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166301e1d1146040518163ffffffff1660e01b815260040160206040518083038186803b15801561128d57600080fd5b505afa1580156112a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c59190611c39565b905083156112eb57816112d88683612143565b6112e29190611ff3565b92505050610641565b806112d88684612143565b600880546fffffffffffffffffffffffffffffffff928316700100000000000000000000000000000000029383167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617909116919091179055565b60006113817f0000000000000000000000000000000000000000000000000000000000000000600a612072565b611389611687565b6113939084612143565b6109fa9190611ff3565b6000806000806113ab61116a565b915091506000827f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016113fe9190611c87565b60206040518083038186803b15801561141657600080fd5b505afa15801561142a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144e9190611c39565b6114589190612162565b90508215158061146757508115155b1561147a57611477600182612162565b90505b600061148782600061119c565b9050808311156114b4576114a861149e8386611fdb565b61105d8386612162565b94509250611198915050565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016636e553f656114ef8588611fdb565b306040518363ffffffff1660e01b815260040161150d929190611f73565b602060405180830381600087803b15801561152757600080fd5b505af115801561153b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155f9190611c39565b9050600061156d8487611fdb565b6115778386612143565b6115819190611ff3565b905061159d6000826115938589611fdb565b61105d9190612162565b9650919450505050509091565b6001600160a01b0382166000908152600360205260409020546115ce908290611fdb565b6001600160a01b0383166000818152600360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061161d908590611ce3565b60405180910390a35050565b6000611635338561171f565b600061164285878561178f565b90508381101561167e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611eb1565b95945050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156116e257600080fd5b505afa1580156116f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171a9190611c39565b905090565b6001600160a01b038216600090815260036020526040902054611743908290612162565b6001600160a01b0383166000818152600360205260408082209390935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061161d908590611ce3565b6000816117a15761179e611687565b91505b6000806117ac61116a565b909250905060006117de7f0000000000000000000000000000000000000000000000000000000000000000600a612072565b6117e6611687565b6117f09089612143565b6117fa9190611ff3565b9050828110156118df5761181b6118118285612162565b61105d8985611fdb565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906118829089908590600401611cbf565b602060405180830381600087803b15801561189c57600080fd5b505af11580156118b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d49190611c01565b50925061099e915050565b60006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e63697c861191a858b611fdb565b306127106040518463ffffffff1660e01b815260040161193c93929190611f8a565b602060405180830381600087803b15801561195657600080fd5b505af115801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e9190611c39565b9050600061199c8985611fdb565b6119a6838b612143565b6119b09190611ff3565b90506119d1816119c08488611fdb565b6119ca9190612162565b60006112f6565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90611a38908b908590600401611cbf565b602060405180830381600087803b158015611a5257600080fd5b505af1158015611a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8a9190611c01565b5098975050505050505050565b80356001600160a01b03811681146109fd57600080fd5b600060208284031215611abf578081fd5b61099e82611a97565b60008060408385031215611ada578081fd5b611ae383611a97565b9150611af160208401611a97565b90509250929050565b600080600060608486031215611b0e578081fd5b611b1784611a97565b9250611b2560208501611a97565b9150604084013590509250925092565b600080600080600080600060e0888a031215611b4f578283fd5b611b5888611a97565b9650611b6660208901611a97565b95506040880135945060608801359350608088013560ff81168114611b89578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611bb8578182fd5b611bc183611a97565b946020939093013593505050565b600080600060608486031215611be3578283fd5b611bec84611a97565b95602085013595506040909401359392505050565b600060208284031215611c12578081fd5b8151801515811461099e578182fd5b600060208284031215611c32578081fd5b5035919050565b600060208284031215611c4a578081fd5b5051919050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015611d6a57858101830151858201604001528201611d4e565b81811115611d7b5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6020808252601d908201527f45524332303a20696e73756666696369656e742d616c6c6f77616e6365000000604082015260600190565b60208082526022908201527f45524332303a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f45524332303a20696e76616c69642d616464726573732d300000000000000000604082015260600190565b60208082526015908201527f45524332303a20696e76616c69642d7065726d69740000000000000000000000604082015260600190565b60208082526015908201527f4e6f7420656e6f75676820756e6465726c79696e670000000000000000000000604082015260600190565b60208082526015908201527f45524332303a207065726d69742d657870697265640000000000000000000000604082015260600190565b6020808252601b908201527f45524332303a20696e73756666696369656e742d62616c616e63650000000000604082015260600190565b6fffffffffffffffffffffffffffffffff91909116815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b03919091166020830152604082015260600190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b60008219821115611fee57611fee6121e8565b500190565b600082612027577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b80825b600180861161203e5750612069565b818704821115612050576120506121e8565b8086161561205d57918102915b9490941c93800261202f565b94509492505050565b600061099e60001960ff85168460008261208e5750600161099e565b8161209b5750600061099e565b81600181146120b157600281146120bb576120e8565b600191505061099e565b60ff8411156120cc576120cc6121e8565b6001841b9150848211156120e2576120e26121e8565b5061099e565b5060208310610133831016604e8410600b841016171561211b575081810a83811115612116576121166121e8565b61099e565b612128848484600161202c565b80860482111561213a5761213a6121e8565b02949350505050565b600081600019048311821515161561215d5761215d6121e8565b500290565b600082821015612174576121746121e8565b500390565b60028104600182168061218d57607f821691505b602082108114156121c7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006000198214156121e1576121e16121e8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220d2eda0c45825d69271b4748af0f80eda580e224e46b254250e242d27a4eaaaef64736f6c634300080000330000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a9000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000d656c656d656e742079764441490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067976555344430000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c35760003560e01c80637e2fb9f4116100f9578063d505accf11610097578063e613deb211610071578063e613deb21461038b578063ec5e5e7d1461039e578063fbfa77cf146103b1578063fc0c546a146103c6576101c3565b8063d505accf1461035d578063d6b1aaaf14610370578063dd62ed3e14610378576101c3565b806395d89b41116100d357806395d89b41146103275780639d6179c31461032f578063a9059cbb14610337578063b5c5f6721461034a576101c3565b80637e2fb9f4146102df5780637ecebe00146102f257806385f45c8814610305576101c3565b8063313ce5671161016657806347e7ef241161014057806347e7ef241461028357806358c7aa0f1461029657806367caf871146102ab57806370a08231146102cc576101c3565b8063313ce567146102535780633644e515146102685780633af9e66914610270576101c3565b8063095ea7b3116101a2578063095ea7b31461021057806312424e3f1461023057806323b872dd1461023857806330adf81f1461024b576101c3565b806291a446146101c857806303d41eb6146101dd57806306fdde03146101fb575b600080fd5b6101db6101d6366004611c21565b6103ce565b005b6101e5610548565b6040516101f29190611ce3565b60405180910390f35b61020361054e565b6040516101f29190611d3e565b61022361021e366004611ba6565b6105dc565b6040516101f29190611cd8565b6101db610647565b610223610246366004611afa565b610800565b6101e56109a5565b61025b6109c9565b6040516101f29190611fcd565b6101e56109d2565b6101e561027e366004611aae565b6109d8565b6101e5610291366004611ba6565b610a02565b61029e610ad8565b6040516101f29190611f56565b6102be6102b9366004611bcf565b610b04565b6040516101f2929190611fa9565b6101e56102da366004611aae565b610b61565b6101e56102ed366004611aae565b610b73565b6101e5610300366004611aae565b610b85565b610318610313366004611aae565b610b97565b6040516101f293929190611fb7565b610203610bdc565b61025b610be9565b610223610345366004611ba6565b610c0d565b6101e5610358366004611bcf565b610c1a565b6101db61036b366004611b35565b610c31565b61029e610ef5565b6101e5610386366004611ac8565b610f0d565b6101e5610399366004611c21565b610f2a565b6101db6103ac366004611c21565b610f35565b6103b9611122565b6040516101f29190611c87565b6103b9611146565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906323b872dd9061043790339030908690600401611c9b565b602060405180830381600087803b15801561045157600080fd5b505af1158015610465573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104899190611c01565b5060008061049561116a565b9092509050816104a682600161119c565b6104b09082611fdb565b6009549091506000816104c45750846104dc565b826104cf8784612143565b6104d99190611ff3565b90505b841580156104e8575083155b156104fb576104f8600187612162565b95505b61050e6105088787611fdb565b856112f6565b336000908152600760205260408120805483929061052d908490611fdb565b9091555061053d90508183611fdb565b600955505050505050565b60095481565b6000805461055b90612179565b80601f016020809104026020016040519081016040528092919081815260200182805461058790612179565b80156105d45780601f106105a9576101008083540402835291602001916105d4565b820191906000526020600020905b8154815290600101906020018083116105b757829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610635908690611ce3565b60405180910390a35060015b92915050565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063095ea7b3906106cf907f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a990600090600401611cbf565b602060405180830381600087803b1580156106e957600080fd5b505af11580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190611c01565b506040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063095ea7b3906107ab907f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a99060001990600401611cbf565b602060405180830381600087803b1580156107c557600080fd5b505af11580156107d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fd9190611c01565b50565b6001600160a01b0383166000908152600360205260408120548281101561085c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611f1f565b60405180910390fd5b6001600160a01b0385163314610904576001600160a01b0385166000908152600460209081526040808320338452909152902054600019811461090257838110156108d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611daf565b6108dd8482612162565b6001600160a01b03871660009081526004602090815260408083203384529091529020555b505b61090e8382612162565b6001600160a01b03808716600090815260036020526040808220939093559086168152205461093e908490611fdb565b6001600160a01b0380861660008181526003602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610990908790611ce3565b60405180910390a360019150505b9392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b6001600160a01b0381166000908152600360205260408120546109fa90611354565b90505b919050565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906323b872dd90610a6e90339030908790600401611c9b565b602060405180830381600087803b158015610a8857600080fd5b505af1158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac09190611c01565b506000610acb61139d565b50905061099e84826115aa565b60085470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1681565b60025460009081908190610b1c9060ff16600a612072565b90506000610b2982611354565b9050600081610b388489612143565b610b429190611ff3565b90506000610b5289838986611629565b99919850909650505050505050565b60036020526000908152604090205481565b60076020526000908152604090205481565b60056020526000908152604090205481565b6000806000806000610ba761139d565b6001600160a01b0388166000908152600360205260409020549193509150610bcf87846115aa565b9196909550909350915050565b6001805461055b90612179565b7f000000000000000000000000000000000000000000000000000000000000000681565b600061099e338484610800565b6000610c298484846000611629565b949350505050565b6006546001600160a01b0388166000908152600560209081526040808320549051929392610c8a927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d92918d9101611cec565b60405160208183030381529060405280519060200120604051602001610cb1929190611c51565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012090506001600160a01b038816610d29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e43565b60018185858560405160008152602001604052604051610d4c9493929190611d20565b6020604051602081039080840390855afa158015610d6e573d6000803e3d6000fd5b505050602060405103516001600160a01b0316886001600160a01b031614610dc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611e7a565b841580610dcf5750844211155b610e05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611ee8565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611de6565b6001600160a01b0388166000908152600560205260408120805491610e83836121cd565b90915550506001600160a01b038089166000818152600460209081526040808320948c168084529490915290819020899055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610ee3908a90611ce3565b60405180910390a35050505050505050565b6008546fffffffffffffffffffffffffffffffff1681565b600460209081526000928352604080842090915290825290205481565b60006109fa82611354565b3360009081526007602052604081208054839290610f54908490612162565b909155506000905080610f6561116a565b6009549193509150600081610f7a8685612143565b610f849190611ff3565b905060007f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a96001600160a01b031663e63697c8833060006040518463ffffffff1660e01b8152600401610fd993929190611f8a565b602060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190611c39565b905060008361103a8888612143565b6110449190611ff3565b90506110626110538288612162565b61105d8588612162565b6112f6565b61106c8785612162565b6009556001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481663a9059cbb336110a98486611fdb565b6040518363ffffffff1660e01b81526004016110c6929190611cbf565b602060405180830381600087803b1580156110e057600080fd5b505af11580156110f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111189190611c01565b5050505050505050565b7f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a981565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6008546fffffffffffffffffffffffffffffffff808216917001000000000000000000000000000000009004165b9091565b6000807f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a96001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f857600080fd5b505afa15801561120c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112309190611c39565b905060007f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a96001600160a01b03166301e1d1146040518163ffffffff1660e01b815260040160206040518083038186803b15801561128d57600080fd5b505afa1580156112a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c59190611c39565b905083156112eb57816112d88683612143565b6112e29190611ff3565b92505050610641565b806112d88684612143565b600880546fffffffffffffffffffffffffffffffff928316700100000000000000000000000000000000029383167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617909116919091179055565b60006113817f0000000000000000000000000000000000000000000000000000000000000006600a612072565b611389611687565b6113939084612143565b6109fa9190611ff3565b6000806000806113ab61116a565b915091506000827f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016113fe9190611c87565b60206040518083038186803b15801561141657600080fd5b505afa15801561142a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144e9190611c39565b6114589190612162565b90508215158061146757508115155b1561147a57611477600182612162565b90505b600061148782600061119c565b9050808311156114b4576114a861149e8386611fdb565b61105d8386612162565b94509250611198915050565b60006001600160a01b037f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a916636e553f656114ef8588611fdb565b306040518363ffffffff1660e01b815260040161150d929190611f73565b602060405180830381600087803b15801561152757600080fd5b505af115801561153b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155f9190611c39565b9050600061156d8487611fdb565b6115778386612143565b6115819190611ff3565b905061159d6000826115938589611fdb565b61105d9190612162565b9650919450505050509091565b6001600160a01b0382166000908152600360205260409020546115ce908290611fdb565b6001600160a01b0383166000818152600360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061161d908590611ce3565b60405180910390a35050565b6000611635338561171f565b600061164285878561178f565b90508381101561167e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085390611eb1565b95945050505050565b60007f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a96001600160a01b03166399530b066040518163ffffffff1660e01b815260040160206040518083038186803b1580156116e257600080fd5b505afa1580156116f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171a9190611c39565b905090565b6001600160a01b038216600090815260036020526040902054611743908290612162565b6001600160a01b0383166000818152600360205260408082209390935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061161d908590611ce3565b6000816117a15761179e611687565b91505b6000806117ac61116a565b909250905060006117de7f0000000000000000000000000000000000000000000000000000000000000006600a612072565b6117e6611687565b6117f09089612143565b6117fa9190611ff3565b9050828110156118df5761181b6118118285612162565b61105d8985611fdb565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063a9059cbb906118829089908590600401611cbf565b602060405180830381600087803b15801561189c57600080fd5b505af11580156118b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d49190611c01565b50925061099e915050565b60006001600160a01b037f0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a91663e63697c861191a858b611fdb565b306127106040518463ffffffff1660e01b815260040161193c93929190611f8a565b602060405180830381600087803b15801561195657600080fd5b505af115801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e9190611c39565b9050600061199c8985611fdb565b6119a6838b612143565b6119b09190611ff3565b90506119d1816119c08488611fdb565b6119ca9190612162565b60006112f6565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063a9059cbb90611a38908b908590600401611cbf565b602060405180830381600087803b158015611a5257600080fd5b505af1158015611a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8a9190611c01565b5098975050505050505050565b80356001600160a01b03811681146109fd57600080fd5b600060208284031215611abf578081fd5b61099e82611a97565b60008060408385031215611ada578081fd5b611ae383611a97565b9150611af160208401611a97565b90509250929050565b600080600060608486031215611b0e578081fd5b611b1784611a97565b9250611b2560208501611a97565b9150604084013590509250925092565b600080600080600080600060e0888a031215611b4f578283fd5b611b5888611a97565b9650611b6660208901611a97565b95506040880135945060608801359350608088013560ff81168114611b89578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611bb8578182fd5b611bc183611a97565b946020939093013593505050565b600080600060608486031215611be3578283fd5b611bec84611a97565b95602085013595506040909401359392505050565b600060208284031215611c12578081fd5b8151801515811461099e578182fd5b600060208284031215611c32578081fd5b5035919050565b600060208284031215611c4a578081fd5b5051919050565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015611d6a57858101830151858201604001528201611d4e565b81811115611d7b5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6020808252601d908201527f45524332303a20696e73756666696369656e742d616c6c6f77616e6365000000604082015260600190565b60208082526022908201527f45524332303a20696e76616c6964207369676e6174757265202773272076616c60408201527f7565000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f45524332303a20696e76616c69642d616464726573732d300000000000000000604082015260600190565b60208082526015908201527f45524332303a20696e76616c69642d7065726d69740000000000000000000000604082015260600190565b60208082526015908201527f4e6f7420656e6f75676820756e6465726c79696e670000000000000000000000604082015260600190565b60208082526015908201527f45524332303a207065726d69742d657870697265640000000000000000000000604082015260600190565b6020808252601b908201527f45524332303a20696e73756666696369656e742d62616c616e63650000000000604082015260600190565b6fffffffffffffffffffffffffffffffff91909116815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b03919091166020830152604082015260600190565b918252602082015260400190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b60008219821115611fee57611fee6121e8565b500190565b600082612027577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b80825b600180861161203e5750612069565b818704821115612050576120506121e8565b8086161561205d57918102915b9490941c93800261202f565b94509492505050565b600061099e60001960ff85168460008261208e5750600161099e565b8161209b5750600061099e565b81600181146120b157600281146120bb576120e8565b600191505061099e565b60ff8411156120cc576120cc6121e8565b6001841b9150848211156120e2576120e26121e8565b5061099e565b5060208310610133831016604e8410600b841016171561211b575081810a83811115612116576121166121e8565b61099e565b612128848484600161202c565b80860482111561213a5761213a6121e8565b02949350505050565b600081600019048311821515161561215d5761215d6121e8565b500290565b600082821015612174576121746121e8565b500390565b60028104600182168061218d57607f821691505b602082108114156121c7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006000198214156121e1576121e16121e8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea2646970667358221220d2eda0c45825d69271b4748af0f80eda580e224e46b254250e242d27a4eaaaef64736f6c63430008000033

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

0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a9000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000d656c656d656e742079764441490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067976555344430000000000000000000000000000000000000000000000000000

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

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000005f18c75abdae578b483e5f43f12a39cf75b973a9
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [5] : 656c656d656e7420797644414900000000000000000000000000000000000000
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.