ETH Price: $3,466.39 (+1.62%)

Contract

0x3c4Fe0db16c9b521480c43856ba3196A9fa50E08
 
Transaction Hash
Method
Block
From
To
Approve212583912024-11-24 15:06:3526 days ago1732460795IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000225559.26678541
Approve211224922024-11-05 15:57:5945 days ago1730822279IN
0x3c4Fe0db...A9fa50E08
0 ETH0.0003224513.24812259
Approve211145202024-11-04 13:15:4746 days ago1730726147IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000149926.15952795
Approve211087622024-11-03 17:59:5947 days ago1730656799IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000113294.65463461
Approve211079962024-11-03 15:25:4747 days ago1730647547IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000222219.12959958
Approve211072692024-11-03 12:59:1147 days ago1730638751IN
0x3c4Fe0db...A9fa50E08
0 ETH0.00015096.2
Approve211067882024-11-03 11:22:3547 days ago1730632955IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000102264.2016696
Approve211067242024-11-03 11:09:3547 days ago1730632175IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000109534.5
Approve211059842024-11-03 8:41:3547 days ago1730623295IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000099334.08132427
Approve210229682024-10-22 18:39:4759 days ago1729622387IN
0x3c4Fe0db...A9fa50E08
0 ETH0.0002531310.4
Approve208767292024-10-02 8:50:3579 days ago1727859035IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000190497.82628321
Transfer207862642024-09-19 17:54:5992 days ago1726768499IN
0x3c4Fe0db...A9fa50E08
0 ETH0.001658435.38756689
Approve207544482024-09-15 7:13:4796 days ago1726384427IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000098782.13414983
Approve207544162024-09-15 7:07:2396 days ago1726384043IN
0x3c4Fe0db...A9fa50E08
0 ETH0.00009722.1
Approve207073162024-09-08 17:14:11103 days ago1725815651IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000057331.23901431
Transfer207072902024-09-08 17:08:59103 days ago1725815339IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000074631.59251272
Approve206610822024-09-02 6:25:59109 days ago1725258359IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000030210.65279134
Approve205734852024-08-21 0:42:59122 days ago1724200979IN
0x3c4Fe0db...A9fa50E08
0 ETH0.00003580.77382453
Approve205615172024-08-19 8:35:47123 days ago1724056547IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000067621.46086702
Approve205477972024-08-17 10:38:23125 days ago1723891103IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000061831.33587015
Approve205472832024-08-17 8:54:59125 days ago1723884899IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000044730.96668494
Approve205462432024-08-17 5:25:47125 days ago1723872347IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000024621.01173435
Approve204680372024-08-06 7:28:23136 days ago1722929303IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000157253.39739496
Approve204475002024-08-03 10:44:59139 days ago1722681899IN
0x3c4Fe0db...A9fa50E08
0 ETH0.000077071.66506359
Approve204108342024-07-29 7:50:23144 days ago1722239423IN
0x3c4Fe0db...A9fa50E08
0 ETH0.00009792.11521065
View all transactions

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.4+commit.c7e474f2

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 17 : Vault.sol
/// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "../library/AddArrayLib.sol";

import "../interfaces/ITradeExecutor.sol";
import "../interfaces/IVault.sol";

