ETH Price: $3,455.30 (-0.92%)
Gas: 2 Gwei

Contract

0x9eBBccCcBfe01047dab8Ef07fAc3e4dBaD444dAC
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Set Router Param...146346962022-04-22 12:37:11801 days ago1650631031IN
0x9eBBccCc...BaD444dAC
0 ETH0.0025540545.03552233
Batch Withdraw146346752022-04-22 12:31:22801 days ago1650630682IN
0x9eBBccCc...BaD444dAC
0 ETH0.0152584435.5190423
Withdraw Funds146075772022-04-18 6:27:19805 days ago1650263239IN
0x9eBBccCc...BaD444dAC
0 ETH0.0019223927.13795278
Deposit Funds146075632022-04-18 6:24:27805 days ago1650263067IN
0x9eBBccCc...BaD444dAC
0 ETH0.002000219.71126324
Withdraw Funds145951362022-04-16 7:59:34807 days ago1650095974IN
0x9eBBccCc...BaD444dAC
0 ETH0.0014167620
Withdraw Funds145951362022-04-16 7:59:34807 days ago1650095974IN
0x9eBBccCc...BaD444dAC
0 ETH0.0014167620
Batch Withdraw145947152022-04-16 6:24:46807 days ago1650090286IN
0x9eBBccCc...BaD444dAC
0 ETH0.0094564126.07105119
Withdraw Funds145898922022-04-15 12:17:15808 days ago1650025035IN
0x9eBBccCc...BaD444dAC
0 ETH0.0020248128.58372519
Batch Withdraw145446442022-04-08 10:43:12815 days ago1649414592IN
0x9eBBccCc...BaD444dAC
0 ETH0.0134723137.3103305
Withdraw Funds145313822022-04-06 8:51:40817 days ago1649235100IN
0x9eBBccCc...BaD444dAC
0 ETH0.0036282651.21915499
Withdraw Funds145041772022-04-02 2:45:20822 days ago1648867520IN
0x9eBBccCc...BaD444dAC
0 ETH0.0051516572.73684466
Batch Withdraw145009732022-04-01 14:39:15822 days ago1648823955IN
0x9eBBccCc...BaD444dAC
0 ETH0.0200790749.14128417
Batch Deposit145009442022-04-01 14:34:39822 days ago1648823679IN
0x9eBBccCc...BaD444dAC
0 ETH0.0169864847.03261415
Set Router Param...145007862022-04-01 14:00:29822 days ago1648821629IN
0x9eBBccCc...BaD444dAC
0 ETH0.0027084447.71755094
Batch Deposit145003352022-04-01 12:23:54822 days ago1648815834IN
0x9eBBccCc...BaD444dAC
0 ETH0.0224045443.8764616
Withdraw Funds144994202022-04-01 9:00:50822 days ago1648803650IN
0x9eBBccCc...BaD444dAC
0 ETH0.0028978638.31831647
Deposit Funds144803392022-03-29 9:31:20825 days ago1648546280IN
0x9eBBccCc...BaD444dAC
0 ETH0.0026918430.18607867
Withdraw Funds144747712022-03-28 12:54:28826 days ago1648472068IN
0x9eBBccCc...BaD444dAC
0 ETH0.0025837736.48066065
Deposit Funds144690322022-03-27 15:19:22827 days ago1648394362IN
0x9eBBccCc...BaD444dAC
0 ETH0.0028267627.85343833
Deposit Funds144621852022-03-26 13:48:50828 days ago1648302530IN
0x9eBBccCc...BaD444dAC
0 ETH0.0029349427.61654741
Deposit Funds144618242022-03-26 12:26:38828 days ago1648297598IN
0x9eBBccCc...BaD444dAC
0 ETH0.0022289121.96514408
Deposit Funds144618242022-03-26 12:26:38828 days ago1648297598IN
0x9eBBccCc...BaD444dAC
0 ETH0.0013240321.96514408
Deposit Funds144618232022-03-26 12:25:54828 days ago1648297554IN
0x9eBBccCc...BaD444dAC
0 ETH0.0019984419.69158665
Deposit Funds144618162022-03-26 12:24:31828 days ago1648297471IN
0x9eBBccCc...BaD444dAC
0 ETH0.0020489920.19207101
Withdraw Funds144608472022-03-26 8:45:02828 days ago1648284302IN
0x9eBBccCc...BaD444dAC
0 ETH0.0020400128.80324169
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Batcher

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 12 : Batcher.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "./interfaces/IBatcher.sol";
import "../../interfaces/IMetaRouter.sol";
import "../ConvexExecutor/interfaces/ICurvePool.sol";
import "../ConvexExecutor/interfaces/ICurveDepositZapper.sol";

import "./EIP712.sol";

