ETH Price: $3,914.82 (-0.32%)

Contract

0xf3bCeDaB2998933c6AAD1cB31430D8bAb329dD8C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...184606992023-10-30 4:49:23410 days ago1698641363IN
0xf3bCeDaB...Ab329dD8C
0 ETH0.0005264211
Set Rebalancer184606992023-10-30 4:49:23410 days ago1698641363IN
0xf3bCeDaB...Ab329dD8C
0 ETH0.0005191311
Set Issuance184606992023-10-30 4:49:23410 days ago1698641363IN
0xf3bCeDaB...Ab329dD8C
0 ETH0.0005191211

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vault

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 15 : Vault.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.18;

import {VerifiableAddressArray} from "src/lib/VArray.sol";
import {IVault} from "src/interfaces/IVault.sol";
import {TokenInfo} from "src/Common.sol";
import {IIndexToken} from "src/interfaces/IIndexToken.sol";
import {SCALAR, fdiv, fmul, finv} from "./lib/FixedPoint.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol";

contract Vault is Ownable2Step, IVault {
    using VerifiableAddressArray for VerifiableAddressArray.VerifiableArray;
    using SafeERC20 for IERC20;

    IIndexToken public immutable indexToken;

    bool public emergency;

    address public issuance;
    address public rebalancer;
    address public feeRecipient;
    address public emergencyResponder;

    uint256 public inflationRate;

    uint256 public lastKnownTimestamp;

    VerifiableAddressArray.VerifiableArray internal _underlying;
    mapping(address => uint256) internal _nominals;

    ///////////////////////// MODIFIERS / CONSTRUCTOR /////////////////////////

    modifier onlyInvokers() {
        if (msg.sender != issuance && msg.sender != rebalancer) {
            revert AMKTVaultOnlyInvokers();
        }
        _;
    }

    modifier only(address who) {
        if (msg.sender != who) {
            revert AMKTVaultOnly(who);
        }
        _;
    }

    modifier whenNotEmergency() {
        if (emergency) {
            revert AMKTVaultEmergency();
        }
        _;
    }

    /// @notice Constructor
    /// @param _indexToken The index token address
    /// @param _owner The owner of the vault
    /// @param _feeRecipient The recipient of the fee
    /// @param _emergencyResponder The emergency responder, can set emergency flag
    /// @param _inflationRate The per second inflation rate
    constructor(
        IIndexToken _indexToken,
        address _owner,
        address _feeRecipient,
        address _emergencyResponder,
        uint256 _inflationRate
    ) {
        if (_owner == address(0)) revert VaultZeroCheck();
        if (_feeRecipient == address(0)) revert VaultZeroCheck();
        if (_emergencyResponder == address(0)) revert VaultZeroCheck();
        if (_inflationRate > SCALAR) {
            revert AMKTVaultInflationRateTooLarge();
        }

        indexToken = _indexToken;

        _transferOwnership(_owner);

        emergencyResponder = _emergencyResponder;

        feeRecipient = _feeRecipient;
        inflationRate = _inflationRate;

        lastKnownTimestamp = block.timestamp;
    }

    ///////////////////////// CONFIG /////////////////////////

    /// @notice Set the issuance module for the vault
    /// @param _issuance The issuance module address
    /// @dev only owner
    function setIssuance(address _issuance) external only(owner()) {
        if (_issuance == address(0)) revert VaultZeroCheck();
        issuance = _issuance;
        emit VaultIssuanceSet(_issuance);
    }

    /// @notice Set the rebalancer module for the vault
    /// @param _rebalancer The rebalancer module address
    /// @dev only owner
    function setRebalancer(address _rebalancer) external only(owner()) {
        if (_rebalancer == address(0)) revert VaultZeroCheck();
        rebalancer = _rebalancer;
        emit VaultRebalancerSet(_rebalancer);
    }

    /// @notice Set the fee recipient
    /// @param _feeRecipient The fee recipient address
    /// @dev only owner
    function setFeeRecipient(address _feeRecipient) external only(owner()) {
        if (_feeRecipient == address(0)) revert VaultZeroCheck();
        feeRecipient = _feeRecipient;
        emit VaultFeeRecipientSet(_feeRecipient);
    }

    /// @notice Set the emergency responder
    /// @param _emergencyResponder The emergency responder address
    /// @dev only owner
    function setEmergencyResponder(
        address _emergencyResponder
    ) external only(owner()) {
        if (_emergencyResponder == address(0)) revert VaultZeroCheck();
        emergencyResponder = _emergencyResponder;
        emit VaultEmergencyResponderSet(_emergencyResponder);
    }

    /// @notice Set the inflation rate
    /// @param _inflationRate The per second inflation rate
    /// @dev only owner & accrues inflation
    function setInflationRate(uint256 _inflationRate) external only(owner()) {
        if (_inflationRate > SCALAR) {
            revert AMKTVaultInflationRateTooLarge();
        }
        inflationRate = _inflationRate;
        emit VaultInflationRateSet(_inflationRate);
    }

    /// @notice Set the emergency flag
    /// @param _emergency The emergency flag
    /// @dev only emergency responder
    function setEmergency(bool _emergency) external only(emergencyResponder) {
        emergency = _emergency;
        emit VaultEmergencySet(_emergency);
    }

    ///////////////////////// INFLATION /////////////////////////

    /// @notice Try to accrue inflation
    function tryInflation() external only(feeRecipient) {
        if (block.timestamp < lastKnownTimestamp + 1 days)
            revert AMKTVaultFeeTooEarly();
        uint256 startingSupply = indexToken.totalSupply();
        uint256 timestampDiff = block.timestamp - lastKnownTimestamp;
        uint256 inflation = fmul(startingSupply, timestampDiff * inflationRate);
        if (inflation == 0) revert AMKTVaultFeeTooSmall();

        lastKnownTimestamp = block.timestamp;

        uint256 valueMultiplier = fdiv(
            startingSupply,
            startingSupply + inflation
        );

        TokenInfo[] memory tokens = virtualUnits();
        for (uint256 i = 0; i < tokens.length; i++) {
            _setNominal(
                SetNominalArgs({
                    token: tokens[i].token,
                    virtualUnits: fmul(tokens[i].units, valueMultiplier)
                })
            );
        }

        indexToken.mint(feeRecipient, inflation);
        invariantCheck();
        emit VaultFeeMinted(feeRecipient, inflation);
    }

    ///////////////////////// INVOKE /////////////////////////

    /// @notice Set the nominal units of more than one token
    /// @param args The SetNominalArgs[]
    /// @dev only rebalancer
    function invokeSetNominals(
        SetNominalArgs[] calldata args
    ) external whenNotEmergency only(rebalancer) {
        for (uint256 i; i < args.length; i++) {
            _setNominal(args[i]);
        }
    }

    /// @notice Invoke ERC20 transfers
    /// @param args The InvokeERC20Args[]
    /// @dev only invokers
    function invokeERC20s(
        InvokeERC20Args[] calldata args
    ) external onlyInvokers {
        for (uint256 i; i < args.length; i++) {
            _transferERC20(args[i]);
        }
    }

    /// @notice Mint index tokens
    /// @param to The recipient of the index tokens
    /// @param amount The amount of index tokens to mint
    /// @dev only issuance
    function invokeMint(
        address to,
        uint256 amount
    ) external whenNotEmergency only(issuance) {
        indexToken.mint(to, amount);
    }

    /// @notice Burn index tokens
    /// @param from The owner of the index tokens
    /// @param amount The amount of index tokens to burn
    /// @dev only issuance
    function invokeBurn(address from, uint256 amount) external only(issuance) {
        indexToken.burn(from, amount);
    }

    ///////////////////////// VIEW ////////////////////////

    /// @notice Returns the underlying tokens
    /// @return address[] memory of underlying tokens with nominal units > 0
    function underlying() external view returns (address[] memory) {
        return _underlying.toMemoryArray();
    }

    /// @notice Returns the underlying tokens and their nominal units
    /// @return the number of tokens backing the index
    function underlyingLength() external view returns (uint256) {
        return _underlying.size();
    }

    /// @notice Returns true if the token is an underlying
    /// @param _token address
    /// @return bool true if underlying
    function isUnderlying(address _token) public view returns (bool) {
        return _underlying.includes(_token);
    }

    /// @notice Returns the virtual units of a token
    /// @dev warning! does not revert on non-underlying token
    /// @param token address
    /// @return uint256
    function virtualUnits(address token) public view returns (uint256) {
        return _nominals[token];
    }

    /// @notice Returns the virtual units of all tokens
    /// @return TokenInfo[] memory
    function virtualUnits() public view returns (TokenInfo[] memory) {
        address[] storage stor = _underlying.toStorageArray();
        uint256 len = stor.length;

        TokenInfo[] memory info = new TokenInfo[](len);

        for (uint256 i; i < len; i++) {
            address token = stor[i];
            info[i] = TokenInfo({token: token, units: _nominals[token]});
        }

        return info;
    }

    /// @notice Checks that the vault is in a valid state
    /// @notice i.e. we can wind down to 0 safely
    /// @notice reverts if the check fails
    function invariantCheck() public view {
        TokenInfo[] memory tokens = virtualUnits();

        for (uint256 i; i < tokens.length; ) {
            uint256 expectedAmount = fmul(
                tokens[i].units,
                indexToken.totalSupply()
            );
            if (
                IERC20(tokens[i].token).balanceOf(address(this)) <
                expectedAmount
            ) revert VaultInvariant();

            unchecked {
                ++i;
            }
        }
    }

    ///////////////////////// INTERNAL /////////////////////////

    function _setNominal(SetNominalArgs memory args) internal {
        address token = args.token;
        uint256 _virtualUnits = args.virtualUnits;

        if (_virtualUnits == 0) {
            delete _nominals[token];
            _underlying.remove(token);
            return;
        }

        if (!isUnderlying(token)) {
            _underlying.add(token);
        }

        _nominals[token] = _virtualUnits;
    }

    function _transferERC20(InvokeERC20Args memory args) internal {
        IERC20(args.token).safeTransfer(args.to, args.amount);
    }
}