/// @title vault (Brahma Vault)
/// @author 0xAd1 and Bapireddy
/// @notice Minimal vault contract to support trades across different protocols.
contract Vault is IVault, ERC20Permit, ReentrancyGuard {
    using AddrArrayLib for AddrArrayLib.Addresses;
    using SafeERC20 for IERC20;
    /*///////////////////////////////////////////////////////////////
                                 CONSTANTS
    //////////////////////////////////////////////////////////////*/
    /// @notice The maximum number of blocks for latest update to be valid.
    /// @dev Needed for processing deposits/withdrawals.
    uint256 constant BLOCK_LIMIT = 50;
    /// @dev minimum balance used to check when executor is removed.
    uint256 constant DUST_LIMIT = 10**6;
    /// @dev The max basis points used as normalizing factor.
    uint256 constant MAX_BPS = 10000;
    /// @dev The max amount of seconds in year.
    /// accounting for leap years there are 365.25 days in year.
    ///  365.25 * 86400 = 31557600.0
    uint256 constant MAX_SECONDS = 31557600;

    /*///////////////////////////////////////////////////////////////
                                IMMUTABLES
    //////////////////////////////////////////////////////////////*/
    /// @notice The underlying token the vault accepts.
    address public immutable override wantToken;
    uint8 private immutable tokenDecimals;

    /*///////////////////////////////////////////////////////////////
                            MUTABLE ACCESS MODFIERS
    //////////////////////////////////////////////////////////////*/
    /// @notice boolean for enabling deposit/withdraw solely via batcher.
    bool public batcherOnlyDeposit;

    /// @notice boolean for enabling emergency mode to halt new withdrawal/deposits into vault.
    bool public emergencyMode;

    // @notice address of batcher used for batching user deposits/withdrawals.
    address public batcher;
    /// @notice keeper address to move funds between executors.
    address public override keeper;
    /// @notice Governance address to add/remove  executors.
    address public override governance;
    address public pendingGovernance;

    /// @notice Creates a new Vault that accepts a specific underlying token.
    /// @param _wantToken The ERC20 compliant token the vault should accept.
    /// @param _name The name of the vault token.
    /// @param _symbol The symbol of the vault token.
    /// @param _keeper The address of the keeper to move funds between executors.
    /// @param _governance The address of the governance to perform governance functions.
    constructor(
        string memory _name,
        string memory _symbol,
        address _wantToken,
        address _keeper,
        address _governance
    ) ERC20(_name, _symbol) ERC20Permit(_name) {
        tokenDecimals = IERC20Metadata(_wantToken).decimals();
        wantToken = _wantToken;
        keeper = _keeper;
        governance = _governance;
        // to prevent any front running deposits
        batcherOnlyDeposit = true;
    }

    function decimals() public view override returns (uint8) {
        return tokenDecimals;
    }

    /*///////////////////////////////////////////////////////////////
                       USER DEPOSIT/WITHDRAWAL LOGIC
    //////////////////////////////////////////////////////////////*/
    /// @notice Initiates a deposit of want tokens to the vault.
    /// @param amountIn The amount of want tokens to deposit.
    /// @param receiver The address to receive vault tokens.
    function deposit(uint256 amountIn, address receiver)
        public
        override
        nonReentrant
        ensureFeesAreCollected
        returns (uint256 shares)
    {
        /// checks for only batcher deposit
        onlyBatcher();
        isValidAddress(receiver);
        require(amountIn > 0, "ZERO_AMOUNT");
        // calculate the shares based on the amount.
        shares = totalSupply() > 0
            ? (totalSupply() * amountIn) / totalVaultFunds()
            : amountIn;
        require(shares != 0, "ZERO_SHARES");
        IERC20(wantToken).safeTransferFrom(msg.sender, address(this), amountIn);
        _mint(receiver, shares);
    }

    /// @notice Initiates a withdrawal of vault tokens to the user.
    /// @param sharesIn The amount of vault tokens to withdraw.
    /// @param receiver The address to receive the vault tokens.
    function withdraw(uint256 sharesIn, address receiver)
        public
        override
        nonReentrant
        ensureFeesAreCollected
        returns (uint256 amountOut)
    {
        /// checks for only batcher withdrawal
        onlyBatcher();
        isValidAddress(receiver);
        require(sharesIn > 0, "ZERO_SHARES");
        // calculate the amount based on the shares.
        amountOut = (sharesIn * totalVaultFunds()) / totalSupply();
        // burn shares of msg.sender
        _burn(msg.sender, sharesIn);
        /// charging exitFee
        if (exitFee > 0) {
            uint256 fee = (amountOut * exitFee) / MAX_BPS;
            IERC20(wantToken).transfer(governance, fee);
            amountOut = amountOut - fee;
        }
        IERC20(wantToken).safeTransfer(receiver, amountOut);
    }

    /// @notice Calculates the total amount of underlying tokens the vault holds.
    /// @return The total amount of underlying tokens the vault holds.
    function totalVaultFunds() public view returns (uint256) {
        return
            IERC20(wantToken).balanceOf(address(this)) + totalExecutorFunds();
    }

    /*///////////////////////////////////////////////////////////////
                    EXECUTOR DEPOSIT/WITHDRAWAL LOGIC
    //////////////////////////////////////////////////////////////*/

    /// @notice list of trade executors connected to vault.
    AddrArrayLib.Addresses tradeExecutorsList;

    /// @notice Emitted after the vault deposits into a executor contract.
    /// @param executor The executor that was deposited into.
    /// @param underlyingAmount The amount of underlying tokens that were deposited.
    event ExecutorDeposit(address indexed executor, uint256 underlyingAmount);

    /// @notice Emitted after the vault withdraws funds from a executor contract.
    /// @param executor The executor that was withdrawn from.
    /// @param underlyingAmount The amount of underlying tokens that were withdrawn.
    event ExecutorWithdrawal(
        address indexed executor,
        uint256 underlyingAmount
    );

    /// @notice Deposit given amount of want tokens into valid executor.
    /// @param _executor The executor to deposit into.
    /// @param _amount The amount of want tokens to deposit.
    function depositIntoExecutor(address _executor, uint256 _amount)
        public
        nonReentrant
    {
        isActiveExecutor(_executor);
        onlyKeeper();
        require(_amount > 0, "ZERO_AMOUNT");
        IERC20(wantToken).safeTransfer(_executor, _amount);
        emit ExecutorDeposit(_executor, _amount);
    }

    /// @notice Withdraw given amount of want tokens into valid executor.
    /// @param _executor The executor to withdraw tokens from.
    /// @param _amount The amount of want tokens to withdraw.
    function withdrawFromExecutor(address _executor, uint256 _amount)
        public
        nonReentrant
    {
        isActiveExecutor(_executor);
        onlyKeeper();
        require(_amount > 0, "ZERO_AMOUNT");
        IERC20(wantToken).safeTransferFrom(_executor, address(this), _amount);
        emit ExecutorWithdrawal(_executor, _amount);
    }

    /*///////////////////////////////////////////////////////////////
                           FEE CONFIGURATION
    //////////////////////////////////////////////////////////////*/
    /// @notice lagging value of vault total funds.
    /// @dev value intialized to max to prevent slashing on first deposit.
    uint256 public prevVaultFunds = type(uint256).max;
    /// @dev value intialized to max to prevent slashing on first deposit.
    uint256 public lastReportedTime = type(uint256).max;
    /// @dev Perfomance fee for the vault.
    uint256 public performanceFee;
    /// @notice Fee denominated in MAX_BPS charged during exit.
    uint256 public exitFee;
    /// @notice Mangement fee for operating the vault.
    uint256 public managementFee;

    /// @notice Emitted after perfomance fee updation.
    /// @param oldFee The old performance fee on vault.
    /// @param newFee The new performance fee on vault.
    event UpdatePerformanceFee(uint256 oldFee, uint256 newFee);

    /// @notice Updates the performance fee on the vault.
    /// @param _fee The new performance fee on the vault.
    /// @dev The new fee must be always less than 50% of yield.
    function setPerformanceFee(uint256 _fee) public {
        onlyGovernance();
        require(_fee < MAX_BPS / 2, "FEE_TOO_HIGH");
        emit UpdatePerformanceFee(performanceFee, _fee);
        performanceFee = _fee;
    }

    /// @notice Emitted after exit fee updation.
    /// @param oldFee The old exit fee on vault.
    /// @param newFee The new exit fee on vault.
    event UpdateExitFee(uint256 oldFee, uint256 newFee);

    /// @notice Function to set exit fee on the vault, can only be called by governance
    /// @param _fee Address of fee
    function setExitFee(uint256 _fee) public {
        onlyGovernance();
        require(_fee < MAX_BPS / 2, "EXIT_FEE_TOO_HIGH");
        emit UpdateExitFee(exitFee, _fee);
        exitFee = _fee;
    }

    /// @notice Emitted after management fee updation.
    /// @param oldFee The old management fee on vault.
    /// @param newFee The new management fee on vault.
    event UpdateManagementFee(uint256 oldFee, uint256 newFee);

    /// @notice Function to set exit fee on the vault, can only be called by governance
    /// @param _fee Address of fee
    function setManagementFee(uint256 _fee) public {
        onlyGovernance();
        require(_fee < MAX_BPS / 2, "EXIT_FEE_TOO_HIGH");
        emit UpdateManagementFee(managementFee, _fee);
        managementFee = _fee;
    }

    /// @notice Emitted when a fees are collected.
    /// @param collectedFees The amount of fees collected.
    event FeesCollected(uint256 collectedFees);

    /// @notice Calculates and collects the fees from the vault.
    /// @dev This function sends all the accured fees to governance.
    /// checks the yield made since previous harvest and
    /// calculates the fee based on it. Also note: this function
    /// should be called before processing any new deposits/withdrawals.
    function collectFees() internal {
        uint256 currentFunds = totalVaultFunds();
        uint256 fees = 0;
        // collect fees only when profit is made.
        if ((performanceFee > 0) && (currentFunds > prevVaultFunds)) {
            uint256 yieldEarned = (currentFunds - prevVaultFunds);
            // normalization by MAX_BPS
            fees += ((yieldEarned * performanceFee) / MAX_BPS);
        }
        if ((managementFee > 0) && (lastReportedTime < block.timestamp)) {
            uint256 duration = block.timestamp - lastReportedTime;
            fees +=
                ((duration * managementFee * currentFunds) / MAX_SECONDS) /
                MAX_BPS;
        }
        if (fees > 0) {
            IERC20(wantToken).safeTransfer(governance, fees);
            emit FeesCollected(fees);
        }
    }

    modifier ensureFeesAreCollected() {
        collectFees();
        _;
        // update vault funds after fees are collected.
        prevVaultFunds = totalVaultFunds();
        // update lastReportedTime after fees are collected.
        lastReportedTime = block.timestamp;
    }

    /*///////////////////////////////////////////////////////////////
                    EXECUTOR ADDITION/REMOVAL LOGIC
    //////////////////////////////////////////////////////////////*/
    /// @notice Emitted when executor is added to vault.
    /// @param executor The address of added executor.
    event ExecutorAdded(address indexed executor);

    /// @notice Emitted when executor is removed from vault.
    /// @param executor The address of removed executor.
    event ExecutorRemoved(address indexed executor);

    /// @notice Adds a trade executor, enabling it to execute trades.
    /// @param _tradeExecutor The address of _tradeExecutor contract.
    function addExecutor(address _tradeExecutor) public {
        onlyGovernance();
        isValidAddress(_tradeExecutor);
        require(
            ITradeExecutor(_tradeExecutor).vault() == address(this),
            "INVALID_VAULT"
        );
        require(
            IERC20(wantToken).allowance(_tradeExecutor, address(this)) > 0,
            "NO_ALLOWANCE"
        );
        tradeExecutorsList.pushAddress(_tradeExecutor);
        emit ExecutorAdded(_tradeExecutor);
    }

    /// @notice Adds a trade executor, enabling it to execute trades.
    /// @param _tradeExecutor The address of _tradeExecutor contract.
    /// @dev make sure all funds are withdrawn from executor before removing.
    function removeExecutor(address _tradeExecutor) public {
        onlyGovernance();
        isValidAddress(_tradeExecutor);
        // check if executor attached to vault.
        isActiveExecutor(_tradeExecutor);

        (uint256 executorFunds, uint256 blockUpdated) = ITradeExecutor(
            _tradeExecutor
        ).totalFunds();
        areFundsUpdated(blockUpdated);
        require(executorFunds < DUST_LIMIT, "FUNDS_TOO_HIGH");
        tradeExecutorsList.removeAddress(_tradeExecutor);
        emit ExecutorRemoved(_tradeExecutor);
    }

    /// @notice gives the number of trade executors.
    /// @return The number of trade executors.
    function totalExecutors() public view returns (uint256) {
        return tradeExecutorsList.size();
    }

    /// @notice Returns trade executor at given index.
    /// @return The executor address at given valid index.
    function executorByIndex(uint256 _index) public view returns (address) {
        return tradeExecutorsList.getAddressAtIndex(_index);
    }

    /// @notice Calculates funds held by all executors in want token.
    /// @return Sum of all funds held by executors.
    function totalExecutorFunds() public view returns (uint256) {
        uint256 totalFunds = 0;
        for (uint256 i = 0; i < totalExecutors(); i++) {
            address executor = executorByIndex(i);
            (uint256 executorFunds, uint256 blockUpdated) = ITradeExecutor(
                executor
            ).totalFunds();
            areFundsUpdated(blockUpdated);
            totalFunds += executorFunds;
        }
        return totalFunds;
    }

    /*///////////////////////////////////////////////////////////////
                    GOVERNANCE ACTIONS
    //////////////////////////////////////////////////////////////*/

    /// @notice Emitted when a batcher is updated.
    /// @param oldBatcher The address of the current batcher.
    /// @param newBatcher The  address of new batcher.
    event UpdatedBatcher(
        address indexed oldBatcher,
        address indexed newBatcher
    );

    /// @notice Changes the batcher address.
    /// @dev  This can only be called by governance.
    /// @param _batcher The address to for new batcher.
    function setBatcher(address _batcher) public {
        onlyGovernance();
        emit UpdatedBatcher(batcher, _batcher);
        batcher = _batcher;
    }

    /// @notice Emitted batcherOnlyDeposit is enabled.
    /// @param state The state of depositing only via batcher.
    event UpdatedBatcherOnlyDeposit(bool state);

    /// @notice Enables/disables deposits with batcher only.
    /// @dev  This can only be called by governance.
    /// @param _batcherOnlyDeposit if true vault can accept deposit via batcher only or else anyone can deposit.
    function setBatcherOnlyDeposit(bool _batcherOnlyDeposit) public {
        onlyGovernance();
        batcherOnlyDeposit = _batcherOnlyDeposit;
        emit UpdatedBatcherOnlyDeposit(_batcherOnlyDeposit);
    }

    /// @notice Nominates new governance address.
    /// @dev  Governance will only be changed if the new governance accepts it. It will be pending till then.
    /// @param _governance The address of new governance.
    function setGovernance(address _governance) public {
        onlyGovernance();
        pendingGovernance = _governance;
    }

    /// @notice Emitted when governance is updated.
    /// @param oldGovernance The address of the current governance.
    /// @param newGovernance The address of new governance.
    event UpdatedGovernance(
        address indexed oldGovernance,
        address indexed newGovernance
    );

    /// @notice The nomine of new governance address proposed by `setGovernance` function can accept the governance.
    /// @dev  This can only be called by address of pendingGovernance.
    function acceptGovernance() public {
        require(msg.sender == pendingGovernance, "INVALID_ADDRESS");
        emit UpdatedGovernance(governance, pendingGovernance);
        governance = pendingGovernance;
    }

    /// @notice Emitted when keeper is updated.
    /// @param oldKeeper The address of the old keeper.
    /// @param newKeeper The address of the new keeper.
    event UpdatedKeeper(address indexed oldKeeper, address indexed newKeeper);

    /// @notice Sets new keeper address.
    /// @dev  This can only be called by governance.
    /// @param _keeper The address of new keeper.
    function setKeeper(address _keeper) public {
        onlyGovernance();
        emit UpdatedKeeper(keeper, _keeper);
        keeper = _keeper;
    }

    /// @notice Emitted when emergencyMode status is updated.
    /// @param emergencyMode boolean indicating state of emergency.
    event EmergencyModeStatus(bool emergencyMode);

    /// @notice sets emergencyMode.
    /// @dev  This can only be called by governance.
    /// @param _emergencyMode if true, vault will be in emergency mode.
    function setEmergencyMode(bool _emergencyMode) public {
        onlyGovernance();
        emergencyMode = _emergencyMode;
        batcherOnlyDeposit = true;
        batcher = address(0);
        emit EmergencyModeStatus(_emergencyMode);
    }

    /// @notice Removes invalid tokens from the vault.
    /// @dev  This is used as fail safe to remove want tokens from the vault during emergency mode
    /// can be called by anyone to send funds to governance.
    /// @param _token The address of token to be removed.
    function sweep(address _token) public {
        isEmergencyMode();
        IERC20(_token).safeTransfer(
            governance,
            IERC20(_token).balanceOf(address(this))
        );
    }

    /*///////////////////////////////////////////////////////////////
                    ACCESS MODIFERS
    //////////////////////////////////////////////////////////////*/
    /// @dev Checks if the sender is the governance.
    function onlyGovernance() internal view {
        require(msg.sender == governance, "ONLY_GOV");
    }

    /// @dev Checks if the sender is the keeper.
    function onlyKeeper() internal view {
        require(msg.sender == keeper, "ONLY_KEEPER");
    }

    /// @dev Checks if the sender is the batcher.
    function onlyBatcher() internal view {
        if (batcherOnlyDeposit) {
            require(msg.sender == batcher, "ONLY_BATCHER");
        }
    }

    /// @dev Checks if emergency mode is enabled.
    function isEmergencyMode() internal view {
        require(emergencyMode == true, "EMERGENCY_MODE");
    }

    /// @dev Checks if the address is valid.
    function isValidAddress(address _addr) internal pure {
        require(_addr != address(0), "NULL_ADDRESS");
    }

    /// @dev Checks if the tradeExecutor is valid.
    function isActiveExecutor(address _tradeExecutor) internal view {
        require(tradeExecutorsList.exists(_tradeExecutor), "INVALID_EXECUTOR");
    }

    /// @dev Checks if funds are updated.
    function areFundsUpdated(uint256 _blockUpdated) internal view {
        require(
            block.number <= _blockUpdated + BLOCK_LIMIT,
            "FUNDS_NOT_UPDATED"
        );
    }
}