/// @title Batcher
/// @author 0xAd1
/// @notice Used to batch user deposits and withdrawals until the next rebalance
contract Batcher is Ownable, IBatcher, EIP712 {
  using SafeERC20 for IERC20;

  uint256 DUST_LIMIT = 10000;

  struct Vault {
    address tokenAddress;
    uint256 maxAmount;
    uint256 currentAmount;
  }

  mapping(address => Vault) public vaults;

  mapping(address => mapping(address => uint256)) public depositLedger;
  mapping(address => mapping(address => uint256)) public withdrawLedger;

  event DepositRequest(
    address indexed sender,
    address indexed router,
    uint256 amountIn
  );
  event WithdrawRequest(
    address indexed sender,
    address indexed router,
    uint256 amountOut
  );

  address public verificationAuthority;
  address public governance;
  address public pendingGovernance;
  uint256 public slippageForCurveLp = 30;
  constructor(address _verificationAuthority, address _governance) {
    verificationAuthority = _verificationAuthority;
    governance = _governance;
  }

  function setAuthority(address authority) public onlyGovernance {
    verificationAuthority = authority;
  }

  /// @inheritdoc IBatcher
  function depositFunds(
    uint256 amountIn,
    address routerAddress,
    bytes memory signature
  ) external override validDeposit(routerAddress, signature) {
    require(
      IERC20(vaults[routerAddress].tokenAddress).allowance(
        msg.sender,
        address(this)
      ) >= amountIn,
      "No allowance"
    );

    IERC20(vaults[routerAddress].tokenAddress).safeTransferFrom(
      msg.sender,
      address(this),
      amountIn
    );

    vaults[routerAddress].currentAmount += amountIn;
    require(vaults[routerAddress].currentAmount <= vaults[routerAddress].maxAmount, "Exceeded deposit limit");

    _completeDeposit(routerAddress, amountIn);
  }

  /// @inheritdoc IBatcher
  function depositFundsInCurveLpToken(
    uint256 amountIn,
    address routerAddress,
    bytes memory signature
  ) external override validDeposit(routerAddress, signature) {
    /// Curve Lp Token - UST_Wormhole
    IERC20 lpToken = IERC20(0xCEAF7747579696A2F0bb206a14210e3c9e6fB269);

    require(
      lpToken.allowance(msg.sender, address(this)) >= amountIn,
      "No allowance"
    );

    lpToken.safeTransferFrom(msg.sender, address(this), amountIn);

    uint256 usdcReceived = _convertLpTokenIntoUSDC(lpToken);

    _completeDeposit(routerAddress, usdcReceived);
  }

  function _completeDeposit(address routerAddress, uint256 amountIn) internal {
    depositLedger[routerAddress][msg.sender] =
      depositLedger[routerAddress][msg.sender] +
      (amountIn);

    emit DepositRequest(msg.sender, routerAddress, amountIn);
  }

  /// @inheritdoc IBatcher
  function withdrawFunds(uint256 amountIn, address routerAddress)
    external
    override
  {
    require(
      vaults[routerAddress].tokenAddress != address(0),
      "Invalid router address"
    );

    require(
      depositLedger[routerAddress][msg.sender] == 0,
      "Cannot withdraw funds from router while waiting to deposit"
    );

    // require(depositLedger[routerAddress][msg.sender] >= amountOut, "No funds available");

    IERC20(routerAddress).safeTransferFrom(msg.sender, address(this), amountIn);

    withdrawLedger[routerAddress][msg.sender] =
      withdrawLedger[routerAddress][msg.sender] +
      (amountIn);

    vaults[routerAddress].currentAmount -= amountIn;

    emit WithdrawRequest(msg.sender, routerAddress, amountIn);
  }

  /// @inheritdoc IBatcher
  function batchDeposit(address routerAddress, address[] memory users)
    external
    override
    onlyOwner
  {
    IMetaRouter router = IMetaRouter(routerAddress);

    uint256 amountToDeposit = 0;
    uint256 oldLPBalance = IERC20(address(router)).balanceOf(address(this));

    for (uint256 i = 0; i < users.length; i++) {
      amountToDeposit =
        amountToDeposit +
        (depositLedger[routerAddress][users[i]]);
    }

    require(amountToDeposit > 0, "no deposits to make");

    uint256 lpTokensReportedByRouter = router.deposit(
      amountToDeposit,
      address(this)
    );

    uint256 lpTokensReceived = IERC20(address(router)).balanceOf(
      address(this)
    ) - (oldLPBalance);

    require(
      lpTokensReceived == lpTokensReportedByRouter,
      "LP tokens received by router does not match"
    );

    for (uint256 i = 0; i < users.length; i++) {
      uint256 userAmount = depositLedger[routerAddress][users[i]];
      if (userAmount > 0) {
        uint256 userShare = (userAmount * (lpTokensReceived)) /
          (amountToDeposit);
        IERC20(address(router)).safeTransfer(users[i], userShare);
        depositLedger[routerAddress][users[i]] = 0;
      }
    }
  }

  /// @inheritdoc IBatcher
  function batchWithdraw(address routerAddress, address[] memory users)
    external
    override
    onlyOwner
  {
    IMetaRouter router = IMetaRouter(routerAddress);

    IERC20 token = IERC20(vaults[routerAddress].tokenAddress);

    uint256 amountToWithdraw = 0;
    uint256 oldWantBalance = token.balanceOf(address(this));

    for (uint256 i = 0; i < users.length; i++) {
      amountToWithdraw =
        amountToWithdraw +
        (withdrawLedger[routerAddress][users[i]]);
    }

    require(amountToWithdraw > 0, "no deposits to make");

    uint256 wantTokensReportedByRouter = router.withdraw(
      amountToWithdraw,
      address(this)
    );

    uint256 wantTokensReceived = token.balanceOf(address(this)) -
      (oldWantBalance);

    require(
      wantTokensReceived == wantTokensReportedByRouter,
      "Want tokens received by router does not match"
    );

    for (uint256 i = 0; i < users.length; i++) {
      uint256 userAmount = withdrawLedger[routerAddress][users[i]];
      if (userAmount > 0) {
        uint256 userShare = (userAmount * wantTokensReceived) /
          amountToWithdraw;
        token.safeTransfer(users[i], userShare);

        withdrawLedger[routerAddress][users[i]] = 0;
      }
    }
  }

  /// @inheritdoc IBatcher
  function setRouterParams(address routerAddress, address token, uint256 maxLimit)
    external
    override
    onlyOwner
  {
    require(routerAddress != address(0), "Invalid router address");
    require(token != address(0), "Invalid token address");
    // (, , IERC20Metadata token0, IERC20Metadata token1) = _getVault(routerAddress);
    // require(address(token0) == token || address(token1) == token, 'wrong token address');
    vaults[routerAddress] = Vault({
      tokenAddress: token, 
      maxAmount: maxLimit,
      currentAmount: 0
    });

    IERC20(token).approve(routerAddress, type(uint256).max);
  }

  /**
   * @notice Get the balance of a token in contract
   * @param token token whose balance needs to be returned
   * @return balance of a token in contract
   */
  function _tokenBalance(IERC20Metadata token) internal view returns (uint256) {
    return token.balanceOf(address(this));
  }

  function sweep(address _token) public onlyGovernance {
    IERC20(_token).transfer(
      msg.sender,
      IERC20(_token).balanceOf(address(this))
    );
  }

  function setGovernance(address _governance) external onlyGovernance {
    pendingGovernance = _governance;
  }

  function acceptGovernance() external {
    require(
      msg.sender == pendingGovernance,
      "Only pending governance can accept"
    );
    governance = pendingGovernance;
  }

  /// @notice Helper to convert Lp tokens into USDC
  /// @dev Burns LpTokens on UST3-Wormhole pool on curve to get USDC
  /// @param lpToken Curve Lp Token
  function _convertLpTokenIntoUSDC(IERC20 lpToken)
    internal
    returns (uint256 receivedWantTokens)
  {
    uint256 MAX_BPS = 10000;

    ICurvePool ust3Pool = ICurvePool(
      0xCEAF7747579696A2F0bb206a14210e3c9e6fB269
    );
    ICurveDepositZapper curve3PoolZap = ICurveDepositZapper(
      0xA79828DF1850E8a3A3064576f380D90aECDD3359
    );

    uint256 _amount = lpToken.balanceOf(address(this));

    lpToken.safeApprove(address(curve3PoolZap), _amount);

    int128 usdcIndexInPool = int128(int256(uint256(2)));

    // estimate amount of USDC received on burning Lp tokens
    uint256 expectedWantTokensOut = curve3PoolZap.calc_withdraw_one_coin(
      address(ust3Pool),
      _amount,
      usdcIndexInPool
    );
    // burn Lp tokens to receive USDC with a slippage of 0.3%
    receivedWantTokens = curve3PoolZap.remove_liquidity_one_coin(
      address(ust3Pool),
      _amount,
      usdcIndexInPool,
      (expectedWantTokensOut * (MAX_BPS - slippageForCurveLp)) / (MAX_BPS)
    );
  }


  function setSlippage(uint256 _slippage) external override onlyOwner {
    require(
      _slippage >= 0 && _slippage <= 10000,
      "Slippage must be between 0 and 10000"
    );
    slippageForCurveLp = _slippage;
  }

  modifier onlyGovernance() {
    require(governance == msg.sender, "Only governance can call this");
    _;
  }

  modifier validDeposit(address routerAddress, bytes memory signature) {
    require(
      verifySignatureAgainstAuthority(signature, verificationAuthority),
      "Signature is not valid"
    );

    require(
      vaults[routerAddress].tokenAddress != address(0),
      "Invalid router address"
    );

    require(
      withdrawLedger[routerAddress][msg.sender] == 0,
      "Cannot deposit funds to router while waiting to withdraw"
    );

    _;
  }
}