File 2 of 15 : VArray.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.18;

/// O(1) insertion / deletion to an array
/// can also check inclusion
library VerifiableAddressArray {
    struct VerifiableArray {
        address[] elements;
        mapping(address => uint256) indexOf;
        // use an additional SSTORE to save a SLOAD at user runtime
        mapping(address => bool) included;
    }

    function size(VerifiableArray storage arr) internal view returns (uint256) {
        return arr.elements.length;
    }

    function add(VerifiableArray storage arr, address element) internal {
        if (includes(arr, element)) {
            revert("VerifiableArray: element already exists");
        } else {
            arr.included[element] = true;
            arr.indexOf[element] = arr.elements.length;
            arr.elements.push(element);
        }
    }

    function remove(VerifiableArray storage arr, address element) internal {
        if (!includes(arr, element)) {
            revert("VerifiableArray: element not found");
        }

        uint256 _size = size(arr);

        if (_size == 1) {
            delete arr.included[element];
            delete arr.indexOf[element];
            arr.elements.pop();
            return;
        }

        uint index = arr.indexOf[element];
        address lastElement = arr.elements[_size - 1];

        arr.indexOf[lastElement] = index;

        delete arr.included[element];
        delete arr.indexOf[element];

        arr.elements[index] = lastElement;
        arr.elements.pop();
    }

    function includes(
        VerifiableArray storage arr,
        address element
    ) internal view returns (bool) {
        return arr.included[element];
    }

    function toStorageArray(
        VerifiableArray storage arr
    ) internal view returns (address[] storage) {
        return arr.elements;
    }

    function toMemoryArray(
        VerifiableArray storage arr
    ) internal view returns (address[] memory) {
        address[] storage stor = toStorageArray(arr);
        uint256 len = stor.length;

        address[] memory mem = new address[](len);

        for (uint256 i; i < len; i++) {
            mem[i] = stor[i];
        }

        return mem;
    }
}