File 2 of 17 : draft-ERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/extensions/draft-ERC20Permit.sol)

pragma solidity ^0.8.0;

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

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

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

    // solhint-disable-next-line var-name-mixedcase
    bytes32 private constant _PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    /**
     * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.
     * However, to ensure consistency with the upgradeable transpiler, we will continue
     * to reserve a slot.
     * @custom:oz-renamed-from _PERMIT_TYPEHASH
     */
    // solhint-disable-next-line var-name-mixedcase
    bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;

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

    /**
     * @dev See {IERC20Permit-permit}.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

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

        _approve(owner, spender, value);
    }

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

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

    /**
     * @dev "Consume a nonce": return the current value and increment.
     *
     * _Available since v4.1._
     */
    function _useNonce(address owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[owner];
        current = nonce.current();
        nonce.increment();
    }
}

File 3 of 17 : 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 4 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        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));
        }
    }

    /**
     * @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 5 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 6 of 17 : AddArrayLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library AddrArrayLib {
    using AddrArrayLib for Addresses;

    struct Addresses {
        address[] _items;
    }

    /**
     * @notice push an address to the array
     * @dev if the address already exists, it will not be added again
     * @param self Storage array containing address type variables
     * @param element the element to add in the array
     */
    function pushAddress(Addresses storage self, address element) internal {
        if (!exists(self, element)) {
            self._items.push(element);
        }
    }

    /**
     * @notice remove an address from the array
     * @dev finds the element, swaps it with the last element, and then deletes it;
     * @param self Storage array containing address type variables
     * @param element the element to remove from the array
     */
    function removeAddress(Addresses storage self, address element) internal {
        for (uint256 i = 0; i < self.size(); i++) {
            if (self._items[i] == element) {
                self._items[i] = self._items[self.size() - 1];
                self._items.pop();
            }
        }
    }

    /**
     * @notice get the address at a specific index from array
     * @dev revert if the index is out of bounds
     * @param self Storage array containing address type variables
     * @param index the index in the array
     */
    function getAddressAtIndex(Addresses memory self, uint256 index)
        internal
        view
        returns (address)
    {
        require(index < size(self), "INVALID_INDEX");
        return self._items[index];
    }

    /**
     * @notice get the size of the array
     * @param self Storage array containing address type variables
     */
    function size(Addresses memory self) internal view returns (uint256) {
        return self._items.length;
    }

    /**
     * @notice check if an element exist in the array
     * @param self Storage array containing address type variables
     * @param element the element to check if it exists in the array
     */
    function exists(Addresses memory self, address element)
        internal
        view
        returns (bool)
    {
        for (uint256 i = 0; i < self.size(); i++) {
            if (self._items[i] == element) {
                return true;
            }
        }
        return false;
    }

    /**
     * @notice get the array
     * @param self Storage array containing address type variables
     */
    function getAllAddresses(Addresses memory self)
        internal
        view
        returns (address[] memory)
    {
        return self._items;
    }
}

File 7 of 17 : ITradeExecutor.sol
//SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.4;

interface ITradeExecutor {
    struct ActionStatus {
        bool inProcess;
        address from;
    }

    function vault() external view returns (address);

    function depositStatus() external returns (bool, address);

    function withdrawalStatus() external returns (bool, address);

    function initiateDeposit(bytes calldata _data) external;

    function confirmDeposit() external;

    function initiateWithdraw(bytes calldata _data) external;

    function confirmWithdraw() external;

    function totalFunds()
        external
        view
        returns (uint256 posValue, uint256 lastUpdatedBlock);
}

File 8 of 17 : IVault.sol
/// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

interface IVault {
    function keeper() external view returns (address);

    function governance() external view returns (address);

    function wantToken() external view returns (address);

    function deposit(uint256 amountIn, address receiver)
        external
        returns (uint256 shares);

    function withdraw(uint256 sharesIn, address receiver)
        external
        returns (uint256 amountOut);
}

File 9 of 17 : 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 10 of 17 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

File 11 of 17 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

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

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

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

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

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

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

File 12 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

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

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 13 of 17 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

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

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

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 14 of 17 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 15 of 17 : 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;
    }
}