File 2 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

File 4 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 12 : IBatcher.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

/**
 * @title IPeripheryBatcher
 * @notice A batcher to resolve router deposits/withdrawals in batches
 * @dev Provides an interface for Batcher
 */
interface IBatcher {
  /**
   * @notice Stores the deposits for future batching via periphery
   * @param amountIn Value of token to be deposited
   * @param routerAddress address of router to deposit into
   * @param signature signature verifying that depositor has enough karma and is authorized to deposit by brahma
   */
  function depositFunds(
    uint256 amountIn,
    address routerAddress,
    bytes memory signature
  ) external;

  /**
   * @notice Stores the deposits for future batching via periphery
   * @param amountIn Value of Lp token to be deposited
   * @param routerAddress address of router to deposit into
   * @param signature signature verifying that depositor has enough karma and is authorized to deposit by brahma
   */
  function depositFundsInCurveLpToken(
    uint256 amountIn,
    address routerAddress,
    bytes memory signature
  ) external;

  /**
   * @notice Stores the deposits for future batching via periphery
   * @param amountOut Value of token to be deposited
   * @param routerAddress address of router to deposit into
   */
  function withdrawFunds(uint256 amountOut, address routerAddress) external;

  /**
   * @notice Performs deposits on the periphery for the supplied users in batch
   * @param routerAddress address of router to deposit inton
   * @param users array of users whose deposits must be resolved
   */
  function batchDeposit(address routerAddress, address[] memory users) external;

  /**
   * @notice Performs withdraws on the periphery for the supplied users in batch
   * @param routerAddress address of router to deposit inton
   * @param users array of users whose deposits must be resolved
   */
  function batchWithdraw(address routerAddress, address[] memory users)
    external;

  /**
   * @notice To set a token address as the deposit token for a router
   * @param routerAddress address of router to deposit inton
   * @param token address of token which is to be deposited into router
   */
  function setRouterParams(address routerAddress, address token, uint256 maxLimit) external;


  /**
   * @notice To set slippage param for curve lp token conversion
   * @param slippage for curve lp token to usdc conversion
   */
  function setSlippage(uint256 slippage) external;
}

File 6 of 12 : IMetaRouter.sol
/// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

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

  function governance() external view returns (address);

  function wantToken() external view returns (address);

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

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

File 7 of 12 : ICurvePool.sol
/// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

interface ICurvePool {
  function exchange(
    int128 i,
    int128 j,
    uint256 _dx,
    uint256 _min_dy,
    address _receiver
  ) external returns (uint256);

  function remove_liquidity_one_coin(
    uint256 _token_amount,
    int128 i,
    uint256 min_amount
  ) external returns (uint256);

  function add_liquidity(uint256[3] memory amounts, uint256 min_mint_amount)
    external
    returns (uint256);

  function get_dy(
    int128 i,
    int128 j,
    uint256 _dx
  ) external view returns (uint256);

  function get_virtual_price() external view returns (uint256);

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

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

}

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

interface ICurveDepositZapper {
  function calc_withdraw_one_coin(
    address _pool,
    uint256 _token_amount,
    int128 i
  ) external returns (uint256);

  function calc_token_amount(
    address _pool,
    uint256[4] memory _amounts,
    bool _is_deposit
  ) external returns (uint256);

  function remove_liquidity_one_coin(
    address _pool,
    uint256 _burn_amount,
    int128 i,
    uint256 _min_amount
  ) external returns (uint256);

  function add_liquidity(
    address _pool,
    uint256[4] memory _deposit_amounts,
    uint256 _min_mint_amount
  ) external returns (uint256);
}

File 9 of 12 : EIP712.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title EIP712
/// @author 0xAd1
/// @notice Used to verify signatures
contract EIP712 {

    /// @notice Verifies a signature against alleged signer of the signature
    /// @param signature Signature to verify
    /// @param authority Signer of the signature
    /// @return True if the signature is signed by authority
    function verifySignatureAgainstAuthority(
        bytes memory signature,
        address authority
    ) internal returns (bool){
        bytes32 eip712DomainHash = keccak256(
            abi.encode(
                keccak256(
                    "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
                ),
                keccak256(bytes("Batcher")),
                keccak256(bytes("1")),
                1, 
                address(this)
            )
        );

        bytes32 hashStruct = keccak256(
            abi.encode(
                keccak256("deposit(address owner)"),
                msg.sender
            )
        );

        (bytes32 r, bytes32 s, uint8 v) = splitSignature(signature);

        bytes32 hash = keccak256(abi.encodePacked("\x19\x01", eip712DomainHash, hashStruct));
        address signer = ecrecover(hash, v, r, s);
        require(signer == authority, "Invalid authority");
        require(signer != address(0), "ECDSA: invalid signature");
        return true;
    }

    function splitSignature(bytes memory sig)
        internal
        pure
        returns (
            bytes32 r,
            bytes32 s,
            uint8 v
        )
    {
        require(sig.length == 65, "invalid signature length");

        assembly {
            /*
            First 32 bytes stores the length of the signature
            add(sig, 32) = pointer of sig + 32
            effectively, skips first 32 bytes of signature
            mload(p) loads next 32 bytes starting at the memory address p into memory
            */

            // first 32 bytes, after the length prefix
            r := mload(add(sig, 32))
            // second 32 bytes
            s := mload(add(sig, 64))
            // final byte (first byte of the next 32 bytes)
            v := byte(0, mload(add(sig, 96)))
        }

        // implicitly return (r, s, v)
    }

    
}

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

pragma solidity ^0.8.0;

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

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