File 3 of 15 : IVault.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.18;

import {TokenInfo} from "src/Common.sol";
import {IIndexToken} from "src/interfaces/IIndexToken.sol";

interface IVault {
    error AMKTVaultOnlyInvokers();
    error AMKTVaultOnly(address who);
    error AMKTVaultInflationRateTooLarge();
    error AMKTVaultFeeTooEarly();
    error AMKTVaultFeeTooSmall();
    error AMKTVaultEmergency();
    error VaultInvariant();
    error VaultZeroCheck();

    event VaultIssuanceSet(address issuance);
    event VaultRebalancerSet(address rebalancer);
    event VaultFeeRecipientSet(address feeRecipient);
    event VaultEmergencyResponderSet(address emergencyResponder);
    event VaultInflationRateSet(uint256 inflationRate);
    event VaultEmergencySet(bool emergency);
    event VaultFeeMinted(address indexed to, uint256 amount);

    struct InvokeERC20Args {
        address token;
        address to;
        uint256 amount;
    }

    struct SetNominalArgs {
        address token;
        uint256 virtualUnits;
    }

    function issuance() external view returns (address);

    function rebalancer() external view returns (address);

    function tryInflation() external;

    function inflationRate() external view returns (uint256);

    function feeRecipient() external view returns (address);

    function lastKnownTimestamp() external view returns (uint256);

    function invokeERC20s(InvokeERC20Args[] calldata args) external;

    function invokeSetNominals(SetNominalArgs[] calldata args) external;

    function virtualUnits(address token) external view returns (uint256);

    function virtualUnits() external view returns (TokenInfo[] memory);

    function invariantCheck() external view;

    function isUnderlying(address target) external view returns (bool);

    function underlying() external view returns (address[] memory);

    function underlyingLength() external view returns (uint256);

    function invokeMint(address to, uint256 amount) external;

    function invokeBurn(address from, uint256 amount) external;

    function indexToken() external view returns (IIndexToken);
}

File 4 of 15 : Common.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.18;

struct TokenInfo {
    address token;
    uint256 units;
}

File 5 of 15 : IIndexToken.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.18;