File 16 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 17 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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 functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_wantToken","type":"address"},{"internalType":"address","name":"_keeper","type":"address"},{"internalType":"address","name":"_governance","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"emergencyMode","type":"bool"}],"name":"EmergencyModeStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"}],"name":"ExecutorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"underlyingAmount","type":"uint256"}],"name":"ExecutorDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"}],"name":"ExecutorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"underlyingAmount","type":"uint256"}],"name":"ExecutorWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"collectedFees","type":"uint256"}],"name":"FeesCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"UpdateExitFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"UpdateManagementFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"UpdatePerformanceFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldBatcher","type":"address"},{"indexed":true,"internalType":"address","name":"newBatcher","type":"address"}],"name":"UpdatedBatcher","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"UpdatedBatcherOnlyDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldGovernance","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernance","type":"address"}],"name":"UpdatedGovernance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldKeeper","type":"address"},{"indexed":true,"internalType":"address","name":"newKeeper","type":"address"}],"name":"UpdatedKeeper","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tradeExecutor","type":"address"}],"name":"addExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batcher","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batcherOnlyDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_executor","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositIntoExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"executorByIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exitFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastReportedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managementFee","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":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFee","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":[],"name":"prevVaultFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tradeExecutor","type":"address"}],"name":"removeExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_batcher","type":"address"}],"name":"setBatcher","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_batcherOnlyDeposit","type":"bool"}],"name":"setBatcherOnlyDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_emergencyMode","type":"bool"}],"name":"setEmergencyMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setExitFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setManagementFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setPerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExecutorFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExecutors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVaultFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wantToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"sharesIn","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_executor","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFromExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610180604052600019600d55600019600e553480156200001e57600080fd5b50604051620035d1380380620035d183398101604081905262000041916200039c565b8480604051806040016040528060018152602001603160f81b815250878781600390805190602001906200007792919062000226565b5080516200008d90600490602084019062000226565b5050825160208085019190912083518483012060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81880181905281830187905260608201869052608082019490945230818401528151808203909301835260c0019052805194019390932091935091906080523060601b60c052610120525050600160075550506040805163313ce56760e01b815290516001600160a01b038616925063313ce56791600480820192602092909190829003018186803b1580156200016c57600080fd5b505afa15801562000181573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a791906200043b565b60f81b7fff00000000000000000000000000000000000000000000000000000000000000166101605260609290921b6001600160601b03191661014052600980546001600160a01b03199081166001600160a01b0393841617909155600a80549091169190921617905550506008805460ff19166001179055620004b8565b828054620002349062000465565b90600052602060002090601f016020900481019282620002585760008555620002a3565b82601f106200027357805160ff1916838001178555620002a3565b82800160010185558215620002a3579182015b82811115620002a357825182559160200191906001019062000286565b50620002b1929150620002b5565b5090565b5b80821115620002b15760008155600101620002b6565b80516001600160a01b0381168114620002e457600080fd5b919050565b600082601f830112620002fa578081fd5b81516001600160401b0380821115620003175762000317620004a2565b604051601f8301601f19908116603f01168101908282118183101715620003425762000342620004a2565b816040528381526020925086838588010111156200035e578485fd5b8491505b8382101562000381578582018301518183018401529082019062000362565b838211156200039257848385830101525b9695505050505050565b600080600080600060a08688031215620003b4578081fd5b85516001600160401b0380821115620003cb578283fd5b620003d989838a01620002e9565b96506020880151915080821115620003ef578283fd5b50620003fe88828901620002e9565b9450506200040f60408701620002cc565b92506200041f60608701620002cc565b91506200042f60808701620002cc565b90509295509295909350565b6000602082840312156200044d578081fd5b815160ff811681146200045e578182fd5b9392505050565b600181811c908216806200047a57607f821691505b602082108114156200049c57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160601c60e05161010051610120516101405160601c6101605160f81c6130726200055f60003960006103bf01526000818161056b015281816106dc0152818161077401528181610a6101528181610bef01528181611026015281816111b5015281816112ad01526118870152600061233f0152600061238e01526000612369015260006122c2015260006122ec0152600061231601526130726000f3fe608060405234801561001057600080fd5b50600436106102895760003560e01c8063748747e61161015c578063ab033ea9116100ce578063d505accf11610087578063d505accf1461058d578063dd62ed3e146105a0578063e5a583a9146105b3578063f39c38a0146105c6578063f621ff60146105d9578063fe56e232146105e157600080fd5b8063ab033ea91461050d578063ab73525514610520578063aced166114610533578063b1b3da5114610546578063be32b3f814610553578063d23e04801461056657600080fd5b8063877887821161012057806387788782146104c457806395d89b41146104cd578063a457c2d7146104d5578063a6f7f5d6146104e8578063a7a7a31c146104f1578063a9059cbb146104fa57600080fd5b8063748747e61461046f578063777f9766146104825780637b3d51b1146104955780637ecebe001461049e5780637f5883a2146104b157600080fd5b8063238efcbc1161020057806339509351116101b957806339509351146103f15780635aa6e675146104045780636284ae41146104175780636e553f651461042057806370897b231461043357806370a082311461044657600080fd5b8063238efcbc1461037757806323b872dd1461037f5780632478842914610392578063303cff53146103a5578063313ce567146103b85780633644e515146103e957600080fd5b80630905f560116102525780630905f56014610317578063095ea7b314610339578063140ce45f1461034c57806318160ddd1461035457806318515a831461035c5780631f5a0bbe1461036457600080fd5b8062f714ce1461028e57806301681a62146102b4578063025a3a29146102c9578063058a8e5f146102ef57806306fdde0314610302575b600080fd5b6102a161029c366004612da3565b6105f4565b6040519081526020015b60405180910390f35b6102c76102c2366004612beb565b6107b5565b005b6008546102e2906201000090046001600160a01b031681565b6040516102ab9190612e06565b6102c76102fd366004612beb565b610859565b61030a6108cb565b6040516102ab9190612e1a565b60085461032990610100900460ff1681565b60405190151581526020016102ab565b610329610347366004612d10565b61095d565b6102a1610977565b6002546102a1565b6102a1610a40565b6102c7610372366004612beb565b610af5565b6102c7610ce9565b61032961038d366004612c5b565b610d98565b6102c76103a0366004612beb565b610dbe565b6102c76103b3366004612d3b565b610edf565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016102ab565b6102a1610f2f565b6103296103ff366004612d10565b610f39565b600a546102e2906001600160a01b031681565b6102a160105481565b6102a161042e366004612da3565b610f5b565b6102c7610441366004612d73565b611058565b6102a1610454366004612beb565b6001600160a01b031660009081526020819052604090205490565b6102c761047d366004612beb565b6110eb565b6102c7610490366004612d10565b61114f565b6102a1600d5481565b6102a16104ac366004612beb565b611229565b6102c76104bf366004612d10565b611247565b6102a1600f5481565b61030a61130f565b6103296104e3366004612d10565b61131e565b6102a160115481565b6102a1600e5481565b610329610508366004612d10565b6113a4565b6102c761051b366004612beb565b6113b2565b6102e261052e366004612d73565b6113dc565b6009546102e2906001600160a01b031681565b6008546103299060ff1681565b6102c7610561366004612d3b565b611457565b6102e27f000000000000000000000000000000000000000000000000000000000000000081565b6102c761059b366004612c9b565b6114be565b6102a16105ae366004612c23565b611622565b6102c76105c1366004612d73565b61164d565b600b546102e2906001600160a01b031681565b6102a16116c1565b6102c76105ef366004612d73565b61172f565b6000600260075414156106225760405162461bcd60e51b815260040161061990612ec2565b60405180910390fd5b600260075561062f6117a3565b6106376118e8565b61064082611944565b600083116106605760405162461bcd60e51b815260040161061990612e78565b60025461066b610a40565b6106759085612f31565b61067f9190612f11565b905061068b3384611989565b60105415610767576000612710601054836106a69190612f31565b6106b09190612f11565b600a5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529192507f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561072057600080fd5b505af1158015610734573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107589190612d57565b506107638183612f50565b9150505b61079b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383611ac7565b6107a3610a40565b600d5542600e55600160075592915050565b6107bd611b2a565b600a546040516370a0823160e01b8152610856916001600160a01b0390811691908416906370a08231906107f5903090600401612e06565b60206040518083038186803b15801561080d57600080fd5b505afa158015610821573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108459190612d8b565b6001600160a01b0384169190611ac7565b50565b610861611b78565b6008546040516001600160a01b038084169262010000900416907f6d039a6d5f36163cbc30fe5c1a15856df293a5769543d5deca1fb7a9ab29bf7790600090a3600880546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6060600380546108da90612f93565b80601f016020809104026020016040519081016040528092919081815260200182805461090690612f93565b80156109535780601f1061092857610100808354040283529160200191610953565b820191906000526020600020905b81548152906001019060200180831161093657829003601f168201915b5050505050905090565b60003361096b818585611bbd565b60019150505b92915050565b600080805b6109846116c1565b811015610a3a576000610996826113dc565b9050600080826001600160a01b031663968ed6006040518163ffffffff1660e01b8152600401604080518083038186803b1580156109d357600080fd5b505afa1580156109e7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0b9190612dc7565b91509150610a1881611cd9565b610a228286612ef9565b94505050508080610a3290612fc8565b91505061097c565b50919050565b6000610a4a610977565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610a96903090600401612e06565b60206040518083038186803b158015610aae57600080fd5b505afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae69190612d8b565b610af09190612ef9565b905090565b610afd611b78565b610b0681611944565b306001600160a01b0316816001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4957600080fd5b505afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190612c07565b6001600160a01b031614610bc75760405162461bcd60e51b815260206004820152600d60248201526c1253959053125117d590555315609a1b6044820152606401610619565b604051636eb1769f60e11b81526001600160a01b0382811660048301523060248301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e9060440160206040518083038186803b158015610c3357600080fd5b505afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190612d8b565b11610ca75760405162461bcd60e51b815260206004820152600c60248201526b4e4f5f414c4c4f57414e434560a01b6044820152606401610619565b610cb2600c82611d27565b6040516001600160a01b038216907fae5b7c3b000f575c241001dc9bcb3d8778376889353b07121115574eceff78c590600090a250565b600b546001600160a01b03163314610d355760405162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b6044820152606401610619565b600b54600a546040516001600160a01b0392831692909116907fff0b32b909f3fb702fe6ac1f682adcca675b9dfaa03ad8f46b4b17c4058a93fc90600090a3600b54600a80546001600160a01b0319166001600160a01b03909216919091179055565b600033610da6858285611dc6565b610db1858585611e40565b60019150505b9392505050565b610dc6611b78565b610dcf81611944565b610dd881611ffc565b600080826001600160a01b031663968ed6006040518163ffffffff1660e01b8152600401604080518083038186803b158015610e1357600080fd5b505afa158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b9190612dc7565b91509150610e5881611cd9565b620f42408210610e9b5760405162461bcd60e51b815260206004820152600e60248201526d08caa9c88a6bea89e9ebe90928e960931b6044820152606401610619565b610ea6600c846120b1565b6040516001600160a01b038416907f4a2cf608bfb427f53279ec7f0eadf48913b9346ccefc3af138dbdec14ea0907d90600090a2505050565b610ee7611b78565b6008805460ff19168215159081179091556040519081527faffd159acb2f0eec86675a846365f4908afe82bcb6f2e273e2703ead071a2617906020015b60405180910390a150565b6000610af06122b5565b60003361096b818585610f4c8383611622565b610f569190612ef9565b611bbd565b600060026007541415610f805760405162461bcd60e51b815260040161061990612ec2565b6002600755610f8d6117a3565b610f956118e8565b610f9e82611944565b60008311610fbe5760405162461bcd60e51b815260040161061990612e9d565b6000610fc960025490565b11610fd45782610ffa565b610fdc610a40565b83610fe660025490565b610ff09190612f31565b610ffa9190612f11565b9050806110195760405162461bcd60e51b815260040161061990612e78565b61104e6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330866123dc565b61079b8282612414565b611060611b78565b61106d6002612710612f11565b81106110aa5760405162461bcd60e51b815260206004820152600c60248201526b08c8a8abea89e9ebe90928e960a31b6044820152606401610619565b600f5460408051918252602082018390527f17519bd6596326e94ff406f9632728407b34e99c6ee45960b15bba05d67874c4910160405180910390a1600f55565b6110f3611b78565b6009546040516001600160a01b038084169216907f60ed9ffad04b70bf58c43b18d1f0e54642250116c1137ac1cc4831449124350890600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b600260075414156111725760405162461bcd60e51b815260040161061990612ec2565b600260075561118082611ffc565b6111886124e1565b600081116111a85760405162461bcd60e51b815260040161061990612e9d565b6111dd6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168330846123dc565b816001600160a01b03167f2331b9a387a0c1b9069a5b1a48cd8c566440a10c1e58654d04d03fad210551968260405161121891815260200190565b60405180910390a250506001600755565b6001600160a01b038116600090815260056020526040812054610971565b6002600754141561126a5760405162461bcd60e51b815260040161061990612ec2565b600260075561127882611ffc565b6112806124e1565b600081116112a05760405162461bcd60e51b815260040161061990612e9d565b6112d46001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168383611ac7565b816001600160a01b03167f2f40f96629e48b44c1173c05df5811e217b0cce3bc7aef3dde4a4625be7c844b8260405161121891815260200190565b6060600480546108da90612f93565b6000338161132c8286611622565b90508381101561138c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610619565b6113998286868403611bbd565b506001949350505050565b60003361096b818585611e40565b6113ba611b78565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60408051600c8054602081810284018501855283018181526000946109719487949093909284929091849184018282801561144057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611422575b50505050508152505061252990919063ffffffff16565b61145f611b78565b6008805462010000600160b01b031960ff19841515610100021661ffff19909216919091176001171690556040517fcc6bda015b6cb89b378ac6dc0294b882c1d0d41b117a7c7a0adb80d8ea7076cb90610f2490831515815260200190565b8342111561150e5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610619565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861153d8c6125a4565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000611598826125ca565b905060006115a882878787612618565b9050896001600160a01b0316816001600160a01b03161461160b5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610619565b6116168a8a8a611bbd565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611655611b78565b6116626002612710612f11565b81106116805760405162461bcd60e51b815260040161061990612e4d565b60105460408051918252602082018390527fa4aab21b1d3be6990ef2d3c38d4d4bf00beb04a40f936221373204a1b1db57a2910160405180910390a1601055565b60408051600c805460208181028401850185528301818152600094610af094939284929184919084018282801561172157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611703575b505050505081525050515190565b611737611b78565b6117446002612710612f11565b81106117625760405162461bcd60e51b815260040161061990612e4d565b60115460408051918252602082018390527f29b9d7a7d8a7a3ac22c295e4517723bc4e386eea60173e59e6da1dbd460cb409910160405180910390a1601155565b60006117ad610a40565b9050600080600f541180156117c35750600d5482115b15611803576000600d54836117d89190612f50565b9050612710600f54826117eb9190612f31565b6117f59190612f11565b6117ff9083612ef9565b9150505b6000601154118015611816575042600e54105b15611870576000600e544261182b9190612f50565b90506127106301e187e084601154846118449190612f31565b61184e9190612f31565b6118589190612f11565b6118629190612f11565b61186c9083612ef9565b9150505b80156118e457600a546118b0906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683611ac7565b6040518181527f860c0aa5520013080c2f65981705fcdea474d9f7c3daf954656ed5e65d692d1f9060200160405180910390a15b5050565b60085460ff1615611942576008546201000090046001600160a01b031633146119425760405162461bcd60e51b815260206004820152600c60248201526b27a7262cafa120aa21a422a960a11b6044820152606401610619565b565b6001600160a01b0381166108565760405162461bcd60e51b815260206004820152600c60248201526b4e554c4c5f4144445245535360a01b6044820152606401610619565b6001600160a01b0382166119e95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610619565b6001600160a01b03821660009081526020819052604090205481811015611a5d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610619565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611a8c908490612f50565b90915550506040518281526000906001600160a01b0385169060008051602061301d833981519152906020015b60405180910390a35b505050565b6040516001600160a01b038316602482015260448101829052611ac290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612640565b60085460ff6101009091041615156001146119425760405162461bcd60e51b815260206004820152600e60248201526d454d455247454e43595f4d4f444560901b6044820152606401610619565b600a546001600160a01b031633146119425760405162461bcd60e51b815260206004820152600860248201526727a7262cafa3a7ab60c11b6044820152606401610619565b6001600160a01b038316611c1f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610619565b6001600160a01b038216611c805760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610619565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101611ab9565b611ce4603282612ef9565b4311156108565760405162461bcd60e51b81526020600482015260116024820152701195539114d7d393d517d5541110551151607a1b6044820152606401610619565b60408051835460208181028301840184528201818152611d91938692849291849190840182828015611d8257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d64575b50505050508152505082612712565b6118e45781546001810183556000838152602090200180546001600160a01b0383166001600160a01b03199091161790555050565b6000611dd28484611622565b90506000198114611e3a5781811015611e2d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610619565b611e3a8484848403611bbd565b50505050565b6001600160a01b038316611ea45760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610619565b6001600160a01b038216611f065760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610619565b6001600160a01b03831660009081526020819052604090205481811015611f7e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610619565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611fb5908490612ef9565b92505081905550826001600160a01b0316846001600160a01b031660008051602061301d83398151915284604051611fef91815260200190565b60405180910390a3611e3a565b60408051600c805460208181028401850185528301818152612072948694939284929184919084018282801561205b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161203d575b50505050508152505061271290919063ffffffff16565b6108565760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa2ac22a1aaaa27a960811b6044820152606401610619565b60005b6040805184546020818102830184018452820181815261211b938792849291849190840182828015611721576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161170357505050505081525050515190565b811015611ac257816001600160a01b031683600001828154811061214f57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156122a3576040805184546020818102830184018452820181815286936001936121d6939092869284928491840182828015611721576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161170357505050505081525050515190565b6121e09190612f50565b815481106121fe57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015483546001600160a01b039091169084908390811061223857634e487b7160e01b600052603260045260246000fd5b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055825483908061228057634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b03191690550190555b806122ad81612fc8565b9150506120b4565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561230e57507f000000000000000000000000000000000000000000000000000000000000000046145b1561233857507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6040516001600160a01b0380851660248301528316604482015260648101829052611e3a9085906323b872dd60e01b90608401611af3565b6001600160a01b03821661246a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610619565b806002600082825461247c9190612ef9565b90915550506001600160a01b038216600090815260208190526040812080548392906124a9908490612ef9565b90915550506040518181526001600160a01b0383169060009060008051602061301d8339815191529060200160405180910390a35050565b6009546001600160a01b031633146119425760405162461bcd60e51b815260206004820152600b60248201526a27a7262cafa5a2a2a822a960a91b6044820152606401610619565b600061253483515190565b82106125725760405162461bcd60e51b815260206004820152600d60248201526c0929cac82989288be929c888ab609b1b6044820152606401610619565b825180518390811061259457634e487b7160e01b600052603260045260246000fd5b6020026020010151905092915050565b6001600160a01b0381166000908152600560205260409020805460018101825590610a3a565b60006109716125d76122b5565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006126298787878761278b565b915091506126368161286e565b5095945050505050565b6000612695826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a6a9092919063ffffffff16565b805190915015611ac257808060200190518101906126b39190612d57565b611ac25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610619565b6000805b83515181101561278157826001600160a01b03168460000151828151811061274e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141561276f576001915050610971565b8061277981612fc8565b915050612716565b5060009392505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156127b85750600090506003612865565b8460ff16601b141580156127d057508460ff16601c14155b156127e15750600090506004612865565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612835573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661285e57600060019250925050612865565b9150600090505b94509492505050565b600081600481111561289057634e487b7160e01b600052602160045260246000fd5b14156128995750565b60018160048111156128bb57634e487b7160e01b600052602160045260246000fd5b14156129045760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610619565b600281600481111561292657634e487b7160e01b600052602160045260246000fd5b14156129745760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610619565b600381600481111561299657634e487b7160e01b600052602160045260246000fd5b14156129ef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610619565b6004816004811115612a1157634e487b7160e01b600052602160045260246000fd5b14156108565760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610619565b6060612a798484600085612a81565b949350505050565b606082471015612ae25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610619565b6001600160a01b0385163b612b395760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610619565b600080866001600160a01b03168587604051612b559190612dea565b60006040518083038185875af1925050503d8060008114612b92576040519150601f19603f3d011682016040523d82523d6000602084013e612b97565b606091505b5091509150612ba7828286612bb2565b979650505050505050565b60608315612bc1575081610db7565b825115612bd15782518084602001fd5b8160405162461bcd60e51b81526004016106199190612e1a565b600060208284031215612bfc578081fd5b8135610db781612ff9565b600060208284031215612c18578081fd5b8151610db781612ff9565b60008060408385031215612c35578081fd5b8235612c4081612ff9565b91506020830135612c5081612ff9565b809150509250929050565b600080600060608486031215612c6f578081fd5b8335612c7a81612ff9565b92506020840135612c8a81612ff9565b929592945050506040919091013590565b600080600080600080600060e0888a031215612cb5578283fd5b8735612cc081612ff9565b96506020880135612cd081612ff9565b95506040880135945060608801359350608088013560ff81168114612cf3578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612d22578182fd5b8235612d2d81612ff9565b946020939093013593505050565b600060208284031215612d4c578081fd5b8135610db78161300e565b600060208284031215612d68578081fd5b8151610db78161300e565b600060208284031215612d84578081fd5b5035919050565b600060208284031215612d9c578081fd5b5051919050565b60008060408385031215612db5578182fd5b823591506020830135612c5081612ff9565b60008060408385031215612dd9578182fd5b505080516020909101519092909150565b60008251612dfc818460208701612f67565b9190910192915050565b6001600160a01b0391909116815260200190565b6020815260008251806020840152612e39816040850160208701612f67565b601f01601f19169190910160400192915050565b60208082526011908201527008ab092a8be8c8a8abea89e9ebe90928e9607b1b604082015260600190565b6020808252600b908201526a5a45524f5f53484152455360a81b604082015260600190565b6020808252600b908201526a16915493d7d05353d5539560aa1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612f0c57612f0c612fe3565b500190565b600082612f2c57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612f4b57612f4b612fe3565b500290565b600082821015612f6257612f62612fe3565b500390565b60005b83811015612f82578181015183820152602001612f6a565b83811115611e3a5750506000910152565b600181811c90821680612fa757607f821691505b60208210811415610a3a57634e487b7160e01b600052602260045260246000fd5b6000600019821415612fdc57612fdc612fe3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461085657600080fd5b801515811461085657600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220f31f11c01f2f907af72df1943789319279d595d6669a94003304b74b62202b4564736f6c6343000804003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ae75b29ade678372d77a8b41225654138a7e6ff10000000000000000000000006b29610d6c6a9e47812be40f1335918bd63321bf000000000000000000000000000000000000000000000000000000000000001850726f746563746564204d6f6f6e73686f7473205553444300000000000000000000000000000000000000000000000000000000000000000000000000000006504d555344430000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102895760003560e01c8063748747e61161015c578063ab033ea9116100ce578063d505accf11610087578063d505accf1461058d578063dd62ed3e146105a0578063e5a583a9146105b3578063f39c38a0146105c6578063f621ff60146105d9578063fe56e232146105e157600080fd5b8063ab033ea91461050d578063ab73525514610520578063aced166114610533578063b1b3da5114610546578063be32b3f814610553578063d23e04801461056657600080fd5b8063877887821161012057806387788782146104c457806395d89b41146104cd578063a457c2d7146104d5578063a6f7f5d6146104e8578063a7a7a31c146104f1578063a9059cbb146104fa57600080fd5b8063748747e61461046f578063777f9766146104825780637b3d51b1146104955780637ecebe001461049e5780637f5883a2146104b157600080fd5b8063238efcbc1161020057806339509351116101b957806339509351146103f15780635aa6e675146104045780636284ae41146104175780636e553f651461042057806370897b231461043357806370a082311461044657600080fd5b8063238efcbc1461037757806323b872dd1461037f5780632478842914610392578063303cff53146103a5578063313ce567146103b85780633644e515146103e957600080fd5b80630905f560116102525780630905f56014610317578063095ea7b314610339578063140ce45f1461034c57806318160ddd1461035457806318515a831461035c5780631f5a0bbe1461036457600080fd5b8062f714ce1461028e57806301681a62146102b4578063025a3a29146102c9578063058a8e5f146102ef57806306fdde0314610302575b600080fd5b6102a161029c366004612da3565b6105f4565b6040519081526020015b60405180910390f35b6102c76102c2366004612beb565b6107b5565b005b6008546102e2906201000090046001600160a01b031681565b6040516102ab9190612e06565b6102c76102fd366004612beb565b610859565b61030a6108cb565b6040516102ab9190612e1a565b60085461032990610100900460ff1681565b60405190151581526020016102ab565b610329610347366004612d10565b61095d565b6102a1610977565b6002546102a1565b6102a1610a40565b6102c7610372366004612beb565b610af5565b6102c7610ce9565b61032961038d366004612c5b565b610d98565b6102c76103a0366004612beb565b610dbe565b6102c76103b3366004612d3b565b610edf565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000061681526020016102ab565b6102a1610f2f565b6103296103ff366004612d10565b610f39565b600a546102e2906001600160a01b031681565b6102a160105481565b6102a161042e366004612da3565b610f5b565b6102c7610441366004612d73565b611058565b6102a1610454366004612beb565b6001600160a01b031660009081526020819052604090205490565b6102c761047d366004612beb565b6110eb565b6102c7610490366004612d10565b61114f565b6102a1600d5481565b6102a16104ac366004612beb565b611229565b6102c76104bf366004612d10565b611247565b6102a1600f5481565b61030a61130f565b6103296104e3366004612d10565b61131e565b6102a160115481565b6102a1600e5481565b610329610508366004612d10565b6113a4565b6102c761051b366004612beb565b6113b2565b6102e261052e366004612d73565b6113dc565b6009546102e2906001600160a01b031681565b6008546103299060ff1681565b6102c7610561366004612d3b565b611457565b6102e27f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6102c761059b366004612c9b565b6114be565b6102a16105ae366004612c23565b611622565b6102c76105c1366004612d73565b61164d565b600b546102e2906001600160a01b031681565b6102a16116c1565b6102c76105ef366004612d73565b61172f565b6000600260075414156106225760405162461bcd60e51b815260040161061990612ec2565b60405180910390fd5b600260075561062f6117a3565b6106376118e8565b61064082611944565b600083116106605760405162461bcd60e51b815260040161061990612e78565b60025461066b610a40565b6106759085612f31565b61067f9190612f11565b905061068b3384611989565b60105415610767576000612710601054836106a69190612f31565b6106b09190612f11565b600a5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529192507f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063a9059cbb90604401602060405180830381600087803b15801561072057600080fd5b505af1158015610734573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107589190612d57565b506107638183612f50565b9150505b61079b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168383611ac7565b6107a3610a40565b600d5542600e55600160075592915050565b6107bd611b2a565b600a546040516370a0823160e01b8152610856916001600160a01b0390811691908416906370a08231906107f5903090600401612e06565b60206040518083038186803b15801561080d57600080fd5b505afa158015610821573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108459190612d8b565b6001600160a01b0384169190611ac7565b50565b610861611b78565b6008546040516001600160a01b038084169262010000900416907f6d039a6d5f36163cbc30fe5c1a15856df293a5769543d5deca1fb7a9ab29bf7790600090a3600880546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b6060600380546108da90612f93565b80601f016020809104026020016040519081016040528092919081815260200182805461090690612f93565b80156109535780601f1061092857610100808354040283529160200191610953565b820191906000526020600020905b81548152906001019060200180831161093657829003601f168201915b5050505050905090565b60003361096b818585611bbd565b60019150505b92915050565b600080805b6109846116c1565b811015610a3a576000610996826113dc565b9050600080826001600160a01b031663968ed6006040518163ffffffff1660e01b8152600401604080518083038186803b1580156109d357600080fd5b505afa1580156109e7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0b9190612dc7565b91509150610a1881611cd9565b610a228286612ef9565b94505050508080610a3290612fc8565b91505061097c565b50919050565b6000610a4a610977565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816906370a0823190610a96903090600401612e06565b60206040518083038186803b158015610aae57600080fd5b505afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae69190612d8b565b610af09190612ef9565b905090565b610afd611b78565b610b0681611944565b306001600160a01b0316816001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4957600080fd5b505afa158015610b5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b819190612c07565b6001600160a01b031614610bc75760405162461bcd60e51b815260206004820152600d60248201526c1253959053125117d590555315609a1b6044820152606401610619565b604051636eb1769f60e11b81526001600160a01b0382811660048301523060248301526000917f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489091169063dd62ed3e9060440160206040518083038186803b158015610c3357600080fd5b505afa158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190612d8b565b11610ca75760405162461bcd60e51b815260206004820152600c60248201526b4e4f5f414c4c4f57414e434560a01b6044820152606401610619565b610cb2600c82611d27565b6040516001600160a01b038216907fae5b7c3b000f575c241001dc9bcb3d8778376889353b07121115574eceff78c590600090a250565b600b546001600160a01b03163314610d355760405162461bcd60e51b815260206004820152600f60248201526e494e56414c49445f4144445245535360881b6044820152606401610619565b600b54600a546040516001600160a01b0392831692909116907fff0b32b909f3fb702fe6ac1f682adcca675b9dfaa03ad8f46b4b17c4058a93fc90600090a3600b54600a80546001600160a01b0319166001600160a01b03909216919091179055565b600033610da6858285611dc6565b610db1858585611e40565b60019150505b9392505050565b610dc6611b78565b610dcf81611944565b610dd881611ffc565b600080826001600160a01b031663968ed6006040518163ffffffff1660e01b8152600401604080518083038186803b158015610e1357600080fd5b505afa158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b9190612dc7565b91509150610e5881611cd9565b620f42408210610e9b5760405162461bcd60e51b815260206004820152600e60248201526d08caa9c88a6bea89e9ebe90928e960931b6044820152606401610619565b610ea6600c846120b1565b6040516001600160a01b038416907f4a2cf608bfb427f53279ec7f0eadf48913b9346ccefc3af138dbdec14ea0907d90600090a2505050565b610ee7611b78565b6008805460ff19168215159081179091556040519081527faffd159acb2f0eec86675a846365f4908afe82bcb6f2e273e2703ead071a2617906020015b60405180910390a150565b6000610af06122b5565b60003361096b818585610f4c8383611622565b610f569190612ef9565b611bbd565b600060026007541415610f805760405162461bcd60e51b815260040161061990612ec2565b6002600755610f8d6117a3565b610f956118e8565b610f9e82611944565b60008311610fbe5760405162461bcd60e51b815260040161061990612e9d565b6000610fc960025490565b11610fd45782610ffa565b610fdc610a40565b83610fe660025490565b610ff09190612f31565b610ffa9190612f11565b9050806110195760405162461bcd60e51b815260040161061990612e78565b61104e6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48163330866123dc565b61079b8282612414565b611060611b78565b61106d6002612710612f11565b81106110aa5760405162461bcd60e51b815260206004820152600c60248201526b08c8a8abea89e9ebe90928e960a31b6044820152606401610619565b600f5460408051918252602082018390527f17519bd6596326e94ff406f9632728407b34e99c6ee45960b15bba05d67874c4910160405180910390a1600f55565b6110f3611b78565b6009546040516001600160a01b038084169216907f60ed9ffad04b70bf58c43b18d1f0e54642250116c1137ac1cc4831449124350890600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b600260075414156111725760405162461bcd60e51b815260040161061990612ec2565b600260075561118082611ffc565b6111886124e1565b600081116111a85760405162461bcd60e51b815260040161061990612e9d565b6111dd6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168330846123dc565b816001600160a01b03167f2331b9a387a0c1b9069a5b1a48cd8c566440a10c1e58654d04d03fad210551968260405161121891815260200190565b60405180910390a250506001600755565b6001600160a01b038116600090815260056020526040812054610971565b6002600754141561126a5760405162461bcd60e51b815260040161061990612ec2565b600260075561127882611ffc565b6112806124e1565b600081116112a05760405162461bcd60e51b815260040161061990612e9d565b6112d46001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48168383611ac7565b816001600160a01b03167f2f40f96629e48b44c1173c05df5811e217b0cce3bc7aef3dde4a4625be7c844b8260405161121891815260200190565b6060600480546108da90612f93565b6000338161132c8286611622565b90508381101561138c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610619565b6113998286868403611bbd565b506001949350505050565b60003361096b818585611e40565b6113ba611b78565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60408051600c8054602081810284018501855283018181526000946109719487949093909284929091849184018282801561144057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611422575b50505050508152505061252990919063ffffffff16565b61145f611b78565b6008805462010000600160b01b031960ff19841515610100021661ffff19909216919091176001171690556040517fcc6bda015b6cb89b378ac6dc0294b882c1d0d41b117a7c7a0adb80d8ea7076cb90610f2490831515815260200190565b8342111561150e5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610619565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861153d8c6125a4565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000611598826125ca565b905060006115a882878787612618565b9050896001600160a01b0316816001600160a01b03161461160b5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610619565b6116168a8a8a611bbd565b50505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611655611b78565b6116626002612710612f11565b81106116805760405162461bcd60e51b815260040161061990612e4d565b60105460408051918252602082018390527fa4aab21b1d3be6990ef2d3c38d4d4bf00beb04a40f936221373204a1b1db57a2910160405180910390a1601055565b60408051600c805460208181028401850185528301818152600094610af094939284929184919084018282801561172157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611703575b505050505081525050515190565b611737611b78565b6117446002612710612f11565b81106117625760405162461bcd60e51b815260040161061990612e4d565b60115460408051918252602082018390527f29b9d7a7d8a7a3ac22c295e4517723bc4e386eea60173e59e6da1dbd460cb409910160405180910390a1601155565b60006117ad610a40565b9050600080600f541180156117c35750600d5482115b15611803576000600d54836117d89190612f50565b9050612710600f54826117eb9190612f31565b6117f59190612f11565b6117ff9083612ef9565b9150505b6000601154118015611816575042600e54105b15611870576000600e544261182b9190612f50565b90506127106301e187e084601154846118449190612f31565b61184e9190612f31565b6118589190612f11565b6118629190612f11565b61186c9083612ef9565b9150505b80156118e457600a546118b0906001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb488116911683611ac7565b6040518181527f860c0aa5520013080c2f65981705fcdea474d9f7c3daf954656ed5e65d692d1f9060200160405180910390a15b5050565b60085460ff1615611942576008546201000090046001600160a01b031633146119425760405162461bcd60e51b815260206004820152600c60248201526b27a7262cafa120aa21a422a960a11b6044820152606401610619565b565b6001600160a01b0381166108565760405162461bcd60e51b815260206004820152600c60248201526b4e554c4c5f4144445245535360a01b6044820152606401610619565b6001600160a01b0382166119e95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610619565b6001600160a01b03821660009081526020819052604090205481811015611a5d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610619565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611a8c908490612f50565b90915550506040518281526000906001600160a01b0385169060008051602061301d833981519152906020015b60405180910390a35b505050565b6040516001600160a01b038316602482015260448101829052611ac290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612640565b60085460ff6101009091041615156001146119425760405162461bcd60e51b815260206004820152600e60248201526d454d455247454e43595f4d4f444560901b6044820152606401610619565b600a546001600160a01b031633146119425760405162461bcd60e51b815260206004820152600860248201526727a7262cafa3a7ab60c11b6044820152606401610619565b6001600160a01b038316611c1f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610619565b6001600160a01b038216611c805760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610619565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259101611ab9565b611ce4603282612ef9565b4311156108565760405162461bcd60e51b81526020600482015260116024820152701195539114d7d393d517d5541110551151607a1b6044820152606401610619565b60408051835460208181028301840184528201818152611d91938692849291849190840182828015611d8257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d64575b50505050508152505082612712565b6118e45781546001810183556000838152602090200180546001600160a01b0383166001600160a01b03199091161790555050565b6000611dd28484611622565b90506000198114611e3a5781811015611e2d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610619565b611e3a8484848403611bbd565b50505050565b6001600160a01b038316611ea45760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610619565b6001600160a01b038216611f065760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610619565b6001600160a01b03831660009081526020819052604090205481811015611f7e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610619565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611fb5908490612ef9565b92505081905550826001600160a01b0316846001600160a01b031660008051602061301d83398151915284604051611fef91815260200190565b60405180910390a3611e3a565b60408051600c805460208181028401850185528301818152612072948694939284929184919084018282801561205b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161203d575b50505050508152505061271290919063ffffffff16565b6108565760405162461bcd60e51b815260206004820152601060248201526f24a72b20a624a22fa2ac22a1aaaa27a960811b6044820152606401610619565b60005b6040805184546020818102830184018452820181815261211b938792849291849190840182828015611721576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161170357505050505081525050515190565b811015611ac257816001600160a01b031683600001828154811061214f57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031614156122a3576040805184546020818102830184018452820181815286936001936121d6939092869284928491840182828015611721576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161170357505050505081525050515190565b6121e09190612f50565b815481106121fe57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015483546001600160a01b039091169084908390811061223857634e487b7160e01b600052603260045260246000fd5b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055825483908061228057634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b03191690550190555b806122ad81612fc8565b9150506120b4565b6000306001600160a01b037f0000000000000000000000003c4fe0db16c9b521480c43856ba3196a9fa50e081614801561230e57507f000000000000000000000000000000000000000000000000000000000000000146145b1561233857507f51ce807f760b8b84dae840acafb2c7016e9e90e73dd33c2f191a3b1497b6eae790565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f3da5b67d958ba0cc7aa73c3983a216caf152940fa1abc0c5820895f6dba521e7828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6040516001600160a01b0380851660248301528316604482015260648101829052611e3a9085906323b872dd60e01b90608401611af3565b6001600160a01b03821661246a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610619565b806002600082825461247c9190612ef9565b90915550506001600160a01b038216600090815260208190526040812080548392906124a9908490612ef9565b90915550506040518181526001600160a01b0383169060009060008051602061301d8339815191529060200160405180910390a35050565b6009546001600160a01b031633146119425760405162461bcd60e51b815260206004820152600b60248201526a27a7262cafa5a2a2a822a960a91b6044820152606401610619565b600061253483515190565b82106125725760405162461bcd60e51b815260206004820152600d60248201526c0929cac82989288be929c888ab609b1b6044820152606401610619565b825180518390811061259457634e487b7160e01b600052603260045260246000fd5b6020026020010151905092915050565b6001600160a01b0381166000908152600560205260409020805460018101825590610a3a565b60006109716125d76122b5565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006126298787878761278b565b915091506126368161286e565b5095945050505050565b6000612695826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a6a9092919063ffffffff16565b805190915015611ac257808060200190518101906126b39190612d57565b611ac25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610619565b6000805b83515181101561278157826001600160a01b03168460000151828151811061274e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141561276f576001915050610971565b8061277981612fc8565b915050612716565b5060009392505050565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156127b85750600090506003612865565b8460ff16601b141580156127d057508460ff16601c14155b156127e15750600090506004612865565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612835573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661285e57600060019250925050612865565b9150600090505b94509492505050565b600081600481111561289057634e487b7160e01b600052602160045260246000fd5b14156128995750565b60018160048111156128bb57634e487b7160e01b600052602160045260246000fd5b14156129045760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610619565b600281600481111561292657634e487b7160e01b600052602160045260246000fd5b14156129745760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610619565b600381600481111561299657634e487b7160e01b600052602160045260246000fd5b14156129ef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610619565b6004816004811115612a1157634e487b7160e01b600052602160045260246000fd5b14156108565760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610619565b6060612a798484600085612a81565b949350505050565b606082471015612ae25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610619565b6001600160a01b0385163b612b395760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610619565b600080866001600160a01b03168587604051612b559190612dea565b60006040518083038185875af1925050503d8060008114612b92576040519150601f19603f3d011682016040523d82523d6000602084013e612b97565b606091505b5091509150612ba7828286612bb2565b979650505050505050565b60608315612bc1575081610db7565b825115612bd15782518084602001fd5b8160405162461bcd60e51b81526004016106199190612e1a565b600060208284031215612bfc578081fd5b8135610db781612ff9565b600060208284031215612c18578081fd5b8151610db781612ff9565b60008060408385031215612c35578081fd5b8235612c4081612ff9565b91506020830135612c5081612ff9565b809150509250929050565b600080600060608486031215612c6f578081fd5b8335612c7a81612ff9565b92506020840135612c8a81612ff9565b929592945050506040919091013590565b600080600080600080600060e0888a031215612cb5578283fd5b8735612cc081612ff9565b96506020880135612cd081612ff9565b95506040880135945060608801359350608088013560ff81168114612cf3578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612d22578182fd5b8235612d2d81612ff9565b946020939093013593505050565b600060208284031215612d4c578081fd5b8135610db78161300e565b600060208284031215612d68578081fd5b8151610db78161300e565b600060208284031215612d84578081fd5b5035919050565b600060208284031215612d9c578081fd5b5051919050565b60008060408385031215612db5578182fd5b823591506020830135612c5081612ff9565b60008060408385031215612dd9578182fd5b505080516020909101519092909150565b60008251612dfc818460208701612f67565b9190910192915050565b6001600160a01b0391909116815260200190565b6020815260008251806020840152612e39816040850160208701612f67565b601f01601f19169190910160400192915050565b60208082526011908201527008ab092a8be8c8a8abea89e9ebe90928e9607b1b604082015260600190565b6020808252600b908201526a5a45524f5f53484152455360a81b604082015260600190565b6020808252600b908201526a16915493d7d05353d5539560aa1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115612f0c57612f0c612fe3565b500190565b600082612f2c57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612f4b57612f4b612fe3565b500290565b600082821015612f6257612f62612fe3565b500390565b60005b83811015612f82578181015183820152602001612f6a565b83811115611e3a5750506000910152565b600181811c90821680612fa757607f821691505b60208210811415610a3a57634e487b7160e01b600052602260045260246000fd5b6000600019821415612fdc57612fdc612fe3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461085657600080fd5b801515811461085657600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220f31f11c01f2f907af72df1943789319279d595d6669a94003304b74b62202b4564736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ae75b29ade678372d77a8b41225654138a7e6ff10000000000000000000000006b29610d6c6a9e47812be40f1335918bd63321bf000000000000000000000000000000000000000000000000000000000000001850726f746563746564204d6f6f6e73686f7473205553444300000000000000000000000000000000000000000000000000000000000000000000000000000006504d555344430000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Protected Moonshots USDC
Arg [1] : _symbol (string): PMUSDC
Arg [2] : _wantToken (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [3] : _keeper (address): 0xAE75B29ADe678372D77A8B41225654138a7E6ff1
Arg [4] : _governance (address): 0x6b29610D6c6a9E47812bE40F1335918bd63321bf

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [3] : 000000000000000000000000ae75b29ade678372d77a8b41225654138a7e6ff1
Arg [4] : 0000000000000000000000006b29610d6c6a9e47812be40f1335918bd63321bf
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [6] : 50726f746563746564204d6f6f6e73686f747320555344430000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [8] : 504d555344430000000000000000000000000000000000000000000000000000


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.