ETH Price: $3,483.36 (+1.00%)

Contract

0x861cbEb7B0ea0D7ecC8d0103F78834bb4fe35097
 

Overview

ETH Balance

1 wei

Eth Value

Less Than $0.01 (@ $3,483.36/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint With ETH131956812021-09-10 3:49:421202 days ago1631245782IN
0x861cbEb7...b4fe35097
0 ETH0.0587859862
Deposit131941302021-09-09 21:53:511202 days ago1631224431IN
0x861cbEb7...b4fe35097
1 wei0.0042104964
Withdraw124046442021-05-10 5:10:071325 days ago1620623407IN
0x861cbEb7...b4fe35097
0 ETH0.00335088180
Withdraw123871522021-05-07 12:30:581328 days ago1620390658IN
0x861cbEb7...b4fe35097
0 ETH0.000930850
Deposit123871332021-05-07 12:27:111328 days ago1620390431IN
0x861cbEb7...b4fe35097
1.9 ETH0.0015794550
Deposit123870692021-05-07 12:13:221328 days ago1620389602IN
0x861cbEb7...b4fe35097
0.1 ETH0.0032236649
Deposit123821152021-05-06 17:36:461328 days ago1620322606IN
0x861cbEb7...b4fe35097
0.01 ETH0.0018953460
Withdraw123783862021-05-06 3:38:141329 days ago1620272294IN
0x861cbEb7...b4fe35097
0 ETH0.0008371845
Deposit123758582021-05-05 18:28:421329 days ago1620239322IN
0x861cbEb7...b4fe35097
0.04 ETH0.0036841856
Withdraw123634872021-05-03 20:47:071331 days ago1620074827IN
0x861cbEb7...b4fe35097
0 ETH0.0014520478
Withdraw123633752021-05-03 20:24:111331 days ago1620073451IN
0x861cbEb7...b4fe35097
0 ETH0.0017487794
Deposit123633342021-05-03 20:13:021331 days ago1620072782IN
0x861cbEb7...b4fe35097
0.05 ETH0.0059210190
Deposit123631652021-05-03 19:32:091331 days ago1620070329IN
0x861cbEb7...b4fe35097
0.1 ETH0.0057236487
Deposit123620572021-05-03 15:29:331331 days ago1620055773IN
0x861cbEb7...b4fe35097
1 ETH0.002960545
Deposit123468502021-05-01 7:08:531334 days ago1619852933IN
0x861cbEb7...b4fe35097
0.001 ETH0.001752836
Withdraw123365752021-04-29 16:58:341335 days ago1619715514IN
0x861cbEb7...b4fe35097
0 ETH0.00234561126
Deposit123365652021-04-29 16:56:061335 days ago1619715366IN
0x861cbEb7...b4fe35097
0.1 ETH0.00331684105
Deposit123365182021-04-29 16:44:441335 days ago1619714684IN
0x861cbEb7...b4fe35097
0.1 ETH0.0026755884.7
Deposit123364862021-04-29 16:38:491335 days ago1619714329IN
0x861cbEb7...b4fe35097
0.1 ETH0.00334843106
Deposit123364722021-04-29 16:34:411335 days ago1619714081IN
0x861cbEb7...b4fe35097
0.1 ETH0.00416974132
Deposit123364332021-04-29 16:25:321335 days ago1619713532IN
0x861cbEb7...b4fe35097
0.1 ETH0.0030641397
Deposit123363492021-04-29 16:07:471335 days ago1619712467IN
0x861cbEb7...b4fe35097
0.1 ETH0.00319048101
Deposit123363222021-04-29 16:01:431335 days ago1619712103IN
0x861cbEb7...b4fe35097
0.1 ETH0.00375909119
Deposit123363032021-04-29 15:57:501335 days ago1619711870IN
0x861cbEb7...b4fe35097
1 ETH0.0045767694
Withdraw123362922021-04-29 15:55:351335 days ago1619711735IN
0x861cbEb7...b4fe35097
0 ETH0.00186346100.1
View all transactions

Latest 8 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
131956812021-09-10 3:49:421202 days ago1631245782
0x861cbEb7...b4fe35097
1 ETH
124046442021-05-10 5:10:071325 days ago1620623407
0x861cbEb7...b4fe35097
0.011 ETH
123871522021-05-07 12:30:581328 days ago1620390658
0x861cbEb7...b4fe35097
2 ETH
123783862021-05-06 3:38:141329 days ago1620272294
0x861cbEb7...b4fe35097
0.04 ETH
123634872021-05-03 20:47:071331 days ago1620074827
0x861cbEb7...b4fe35097
0.1 ETH
123633752021-05-03 20:24:111331 days ago1620073451
0x861cbEb7...b4fe35097
0.05 ETH
123365752021-04-29 16:58:341335 days ago1619715514
0x861cbEb7...b4fe35097
1.7 ETH
123362922021-04-29 15:55:351335 days ago1619711735
0x861cbEb7...b4fe35097
1 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DelayedMinter

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 17: DelayedMinter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

import "./DelayedMinterHelper.sol";

import "./IATokenV1.sol";
import "./ICToken.sol";
import "./IComptroller.sol";
import "./ISushiBar.sol";
import "./ILendingPoolV1.sol";
import "./ICompoundLens.sol";
import "./IUniswapV2.sol";
import "./IBasket.sol";
import "./IBasicIssuanceModule.sol";

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

// Basket Weaver is a way to socialize gas costs related to minting baskets tokens
contract DelayedMinter is DelayedMinterHelper {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    uint256 public constant BLOCK_DELAY = 5;

    IBasket public constant BDPI = IBasket(0x0309c98B1bffA350bcb3F9fB9780970CA32a5060);

    address public governance;

    // User deposited
    mapping(address => uint256) public deposits;

    // When user deposited
    mapping(address => uint256) public blockWhenDeposited;

    // **** Constructor and modifiers ****

    constructor(address _governance) {
        governance = _governance;

        // Enter compound markets
        address[] memory markets = new address[](2);
        markets[0] = CUNI;
        markets[0] = CCOMP;
        enterMarkets(markets);
    }

    receive() external payable {}

    modifier onlyGov() {
        require(msg.sender == governance, "!governance");
        _;
    }

    // **** Restricted functions ****

    function setGov(address _governance) public onlyGov {
        governance = _governance;
    }

    function recoverERC20(address _token) public onlyGov {
        IERC20(_token).safeTransfer(governance, IERC20(_token).balanceOf(address(this)));
    }

    function recoverERC20s(address[] memory _tokens) public onlyGov {
        for (uint256 i = 0; i < _tokens.length; i++) {
            recoverERC20(_tokens[i]);
        }
    }

    // **** Public Functions ****

    function deposit() public payable {
        require(msg.value > 0, "!value");

        deposits[msg.sender] = deposits[msg.sender].add(msg.value);
        blockWhenDeposited[msg.sender] = block.number;
    }

    function withdraw(uint256 _amount) public {
        deposits[msg.sender] = deposits[msg.sender].sub(_amount);

        (bool success, ) = msg.sender.call{ value: _amount }("");
        require(success, "!eth-transfer");
    }

    /// @notice Converts ETH into a Basket
    /// @param  derivatives  Address of the derivatives (e.g. cUNI, aYFI)
    /// @param  underlyings  Address of the underlyings (e.g. UNI,   YFI)
    /// @param  underlyingsInEthPerBasket  Off-chain calculation - how much each underlying is
    ///                                    worth in ETH per 1 unit of basket token
    /// @param  ethPerBasket  How much 1 basket token is worth in ETH
    /// @param  minMintAmount Minimum amount of basket token to mint
    /// @param  deadline      Deadline to mint by
    function mintWithETH(
        address[] memory derivatives,
        address[] memory underlyings,
        uint256[] memory underlyingsInEthPerBasket,
        uint256 ethPerBasket,
        uint256 minMintAmount,
        uint256 deadline
    ) public returns (uint256) {
        require(block.timestamp <= deadline, "expired");

        uint256 _amount = deposits[msg.sender];

        require(_amount > 0, "!amount");
        require(block.number > blockWhenDeposited[msg.sender] + BLOCK_DELAY, "!block");

        // BDPI to mint
        uint256 bdpiToMint =
            _convertETHToDerivativeAndGetMintAmount(derivatives, underlyings, underlyingsInEthPerBasket, ethPerBasket);

        // Reset deposit
        deposits[msg.sender] = 0;

        require(bdpiToMint >= minMintAmount, "!mint-min-amount");

        // Mint tokens and transfer to user
        BDPI.mint(bdpiToMint);
        IERC20(address(BDPI)).safeTransfer(msg.sender, bdpiToMint);

        return bdpiToMint;
    }

    // **** Internals ****

    /// @notice Chooses which router address to use
    function _getRouterAddressForToken(address _token) internal pure returns (address) {
        // Chooses which router (uniswap or sushiswap) to use to swap tokens
        // By default: SUSHI
        // But some tokens don't have liquidity on SUSHI, so we use UNI
        // Don't want to use 1inch as its too costly gas-wise

        if (_token == KNC || _token == LRC || _token == BAL || _token == MTA) {
            return UNIV2_ROUTER;
        }

        return SUSHISWAP_ROUTER;
    }

    /// @notice Converts ETH into the specific derivative and get mint amount for basket
    /// @param  derivatives  Address of the derivatives (e.g. cUNI, aYFI)
    /// @param  underlyings  Address of the underlyings (e.g. UNI,   YFI)
    /// @param  underlyingsInEthPerBasketToken  Off-chain calculation - how much each underlying is
    ///                                    worth in ETH per 1 unit of basket token
    /// @param  ethPerBasketToken  How much 1 basket token is worth in ETH
    function _convertETHToDerivativeAndGetMintAmount(
        address[] memory derivatives,
        address[] memory underlyings,
        uint256[] memory underlyingsInEthPerBasketToken,
        uint256 ethPerBasketToken
    ) internal returns (uint256) {
        // Path
        address[] memory path = new address[](2);
        path[0] = WETH;

        // Convert them all to the underlyings
        uint256 bdpiToMint;

        // Get total amount in bdpi
        (, uint256[] memory tokenAmountsInBasket) = BDPI.getAssetsAndBalances();

        // BDPI total supply
        uint256 basketTotalSupply = BDPI.totalSupply();

        uint256 ethAmount = deposits[msg.sender];

        {
            uint256 ratio;
            uint256 ethToSend;
            for (uint256 i = 0; i < derivatives.length; i++) {
                ratio = underlyingsInEthPerBasketToken[i].mul(1e18).div(ethPerBasketToken);

                // Convert them from ETH to their respective tokens (truncate 1e6 for rounding errors)
                ethToSend = ethAmount.mul(ratio).div(1e24).mul(1e6);

                path[1] = underlyings[i];
                IUniswapV2Router02(_getRouterAddressForToken(underlyings[i])).swapExactETHForTokens{ value: ethToSend }(
                    0,
                    path,
                    address(this),
                    block.timestamp + 60
                );

                // Convert to from respective token to derivative
                _toDerivative(underlyings[i], derivatives[i]);

                // Approve derivative and calculate mint amount
                bdpiToMint = _approveDerivativeAndGetMintAmount(
                    derivatives[i],
                    basketTotalSupply,
                    tokenAmountsInBasket[i],
                    bdpiToMint
                );
            }
        }

        return bdpiToMint;
    }

    /// @notice Approves derivative to the basket address and gets the mint amount.
    ///         Mainly here to avoid stack too deep errors
    /// @param  derivative  Address of the derivative (e.g. cUNI, aYFI)
    /// @param  basketTotalSupply  Total supply of the basket token
    /// @param  tokenAmountInBasket  Amount of derivative currently in the basket
    /// @param  curMintAmount  Accumulator - whats the minimum mint amount right now
    function _approveDerivativeAndGetMintAmount(
        address derivative,
        uint256 basketTotalSupply,
        uint256 tokenAmountInBasket,
        uint256 curMintAmount
    ) internal returns (uint256) {
        uint256 derivativeBal = IERC20(derivative).balanceOf(address(this));

        IERC20(derivative).safeApprove(address(BDPI), 0);
        IERC20(derivative).safeApprove(address(BDPI), derivativeBal);

        // Calculate how much BDPI we can mint at max
        // Formula: min(e for e in bdpiSupply * tokenWeHave[e] / tokenInBDPI[e])
        if (curMintAmount == 0) {
            return basketTotalSupply.mul(derivativeBal).div(tokenAmountInBasket);
        }

        uint256 temp = basketTotalSupply.mul(derivativeBal).div(tokenAmountInBasket);
        if (temp < curMintAmount) {
            return temp;
        }

        return curMintAmount;
    }
}

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

pragma solidity >=0.6.2 <0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 3 of 17: Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 4 of 17: DelayedMinterHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

import "./IATokenV1.sol";
import "./ICToken.sol";
import "./IComptroller.sol";
import "./ILendingPoolV1.sol";
import "./ISushiBar.sol";

import "./SafeMath.sol";
import "./IERC20.sol";
import "./SafeERC20.sol";

contract DelayedMinterHelper {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Aave
    address constant LENDING_POOL_V1 = 0x398eC7346DcD622eDc5ae82352F02bE94C62d119;
    address constant LENDING_POOL_CORE_V1 = 0x3dfd23A6c5E8BbcFc9581d2E864a68feb6a076d3;

    // Compound
    address constant COMPTROLLER = 0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B;

    // Router address
    address constant SUSHISWAP_ROUTER = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F;
    address constant UNIV2_ROUTER = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;

    // CTokens
    address constant CUNI = 0x35A18000230DA775CAc24873d00Ff85BccdeD550;
    address constant CCOMP = 0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4;

    // SUSHI
    address constant XSUSHI = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272;

    // WETH
    address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    // DPI
    address constant DPI = 0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b;

    // Defi tokens
    address constant UNI = 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984;
    address constant COMP = 0xc00e94Cb662C3520282E6f5717214004A7f26888;
    address constant YFI = 0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e;
    address constant SNX = 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F;
    address constant MKR = 0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2;
    address constant REN = 0x408e41876cCCDC0F92210600ef50372656052a38;
    address constant KNC = 0xdd974D5C2e2928deA5F71b9825b8b646686BD200;
    address constant LRC = 0xBBbbCA6A901c926F240b89EacB641d8Aec7AEafD;
    address constant BAL = 0xba100000625a3754423978a60c9317c58a424e3D;
    address constant AAVE = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9;
    address constant MTA = 0xa3BeD4E1c75D00fa6f4E5E6922DB7261B5E9AcD2;
    address constant SUSHI = 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2;

    // **** Public ****

    /// @notice Enters Compound market. *Must be called before toCToken*
    /// @param  _markets  Compound markets to enter (underlying, not cTokens)
    function enterMarkets(address[] memory _markets) public {
        IComptroller(COMPTROLLER).enterMarkets(_markets);
    }

    // **** Internal ****

    /// @notice Converts underlying to derivative
    /// @param  _derivative  Address of the derivative token
    function _toDerivative(address _underlying, address _derivative) internal {
        if (_underlying == _derivative) {
            return;
        }

        if (_derivative == CUNI || _derivative == CCOMP) {
            _toCToken(_underlying);
        } else if (_derivative == XSUSHI) {
            _toXSushi();
        } else {
            _toATokenV1(_underlying);
        }
    }

    /// @notice Supplies assets to the Compound market
    /// @param  _token  Underlying token to supply to Compound
    function _toCToken(address _token) internal {
        // Only doing UNI or COMP for CTokens
        require(_token == UNI || _token == COMP, "!valid-to-ctoken");

        address _ctoken = _getTokenToCToken(_token);
        uint256 balance = IERC20(_token).balanceOf(address(this));

        require(balance > 0, "!token-bal");

        IERC20(_token).safeApprove(_ctoken, 0);
        IERC20(_token).safeApprove(_ctoken, balance);
        require(ICToken(_ctoken).mint(balance) == 0, "!ctoken-mint");
    }

    /// @notice Supplies assets to the Aave market
    /// @param  _token  Underlying to supply to Aave
    function _toATokenV1(address _token) internal {
        require(_token != UNI && _token != COMP, "no-uni-or-comp");

        uint256 balance = IERC20(_token).balanceOf(address(this));

        require(balance > 0, "!token-bal");

        IERC20(_token).safeApprove(LENDING_POOL_CORE_V1, 0);
        IERC20(_token).safeApprove(LENDING_POOL_CORE_V1, balance);
        ILendingPoolV1(LENDING_POOL_V1).deposit(_token, balance, 0);
    }

    /// @dev Token to CToken mapping
    /// @param  _token Token address
    function _getTokenToCToken(address _token) internal pure returns (address) {
        if (_token == UNI) {
            return CUNI;
        }
        if (_token == COMP) {
            return CCOMP;
        }
        revert("!supported-token-to-ctoken");
    }

    /// @notice Converts sushi to xsushi
    function _toXSushi() internal {
        uint256 balance = IERC20(SUSHI).balanceOf(address(this));
        require(balance > 0, "!sushi-bal");

        IERC20(SUSHI).safeApprove(XSUSHI, 0);
        IERC20(SUSHI).safeApprove(XSUSHI, balance);
        ISushiBar(XSUSHI).enter(balance);
    }
}

File 5 of 17: ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./Context.sol";
import "./IERC20.sol";
import "./SafeMath.sol";

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

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

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

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

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

    /**
     * @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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

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

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

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

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

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

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

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

File 6 of 17: IATokenV1.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

interface IATokenV1 {
    function UINT_MAX_VALUE() external view returns (uint256);

    function allowInterestRedirectionTo(address _to) external;

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

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

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

    function burnOnLiquidation(address _account, uint256 _value) external;

    function decimals() external view returns (uint8);

    function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);

    function getInterestRedirectionAddress(address _user) external view returns (address);

    function getRedirectedBalance(address _user) external view returns (uint256);

    function getUserIndex(address _user) external view returns (uint256);

    function increaseAllowance(address spender, uint256 addedValue) external returns (bool);

    function isTransferAllowed(address _user, uint256 _amount) external view returns (bool);

    function mintOnDeposit(address _account, uint256 _amount) external;

    function name() external view returns (string memory);

    function principalBalanceOf(address _user) external view returns (uint256);

    function redeem(uint256 _amount) external;

    function redirectInterestStream(address _to) external;

    function redirectInterestStreamOf(address _from, address _to) external;

    function symbol() external view returns (string memory);

    function totalSupply() external view returns (uint256);

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

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

    function transferOnLiquidation(
        address _from,
        address _to,
        uint256 _value
    ) external;

    function underlyingAssetAddress() external view returns (address);
}

File 7 of 17: IBasicIssuanceModule.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

interface IBasicIssuanceModule {
    function controller() external view returns (address);

    function getRequiredComponentUnitsForIssue(address _setToken, uint256 _quantity)
        external
        view
        returns (address[] memory, uint256[] memory);

    function initialize(address _setToken, address _preIssueHook) external;

    function issue(
        address _setToken,
        uint256 _quantity,
        address _to
    ) external;

    function managerIssuanceHook(address) external view returns (address);

    function redeem(
        address _setToken,
        uint256 _quantity,
        address _to
    ) external;

    function removeModule() external;
}

File 8 of 17: IBasket.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

interface IBasket {
    function transfer(address dst, uint256 amount) external returns (bool);

    function totalSupply() external view returns (uint256);

    function mint(uint256) external;

    function getOne() external view returns (address[] memory, uint256[] memory);

    function getAssetsAndBalances() external view returns (address[] memory, uint256[] memory);

    function burn(uint256) external;
}

File 9 of 17: ICompoundLens.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

interface ICompoundLens {
    function getCompBalanceMetadataExt(
        address comp,
        address comptroller,
        address account
    )
        external
        returns (
            uint256 balance,
            uint256 votes,
            address delegate,
            uint256 allocated
        );
}

File 10 of 17: IComptroller.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

interface IComptroller {
    function _addCompMarkets(address[] memory cTokens) external;

    function _become(address unitroller) external;

    function _borrowGuardianPaused() external view returns (bool);

    function _dropCompMarket(address cToken) external;

    function _grantComp(address recipient, uint256 amount) external;

    function _mintGuardianPaused() external view returns (bool);

    function _setBorrowCapGuardian(address newBorrowCapGuardian) external;

    function _setBorrowPaused(address cToken, bool state) external returns (bool);

    function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);

    function _setCollateralFactor(address cToken, uint256 newCollateralFactorMantissa) external returns (uint256);

    function _setCompRate(uint256 compRate_) external;

    function _setContributorCompSpeed(address contributor, uint256 compSpeed) external;

    function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);

    function _setMarketBorrowCaps(address[] memory cTokens, uint256[] memory newBorrowCaps) external;

    function _setMintPaused(address cToken, bool state) external returns (bool);

    function _setPauseGuardian(address newPauseGuardian) external returns (uint256);

    function _setPriceOracle(address newOracle) external returns (uint256);

    function _setSeizePaused(bool state) external returns (bool);

    function _setTransferPaused(bool state) external returns (bool);

    function _supportMarket(address cToken) external returns (uint256);

    function accountAssets(address, uint256) external view returns (address);

    function admin() external view returns (address);

    function allMarkets(uint256) external view returns (address);

    function borrowAllowed(
        address cToken,
        address borrower,
        uint256 borrowAmount
    ) external returns (uint256);

    function borrowCapGuardian() external view returns (address);

    function borrowCaps(address) external view returns (uint256);

    function borrowGuardianPaused(address) external view returns (bool);

    function borrowVerify(
        address cToken,
        address borrower,
        uint256 borrowAmount
    ) external;

    function checkMembership(address account, address cToken) external view returns (bool);

    function claimComp(address holder, address[] memory cTokens) external;

    function claimComp(
        address[] memory holders,
        address[] memory cTokens,
        bool borrowers,
        bool suppliers
    ) external;

    function claimComp(address holder) external;

    function closeFactorMantissa() external view returns (uint256);

    function compAccrued(address) external view returns (uint256);

    function compBorrowState(address) external view returns (uint224 index, uint32);

    function compBorrowerIndex(address, address) external view returns (uint256);

    function compClaimThreshold() external view returns (uint256);

    function compContributorSpeeds(address) external view returns (uint256);

    function compInitialIndex() external view returns (uint224);

    function compRate() external view returns (uint256);

    function compSpeeds(address) external view returns (uint256);

    function compSupplierIndex(address, address) external view returns (uint256);

    function compSupplyState(address) external view returns (uint224 index, uint32);

    function comptrollerImplementation() external view returns (address);

    function enterMarkets(address[] memory cTokens) external returns (uint256[] memory);

    function exitMarket(address cTokenAddress) external returns (uint256);

    function getAccountLiquidity(address account)
        external
        view
        returns (
            uint256,
            uint256,
            uint256
        );

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

    function getAssetsIn(address account) external view returns (address[] memory);

    function getBlockNumber() external view returns (uint256);

    function getCompAddress() external view returns (address);

    function getHypotheticalAccountLiquidity(
        address account,
        address cTokenModify,
        uint256 redeemTokens,
        uint256 borrowAmount
    )
        external
        view
        returns (
            uint256,
            uint256,
            uint256
        );

    function isComptroller() external view returns (bool);

    function lastContributorBlock(address) external view returns (uint256);

    function liquidateBorrowAllowed(
        address cTokenBorrowed,
        address cTokenCollateral,
        address liquidator,
        address borrower,
        uint256 repayAmount
    ) external returns (uint256);

    function liquidateBorrowVerify(
        address cTokenBorrowed,
        address cTokenCollateral,
        address liquidator,
        address borrower,
        uint256 actualRepayAmount,
        uint256 seizeTokens
    ) external;

    function liquidateCalculateSeizeTokens(
        address cTokenBorrowed,
        address cTokenCollateral,
        uint256 actualRepayAmount
    ) external view returns (uint256, uint256);

    function liquidationIncentiveMantissa() external view returns (uint256);

    function markets(address)
        external
        view
        returns (
            bool isListed,
            uint256 collateralFactorMantissa,
            bool isComped
        );

    function maxAssets() external view returns (uint256);

    function mintAllowed(
        address cToken,
        address minter,
        uint256 mintAmount
    ) external returns (uint256);

    function mintGuardianPaused(address) external view returns (bool);

    function mintVerify(
        address cToken,
        address minter,
        uint256 actualMintAmount,
        uint256 mintTokens
    ) external;

    function oracle() external view returns (address);

    function pauseGuardian() external view returns (address);

    function pendingAdmin() external view returns (address);

    function pendingComptrollerImplementation() external view returns (address);

    function redeemAllowed(
        address cToken,
        address redeemer,
        uint256 redeemTokens
    ) external returns (uint256);

    function redeemVerify(
        address cToken,
        address redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    ) external;

    function refreshCompSpeeds() external;

    function repayBorrowAllowed(
        address cToken,
        address payer,
        address borrower,
        uint256 repayAmount
    ) external returns (uint256);

    function repayBorrowVerify(
        address cToken,
        address payer,
        address borrower,
        uint256 actualRepayAmount,
        uint256 borrowerIndex
    ) external;

    function seizeAllowed(
        address cTokenCollateral,
        address cTokenBorrowed,
        address liquidator,
        address borrower,
        uint256 seizeTokens
    ) external returns (uint256);

    function seizeGuardianPaused() external view returns (bool);

    function seizeVerify(
        address cTokenCollateral,
        address cTokenBorrowed,
        address liquidator,
        address borrower,
        uint256 seizeTokens
    ) external;

    function transferAllowed(
        address cToken,
        address src,
        address dst,
        uint256 transferTokens
    ) external returns (uint256);

    function transferGuardianPaused() external view returns (bool);

    function transferVerify(
        address cToken,
        address src,
        address dst,
        uint256 transferTokens
    ) external;

    function updateContributorRewards(address contributor) external;
}

File 11 of 17: ICToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

interface ICToken {
    function _acceptAdmin() external returns (uint256);

    function _addReserves(uint256 addAmount) external returns (uint256);

    function _reduceReserves(uint256 reduceAmount) external returns (uint256);

    function _setComptroller(address newComptroller) external returns (uint256);

    function _setImplementation(
        address implementation_,
        bool allowResign,
        bytes memory becomeImplementationData
    ) external;

    function _setInterestRateModel(address newInterestRateModel) external returns (uint256);

    function _setPendingAdmin(address newPendingAdmin) external returns (uint256);

    function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256);

    function accrualBlockNumber() external view returns (uint256);

    function accrueInterest() external returns (uint256);

    function admin() external view returns (address);

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

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

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

    function balanceOfUnderlying(address owner) external returns (uint256);

    function borrow(uint256 borrowAmount) external returns (uint256);

    function borrowBalanceCurrent(address account) external returns (uint256);

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

    function borrowIndex() external view returns (uint256);

    function borrowRatePerBlock() external view returns (uint256);

    function comptroller() external view returns (address);

    function decimals() external view returns (uint8);

    function delegateToImplementation(bytes memory data) external returns (bytes memory);

    function delegateToViewImplementation(bytes memory data) external view returns (bytes memory);

    function exchangeRateCurrent() external returns (uint256);

    function exchangeRateStored() external view returns (uint256);

    function getAccountSnapshot(address account)
        external
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256
        );

    function getCash() external view returns (uint256);

    function implementation() external view returns (address);

    function interestRateModel() external view returns (address);

    function isCToken() external view returns (bool);

    function liquidateBorrow(
        address borrower,
        uint256 repayAmount,
        address cTokenCollateral
    ) external returns (uint256);

    function mint(uint256 mintAmount) external returns (uint256);

    function name() external view returns (string memory);

    function pendingAdmin() external view returns (address);

    function redeem(uint256 redeemTokens) external returns (uint256);

    function redeemUnderlying(uint256 redeemAmount) external returns (uint256);

    function repayBorrow(uint256 repayAmount) external returns (uint256);

    function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256);

    function reserveFactorMantissa() external view returns (uint256);

    function seize(
        address liquidator,
        address borrower,
        uint256 seizeTokens
    ) external returns (uint256);

    function supplyRatePerBlock() external view returns (uint256);

    function symbol() external view returns (string memory);

    function totalBorrows() external view returns (uint256);

    function totalBorrowsCurrent() external returns (uint256);

    function totalReserves() external view returns (uint256);

    function totalSupply() external view returns (uint256);

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

    function transferFrom(
        address src,
        address dst,
        uint256 amount
    ) external returns (bool);

    function underlying() external view returns (address);
}

File 12 of 17: IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

pragma solidity ^0.7.3;

interface ILendingPoolV1 {
    function LENDINGPOOL_REVISION() external view returns (uint256);

    function UINT_MAX_VALUE() external view returns (uint256);

    function addressesProvider() external view returns (address);

    function borrow(
        address _reserve,
        uint256 _amount,
        uint256 _interestRateMode,
        uint16 _referralCode
    ) external;

    function core() external view returns (address);

    function dataProvider() external view returns (address);

    function deposit(
        address _reserve,
        uint256 _amount,
        uint16 _referralCode
    ) external payable;

    function flashLoan(
        address _receiver,
        address _reserve,
        uint256 _amount,
        bytes memory _params
    ) external;

    function getReserveConfigurationData(address _reserve)
        external
        view
        returns (
            uint256 ltv,
            uint256 liquidationThreshold,
            uint256 liquidationBonus,
            address interestRateStrategyAddress,
            bool usageAsCollateralEnabled,
            bool borrowingEnabled,
            bool stableBorrowRateEnabled,
            bool isActive
        );

    function getReserveData(address _reserve)
        external
        view
        returns (
            uint256 totalLiquidity,
            uint256 availableLiquidity,
            uint256 totalBorrowsStable,
            uint256 totalBorrowsVariable,
            uint256 liquidityRate,
            uint256 variableBorrowRate,
            uint256 stableBorrowRate,
            uint256 averageStableBorrowRate,
            uint256 utilizationRate,
            uint256 liquidityIndex,
            uint256 variableBorrowIndex,
            address aTokenAddress,
            uint40 lastUpdateTimestamp
        );

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

    function getUserAccountData(address _user)
        external
        view
        returns (
            uint256 totalLiquidityETH,
            uint256 totalCollateralETH,
            uint256 totalBorrowsETH,
            uint256 totalFeesETH,
            uint256 availableBorrowsETH,
            uint256 currentLiquidationThreshold,
            uint256 ltv,
            uint256 healthFactor
        );

    function getUserReserveData(address _reserve, address _user)
        external
        view
        returns (
            uint256 currentATokenBalance,
            uint256 currentBorrowBalance,
            uint256 principalBorrowBalance,
            uint256 borrowRateMode,
            uint256 borrowRate,
            uint256 liquidityRate,
            uint256 originationFee,
            uint256 variableBorrowIndex,
            uint256 lastUpdateTimestamp,
            bool usageAsCollateralEnabled
        );

    function initialize(address _addressesProvider) external;

    function liquidationCall(
        address _collateral,
        address _reserve,
        address _user,
        uint256 _purchaseAmount,
        bool _receiveAToken
    ) external payable;

    function parametersProvider() external view returns (address);

    function rebalanceStableBorrowRate(address _reserve, address _user) external;

    function redeemUnderlying(
        address _reserve,
        address _user,
        uint256 _amount,
        uint256 _aTokenBalanceAfterRedeem
    ) external;

    function repay(
        address _reserve,
        uint256 _amount,
        address _onBehalfOf
    ) external payable;

    function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) external;

    function swapBorrowRateMode(address _reserve) external;
}

File 14 of 17: ISushiBar.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.3;

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

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

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

    function decimals() external view returns (uint8);

    function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);

    function enter(uint256 _amount) external;

    function increaseAllowance(address spender, uint256 addedValue) external returns (bool);

    function leave(uint256 _share) external;

    function name() external view returns (string memory);

    function sushi() external view returns (address);

    function symbol() external view returns (string memory);

    function totalSupply() external view returns (uint256);

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

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

File 15 of 17: IUniswapV2.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint256);

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function migrator() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;

    function setMigrator(address) external;
}

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

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

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

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

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

interface IUniswapV2Router01 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);
}

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 16 of 17: SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "./SafeMath.sol";
import "./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 SafeMath for uint256;
    using Address for address;

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

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

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

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

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

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

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

File 17 of 17: SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BDPI","outputs":[{"internalType":"contract IBasket","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLOCK_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blockWhenDeposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_markets","type":"address[]"}],"name":"enterMarkets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"derivatives","type":"address[]"},{"internalType":"address[]","name":"underlyings","type":"address[]"},{"internalType":"uint256[]","name":"underlyingsInEthPerBasket","type":"uint256[]"},{"internalType":"uint256","name":"ethPerBasket","type":"uint256"},{"internalType":"uint256","name":"minMintAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"mintWithETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"recoverERC20s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506040516200237138038062002371833981810160405260208110156200003757600080fd5b5051600080546001600160a01b0319166001600160a01b03831617905560408051600280825260608083018452926020830190803683370190505090507335a18000230da775cac24873d00ff85bccded550816000815181106200009757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250507370e36f6bf80a52b3b46b3af8e106cc0ed743e8e481600081518110620000da57fe5b6001600160a01b0390921660209283029190910190910152620000fd8162000105565b505062000268565b604051631853304760e31b8152602060048201818152835160248401528351733d9819210a31b4961b30ef54be2aed79b9c9cd3b9363c299823893869392839260440191808601910280838360005b838110156200016e57818101518382015260200162000154565b5050505090500192505050600060405180830381600087803b1580156200019457600080fd5b505af1158015620001a9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620001d357600080fd5b8101908080516040519392919084640100000000821115620001f457600080fd5b9083019060208201858111156200020a57600080fd5b82518660208202830111640100000000821117156200022857600080fd5b82525081516020918201928201910280838360005b83811015620002575781810151838201526020016200023d565b505050509050016040525050505050565b6120f980620002786000396000f3fe6080604052600436106100ab5760003560e01c8063a7a580d511610064578063a7a580d5146101b6578063c299823814610264578063cc69188814610312578063cfad57a2146104cf578063d0e30db014610502578063fc7e286d1461050a576100b2565b80632272c18f146100b75780632e1a7d4d146100e85780635aa6e675146101145780636db3f625146101295780639e78f4591461016e5780639e8c708e14610183576100b2565b366100b257005b600080fd5b3480156100c357600080fd5b506100cc61053d565b604080516001600160a01b039092168252519081900360200190f35b3480156100f457600080fd5b506101126004803603602081101561010b57600080fd5b5035610555565b005b34801561012057600080fd5b506100cc61060e565b34801561013557600080fd5b5061015c6004803603602081101561014c57600080fd5b50356001600160a01b031661061d565b60408051918252519081900360200190f35b34801561017a57600080fd5b5061015c61062f565b34801561018f57600080fd5b50610112600480360360208110156101a657600080fd5b50356001600160a01b0316610634565b3480156101c257600080fd5b50610112600480360360208110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460208302840111600160201b8311171561022657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610714945050505050565b34801561027057600080fd5b506101126004803603602081101561028757600080fd5b810190602081018135600160201b8111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460208302840111600160201b831117156102d457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610791945050505050565b34801561031e57600080fd5b5061015c600480360360c081101561033557600080fd5b810190602081018135600160201b81111561034f57600080fd5b82018360208201111561036157600080fd5b803590602001918460208302840111600160201b8311171561038257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103d157600080fd5b8201836020820111156103e357600080fd5b803590602001918460208302840111600160201b8311171561040457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561045357600080fd5b82018360208201111561046557600080fd5b803590602001918460208302840111600160201b8311171561048657600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356108e8565b3480156104db57600080fd5b50610112600480360360208110156104f257600080fd5b50356001600160a01b0316610acc565b610112610b3b565b34801561051657600080fd5b5061015c6004803603602081101561052d57600080fd5b50356001600160a01b0316610bb3565b730309c98b1bffa350bcb3f9fb9780970ca32a506081565b3360009081526001602052604090205461056f9082610bc5565b3360008181526001602052604080822093909355915183908381818185875af1925050503d80600081146105bf576040519150601f19603f3d011682016040523d82523d6000602084013e6105c4565b606091505b505090508061060a576040805162461bcd60e51b815260206004820152600d60248201526c10b2ba3416ba3930b739b332b960991b604482015290519081900360640190fd5b5050565b6000546001600160a01b031681565b60026020526000908152604090205481565b600581565b6000546001600160a01b03163314610681576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600054604080516370a0823160e01b81523060048201529051610711926001600160a01b0390811692908516916370a0823191602480820192602092909190829003018186803b1580156106d457600080fd5b505afa1580156106e8573d6000803e3d6000fd5b505050506040513d60208110156106fe57600080fd5b50516001600160a01b0384169190610c27565b50565b6000546001600160a01b03163314610761576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b60005b815181101561060a5761078982828151811061077c57fe5b6020026020010151610634565b600101610764565b604051631853304760e31b8152602060048201818152835160248401528351733d9819210a31b4961b30ef54be2aed79b9c9cd3b9363c299823893869392839260440191808601910280838360005b838110156107f85781810151838201526020016107e0565b5050505090500192505050600060405180830381600087803b15801561081d57600080fd5b505af1158015610831573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085a57600080fd5b8101908080516040519392919084600160201b82111561087957600080fd5b90830190602082018581111561088e57600080fd5b82518660208202830111600160201b821117156108aa57600080fd5b82525081516020918201928201910280838360005b838110156108d75781810151838201526020016108bf565b505050509050016040525050505050565b600081421115610929576040805162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b604482015290519081900360640190fd5b3360009081526001602052604090205480610975576040805162461bcd60e51b815260206004820152600760248201526608585b5bdd5b9d60ca1b604482015290519081900360640190fd5b3360009081526002602052604090205460050143116109c4576040805162461bcd60e51b815260206004820152600660248201526521626c6f636b60d01b604482015290519081900360640190fd5b60006109d289898989610c7e565b33600090815260016020526040812055905084811015610a2c576040805162461bcd60e51b815260206004820152601060248201526f085b5a5b9d0b5b5a5b8b585b5bdd5b9d60821b604482015290519081900360640190fd5b730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610a8657600080fd5b505af1158015610a9a573d6000803e3d6000fd5b50610ac09250730309c98b1bffa350bcb3f9fb9780970ca32a5060915033905083610c27565b98975050505050505050565b6000546001600160a01b03163314610b19576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60003411610b79576040805162461bcd60e51b81526020600482015260066024820152652176616c756560d01b604482015290519081900360640190fd5b33600090815260016020526040902054610b9390346111cf565b336000908152600160209081526040808320939093556002905220439055565b60016020526000908152604090205481565b600082821115610c1c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c79908490611230565b505050565b604080516002808252606080830184526000939092919060208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281600081518110610cc657fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006060730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663db5792576040518163ffffffff1660e01b815260040160006040518083038186803b158015610d3757600080fd5b505afa158015610d4b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015610d7457600080fd5b8101908080516040519392919084600160201b821115610d9357600080fd5b908301906020820185811115610da857600080fd5b82518660208202830111600160201b82111715610dc457600080fd5b82525081516020918201928201910280838360005b83811015610df1578181015183820152602001610dd9565b5050505090500160405260200180516040519392919084600160201b821115610e1957600080fd5b908301906020820185811115610e2e57600080fd5b82518660208202830111600160201b82111715610e4a57600080fd5b82525081516020918201928201910280838360005b83811015610e77578181015183820152602001610e5f565b505050509050016040525050509150506000730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ed657600080fd5b505afa158015610eea573d6000803e3d6000fd5b505050506040513d6020811015610f0057600080fd5b50513360009081526001602052604081205491925080805b8c518110156111bc57610f598a610f53670de0b6b3a76400008e8581518110610f3d57fe5b60200260200101516112e190919063ffffffff16565b9061133a565b9250610f80620f4240610f7a69d3c21bcecceda1000000610f5388886112e1565b906112e1565b91508b8181518110610f8e57fe5b602002602001015188600181518110610fa357fe5b60200260200101906001600160a01b031690816001600160a01b031681525050610fdf8c8281518110610fd257fe5b60200260200101516113a1565b6001600160a01b0316637ff36ab58360008b3042603c016040518663ffffffff1660e01b81526004018085815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611060578181015183820152602001611048565b50505050905001955050505050506000604051808303818588803b15801561108757600080fd5b505af115801561109b573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405260208110156110c557600080fd5b8101908080516040519392919084600160201b8211156110e457600080fd5b9083019060208201858111156110f957600080fd5b82518660208202830111600160201b8211171561111557600080fd5b82525081516020918201928201910280838360005b8381101561114257818101518382015260200161112a565b50505050905001604052505050506111808c828151811061115f57fe5b60200260200101518e838151811061117357fe5b6020026020010151611474565b6111b28d828151811061118f57fe5b6020026020010151868884815181106111a457fe5b60200260200101518a611523565b9650600101610f18565b509496505050505050505b949350505050565b600082820183811015611229576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6060611285826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661163b9092919063ffffffff16565b805190915015610c79578080602001905160208110156112a457600080fd5b5051610c795760405162461bcd60e51b815260040180806020018281038252602a815260200180612064602a913960400191505060405180910390fd5b6000826112f057506000610c21565b828202828482816112fd57fe5b04146112295760405162461bcd60e51b81526004018080602001828103825260218152602001806120436021913960400191505060405180910390fd5b6000808211611390576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161139957fe5b049392505050565b60006001600160a01b03821673dd974d5c2e2928dea5f71b9825b8b646686bd20014806113ea57506001600160a01b03821673bbbbca6a901c926f240b89eacb641d8aec7aeafd145b8061141157506001600160a01b03821673ba100000625a3754423978a60c9317c58a424e3d145b8061143857506001600160a01b03821673a3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2145b156114585750737a250d5630b4cf539739df2c5dacb4c659f2488d61146f565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b919050565b806001600160a01b0316826001600160a01b031614156114935761060a565b6001600160a01b0381167335a18000230da775cac24873d00ff85bccded55014806114da57506001600160a01b0381167370e36f6bf80a52b3b46b3af8e106cc0ed743e8e4145b156114ed576114e88261164a565b61060a565b6001600160a01b038116738798249c2e607446efb7ad49ec89dd1865ff4272141561151a576114e861187a565b61060a82611a18565b600080856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561157357600080fd5b505afa158015611587573d6000803e3d6000fd5b505050506040513d602081101561159d57600080fd5b505190506115ca6001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a50606000611c34565b6115f26001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a506083611c34565b8261160d5761160584610f5387846112e1565b9150506111c7565b600061161d85610f5388856112e1565b9050838110156116305791506111c79050565b509195945050505050565b60606111c78484600085611d47565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f984148061169157506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f26888145b6116d5576040805162461bcd60e51b815260206004820152601060248201526f10bb30b634b216ba3796b1ba37b5b2b760811b604482015290519081900360640190fd5b60006116e082611ea3565b90506000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561173157600080fd5b505afa158015611745573d6000803e3d6000fd5b505050506040513d602081101561175b57600080fd5b505190508061179e576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b6117b36001600160a01b038416836000611c34565b6117c76001600160a01b0384168383611c34565b816001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561180d57600080fd5b505af1158015611821573d6000803e3d6000fd5b505050506040513d602081101561183757600080fd5b505115610c79576040805162461bcd60e51b815260206004820152600c60248201526b0858dd1bdad95b8b5b5a5b9d60a21b604482015290519081900360640190fd5b604080516370a0823160e01b81523060048201529051600091736b3595068778dd592e39a122f4f5a5cf09c90fe2916370a0823191602480820192602092909190829003018186803b1580156118cf57600080fd5b505afa1580156118e3573d6000803e3d6000fd5b505050506040513d60208110156118f957600080fd5b505190508061193c576040805162461bcd60e51b815260206004820152600a602482015269085cdd5cda1a4b58985b60b21b604482015290519081900360640190fd5b611970736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff42726000611c34565b6119a3736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff427283611c34565b738798249c2e607446efb7ad49ec89dd1865ff42726001600160a01b031663a59f3e0c826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156119fd57600080fd5b505af1158015611a11573d6000803e3d6000fd5b5050505050565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f98414801590611a6257506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f2688814155b611aa4576040805162461bcd60e51b815260206004820152600e60248201526d06e6f2d756e692d6f722d636f6d760941b604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611af357600080fd5b505afa158015611b07573d6000803e3d6000fd5b505050506040513d6020811015611b1d57600080fd5b5051905080611b60576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b611b896001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d36000611c34565b611bb16001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d383611c34565b60408051636968703360e11b81526001600160a01b038416600482015260248101839052600060448201819052915173398ec7346dcd622edc5ae82352f02be94c62d1199263d2d0e066926064808201939182900301818387803b158015611c1857600080fd5b505af1158015611c2c573d6000803e3d6000fd5b505050505050565b801580611cba575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611c8c57600080fd5b505afa158015611ca0573d6000803e3d6000fd5b505050506040513d6020811015611cb657600080fd5b5051155b611cf55760405162461bcd60e51b815260040180806020018281038252603681526020018061208e6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610c79908490611230565b606082471015611d885760405162461bcd60e51b815260040180806020018281038252602681526020018061201d6026913960400191505060405180910390fd5b611d9185611f72565b611de2576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611e215780518252601f199092019160209182019101611e02565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611e83576040519150601f19603f3d011682016040523d82523d6000602084013e611e88565b606091505b5091509150611e98828286611f78565b979650505050505050565b60006001600160a01b038216731f9840a85d5af5bf1d1762f925bdaddc4201f9841415611ee557507335a18000230da775cac24873d00ff85bccded55061146f565b6001600160a01b03821673c00e94cb662c3520282e6f5717214004a7f268881415611f2557507370e36f6bf80a52b3b46b3af8e106cc0ed743e8e461146f565b6040805162461bcd60e51b815260206004820152601a60248201527f21737570706f727465642d746f6b656e2d746f2d63746f6b656e000000000000604482015290519081900360640190fd5b3b151590565b60608315611f87575081611229565b825115611f975782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fe1578181015183820152602001611fc9565b50505050905090810190601f16801561200e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212200189892b3fb35d85aa1c0570c4e5f35b60ba4e33788ba4729bae3acd64c49a3a64736f6c63430007030033000000000000000000000000f337a885a7543cab542b2d3f5a8c1945036e0c42

Deployed Bytecode

0x6080604052600436106100ab5760003560e01c8063a7a580d511610064578063a7a580d5146101b6578063c299823814610264578063cc69188814610312578063cfad57a2146104cf578063d0e30db014610502578063fc7e286d1461050a576100b2565b80632272c18f146100b75780632e1a7d4d146100e85780635aa6e675146101145780636db3f625146101295780639e78f4591461016e5780639e8c708e14610183576100b2565b366100b257005b600080fd5b3480156100c357600080fd5b506100cc61053d565b604080516001600160a01b039092168252519081900360200190f35b3480156100f457600080fd5b506101126004803603602081101561010b57600080fd5b5035610555565b005b34801561012057600080fd5b506100cc61060e565b34801561013557600080fd5b5061015c6004803603602081101561014c57600080fd5b50356001600160a01b031661061d565b60408051918252519081900360200190f35b34801561017a57600080fd5b5061015c61062f565b34801561018f57600080fd5b50610112600480360360208110156101a657600080fd5b50356001600160a01b0316610634565b3480156101c257600080fd5b50610112600480360360208110156101d957600080fd5b810190602081018135600160201b8111156101f357600080fd5b82018360208201111561020557600080fd5b803590602001918460208302840111600160201b8311171561022657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610714945050505050565b34801561027057600080fd5b506101126004803603602081101561028757600080fd5b810190602081018135600160201b8111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460208302840111600160201b831117156102d457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610791945050505050565b34801561031e57600080fd5b5061015c600480360360c081101561033557600080fd5b810190602081018135600160201b81111561034f57600080fd5b82018360208201111561036157600080fd5b803590602001918460208302840111600160201b8311171561038257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156103d157600080fd5b8201836020820111156103e357600080fd5b803590602001918460208302840111600160201b8311171561040457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561045357600080fd5b82018360208201111561046557600080fd5b803590602001918460208302840111600160201b8311171561048657600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050823593505050602081013590604001356108e8565b3480156104db57600080fd5b50610112600480360360208110156104f257600080fd5b50356001600160a01b0316610acc565b610112610b3b565b34801561051657600080fd5b5061015c6004803603602081101561052d57600080fd5b50356001600160a01b0316610bb3565b730309c98b1bffa350bcb3f9fb9780970ca32a506081565b3360009081526001602052604090205461056f9082610bc5565b3360008181526001602052604080822093909355915183908381818185875af1925050503d80600081146105bf576040519150601f19603f3d011682016040523d82523d6000602084013e6105c4565b606091505b505090508061060a576040805162461bcd60e51b815260206004820152600d60248201526c10b2ba3416ba3930b739b332b960991b604482015290519081900360640190fd5b5050565b6000546001600160a01b031681565b60026020526000908152604090205481565b600581565b6000546001600160a01b03163314610681576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600054604080516370a0823160e01b81523060048201529051610711926001600160a01b0390811692908516916370a0823191602480820192602092909190829003018186803b1580156106d457600080fd5b505afa1580156106e8573d6000803e3d6000fd5b505050506040513d60208110156106fe57600080fd5b50516001600160a01b0384169190610c27565b50565b6000546001600160a01b03163314610761576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b60005b815181101561060a5761078982828151811061077c57fe5b6020026020010151610634565b600101610764565b604051631853304760e31b8152602060048201818152835160248401528351733d9819210a31b4961b30ef54be2aed79b9c9cd3b9363c299823893869392839260440191808601910280838360005b838110156107f85781810151838201526020016107e0565b5050505090500192505050600060405180830381600087803b15801561081d57600080fd5b505af1158015610831573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561085a57600080fd5b8101908080516040519392919084600160201b82111561087957600080fd5b90830190602082018581111561088e57600080fd5b82518660208202830111600160201b821117156108aa57600080fd5b82525081516020918201928201910280838360005b838110156108d75781810151838201526020016108bf565b505050509050016040525050505050565b600081421115610929576040805162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b604482015290519081900360640190fd5b3360009081526001602052604090205480610975576040805162461bcd60e51b815260206004820152600760248201526608585b5bdd5b9d60ca1b604482015290519081900360640190fd5b3360009081526002602052604090205460050143116109c4576040805162461bcd60e51b815260206004820152600660248201526521626c6f636b60d01b604482015290519081900360640190fd5b60006109d289898989610c7e565b33600090815260016020526040812055905084811015610a2c576040805162461bcd60e51b815260206004820152601060248201526f085b5a5b9d0b5b5a5b8b585b5bdd5b9d60821b604482015290519081900360640190fd5b730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610a8657600080fd5b505af1158015610a9a573d6000803e3d6000fd5b50610ac09250730309c98b1bffa350bcb3f9fb9780970ca32a5060915033905083610c27565b98975050505050505050565b6000546001600160a01b03163314610b19576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60003411610b79576040805162461bcd60e51b81526020600482015260066024820152652176616c756560d01b604482015290519081900360640190fd5b33600090815260016020526040902054610b9390346111cf565b336000908152600160209081526040808320939093556002905220439055565b60016020526000908152604090205481565b600082821115610c1c576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c79908490611230565b505050565b604080516002808252606080830184526000939092919060208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281600081518110610cc657fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006060730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b031663db5792576040518163ffffffff1660e01b815260040160006040518083038186803b158015610d3757600080fd5b505afa158015610d4b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040908152811015610d7457600080fd5b8101908080516040519392919084600160201b821115610d9357600080fd5b908301906020820185811115610da857600080fd5b82518660208202830111600160201b82111715610dc457600080fd5b82525081516020918201928201910280838360005b83811015610df1578181015183820152602001610dd9565b5050505090500160405260200180516040519392919084600160201b821115610e1957600080fd5b908301906020820185811115610e2e57600080fd5b82518660208202830111600160201b82111715610e4a57600080fd5b82525081516020918201928201910280838360005b83811015610e77578181015183820152602001610e5f565b505050509050016040525050509150506000730309c98b1bffa350bcb3f9fb9780970ca32a50606001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ed657600080fd5b505afa158015610eea573d6000803e3d6000fd5b505050506040513d6020811015610f0057600080fd5b50513360009081526001602052604081205491925080805b8c518110156111bc57610f598a610f53670de0b6b3a76400008e8581518110610f3d57fe5b60200260200101516112e190919063ffffffff16565b9061133a565b9250610f80620f4240610f7a69d3c21bcecceda1000000610f5388886112e1565b906112e1565b91508b8181518110610f8e57fe5b602002602001015188600181518110610fa357fe5b60200260200101906001600160a01b031690816001600160a01b031681525050610fdf8c8281518110610fd257fe5b60200260200101516113a1565b6001600160a01b0316637ff36ab58360008b3042603c016040518663ffffffff1660e01b81526004018085815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611060578181015183820152602001611048565b50505050905001955050505050506000604051808303818588803b15801561108757600080fd5b505af115801561109b573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405260208110156110c557600080fd5b8101908080516040519392919084600160201b8211156110e457600080fd5b9083019060208201858111156110f957600080fd5b82518660208202830111600160201b8211171561111557600080fd5b82525081516020918201928201910280838360005b8381101561114257818101518382015260200161112a565b50505050905001604052505050506111808c828151811061115f57fe5b60200260200101518e838151811061117357fe5b6020026020010151611474565b6111b28d828151811061118f57fe5b6020026020010151868884815181106111a457fe5b60200260200101518a611523565b9650600101610f18565b509496505050505050505b949350505050565b600082820183811015611229576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6060611285826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661163b9092919063ffffffff16565b805190915015610c79578080602001905160208110156112a457600080fd5b5051610c795760405162461bcd60e51b815260040180806020018281038252602a815260200180612064602a913960400191505060405180910390fd5b6000826112f057506000610c21565b828202828482816112fd57fe5b04146112295760405162461bcd60e51b81526004018080602001828103825260218152602001806120436021913960400191505060405180910390fd5b6000808211611390576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161139957fe5b049392505050565b60006001600160a01b03821673dd974d5c2e2928dea5f71b9825b8b646686bd20014806113ea57506001600160a01b03821673bbbbca6a901c926f240b89eacb641d8aec7aeafd145b8061141157506001600160a01b03821673ba100000625a3754423978a60c9317c58a424e3d145b8061143857506001600160a01b03821673a3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2145b156114585750737a250d5630b4cf539739df2c5dacb4c659f2488d61146f565b5073d9e1ce17f2641f24ae83637ab66a2cca9c378b9f5b919050565b806001600160a01b0316826001600160a01b031614156114935761060a565b6001600160a01b0381167335a18000230da775cac24873d00ff85bccded55014806114da57506001600160a01b0381167370e36f6bf80a52b3b46b3af8e106cc0ed743e8e4145b156114ed576114e88261164a565b61060a565b6001600160a01b038116738798249c2e607446efb7ad49ec89dd1865ff4272141561151a576114e861187a565b61060a82611a18565b600080856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561157357600080fd5b505afa158015611587573d6000803e3d6000fd5b505050506040513d602081101561159d57600080fd5b505190506115ca6001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a50606000611c34565b6115f26001600160a01b038716730309c98b1bffa350bcb3f9fb9780970ca32a506083611c34565b8261160d5761160584610f5387846112e1565b9150506111c7565b600061161d85610f5388856112e1565b9050838110156116305791506111c79050565b509195945050505050565b60606111c78484600085611d47565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f984148061169157506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f26888145b6116d5576040805162461bcd60e51b815260206004820152601060248201526f10bb30b634b216ba3796b1ba37b5b2b760811b604482015290519081900360640190fd5b60006116e082611ea3565b90506000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561173157600080fd5b505afa158015611745573d6000803e3d6000fd5b505050506040513d602081101561175b57600080fd5b505190508061179e576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b6117b36001600160a01b038416836000611c34565b6117c76001600160a01b0384168383611c34565b816001600160a01b031663a0712d68826040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561180d57600080fd5b505af1158015611821573d6000803e3d6000fd5b505050506040513d602081101561183757600080fd5b505115610c79576040805162461bcd60e51b815260206004820152600c60248201526b0858dd1bdad95b8b5b5a5b9d60a21b604482015290519081900360640190fd5b604080516370a0823160e01b81523060048201529051600091736b3595068778dd592e39a122f4f5a5cf09c90fe2916370a0823191602480820192602092909190829003018186803b1580156118cf57600080fd5b505afa1580156118e3573d6000803e3d6000fd5b505050506040513d60208110156118f957600080fd5b505190508061193c576040805162461bcd60e51b815260206004820152600a602482015269085cdd5cda1a4b58985b60b21b604482015290519081900360640190fd5b611970736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff42726000611c34565b6119a3736b3595068778dd592e39a122f4f5a5cf09c90fe2738798249c2e607446efb7ad49ec89dd1865ff427283611c34565b738798249c2e607446efb7ad49ec89dd1865ff42726001600160a01b031663a59f3e0c826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156119fd57600080fd5b505af1158015611a11573d6000803e3d6000fd5b5050505050565b6001600160a01b038116731f9840a85d5af5bf1d1762f925bdaddc4201f98414801590611a6257506001600160a01b03811673c00e94cb662c3520282e6f5717214004a7f2688814155b611aa4576040805162461bcd60e51b815260206004820152600e60248201526d06e6f2d756e692d6f722d636f6d760941b604482015290519081900360640190fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611af357600080fd5b505afa158015611b07573d6000803e3d6000fd5b505050506040513d6020811015611b1d57600080fd5b5051905080611b60576040805162461bcd60e51b815260206004820152600a602482015269085d1bdad95b8b58985b60b21b604482015290519081900360640190fd5b611b896001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d36000611c34565b611bb16001600160a01b038316733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d383611c34565b60408051636968703360e11b81526001600160a01b038416600482015260248101839052600060448201819052915173398ec7346dcd622edc5ae82352f02be94c62d1199263d2d0e066926064808201939182900301818387803b158015611c1857600080fd5b505af1158015611c2c573d6000803e3d6000fd5b505050505050565b801580611cba575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015611c8c57600080fd5b505afa158015611ca0573d6000803e3d6000fd5b505050506040513d6020811015611cb657600080fd5b5051155b611cf55760405162461bcd60e51b815260040180806020018281038252603681526020018061208e6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610c79908490611230565b606082471015611d885760405162461bcd60e51b815260040180806020018281038252602681526020018061201d6026913960400191505060405180910390fd5b611d9185611f72565b611de2576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611e215780518252601f199092019160209182019101611e02565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611e83576040519150601f19603f3d011682016040523d82523d6000602084013e611e88565b606091505b5091509150611e98828286611f78565b979650505050505050565b60006001600160a01b038216731f9840a85d5af5bf1d1762f925bdaddc4201f9841415611ee557507335a18000230da775cac24873d00ff85bccded55061146f565b6001600160a01b03821673c00e94cb662c3520282e6f5717214004a7f268881415611f2557507370e36f6bf80a52b3b46b3af8e106cc0ed743e8e461146f565b6040805162461bcd60e51b815260206004820152601a60248201527f21737570706f727465642d746f6b656e2d746f2d63746f6b656e000000000000604482015290519081900360640190fd5b3b151590565b60608315611f87575081611229565b825115611f975782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fe1578181015183820152602001611fc9565b50505050905090810190601f16801561200e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212200189892b3fb35d85aa1c0570c4e5f35b60ba4e33788ba4729bae3acd64c49a3a64736f6c63430007030033

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

000000000000000000000000f337a885a7543cab542b2d3f5a8c1945036e0c42

-----Decoded View---------------
Arg [0] : _governance (address): 0xF337A885a7543CAb542B2D3f5A8c1945036E0C42

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f337a885a7543cab542b2d3f5a8c1945036e0c42


Deployed Bytecode Sourcemap

530:7641:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;693:82;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;693:82:2;;;;;;;;;;;;;;2129:225;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2129:225:2;;:::i;:::-;;782:25;;;;;;;;;;;;;:::i;913:53::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;913:53:2;-1:-1:-1;;;;;913:53:2;;:::i;:::-;;;;;;;;;;;;;;;;647:39;;;;;;;;;;;;;:::i;1545:150::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1545:150:2;-1:-1:-1;;;;;1545:150:2;;:::i;1701:174::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1701:174:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1701:174:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1701:174:2;;-1:-1:-1;1701:174:2;;-1:-1:-1;;;;;1701:174:2:i;2306:121:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2306:121:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2306:121:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2306:121:3;;-1:-1:-1;2306:121:3;;-1:-1:-1;;;;;2306:121:3:i;2918:983:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2918:983:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2918:983:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2918:983:2;;;;;;;;-1:-1:-1;2918:983:2;;-1:-1:-1;;;;;2918:983:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2918:983:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2918:983:2;;;;;;;;-1:-1:-1;2918:983:2;;-1:-1:-1;;;;;2918:983:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2918:983:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2918:983:2;;-1:-1:-1;;2918:983:2;;;-1:-1:-1;;;2918:983:2;;;;;;;;;:::i;1446:93::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1446:93:2;-1:-1:-1;;;;;1446:93:2;;:::i;1916:207::-;;;:::i;836:43::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;836:43:2;-1:-1:-1;;;;;836:43:2;;:::i;693:82::-;732:42;693:82;:::o;2129:225::-;2213:10;2204:20;;;;:8;:20;;;;;;:33;;2229:7;2204:24;:33::i;:::-;2190:10;2181:20;;;;:8;:20;;;;;;:56;;;;2267:37;;2291:7;;2181:20;2267:37;2181:20;2267:37;2291:7;2190:10;2267:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2248:56;;;2322:7;2314:33;;;;;-1:-1:-1;;;2314:33:2;;;;;;;;;;;;-1:-1:-1;;;2314:33:2;;;;;;;;;;;;;;;2129:225;;:::o;782:25::-;;;-1:-1:-1;;;;;782:25:2;;:::o;913:53::-;;;;;;;;;;;;;:::o;647:39::-;685:1;647:39;:::o;1545:150::-;1357:10;;-1:-1:-1;;;;;1357:10:2;1343;:24;1335:48;;;;;-1:-1:-1;;;1335:48:2;;;;;;;;;;;;-1:-1:-1;;;1335:48:2;;;;;;;;;;;;;;;1636:10:::1;::::0;1648:39:::1;::::0;;-1:-1:-1;;;1648:39:2;;1681:4:::1;1648:39;::::0;::::1;::::0;;;1608:80:::1;::::0;-1:-1:-1;;;;;1636:10:2;;::::1;::::0;1648:24;;::::1;::::0;::::1;::::0;:39;;;;;::::1;::::0;;;;;;;;;:24;:39;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;1648:39:2;-1:-1:-1;;;;;1608:27:2;::::1;::::0;:80;:27:::1;:80::i;:::-;1545:150:::0;:::o;1701:174::-;1357:10;;-1:-1:-1;;;;;1357:10:2;1343;:24;1335:48;;;;;-1:-1:-1;;;1335:48:2;;;;;;;;;;;;-1:-1:-1;;;1335:48:2;;;;;;;;;;;;;;;1780:9:::1;1775:94;1799:7;:14;1795:1;:18;1775:94;;;1834:24;1847:7;1855:1;1847:10;;;;;;;;;;;;;;1834:12;:24::i;:::-;1815:3;;1775:94;;2306:121:3::0;2372:48;;-1:-1:-1;;;2372:48:3;;;;;;;;;;;;;;;;;601:42;;2372:38;;2411:8;;2372:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2372:48:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2372:48:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2372:48:3;;;;;;;;;;;;-1:-1:-1;2372:48:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2306:121;:::o;2918:983:2:-;3176:7;3222:8;3203:15;:27;;3195:47;;;;;-1:-1:-1;;;3195:47:2;;;;;;;;;;;;-1:-1:-1;;;3195:47:2;;;;;;;;;;;;;;;3280:10;3253:15;3271:20;;;:8;:20;;;;;;3310:11;3302:31;;;;;-1:-1:-1;;;3302:31:2;;;;;;;;;;;;-1:-1:-1;;;3302:31:2;;;;;;;;;;;;;;;3385:10;3366:30;;;;:18;:30;;;;;;685:1;3366:44;3351:12;:59;3343:78;;;;;-1:-1:-1;;;3343:78:2;;;;;;;;;;;;-1:-1:-1;;;3343:78:2;;;;;;;;;;;;;;;3456:18;3489:106;3529:11;3542;3555:25;3582:12;3489:39;:106::i;:::-;3640:10;3654:1;3631:20;;;:8;:20;;;;;:24;3456:139;-1:-1:-1;3674:27:2;;;;3666:56;;;;;-1:-1:-1;;;3666:56:2;;;;;;;;;;;;-1:-1:-1;;;3666:56:2;;;;;;;;;;;;;;;732:42;-1:-1:-1;;;;;3777:9:2;;3787:10;3777:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3808:58:2;;-1:-1:-1;732:42:2;;-1:-1:-1;3843:10:2;;-1:-1:-1;3855:10:2;3808:34;:58::i;:::-;3884:10;2918:983;-1:-1:-1;;;;;;;;2918:983:2:o;1446:93::-;1357:10;;-1:-1:-1;;;;;1357:10:2;1343;:24;1335:48;;;;;-1:-1:-1;;;1335:48:2;;;;;;;;;;;;-1:-1:-1;;;1335:48:2;;;;;;;;;;;;;;;1508:10:::1;:24:::0;;-1:-1:-1;;;;;;1508:24:2::1;-1:-1:-1::0;;;;;1508:24:2;;;::::1;::::0;;;::::1;::::0;;1446:93::o;1916:207::-;1980:1;1968:9;:13;1960:32;;;;;-1:-1:-1;;;1960:32:2;;;;;;;;;;;;-1:-1:-1;;;1960:32:2;;;;;;;;;;;;;;;2035:10;2026:20;;;;:8;:20;;;;;;:35;;2051:9;2026:24;:35::i;:::-;2012:10;2003:20;;;;:8;:20;;;;;;;;:58;;;;2071:18;:30;;;2104:12;2071:45;;1916:207::o;836:43::-;;;;;;;;;;;;;:::o;3136:155:16:-;3194:7;3226:1;3221;:6;;3213:49;;;;;-1:-1:-1;;;3213:49:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3279:5:16;;;3136:155;;;;;:::o;685:175:15:-;794:58;;;-1:-1:-1;;;;;794:58:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;794:58:15;-1:-1:-1;;;794:58:15;;;767:86;;787:5;;767:19;:86::i;:::-;685:175;;;:::o;4976:1865:2:-;5276:16;;;5290:1;5276:16;;;5252:21;5276:16;;;;;5217:7;;5252:21;;5276:16;5290:1;5276:16;;;;;;;;;;-1:-1:-1;5276:16:2;5252:40;;1122:42:3;5302:4:2;5307:1;5302:7;;;;;;;;;;;;;:14;-1:-1:-1;;;;;5302:14:2;;;-1:-1:-1;;;;;5302:14:2;;;;;5374:18;5442:37;732:42;-1:-1:-1;;;;;5483:25:2;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5483:27:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5483:27:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5483:27:2;;;;;;;;;;;;-1:-1:-1;5483:27:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5483:27:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5483:27:2;;;;;;;;;;;;-1:-1:-1;5483:27:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5439:71;;;5550:25;732:42;-1:-1:-1;;;;;5578:16:2;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5578:18:2;5636:10;5607:17;5627:20;;;:8;5578:18;5627:20;;;;;5578:18;;-1:-1:-1;5607:17:2;;5730:1067;5754:11;:18;5750:1;:22;5730:1067;;;5805:66;5853:17;5805:43;5843:4;5805:30;5836:1;5805:33;;;;;;;;;;;;;;:37;;:43;;;;:::i;:::-;:47;;:66::i;:::-;5797:74;-1:-1:-1;6005:39:2;6040:3;6005:30;6030:4;6005:20;:9;5797:74;6005:13;:20::i;:30::-;:34;;:39::i;:::-;5993:51;;6073:11;6085:1;6073:14;;;;;;;;;;;;;;6063:4;6068:1;6063:7;;;;;;;;;;;;;:24;-1:-1:-1;;;;;6063:24:2;;;-1:-1:-1;;;;;6063:24:2;;;;;6124:41;6150:11;6162:1;6150:14;;;;;;;;;;;;;;6124:25;:41::i;:::-;-1:-1:-1;;;;;6105:83:2;;6197:9;6230:1;6253:4;6287;6314:15;6332:2;6314:20;6105:247;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6105:247:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6105:247:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6105:247:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6105:247:2;;;;;;;;;;;;-1:-1:-1;6105:247:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6437:45;6451:11;6463:1;6451:14;;;;;;;;;;;;;;6467:11;6479:1;6467:14;;;;;;;;;;;;;;6437:13;:45::i;:::-;6578:204;6634:11;6646:1;6634:14;;;;;;;;;;;;;;6670:17;6709:20;6730:1;6709:23;;;;;;;;;;;;;;6754:10;6578:34;:204::i;:::-;6565:217;-1:-1:-1;5774:3:2;;5730:1067;;;-1:-1:-1;6824:10:2;;-1:-1:-1;;;;;;;4976:1865:2;;;;;;;:::o;2690:175:16:-;2748:7;2779:5;;;2802:6;;;;2794:46;;;;;-1:-1:-1;;;2794:46:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;2690:175;-1:-1:-1;;;2690:175:16:o;2948:751:15:-;3367:23;3393:69;3421:4;3393:69;;;;;;;;;;;;;;;;;3401:5;-1:-1:-1;;;;;3393:27:15;;;:69;;;;;:::i;:::-;3476:17;;3367:95;;-1:-1:-1;3476:21:15;3472:221;;3616:10;3605:30;;;;;;;;;;;;;;;-1:-1:-1;3605:30:15;3597:85;;;;-1:-1:-1;;;3597:85:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3538:215:16;3596:7;3619:6;3615:20;;-1:-1:-1;3634:1:16;3627:8;;3615:20;3657:5;;;3661:1;3657;:5;:1;3680:5;;;;;:10;3672:56;;;;-1:-1:-1;;;3672:56:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4217:150;4275:7;4306:1;4302;:5;4294:44;;;;;-1:-1:-1;;;4294:44:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;4359:1;4355;:5;;;;;;;4217:150;-1:-1:-1;;;4217:150:16:o;3987:488:2:-;4061:7;-1:-1:-1;;;;;4325:13:2;;1723:42:3;4325:13:2;;:30;;-1:-1:-1;;;;;;4342:13:2;;1794:42:3;4342:13:2;4325:30;:47;;;-1:-1:-1;;;;;;4359:13:2;;1865:42:3;4359:13:2;4325:47;:64;;;-1:-1:-1;;;;;;4376:13:2;;2008:42:3;4376:13:2;4325:64;4321:114;;;-1:-1:-1;788:42:3;4405:19:2;;4321:114;-1:-1:-1;708:42:3;3987:488:2;;;;:::o;2571:383:3:-;2674:11;-1:-1:-1;;;;;2659:26:3;:11;-1:-1:-1;;;;;2659:26:3;;2655:63;;;2701:7;;2655:63;-1:-1:-1;;;;;2732:19:3;;876:42;2732:19;;:43;;-1:-1:-1;;;;;;2755:20:3;;949:42;2755:20;2732:43;2728:220;;;2791:22;2801:11;2791:9;:22::i;:::-;2728:220;;;-1:-1:-1;;;;;2834:21:3;;1037:42;2834:21;2830:118;;;2871:11;:9;:11::i;2830:118::-;2913:24;2925:11;2913;:24::i;7297:872:2:-;7496:7;7515:21;7546:10;-1:-1:-1;;;;;7539:28:2;;7576:4;7539:43;;;;;;;;;;;;;-1:-1:-1;;;;;7539:43:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7539:43:2;;-1:-1:-1;7593:48:2;-1:-1:-1;;;;;7593:30:2;;732:42;7639:1;7593:30;:48::i;:::-;7651:60;-1:-1:-1;;;;;7651:30:2;;732:42;7697:13;7651:30;:60::i;:::-;7861:18;7857:117;;7902:61;7943:19;7902:36;:17;7924:13;7902:21;:36::i;:61::-;7895:68;;;;;7857:117;7984:12;7999:61;8040:19;7999:36;:17;8021:13;7999:21;:36::i;:61::-;7984:76;;8081:13;8074:4;:20;8070:62;;;8117:4;-1:-1:-1;8110:11:2;;-1:-1:-1;8110:11:2;8070:62;-1:-1:-1;8149:13:2;;7297:872;-1:-1:-1;;;;;7297:872:2:o;3581:193:0:-;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;3078:506:3:-;-1:-1:-1;;;;;3186:13:3;;1296:42;3186:13;;:31;;-1:-1:-1;;;;;;3203:14:3;;1368:42;3203:14;3186:31;3178:60;;;;;-1:-1:-1;;;3178:60:3;;;;;;;;;;;;-1:-1:-1;;;3178:60:3;;;;;;;;;;;;;;;3249:15;3267:25;3285:6;3267:17;:25::i;:::-;3249:43;;3302:15;3327:6;-1:-1:-1;;;;;3320:24:3;;3353:4;3320:39;;;;;;;;;;;;;-1:-1:-1;;;;;3320:39:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3320:39:3;;-1:-1:-1;3378:11:3;3370:34;;;;;-1:-1:-1;;;3370:34:3;;;;;;;;;;;;-1:-1:-1;;;3370:34:3;;;;;;;;;;;;;;;3415:38;-1:-1:-1;;;;;3415:26:3;;3442:7;3451:1;3415:26;:38::i;:::-;3463:44;-1:-1:-1;;;;;3463:26:3;;3490:7;3499;3463:26;:44::i;:::-;3533:7;-1:-1:-1;;;;;3525:21:3;;3547:7;3525:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3525:30:3;:35;3517:60;;;;;-1:-1:-1;;;3517:60:3;;;;;;;;;;;;-1:-1:-1;;;3517:60:3;;;;;;;;;;;;;;4511:288;4569:38;;;-1:-1:-1;;;4569:38:3;;4601:4;4569:38;;;;;;4551:15;;2081:42;;4569:23;;:38;;;;;;;;;;;;;;;2081:42;4569:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4569:38:3;;-1:-1:-1;4625:11:3;4617:34;;;;;-1:-1:-1;;;4617:34:3;;;;;;;;;;;;-1:-1:-1;;;4617:34:3;;;;;;;;;;;;;;;4662:36;2081:42;1037;4696:1;4662:25;:36::i;:::-;4708:42;2081;1037;4742:7;4708:25;:42::i;:::-;1037;-1:-1:-1;;;;;4760:23:3;;4784:7;4760:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4511:288;:::o;3694:432::-;-1:-1:-1;;;;;3758:13:3;;1296:42;3758:13;;;;:31;;-1:-1:-1;;;;;;3775:14:3;;1368:42;3775:14;;3758:31;3750:58;;;;;-1:-1:-1;;;3750:58:3;;;;;;;;;;;;-1:-1:-1;;;3750:58:3;;;;;;;;;;;;;;;3819:15;3844:6;-1:-1:-1;;;;;3837:24:3;;3870:4;3837:39;;;;;;;;;;;;;-1:-1:-1;;;;;3837:39:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3837:39:3;;-1:-1:-1;3895:11:3;3887:34;;;;;-1:-1:-1;;;3887:34:3;;;;;;;;;;;;-1:-1:-1;;;3887:34:3;;;;;;;;;;;;;;;3932:51;-1:-1:-1;;;;;3932:26:3;;505:42;3981:1;3932:26;:51::i;:::-;3993:57;-1:-1:-1;;;;;3993:26:3;;505:42;4042:7;3993:26;:57::i;:::-;4060:59;;;-1:-1:-1;;;4060:59:3;;-1:-1:-1;;;;;4060:59:3;;;;;;;;;;;;4117:1;4060:59;;;;;;;;417:42;;4060:39;;:59;;;;;;;;;;;4117:1;417:42;4060:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3694:432;;:::o;1329:613:15:-;1694:10;;;1693:62;;-1:-1:-1;1710:39:15;;;-1:-1:-1;;;1710:39:15;;1734:4;1710:39;;;;-1:-1:-1;;;;;1710:39:15;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1710:39:15;:44;1693:62;1685:150;;;;-1:-1:-1;;;1685:150:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1872:62;;;-1:-1:-1;;;;;1872:62:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1872:62:15;-1:-1:-1;;;1872:62:15;;;1845:90;;1865:5;;1845:19;:90::i;4608:523:0:-;4735:12;4792:5;4767:21;:30;;4759:81;;;;-1:-1:-1;;;4759:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;-1:-1:-1;;;4850:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:12;4995:23;5022:6;-1:-1:-1;;;;;5022:11:0;5042:5;5050:4;5022:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5022:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:75;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;:::-;5065:59;4608:523;-1:-1:-1;;;;;;;4608:523:0:o;4206:258:3:-;4272:7;-1:-1:-1;;;;;4295:13:3;;1296:42;4295:13;4291:55;;;-1:-1:-1;876:42:3;4324:11;;4291:55;-1:-1:-1;;;;;4359:14:3;;1368:42;4359:14;4355:57;;;-1:-1:-1;949:42:3;4389:12;;4355:57;4421:36;;;-1:-1:-1;;;4421:36:3;;;;;;;;;;;;;;;;;;;;;;;;;;;726:413:0;1086:20;1124:8;;;726:413::o;7091:725::-;7206:12;7234:7;7230:580;;;-1:-1:-1;7264:10:0;7257:17;;7230:580;7375:17;;:21;7371:429;;7633:10;7627:17;7693:15;7680:10;7676:2;7672:19;7665:44;7582:145;7772:12;7765:20;;-1:-1:-1;;;7765:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://0189892b3fb35d85aa1c0570c4e5f35b60ba4e33788ba4729bae3acd64c49a3a

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  ]
[ 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.