File 11 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

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

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

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

    /**
     * @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 12 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_verificationAuthority","type":"address"},{"internalType":"address","name":"_governance","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"router","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"DepositRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"router","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"WithdrawRequest","type":"event"},{"inputs":[],"name":"acceptGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"address[]","name":"users","type":"address[]"}],"name":"batchDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"address[]","name":"users","type":"address[]"}],"name":"batchWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"depositFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"depositFundsInCurveLpToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"depositLedger","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authority","type":"address"}],"name":"setAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"maxLimit","type":"uint256"}],"name":"setRouterParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_slippage","type":"uint256"}],"name":"setSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageForCurveLp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaults","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"currentAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verificationAuthority","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"routerAddress","type":"address"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"withdrawLedger","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052612710600155601e6008553480156200001c57600080fd5b506040516200275c3803806200275c8339810160408190526200003f91620000e9565b6200004a336200007c565b600580546001600160a01b039384166001600160a01b0319918216179091556006805492909316911617905562000120565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000e457600080fd5b919050565b60008060408385031215620000fc578182fd5b6200010783620000cc565b91506200011760208401620000cc565b90509250929050565b61262c80620001306000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80637a9e5e4b116100b8578063ba96af321161007c578063ba96af32146102d6578063e0bb861a146102e9578063e6ac418a146102f2578063f0fa55a914610305578063f2fde38b14610318578063f39c38a01461032b57600080fd5b80637a9e5e4b1461021e5780638da5cb5b14610231578063a622ee7c14610239578063ab033ea914610298578063addd57e3146102ab57600080fd5b80632862523a116100ff5780632862523a146101bd578063555d2e94146101d05780635aa6e675146101e3578063715018a614610203578063744bfe611461020b57600080fd5b806301681a621461013c57806302cbb2e8146101515780631aa7d780146101645780631aee3dd914610177578063238efcbc146101b5575b600080fd5b61014f61014a36600461205b565b61033e565b005b61014f61015f3660046120a7565b61046a565b61014f6101723660046120e2565b6105e6565b6101a2610185366004612075565b600460209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61014f610a20565b61014f6101cb366004612216565b610aa9565b61014f6101de366004612216565b610c38565b6006546101f6906001600160a01b031681565b6040516101ac91906122dc565b61014f610e6c565b61014f6102193660046121f4565b610ea7565b61014f61022c36600461205b565b611047565b6101f6611093565b61027361024736600461205b565b60026020819052600091825260409091208054600182015491909201546001600160a01b039092169183565b604080516001600160a01b0390941684526020840192909252908201526060016101ac565b61014f6102a636600461205b565b6110a2565b6101a26102b9366004612075565b600360209081526000928352604080842090915290825290205481565b61014f6102e43660046120e2565b6110ee565b6101a260085481565b6005546101f6906001600160a01b031681565b61014f6103133660046121c4565b61151b565b61014f61032636600461205b565b6115ad565b6007546101f6906001600160a01b031681565b6006546001600160a01b031633146103715760405162461bcd60e51b81526004016103689061241b565b60405180910390fd5b6040516370a0823160e01b81526001600160a01b0382169063a9059cbb90339083906370a08231906103a79030906004016122dc565b60206040518083038186803b1580156103bf57600080fd5b505afa1580156103d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f791906121dc565b6040518363ffffffff1660e01b815260040161041492919061230a565b602060405180830381600087803b15801561042e57600080fd5b505af1158015610442573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046691906121a4565b5050565b33610473611093565b6001600160a01b0316146104995760405162461bcd60e51b81526004016103689061247f565b6001600160a01b0383166104bf5760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b03821661050d5760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b6044820152606401610368565b604080516060810182526001600160a01b03848116808352602080840186815260008587018181528a8616825260029384905290879020955186546001600160a01b031916951694909417855551600185015591519290910191909155905163095ea7b360e01b815263095ea7b39061058e9086906000199060040161230a565b602060405180830381600087803b1580156105a857600080fd5b505af11580156105bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e091906121a4565b50505050565b336105ef611093565b6001600160a01b0316146106155760405162461bcd60e51b81526004016103689061247f565b6040516370a0823160e01b8152829060009081906001600160a01b038416906370a08231906106489030906004016122dc565b60206040518083038186803b15801561066057600080fd5b505afa158015610674573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069891906121dc565b905060005b845181101561072b576001600160a01b038616600090815260036020526040812086519091908790849081106106e357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054836107179190612515565b925080610723816125af565b91505061069d565b506000821161074c5760405162461bcd60e51b815260040161036890612452565b604051636e553f6560e01b81526000906001600160a01b03851690636e553f659061077d9086903090600401612323565b602060405180830381600087803b15801561079757600080fd5b505af11580156107ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cf91906121dc565b9050600082856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161080091906122dc565b60206040518083038186803b15801561081857600080fd5b505afa15801561082c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085091906121dc565b61085a919061256c565b90508181146108bf5760405162461bcd60e51b815260206004820152602b60248201527f4c5020746f6b656e7320726563656976656420627920726f7574657220646f6560448201526a0e640dcdee840dac2e8c6d60ab1b6064820152608401610368565b60005b8651811015610a16576001600160a01b0388166000908152600360205260408120885182908a908590811061090757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205490506000811115610a0357600086610948858461254d565b610952919061252d565b905061099989848151811061097757634e487b7160e01b600052603260045260246000fd5b6020026020010151828a6001600160a01b031661164d9092919063ffffffff16565b6001600160a01b038a1660009081526003602052604081208a5182908c90879081106109d557634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550505b5080610a0e816125af565b9150506108c2565b5050505050505050565b6007546001600160a01b03163314610a855760405162461bcd60e51b815260206004820152602260248201527f4f6e6c792070656e64696e6720676f7665726e616e63652063616e20616363656044820152611c1d60f21b6064820152608401610368565b600754600680546001600160a01b0319166001600160a01b03909216919091179055565b60055482908290610ac49082906001600160a01b03166116a8565b610ae05760405162461bcd60e51b8152600401610368906123c5565b6001600160a01b0382811660009081526002602052604090205416610b175760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b038216600090815260046020908152604080832033845290915290205415610b585760405162461bcd60e51b81526004016103689061236d565b604051636eb1769f60e11b815273ceaf7747579696a2f0bb206a14210e3c9e6fb269908690829063dd62ed3e90610b9590339030906004016122f0565b60206040518083038186803b158015610bad57600080fd5b505afa158015610bc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be591906121dc565b1015610c035760405162461bcd60e51b8152600401610368906123f5565b610c186001600160a01b03821633308961192f565b6000610c2382611967565b9050610c2f8682611b8e565b50505050505050565b60055482908290610c539082906001600160a01b03166116a8565b610c6f5760405162461bcd60e51b8152600401610368906123c5565b6001600160a01b0382811660009081526002602052604090205416610ca65760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b038216600090815260046020908152604080832033845290915290205415610ce75760405162461bcd60e51b81526004016103689061236d565b6001600160a01b0380851660009081526002602052604090819020549051636eb1769f60e11b81528792919091169063dd62ed3e90610d2c90339030906004016122f0565b60206040518083038186803b158015610d4457600080fd5b505afa158015610d58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7c91906121dc565b1015610d9a5760405162461bcd60e51b8152600401610368906123f5565b6001600160a01b03808516600090815260026020526040902054610dc1911633308861192f565b6001600160a01b03841660009081526002602081905260408220018054879290610dec908490612515565b90915550506001600160a01b038416600090815260026020819052604090912060018101549101541115610e5b5760405162461bcd60e51b8152602060048201526016602482015275115e18d9595919590819195c1bdcda5d081b1a5b5a5d60521b6044820152606401610368565b610e658486611b8e565b5050505050565b33610e75611093565b6001600160a01b031614610e9b5760405162461bcd60e51b81526004016103689061247f565b610ea56000611c19565b565b6001600160a01b0381811660009081526002602052604090205416610ede5760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b038116600090815260036020908152604080832033845290915290205415610f755760405162461bcd60e51b815260206004820152603a60248201527f43616e6e6f742077697468647261772066756e64732066726f6d20726f75746560448201527f72207768696c652077616974696e6720746f206465706f7369740000000000006064820152608401610368565b610f8a6001600160a01b03821633308561192f565b6001600160a01b0381166000908152600460209081526040808320338452909152902054610fb9908390612515565b6001600160a01b0382166000818152600460209081526040808320338452825280832094909455918152600291829052918220018054849290610ffd90849061256c565b90915550506040518281526001600160a01b0382169033907fcdb62e3f244f9959bd661d145243fc71558361230885919e11fcc84312d44c7d906020015b60405180910390a35050565b6006546001600160a01b031633146110715760405162461bcd60e51b81526004016103689061241b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6006546001600160a01b031633146110cc5760405162461bcd60e51b81526004016103689061241b565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b336110f7611093565b6001600160a01b03161461111d5760405162461bcd60e51b81526004016103689061247f565b6001600160a01b038083166000908152600260205260408082205490516370a0823160e01b81528593919091169190819083906370a08231906111649030906004016122dc565b60206040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b491906121dc565b905060005b8551811015611247576001600160a01b038716600090815260046020526040812087519091908890849081106111ff57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054836112339190612515565b92508061123f816125af565b9150506111b9565b50600082116112685760405162461bcd60e51b815260040161036890612452565b604051627b8a6760e11b81526000906001600160a01b0386169062f714ce906112979086903090600401612323565b602060405180830381600087803b1580156112b157600080fd5b505af11580156112c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e991906121dc565b9050600082856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161131a91906122dc565b60206040518083038186803b15801561133257600080fd5b505afa158015611346573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136a91906121dc565b611374919061256c565b90508181146113db5760405162461bcd60e51b815260206004820152602d60248201527f57616e7420746f6b656e7320726563656976656420627920726f75746572206460448201526c0decae640dcdee840dac2e8c6d609b1b6064820152608401610368565b60005b8751811015611510576001600160a01b0389166000908152600460205260408120895182908b908590811061142357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905060008111156114fd57600086611464858461254d565b61146e919061252d565b90506114938a848151811061097757634e487b7160e01b600052603260045260246000fd5b6001600160a01b038b1660009081526004602052604081208b5182908d90879081106114cf57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550505b5080611508816125af565b9150506113de565b505050505050505050565b33611524611093565b6001600160a01b03161461154a5760405162461bcd60e51b81526004016103689061247f565b6127108111156115a85760405162461bcd60e51b8152602060048201526024808201527f536c697070616765206d757374206265206265747765656e203020616e6420316044820152630303030360e41b6064820152608401610368565b600855565b336115b6611093565b6001600160a01b0316146115dc5760405162461bcd60e51b81526004016103689061247f565b6001600160a01b0381166116415760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610368565b61164a81611c19565b50565b6116a38363a9059cbb60e01b848460405160240161166c92919061230a565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611c69565b505050565b60408051808201825260078152662130ba31b432b960c91b602091820152815180830183526001808252603160f81b9183019190915282517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818401527fe9d76cee0cf4473cddcc3e081ef9f2caab96302d23d7ba675ea190f2188e546f818501527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101919091523060a0808301919091528351808303909101815260c082019093528251929091019190912060009182906117b2907f2fe9f7b6a29d4dd4b42345a1abcb25508fd8a183b707ff2d4a5130e9ccb1926190339060e001612323565b60405160208183030381529060405280519060200120905060008060006117d888611d3b565b60405161190160f01b60208201526022810189905260428101889052929550909350915060009060620160408051601f198184030181528282528051602091820120600080855291840180845281905260ff86169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa15801561186d573d6000803e3d6000fd5b505050602060405103519050886001600160a01b0316816001600160a01b0316146118ce5760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420617574686f7269747960781b6044820152606401610368565b6001600160a01b03811661191f5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610368565b5060019998505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526105e09085906323b872dd60e01b9060840161166c565b6040516370a0823160e01b81526000906127109073ceaf7747579696a2f0bb206a14210e3c9e6fb2699073a79828df1850e8a3a3064576f380d90aecdd33599084906001600160a01b038716906370a08231906119c89030906004016122dc565b60206040518083038186803b1580156119e057600080fd5b505afa1580156119f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1891906121dc565b9050611a2e6001600160a01b0387168383611daa565b6040516341b028f360e01b81526001600160a01b03848116600483015260248201839052600260448301819052916000918516906341b028f390606401602060405180830381600087803b158015611a8557600080fd5b505af1158015611a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abd91906121dc565b9050836001600160a01b03166329ed28628685858a6008548c611ae0919061256c565b611aea908861254d565b611af4919061252d565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526024840192909252600f0b60448301526064820152608401602060405180830381600087803b158015611b4a57600080fd5b505af1158015611b5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8291906121dc565b98975050505050505050565b6001600160a01b0382166000908152600360209081526040808320338452909152902054611bbd908290612515565b6001600160a01b03831660008181526003602090815260408083203380855292529182902093909355519091907f4ed1a8a57a37b79833de68b3bc01307fc91c77341a669fc487f7e588f986d5ff9061103b9085815260200190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611cbe826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ebc9092919063ffffffff16565b8051909150156116a35780806020019051810190611cdc91906121a4565b6116a35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610368565b60008060008351604114611d8c5760405162461bcd60e51b81526020600482015260186024820152770d2dcecc2d8d2c840e6d2cedcc2e8eae4ca40d8cadccee8d60431b6044820152606401610368565b50505060208101516040820151606090920151909260009190911a90565b801580611e325750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90611de090309086906004016122f0565b60206040518083038186803b158015611df857600080fd5b505afa158015611e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3091906121dc565b155b611e9d5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610368565b6116a38363095ea7b360e01b848460405160240161166c92919061230a565b6060611ecb8484600085611ed5565b90505b9392505050565b606082471015611f365760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610368565b6001600160a01b0385163b611f8d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610368565b600080866001600160a01b03168587604051611fa991906122c0565b60006040518083038185875af1925050503d8060008114611fe6576040519150601f19603f3d011682016040523d82523d6000602084013e611feb565b606091505b5091509150611ffb828286612006565b979650505050505050565b60608315612015575081611ece565b8251156120255782518084602001fd5b8160405162461bcd60e51b8152600401610368919061233a565b80356001600160a01b038116811461205657600080fd5b919050565b60006020828403121561206c578081fd5b611ece8261203f565b60008060408385031215612087578081fd5b6120908361203f565b915061209e6020840161203f565b90509250929050565b6000806000606084860312156120bb578081fd5b6120c48461203f565b92506120d26020850161203f565b9150604084013590509250925092565b600080604083850312156120f4578182fd5b6120fd8361203f565b915060208084013567ffffffffffffffff8082111561211a578384fd5b818601915086601f83011261212d578384fd5b81358181111561213f5761213f6125e0565b8060051b91506121508483016124e4565b8181528481019084860184860187018b101561216a578788fd5b8795505b838610156121935761217f8161203f565b83526001959095019491860191860161216e565b508096505050505050509250929050565b6000602082840312156121b5578081fd5b81518015158114611ece578182fd5b6000602082840312156121d5578081fd5b5035919050565b6000602082840312156121ed578081fd5b5051919050565b60008060408385031215612206578182fd5b8235915061209e6020840161203f565b60008060006060848603121561222a578283fd5b83359250602061223b81860161203f565b9250604085013567ffffffffffffffff80821115612257578384fd5b818701915087601f83011261226a578384fd5b81358181111561227c5761227c6125e0565b61228e601f8201601f191685016124e4565b915080825288848285010111156122a3578485fd5b808484018584013784848284010152508093505050509250925092565b600082516122d2818460208701612583565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b9182526001600160a01b0316602082015260400190565b6020815260008251806020840152612359816040850160208701612583565b601f01601f19169190910160400192915050565b60208082526038908201527f43616e6e6f74206465706f7369742066756e647320746f20726f75746572207760408201527768696c652077616974696e6720746f20776974686472617760401b606082015260800190565b60208082526016908201527514da59db985d1d5c99481a5cc81b9bdd081d985b1a5960521b604082015260600190565b6020808252600c908201526b4e6f20616c6c6f77616e636560a01b604082015260600190565b6020808252601d908201527f4f6e6c7920676f7665726e616e63652063616e2063616c6c2074686973000000604082015260600190565b6020808252601390820152726e6f206465706f7369747320746f206d616b6560681b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260169082015275496e76616c696420726f75746572206164647265737360501b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561250d5761250d6125e0565b604052919050565b60008219821115612528576125286125ca565b500190565b60008261254857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612567576125676125ca565b500290565b60008282101561257e5761257e6125ca565b500390565b60005b8381101561259e578181015183820152602001612586565b838111156105e05750506000910152565b60006000198214156125c3576125c36125ca565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220f38bee7dd1b1515bd043432d22fbf6cd02e6c79236eb7b0616dd600bd4470f1064736f6c63430008040033000000000000000000000000687f4304df62449dbc6c95fe9a8cb1153d40d42e0000000000000000000000006b29610d6c6a9e47812be40f1335918bd63321bf

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101375760003560e01c80637a9e5e4b116100b8578063ba96af321161007c578063ba96af32146102d6578063e0bb861a146102e9578063e6ac418a146102f2578063f0fa55a914610305578063f2fde38b14610318578063f39c38a01461032b57600080fd5b80637a9e5e4b1461021e5780638da5cb5b14610231578063a622ee7c14610239578063ab033ea914610298578063addd57e3146102ab57600080fd5b80632862523a116100ff5780632862523a146101bd578063555d2e94146101d05780635aa6e675146101e3578063715018a614610203578063744bfe611461020b57600080fd5b806301681a621461013c57806302cbb2e8146101515780631aa7d780146101645780631aee3dd914610177578063238efcbc146101b5575b600080fd5b61014f61014a36600461205b565b61033e565b005b61014f61015f3660046120a7565b61046a565b61014f6101723660046120e2565b6105e6565b6101a2610185366004612075565b600460209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b61014f610a20565b61014f6101cb366004612216565b610aa9565b61014f6101de366004612216565b610c38565b6006546101f6906001600160a01b031681565b6040516101ac91906122dc565b61014f610e6c565b61014f6102193660046121f4565b610ea7565b61014f61022c36600461205b565b611047565b6101f6611093565b61027361024736600461205b565b60026020819052600091825260409091208054600182015491909201546001600160a01b039092169183565b604080516001600160a01b0390941684526020840192909252908201526060016101ac565b61014f6102a636600461205b565b6110a2565b6101a26102b9366004612075565b600360209081526000928352604080842090915290825290205481565b61014f6102e43660046120e2565b6110ee565b6101a260085481565b6005546101f6906001600160a01b031681565b61014f6103133660046121c4565b61151b565b61014f61032636600461205b565b6115ad565b6007546101f6906001600160a01b031681565b6006546001600160a01b031633146103715760405162461bcd60e51b81526004016103689061241b565b60405180910390fd5b6040516370a0823160e01b81526001600160a01b0382169063a9059cbb90339083906370a08231906103a79030906004016122dc565b60206040518083038186803b1580156103bf57600080fd5b505afa1580156103d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f791906121dc565b6040518363ffffffff1660e01b815260040161041492919061230a565b602060405180830381600087803b15801561042e57600080fd5b505af1158015610442573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046691906121a4565b5050565b33610473611093565b6001600160a01b0316146104995760405162461bcd60e51b81526004016103689061247f565b6001600160a01b0383166104bf5760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b03821661050d5760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420746f6b656e206164647265737360581b6044820152606401610368565b604080516060810182526001600160a01b03848116808352602080840186815260008587018181528a8616825260029384905290879020955186546001600160a01b031916951694909417855551600185015591519290910191909155905163095ea7b360e01b815263095ea7b39061058e9086906000199060040161230a565b602060405180830381600087803b1580156105a857600080fd5b505af11580156105bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e091906121a4565b50505050565b336105ef611093565b6001600160a01b0316146106155760405162461bcd60e51b81526004016103689061247f565b6040516370a0823160e01b8152829060009081906001600160a01b038416906370a08231906106489030906004016122dc565b60206040518083038186803b15801561066057600080fd5b505afa158015610674573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069891906121dc565b905060005b845181101561072b576001600160a01b038616600090815260036020526040812086519091908790849081106106e357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054836107179190612515565b925080610723816125af565b91505061069d565b506000821161074c5760405162461bcd60e51b815260040161036890612452565b604051636e553f6560e01b81526000906001600160a01b03851690636e553f659061077d9086903090600401612323565b602060405180830381600087803b15801561079757600080fd5b505af11580156107ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cf91906121dc565b9050600082856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161080091906122dc565b60206040518083038186803b15801561081857600080fd5b505afa15801561082c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085091906121dc565b61085a919061256c565b90508181146108bf5760405162461bcd60e51b815260206004820152602b60248201527f4c5020746f6b656e7320726563656976656420627920726f7574657220646f6560448201526a0e640dcdee840dac2e8c6d60ab1b6064820152608401610368565b60005b8651811015610a16576001600160a01b0388166000908152600360205260408120885182908a908590811061090757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205490506000811115610a0357600086610948858461254d565b610952919061252d565b905061099989848151811061097757634e487b7160e01b600052603260045260246000fd5b6020026020010151828a6001600160a01b031661164d9092919063ffffffff16565b6001600160a01b038a1660009081526003602052604081208a5182908c90879081106109d557634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550505b5080610a0e816125af565b9150506108c2565b5050505050505050565b6007546001600160a01b03163314610a855760405162461bcd60e51b815260206004820152602260248201527f4f6e6c792070656e64696e6720676f7665726e616e63652063616e20616363656044820152611c1d60f21b6064820152608401610368565b600754600680546001600160a01b0319166001600160a01b03909216919091179055565b60055482908290610ac49082906001600160a01b03166116a8565b610ae05760405162461bcd60e51b8152600401610368906123c5565b6001600160a01b0382811660009081526002602052604090205416610b175760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b038216600090815260046020908152604080832033845290915290205415610b585760405162461bcd60e51b81526004016103689061236d565b604051636eb1769f60e11b815273ceaf7747579696a2f0bb206a14210e3c9e6fb269908690829063dd62ed3e90610b9590339030906004016122f0565b60206040518083038186803b158015610bad57600080fd5b505afa158015610bc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be591906121dc565b1015610c035760405162461bcd60e51b8152600401610368906123f5565b610c186001600160a01b03821633308961192f565b6000610c2382611967565b9050610c2f8682611b8e565b50505050505050565b60055482908290610c539082906001600160a01b03166116a8565b610c6f5760405162461bcd60e51b8152600401610368906123c5565b6001600160a01b0382811660009081526002602052604090205416610ca65760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b038216600090815260046020908152604080832033845290915290205415610ce75760405162461bcd60e51b81526004016103689061236d565b6001600160a01b0380851660009081526002602052604090819020549051636eb1769f60e11b81528792919091169063dd62ed3e90610d2c90339030906004016122f0565b60206040518083038186803b158015610d4457600080fd5b505afa158015610d58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7c91906121dc565b1015610d9a5760405162461bcd60e51b8152600401610368906123f5565b6001600160a01b03808516600090815260026020526040902054610dc1911633308861192f565b6001600160a01b03841660009081526002602081905260408220018054879290610dec908490612515565b90915550506001600160a01b038416600090815260026020819052604090912060018101549101541115610e5b5760405162461bcd60e51b8152602060048201526016602482015275115e18d9595919590819195c1bdcda5d081b1a5b5a5d60521b6044820152606401610368565b610e658486611b8e565b5050505050565b33610e75611093565b6001600160a01b031614610e9b5760405162461bcd60e51b81526004016103689061247f565b610ea56000611c19565b565b6001600160a01b0381811660009081526002602052604090205416610ede5760405162461bcd60e51b8152600401610368906124b4565b6001600160a01b038116600090815260036020908152604080832033845290915290205415610f755760405162461bcd60e51b815260206004820152603a60248201527f43616e6e6f742077697468647261772066756e64732066726f6d20726f75746560448201527f72207768696c652077616974696e6720746f206465706f7369740000000000006064820152608401610368565b610f8a6001600160a01b03821633308561192f565b6001600160a01b0381166000908152600460209081526040808320338452909152902054610fb9908390612515565b6001600160a01b0382166000818152600460209081526040808320338452825280832094909455918152600291829052918220018054849290610ffd90849061256c565b90915550506040518281526001600160a01b0382169033907fcdb62e3f244f9959bd661d145243fc71558361230885919e11fcc84312d44c7d906020015b60405180910390a35050565b6006546001600160a01b031633146110715760405162461bcd60e51b81526004016103689061241b565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6006546001600160a01b031633146110cc5760405162461bcd60e51b81526004016103689061241b565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b336110f7611093565b6001600160a01b03161461111d5760405162461bcd60e51b81526004016103689061247f565b6001600160a01b038083166000908152600260205260408082205490516370a0823160e01b81528593919091169190819083906370a08231906111649030906004016122dc565b60206040518083038186803b15801561117c57600080fd5b505afa158015611190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b491906121dc565b905060005b8551811015611247576001600160a01b038716600090815260046020526040812087519091908890849081106111ff57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054836112339190612515565b92508061123f816125af565b9150506111b9565b50600082116112685760405162461bcd60e51b815260040161036890612452565b604051627b8a6760e11b81526000906001600160a01b0386169062f714ce906112979086903090600401612323565b602060405180830381600087803b1580156112b157600080fd5b505af11580156112c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e991906121dc565b9050600082856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161131a91906122dc565b60206040518083038186803b15801561133257600080fd5b505afa158015611346573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136a91906121dc565b611374919061256c565b90508181146113db5760405162461bcd60e51b815260206004820152602d60248201527f57616e7420746f6b656e7320726563656976656420627920726f75746572206460448201526c0decae640dcdee840dac2e8c6d609b1b6064820152608401610368565b60005b8751811015611510576001600160a01b0389166000908152600460205260408120895182908b908590811061142357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054905060008111156114fd57600086611464858461254d565b61146e919061252d565b90506114938a848151811061097757634e487b7160e01b600052603260045260246000fd5b6001600160a01b038b1660009081526004602052604081208b5182908d90879081106114cf57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550505b5080611508816125af565b9150506113de565b505050505050505050565b33611524611093565b6001600160a01b03161461154a5760405162461bcd60e51b81526004016103689061247f565b6127108111156115a85760405162461bcd60e51b8152602060048201526024808201527f536c697070616765206d757374206265206265747765656e203020616e6420316044820152630303030360e41b6064820152608401610368565b600855565b336115b6611093565b6001600160a01b0316146115dc5760405162461bcd60e51b81526004016103689061247f565b6001600160a01b0381166116415760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610368565b61164a81611c19565b50565b6116a38363a9059cbb60e01b848460405160240161166c92919061230a565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611c69565b505050565b60408051808201825260078152662130ba31b432b960c91b602091820152815180830183526001808252603160f81b9183019190915282517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818401527fe9d76cee0cf4473cddcc3e081ef9f2caab96302d23d7ba675ea190f2188e546f818501527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101919091523060a0808301919091528351808303909101815260c082019093528251929091019190912060009182906117b2907f2fe9f7b6a29d4dd4b42345a1abcb25508fd8a183b707ff2d4a5130e9ccb1926190339060e001612323565b60405160208183030381529060405280519060200120905060008060006117d888611d3b565b60405161190160f01b60208201526022810189905260428101889052929550909350915060009060620160408051601f198184030181528282528051602091820120600080855291840180845281905260ff86169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa15801561186d573d6000803e3d6000fd5b505050602060405103519050886001600160a01b0316816001600160a01b0316146118ce5760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420617574686f7269747960781b6044820152606401610368565b6001600160a01b03811661191f5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610368565b5060019998505050505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526105e09085906323b872dd60e01b9060840161166c565b6040516370a0823160e01b81526000906127109073ceaf7747579696a2f0bb206a14210e3c9e6fb2699073a79828df1850e8a3a3064576f380d90aecdd33599084906001600160a01b038716906370a08231906119c89030906004016122dc565b60206040518083038186803b1580156119e057600080fd5b505afa1580156119f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1891906121dc565b9050611a2e6001600160a01b0387168383611daa565b6040516341b028f360e01b81526001600160a01b03848116600483015260248201839052600260448301819052916000918516906341b028f390606401602060405180830381600087803b158015611a8557600080fd5b505af1158015611a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abd91906121dc565b9050836001600160a01b03166329ed28628685858a6008548c611ae0919061256c565b611aea908861254d565b611af4919061252d565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526024840192909252600f0b60448301526064820152608401602060405180830381600087803b158015611b4a57600080fd5b505af1158015611b5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8291906121dc565b98975050505050505050565b6001600160a01b0382166000908152600360209081526040808320338452909152902054611bbd908290612515565b6001600160a01b03831660008181526003602090815260408083203380855292529182902093909355519091907f4ed1a8a57a37b79833de68b3bc01307fc91c77341a669fc487f7e588f986d5ff9061103b9085815260200190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611cbe826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ebc9092919063ffffffff16565b8051909150156116a35780806020019051810190611cdc91906121a4565b6116a35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610368565b60008060008351604114611d8c5760405162461bcd60e51b81526020600482015260186024820152770d2dcecc2d8d2c840e6d2cedcc2e8eae4ca40d8cadccee8d60431b6044820152606401610368565b50505060208101516040820151606090920151909260009190911a90565b801580611e325750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90611de090309086906004016122f0565b60206040518083038186803b158015611df857600080fd5b505afa158015611e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3091906121dc565b155b611e9d5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610368565b6116a38363095ea7b360e01b848460405160240161166c92919061230a565b6060611ecb8484600085611ed5565b90505b9392505050565b606082471015611f365760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610368565b6001600160a01b0385163b611f8d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610368565b600080866001600160a01b03168587604051611fa991906122c0565b60006040518083038185875af1925050503d8060008114611fe6576040519150601f19603f3d011682016040523d82523d6000602084013e611feb565b606091505b5091509150611ffb828286612006565b979650505050505050565b60608315612015575081611ece565b8251156120255782518084602001fd5b8160405162461bcd60e51b8152600401610368919061233a565b80356001600160a01b038116811461205657600080fd5b919050565b60006020828403121561206c578081fd5b611ece8261203f565b60008060408385031215612087578081fd5b6120908361203f565b915061209e6020840161203f565b90509250929050565b6000806000606084860312156120bb578081fd5b6120c48461203f565b92506120d26020850161203f565b9150604084013590509250925092565b600080604083850312156120f4578182fd5b6120fd8361203f565b915060208084013567ffffffffffffffff8082111561211a578384fd5b818601915086601f83011261212d578384fd5b81358181111561213f5761213f6125e0565b8060051b91506121508483016124e4565b8181528481019084860184860187018b101561216a578788fd5b8795505b838610156121935761217f8161203f565b83526001959095019491860191860161216e565b508096505050505050509250929050565b6000602082840312156121b5578081fd5b81518015158114611ece578182fd5b6000602082840312156121d5578081fd5b5035919050565b6000602082840312156121ed578081fd5b5051919050565b60008060408385031215612206578182fd5b8235915061209e6020840161203f565b60008060006060848603121561222a578283fd5b83359250602061223b81860161203f565b9250604085013567ffffffffffffffff80821115612257578384fd5b818701915087601f83011261226a578384fd5b81358181111561227c5761227c6125e0565b61228e601f8201601f191685016124e4565b915080825288848285010111156122a3578485fd5b808484018584013784848284010152508093505050509250925092565b600082516122d2818460208701612583565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b9182526001600160a01b0316602082015260400190565b6020815260008251806020840152612359816040850160208701612583565b601f01601f19169190910160400192915050565b60208082526038908201527f43616e6e6f74206465706f7369742066756e647320746f20726f75746572207760408201527768696c652077616974696e6720746f20776974686472617760401b606082015260800190565b60208082526016908201527514da59db985d1d5c99481a5cc81b9bdd081d985b1a5960521b604082015260600190565b6020808252600c908201526b4e6f20616c6c6f77616e636560a01b604082015260600190565b6020808252601d908201527f4f6e6c7920676f7665726e616e63652063616e2063616c6c2074686973000000604082015260600190565b6020808252601390820152726e6f206465706f7369747320746f206d616b6560681b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260169082015275496e76616c696420726f75746572206164647265737360501b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561250d5761250d6125e0565b604052919050565b60008219821115612528576125286125ca565b500190565b60008261254857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612567576125676125ca565b500290565b60008282101561257e5761257e6125ca565b500390565b60005b8381101561259e578181015183820152602001612586565b838111156105e05750506000910152565b60006000198214156125c3576125c36125ca565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220f38bee7dd1b1515bd043432d22fbf6cd02e6c79236eb7b0616dd600bd4470f1064736f6c63430008040033

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

000000000000000000000000687f4304df62449dbc6c95fe9a8cb1153d40d42e0000000000000000000000006b29610d6c6a9e47812be40f1335918bd63321bf

-----Decoded View---------------
Arg [0] : _verificationAuthority (address): 0x687f4304Df62449dBc6C95FE9A8cb1153d40D42e
Arg [1] : _governance (address): 0x6b29610D6c6a9E47812bE40F1335918bd63321bf

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000687f4304df62449dbc6c95fe9a8cb1153d40d42e
Arg [1] : 0000000000000000000000006b29610d6c6a9e47812be40f1335918bd63321bf


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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