import {IERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol";

interface IIndexToken is IERC20Upgradeable {
    event MinterSet(address indexed minter);

    ///=============================================================================================
    /// Initializer
    ///=============================================================================================

    function initialize(address _minter) external;

    ///=============================================================================================
    /// State
    ///=============================================================================================

    function minter() external view returns (address);

    ///=============================================================================================
    /// Mint Logic
    ///=============================================================================================

    /// @notice External mint function
    /// @dev Mint function can only be called externally by the controller
    /// @param to address
    /// @param amount uint256
    function mint(address to, uint256 amount) external;

    /// @notice External burn function
    /// @dev burn function can only be called externally by the controller
    /// @param from address
    /// @param amount uint256
    function burn(address from, uint256 amount) external;
}

File 6 of 15 : FixedPoint.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.18;

uint256 constant SCALAR = 1e18;

function fmul(uint256 a, uint256 b) pure returns (uint256 ret) {
    ret = (a * b) / SCALAR;
}

function fdiv(uint256 a, uint256 b) pure returns (uint256 ret) {
    ret = (a * SCALAR) / b;
}

function finv(uint256 a) pure returns (uint256 ret) {
    ret = fdiv(SCALAR, a);
}

File 7 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 8 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

File 9 of 15 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() external {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

File 10 of 15 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20Upgradeable.sol";

File 11 of 15 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

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

File 12 of 15 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 13 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 14 of 15 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 15 of 15 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "src/=src/",
    "test/=test/",
    "invoke-modules/=src/invoke/",
    "core-libs/=src/lib/",
    "core-test/=test/core/",
    "mocks/=test/mocks/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "halmost-cheatcodes/=lib/halmos-cheatcodes/src/",
    "halmos-cheatcodes/=lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IIndexToken","name":"_indexToken","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"address","name":"_emergencyResponder","type":"address"},{"internalType":"uint256","name":"_inflationRate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AMKTVaultEmergency","type":"error"},{"inputs":[],"name":"AMKTVaultFeeTooEarly","type":"error"},{"inputs":[],"name":"AMKTVaultFeeTooSmall","type":"error"},{"inputs":[],"name":"AMKTVaultInflationRateTooLarge","type":"error"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"AMKTVaultOnly","type":"error"},{"inputs":[],"name":"AMKTVaultOnlyInvokers","type":"error"},{"inputs":[],"name":"VaultInvariant","type":"error"},{"inputs":[],"name":"VaultZeroCheck","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"emergencyResponder","type":"address"}],"name":"VaultEmergencyResponderSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"emergency","type":"bool"}],"name":"VaultEmergencySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"VaultFeeMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeRecipient","type":"address"}],"name":"VaultFeeRecipientSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"inflationRate","type":"uint256"}],"name":"VaultInflationRateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"issuance","type":"address"}],"name":"VaultIssuanceSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rebalancer","type":"address"}],"name":"VaultRebalancerSet","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyResponder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"indexToken","outputs":[{"internalType":"contract IIndexToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inflationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"invariantCheck","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"invokeBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IVault.InvokeERC20Args[]","name":"args","type":"tuple[]"}],"name":"invokeERC20s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"invokeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"virtualUnits","type":"uint256"}],"internalType":"struct IVault.SetNominalArgs[]","name":"args","type":"tuple[]"}],"name":"invokeSetNominals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isUnderlying","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"issuance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastKnownTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebalancer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_emergency","type":"bool"}],"name":"setEmergency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_emergencyResponder","type":"address"}],"name":"setEmergencyResponder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_inflationRate","type":"uint256"}],"name":"setInflationRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_issuance","type":"address"}],"name":"setIssuance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rebalancer","type":"address"}],"name":"setRebalancer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tryInflation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"virtualUnits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"virtualUnits","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"units","type":"uint256"}],"internalType":"struct TokenInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b5060405162002036380380620020368339810160408190526200003491620001c7565b6200003f3362000137565b6001600160a01b0384166200006757604051630e69a9df60e31b815260040160405180910390fd5b6001600160a01b0383166200008f57604051630e69a9df60e31b815260040160405180910390fd5b6001600160a01b038216620000b757604051630e69a9df60e31b815260040160405180910390fd5b670de0b6b3a7640000811115620000e157604051632fa83acb60e11b815260040160405180910390fd5b6001600160a01b038516608052620000f98462000137565b600580546001600160a01b039384166001600160a01b031991821617909155600480549490931693169290921790556006555050426007556200023b565b600180546001600160a01b03191690556200015e8162000161602090811b6200114417901c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200015e57600080fd5b600080600080600060a08688031215620001e057600080fd5b8551620001ed81620001b1565b60208701519095506200020081620001b1565b60408701519094506200021381620001b1565b60608701519093506200022681620001b1565b80925050608086015190509295509295909350565b608051611dbc6200027a600039600081816103ee015281816105ae015281816107f201528181610bb001528181610d550152610f430152611dbc6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c8063863623bb11610104578063b213e3f7116100a2578063e74b981b11610071578063e74b981b146103d6578063e7d015f2146103e9578063ed63106114610410578063f2fde38b1461042357600080fd5b8063b213e3f71461037b578063caa6fea41461039e578063de1e2eea146103b2578063e30c3978146103c557600080fd5b80639ff6a78c116100de5780639ff6a78c14610344578063a7d0337714610357578063a887eda31461035f578063b1551b951461036857600080fd5b8063863623bb1461030b5780638c30fb7e1461031e5780638da5cb5b1461033357600080fd5b80636cfd15531161017c578063736419ef1161014b578063736419ef146102b457806377052fc1146102c757806379ba5097146102da5780637dd09fec146102e257600080fd5b80636cfd1553146102715780636dab2bc0146102845780636f307dc314610297578063715018a6146102ac57600080fd5b806331f9e35b116101b857806331f9e35b1461023a5780633c37b54b146102435780634509017e14610256578063469048401461025e57600080fd5b806301d22ccd146101df5780630501d5561461020f578063207faa7d14610224575b600080fd5b6003546101f2906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61022261021d36600461191e565b610436565b005b61022c6104cb565b604051908152602001610206565b61022c60065481565b61022261025136600461193b565b6104db565b610222610571565b6004546101f2906001600160a01b031681565b61022261027f3660046119cc565b6106e9565b6102226102923660046119e7565b610795565b61029f610854565b6040516102069190611a11565b610222610860565b6102226102c23660046119cc565b610874565b6005546101f2906001600160a01b031681565b610222610920565b61022c6102f03660046119cc565b6001600160a01b03166000908152600b602052604090205490565b6002546101f2906001600160a01b031681565b61032661099a565b6040516102069190611a5e565b6000546001600160a01b03166101f2565b6102226103523660046119cc565b610a99565b610222610b45565b61022c60075481565b610222610376366004611ab6565b610e03565b61038e6103893660046119cc565b610e98565b6040519015158152602001610206565b60015461038e90600160a01b900460ff1681565b6102226103c03660046119e7565b610ebb565b6001546001600160a01b03166101f2565b6102226103e43660046119cc565b610f72565b6101f27f000000000000000000000000000000000000000000000000000000000000000081565b61022261041e366004611acf565b61101e565b6102226104313660046119cc565b6110d3565b6005546001600160a01b0316338114610472576040516379ff071d60e11b81526001600160a01b03821660048201526024015b60405180910390fd5b60018054831515600160a01b0260ff60a01b199091161790556040517f67a04af6bceb23834381c7373fddb94e081e12f4ac492c98f18b71a7196d7993906104bf90841515815260200190565b60405180910390a15050565b60006104d660085490565b905090565b6002546001600160a01b0316331480159061050157506003546001600160a01b03163314155b1561051f57604051634e65a31b60e01b815260040160405180910390fd5b60005b8181101561056c5761055a83838381811061053f5761053f611b32565b9050606002018036038101906105559190611b5e565b611194565b8061056481611bea565b915050610522565b505050565b600061057b61099a565b905060005b81518110156106e55760006106338383815181106105a0576105a0611b32565b6020026020010151602001517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611c03565b6111b5565b90508083838151811061064857610648611b32565b6020908102919091010151516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610699573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bd9190611c03565b10156106dc57604051631cc92ae160e01b815260040160405180910390fd5b50600101610580565b5050565b6000546001600160a01b0316338114610720576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b03821661074757604051630e69a9df60e31b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0384169081179091556040519081527f7459cca2180c4c67025ec356c52daa36a028b7d1f66c8c2f10678e8b23fd41c8906020016104bf565b6002546001600160a01b03163381146107cc576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b604051632770a7eb60e21b81526001600160a01b038481166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690639dc29fac906044015b600060405180830381600087803b15801561083757600080fd5b505af115801561084b573d6000803e3d6000fd5b50505050505050565b60606104d660086111db565b6108686112a9565b6108726000611303565b565b6000546001600160a01b03163381146108ab576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b0382166108d257604051630e69a9df60e31b815260040160405180910390fd5b600580546001600160a01b0319166001600160a01b0384169081179091556040519081527fb7828ad7801f391a6eb922c9dbc2319a70f50646eae3fe20be188dcbb5b56009906020016104bf565b60015433906001600160a01b0316811461098e5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610469565b61099781611303565b50565b600880546060919060008167ffffffffffffffff8111156109bd576109bd611b48565b604051908082528060200260200182016040528015610a0257816020015b60408051808201909152600080825260208201528152602001906001900390816109db5790505b50905060005b82811015610a91576000848281548110610a2457610a24611b32565b60009182526020808320909101546040805180820182526001600160a01b03909216808352808552600b845293205491810191909152845191925090849084908110610a7257610a72611b32565b6020026020010181905250508080610a8990611bea565b915050610a08565b509392505050565b6000546001600160a01b0316338114610ad0576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b038216610af757604051630e69a9df60e31b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0384169081179091556040519081527febcebc246416f572a4b006b28c4731a17a8488b467382b4bf2111f2a5f653187906020016104bf565b6004546001600160a01b0316338114610b7c576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b600754610b8c9062015180611c1c565b421015610bac57604051630f9a8f6160e31b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c309190611c03565b9050600060075442610c429190611c2f565b90506000610c58836006548461062e9190611c42565b905080600003610c7b57604051632375de2960e11b815260040160405180910390fd5b426007556000610c9484610c8f8482611c1c565b61131c565b90506000610ca061099a565b905060005b8151811015610d2857610d166040518060400160405280848481518110610cce57610cce611b32565b6020026020010151600001516001600160a01b03168152602001610d0f858581518110610cfd57610cfd611b32565b602002602001015160200151876111b5565b9052611331565b80610d2081611bea565b915050610ca5565b50600480546040516340c10f1960e01b81526001600160a01b0391821692810192909252602482018590527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b158015610d9957600080fd5b505af1158015610dad573d6000803e3d6000fd5b50505050610db9610571565b6004546040518481526001600160a01b03909116907f4ae3e370626815bbde09e1e0460c6bfe7515a826bddbbb984051522653dd5d2a9060200160405180910390a2505050505050565b6000546001600160a01b0316338114610e3a576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b670de0b6b3a7640000821115610e6357604051632fa83acb60e11b815260040160405180910390fd5b60068290556040518281527ff9acce31f492c41b68ae715395fee04b037d05cf880e1943d4fa781b7703554e906020016104bf565b6001600160a01b0381166000908152600a602052604081205460ff165b92915050565b600154600160a01b900460ff1615610ee657604051635201f2b760e01b815260040160405180910390fd5b6002546001600160a01b0316338114610f1d576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000000000000000000000000000000000000000000016906340c10f199060440161081d565b6000546001600160a01b0316338114610fa9576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b038216610fd057604051630e69a9df60e31b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0384169081179091556040519081527f51147c0622f96c2c6a034f0c8637a7c06a1368dc9c9e479968febf72750b3d4f906020016104bf565b600154600160a01b900460ff161561104957604051635201f2b760e01b815260040160405180910390fd5b6003546001600160a01b0316338114611080576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b60005b828110156110cd576110bb8484838181106110a0576110a0611b32565b9050604002018036038101906110b69190611c59565b611331565b806110c581611bea565b915050611083565b50505050565b6110db6112a9565b600180546001600160a01b0383166001600160a01b0319909116811790915561110c6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b602081015160408201518251610997926001600160a01b039091169161139a565b6000670de0b6b3a76400006111ca8385611c42565b6111d49190611cbe565b9392505050565b8054606090829060008167ffffffffffffffff8111156111fd576111fd611b48565b604051908082528060200260200182016040528015611226578160200160208202803683370190505b50905060005b828110156112a05783818154811061124657611246611b32565b9060005260206000200160009054906101000a90046001600160a01b031682828151811061127657611276611b32565b6001600160a01b03909216602092830291909101909101528061129881611bea565b91505061122c565b50949350505050565b6000546001600160a01b031633146108725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b600180546001600160a01b031916905561099781611144565b6000816111ca670de0b6b3a764000085611c42565b805160208201516000819003611365576001600160a01b0382166000908152600b602052604081205561056c6008836113ec565b61136e82610e98565b61137d5761137d6008836115dc565b6001600160a01b039091166000908152600b602052604090205550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261056c9084906116ae565b6001600160a01b038116600090815260028301602052604090205460ff166114615760405162461bcd60e51b815260206004820152602260248201527f56657269666961626c6541727261793a20656c656d656e74206e6f7420666f756044820152611b9960f21b6064820152608401610469565b600061146b835490565b9050806001036114dc576001600160a01b03821660009081526002840160209081526040808320805460ff191690556001860190915281205582548390806114b5576114b5611ce0565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6001600160a01b038216600090815260018085016020526040822054919085906115069085611c2f565b8154811061151657611516611b32565b60009182526020808320909101546001600160a01b03908116808452600189018084526040808620889055928916855260028a018452828520805460ff191690559092528220919091558554909150819086908490811061157957611579611b32565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905584548590806115b3576115b3611ce0565b600082815260209020810160001990810180546001600160a01b03191690550190555050505050565b6001600160a01b038116600090815260028301602052604090205460ff16156116575760405162461bcd60e51b815260206004820152602760248201527f56657269666961626c6541727261793a20656c656d656e7420616c72656164796044820152662065786973747360c81b6064820152608401610469565b6001600160a01b03811660008181526002840160209081526040808320805460ff19166001908117909155865487820184529184208290558101865585835291200180546001600160a01b03191690911790555050565b6000611703826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117809092919063ffffffff16565b80519091501561056c57808060200190518101906117219190611cf6565b61056c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610469565b606061178f8484600085611797565b949350505050565b6060824710156117f85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610469565b600080866001600160a01b031685876040516118149190611d37565b60006040518083038185875af1925050503d8060008114611851576040519150601f19603f3d011682016040523d82523d6000602084013e611856565b606091505b509150915061186787838387611872565b979650505050505050565b606083156118e15782516000036118da576001600160a01b0385163b6118da5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610469565b508161178f565b61178f83838151156118f65781518083602001fd5b8060405162461bcd60e51b81526004016104699190611d53565b801515811461099757600080fd5b60006020828403121561193057600080fd5b81356111d481611910565b6000806020838503121561194e57600080fd5b823567ffffffffffffffff8082111561196657600080fd5b818501915085601f83011261197a57600080fd5b81358181111561198957600080fd5b86602060608302850101111561199e57600080fd5b60209290920196919550909350505050565b80356001600160a01b03811681146119c757600080fd5b919050565b6000602082840312156119de57600080fd5b6111d4826119b0565b600080604083850312156119fa57600080fd5b611a03836119b0565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b81811015611a525783516001600160a01b031683529284019291840191600101611a2d565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015611aa957815180516001600160a01b03168552860151868501529284019290850190600101611a7b565b5091979650505050505050565b600060208284031215611ac857600080fd5b5035919050565b60008060208385031215611ae257600080fd5b823567ffffffffffffffff80821115611afa57600080fd5b818501915085601f830112611b0e57600080fd5b813581811115611b1d57600080fd5b8660208260061b850101111561199e57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060608284031215611b7057600080fd5b6040516060810181811067ffffffffffffffff82111715611ba157634e487b7160e01b600052604160045260246000fd5b604052611bad836119b0565b8152611bbb602084016119b0565b6020820152604083013560408201528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600060018201611bfc57611bfc611bd4565b5060010190565b600060208284031215611c1557600080fd5b5051919050565b80820180821115610eb557610eb5611bd4565b81810381811115610eb557610eb5611bd4565b8082028115828204841417610eb557610eb5611bd4565b600060408284031215611c6b57600080fd5b6040516040810181811067ffffffffffffffff82111715611c9c57634e487b7160e01b600052604160045260246000fd5b604052611ca8836119b0565b8152602083013560208201528091505092915050565b600082611cdb57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b600060208284031215611d0857600080fd5b81516111d481611910565b60005b83811015611d2e578181015183820152602001611d16565b50506000910152565b60008251611d49818460208701611d13565b9190910192915050565b6020815260008251806020840152611d72816040850160208701611d13565b601f01601f1916919091016040019291505056fea26469706673582212200544b750bd5898d1214dcaa0c5fe11e4e183acdecf2da3f15e800732ad42f8ce64736f6c63430008120033000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d00000000000000000000000091f23057ee6e2d1e1ba00a7c1d71ba1a0b2c3113000000000000000000000000c19a5b6e0a923519603985153515222d59cb3f2e000000000000000000000000aeb9ef94b6542be7112f3a295646b5aaaa9fca130000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063863623bb11610104578063b213e3f7116100a2578063e74b981b11610071578063e74b981b146103d6578063e7d015f2146103e9578063ed63106114610410578063f2fde38b1461042357600080fd5b8063b213e3f71461037b578063caa6fea41461039e578063de1e2eea146103b2578063e30c3978146103c557600080fd5b80639ff6a78c116100de5780639ff6a78c14610344578063a7d0337714610357578063a887eda31461035f578063b1551b951461036857600080fd5b8063863623bb1461030b5780638c30fb7e1461031e5780638da5cb5b1461033357600080fd5b80636cfd15531161017c578063736419ef1161014b578063736419ef146102b457806377052fc1146102c757806379ba5097146102da5780637dd09fec146102e257600080fd5b80636cfd1553146102715780636dab2bc0146102845780636f307dc314610297578063715018a6146102ac57600080fd5b806331f9e35b116101b857806331f9e35b1461023a5780633c37b54b146102435780634509017e14610256578063469048401461025e57600080fd5b806301d22ccd146101df5780630501d5561461020f578063207faa7d14610224575b600080fd5b6003546101f2906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61022261021d36600461191e565b610436565b005b61022c6104cb565b604051908152602001610206565b61022c60065481565b61022261025136600461193b565b6104db565b610222610571565b6004546101f2906001600160a01b031681565b61022261027f3660046119cc565b6106e9565b6102226102923660046119e7565b610795565b61029f610854565b6040516102069190611a11565b610222610860565b6102226102c23660046119cc565b610874565b6005546101f2906001600160a01b031681565b610222610920565b61022c6102f03660046119cc565b6001600160a01b03166000908152600b602052604090205490565b6002546101f2906001600160a01b031681565b61032661099a565b6040516102069190611a5e565b6000546001600160a01b03166101f2565b6102226103523660046119cc565b610a99565b610222610b45565b61022c60075481565b610222610376366004611ab6565b610e03565b61038e6103893660046119cc565b610e98565b6040519015158152602001610206565b60015461038e90600160a01b900460ff1681565b6102226103c03660046119e7565b610ebb565b6001546001600160a01b03166101f2565b6102226103e43660046119cc565b610f72565b6101f27f000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d81565b61022261041e366004611acf565b61101e565b6102226104313660046119cc565b6110d3565b6005546001600160a01b0316338114610472576040516379ff071d60e11b81526001600160a01b03821660048201526024015b60405180910390fd5b60018054831515600160a01b0260ff60a01b199091161790556040517f67a04af6bceb23834381c7373fddb94e081e12f4ac492c98f18b71a7196d7993906104bf90841515815260200190565b60405180910390a15050565b60006104d660085490565b905090565b6002546001600160a01b0316331480159061050157506003546001600160a01b03163314155b1561051f57604051634e65a31b60e01b815260040160405180910390fd5b60005b8181101561056c5761055a83838381811061053f5761053f611b32565b9050606002018036038101906105559190611b5e565b611194565b8061056481611bea565b915050610522565b505050565b600061057b61099a565b905060005b81518110156106e55760006106338383815181106105a0576105a0611b32565b6020026020010151602001517f000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611c03565b6111b5565b90508083838151811061064857610648611b32565b6020908102919091010151516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610699573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106bd9190611c03565b10156106dc57604051631cc92ae160e01b815260040160405180910390fd5b50600101610580565b5050565b6000546001600160a01b0316338114610720576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b03821661074757604051630e69a9df60e31b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0384169081179091556040519081527f7459cca2180c4c67025ec356c52daa36a028b7d1f66c8c2f10678e8b23fd41c8906020016104bf565b6002546001600160a01b03163381146107cc576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b604051632770a7eb60e21b81526001600160a01b038481166004830152602482018490527f000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d1690639dc29fac906044015b600060405180830381600087803b15801561083757600080fd5b505af115801561084b573d6000803e3d6000fd5b50505050505050565b60606104d660086111db565b6108686112a9565b6108726000611303565b565b6000546001600160a01b03163381146108ab576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b0382166108d257604051630e69a9df60e31b815260040160405180910390fd5b600580546001600160a01b0319166001600160a01b0384169081179091556040519081527fb7828ad7801f391a6eb922c9dbc2319a70f50646eae3fe20be188dcbb5b56009906020016104bf565b60015433906001600160a01b0316811461098e5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610469565b61099781611303565b50565b600880546060919060008167ffffffffffffffff8111156109bd576109bd611b48565b604051908082528060200260200182016040528015610a0257816020015b60408051808201909152600080825260208201528152602001906001900390816109db5790505b50905060005b82811015610a91576000848281548110610a2457610a24611b32565b60009182526020808320909101546040805180820182526001600160a01b03909216808352808552600b845293205491810191909152845191925090849084908110610a7257610a72611b32565b6020026020010181905250508080610a8990611bea565b915050610a08565b509392505050565b6000546001600160a01b0316338114610ad0576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b038216610af757604051630e69a9df60e31b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0384169081179091556040519081527febcebc246416f572a4b006b28c4731a17a8488b467382b4bf2111f2a5f653187906020016104bf565b6004546001600160a01b0316338114610b7c576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b600754610b8c9062015180611c1c565b421015610bac57604051630f9a8f6160e31b815260040160405180910390fd5b60007f000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d6001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c309190611c03565b9050600060075442610c429190611c2f565b90506000610c58836006548461062e9190611c42565b905080600003610c7b57604051632375de2960e11b815260040160405180910390fd5b426007556000610c9484610c8f8482611c1c565b61131c565b90506000610ca061099a565b905060005b8151811015610d2857610d166040518060400160405280848481518110610cce57610cce611b32565b6020026020010151600001516001600160a01b03168152602001610d0f858581518110610cfd57610cfd611b32565b602002602001015160200151876111b5565b9052611331565b80610d2081611bea565b915050610ca5565b50600480546040516340c10f1960e01b81526001600160a01b0391821692810192909252602482018590527f000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d16906340c10f1990604401600060405180830381600087803b158015610d9957600080fd5b505af1158015610dad573d6000803e3d6000fd5b50505050610db9610571565b6004546040518481526001600160a01b03909116907f4ae3e370626815bbde09e1e0460c6bfe7515a826bddbbb984051522653dd5d2a9060200160405180910390a2505050505050565b6000546001600160a01b0316338114610e3a576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b670de0b6b3a7640000821115610e6357604051632fa83acb60e11b815260040160405180910390fd5b60068290556040518281527ff9acce31f492c41b68ae715395fee04b037d05cf880e1943d4fa781b7703554e906020016104bf565b6001600160a01b0381166000908152600a602052604081205460ff165b92915050565b600154600160a01b900460ff1615610ee657604051635201f2b760e01b815260040160405180910390fd5b6002546001600160a01b0316338114610f1d576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6040516340c10f1960e01b81526001600160a01b038481166004830152602482018490527f000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d16906340c10f199060440161081d565b6000546001600160a01b0316338114610fa9576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b6001600160a01b038216610fd057604051630e69a9df60e31b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b0384169081179091556040519081527f51147c0622f96c2c6a034f0c8637a7c06a1368dc9c9e479968febf72750b3d4f906020016104bf565b600154600160a01b900460ff161561104957604051635201f2b760e01b815260040160405180910390fd5b6003546001600160a01b0316338114611080576040516379ff071d60e11b81526001600160a01b0382166004820152602401610469565b60005b828110156110cd576110bb8484838181106110a0576110a0611b32565b9050604002018036038101906110b69190611c59565b611331565b806110c581611bea565b915050611083565b50505050565b6110db6112a9565b600180546001600160a01b0383166001600160a01b0319909116811790915561110c6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b602081015160408201518251610997926001600160a01b039091169161139a565b6000670de0b6b3a76400006111ca8385611c42565b6111d49190611cbe565b9392505050565b8054606090829060008167ffffffffffffffff8111156111fd576111fd611b48565b604051908082528060200260200182016040528015611226578160200160208202803683370190505b50905060005b828110156112a05783818154811061124657611246611b32565b9060005260206000200160009054906101000a90046001600160a01b031682828151811061127657611276611b32565b6001600160a01b03909216602092830291909101909101528061129881611bea565b91505061122c565b50949350505050565b6000546001600160a01b031633146108725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b600180546001600160a01b031916905561099781611144565b6000816111ca670de0b6b3a764000085611c42565b805160208201516000819003611365576001600160a01b0382166000908152600b602052604081205561056c6008836113ec565b61136e82610e98565b61137d5761137d6008836115dc565b6001600160a01b039091166000908152600b602052604090205550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261056c9084906116ae565b6001600160a01b038116600090815260028301602052604090205460ff166114615760405162461bcd60e51b815260206004820152602260248201527f56657269666961626c6541727261793a20656c656d656e74206e6f7420666f756044820152611b9960f21b6064820152608401610469565b600061146b835490565b9050806001036114dc576001600160a01b03821660009081526002840160209081526040808320805460ff191690556001860190915281205582548390806114b5576114b5611ce0565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b6001600160a01b038216600090815260018085016020526040822054919085906115069085611c2f565b8154811061151657611516611b32565b60009182526020808320909101546001600160a01b03908116808452600189018084526040808620889055928916855260028a018452828520805460ff191690559092528220919091558554909150819086908490811061157957611579611b32565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905584548590806115b3576115b3611ce0565b600082815260209020810160001990810180546001600160a01b03191690550190555050505050565b6001600160a01b038116600090815260028301602052604090205460ff16156116575760405162461bcd60e51b815260206004820152602760248201527f56657269666961626c6541727261793a20656c656d656e7420616c72656164796044820152662065786973747360c81b6064820152608401610469565b6001600160a01b03811660008181526002840160209081526040808320805460ff19166001908117909155865487820184529184208290558101865585835291200180546001600160a01b03191690911790555050565b6000611703826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117809092919063ffffffff16565b80519091501561056c57808060200190518101906117219190611cf6565b61056c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610469565b606061178f8484600085611797565b949350505050565b6060824710156117f85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610469565b600080866001600160a01b031685876040516118149190611d37565b60006040518083038185875af1925050503d8060008114611851576040519150601f19603f3d011682016040523d82523d6000602084013e611856565b606091505b509150915061186787838387611872565b979650505050505050565b606083156118e15782516000036118da576001600160a01b0385163b6118da5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610469565b508161178f565b61178f83838151156118f65781518083602001fd5b8060405162461bcd60e51b81526004016104699190611d53565b801515811461099757600080fd5b60006020828403121561193057600080fd5b81356111d481611910565b6000806020838503121561194e57600080fd5b823567ffffffffffffffff8082111561196657600080fd5b818501915085601f83011261197a57600080fd5b81358181111561198957600080fd5b86602060608302850101111561199e57600080fd5b60209290920196919550909350505050565b80356001600160a01b03811681146119c757600080fd5b919050565b6000602082840312156119de57600080fd5b6111d4826119b0565b600080604083850312156119fa57600080fd5b611a03836119b0565b946020939093013593505050565b6020808252825182820181905260009190848201906040850190845b81811015611a525783516001600160a01b031683529284019291840191600101611a2d565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015611aa957815180516001600160a01b03168552860151868501529284019290850190600101611a7b565b5091979650505050505050565b600060208284031215611ac857600080fd5b5035919050565b60008060208385031215611ae257600080fd5b823567ffffffffffffffff80821115611afa57600080fd5b818501915085601f830112611b0e57600080fd5b813581811115611b1d57600080fd5b8660208260061b850101111561199e57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060608284031215611b7057600080fd5b6040516060810181811067ffffffffffffffff82111715611ba157634e487b7160e01b600052604160045260246000fd5b604052611bad836119b0565b8152611bbb602084016119b0565b6020820152604083013560408201528091505092915050565b634e487b7160e01b600052601160045260246000fd5b600060018201611bfc57611bfc611bd4565b5060010190565b600060208284031215611c1557600080fd5b5051919050565b80820180821115610eb557610eb5611bd4565b81810381811115610eb557610eb5611bd4565b8082028115828204841417610eb557610eb5611bd4565b600060408284031215611c6b57600080fd5b6040516040810181811067ffffffffffffffff82111715611c9c57634e487b7160e01b600052604160045260246000fd5b604052611ca8836119b0565b8152602083013560208201528091505092915050565b600082611cdb57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fd5b600060208284031215611d0857600080fd5b81516111d481611910565b60005b83811015611d2e578181015183820152602001611d16565b50506000910152565b60008251611d49818460208701611d13565b9190910192915050565b6020815260008251806020840152611d72816040850160208701611d13565b601f01601f1916919091016040019291505056fea26469706673582212200544b750bd5898d1214dcaa0c5fe11e4e183acdecf2da3f15e800732ad42f8ce64736f6c63430008120033

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

000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d00000000000000000000000091f23057ee6e2d1e1ba00a7c1d71ba1a0b2c3113000000000000000000000000c19a5b6e0a923519603985153515222d59cb3f2e000000000000000000000000aeb9ef94b6542be7112f3a295646b5aaaa9fca130000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _indexToken (address): 0xF17A3fE536F8F7847F1385ec1bC967b2Ca9caE8D
Arg [1] : _owner (address): 0x91F23057Ee6e2d1E1BA00A7c1D71Ba1a0B2c3113
Arg [2] : _feeRecipient (address): 0xC19a5b6E0a923519603985153515222D59cb3F2e
Arg [3] : _emergencyResponder (address): 0xAeB9ef94b6542BE7112f3a295646B5AaAa9Fca13
Arg [4] : _inflationRate (uint256): 0

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000f17a3fe536f8f7847f1385ec1bc967b2ca9cae8d
Arg [1] : 00000000000000000000000091f23057ee6e2d1e1ba00a7c1d71ba1a0b2c3113
Arg [2] : 000000000000000000000000c19a5b6e0a923519603985153515222d59cb3f2e
Arg [3] : 000000000000000000000000aeb9ef94b6542be7112f3a295646b5aaaa9fca13
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.