ETH Price: $3,327.29 (+0.53%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RestrictedIndexPool

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : RestrictedIndexPool.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
pragma abicoder v2;

import "./IndexPoolToken.sol";

contract RestrictedIndexPool is IndexPoolToken {
  function _pushUnderlying(
    address erc20,
    address to,
    uint256 amount
  ) internal {
    (bool success, bytes memory data) =
      erc20.call(abi.encodeWithSelector(IERC20.transfer.selector, to, amount));
    require(
      success && (data.length == 0 || abi.decode(data, (bool))),
      "ERR_ERC20_FALSE"
    );
  }

  function _redeemTokensTo(
    address src,
    address dst,
    uint256 poolAmountIn
  ) internal returns (uint256[] memory tokenAmountsOut) {
    uint256 len = _tokens.length;
    tokenAmountsOut = new uint256[](len);
    uint256 poolTotal = totalSupply;
    uint256 ratio = bdiv(poolAmountIn, poolTotal);
    _burn(src, poolAmountIn);

    for (uint256 i = 0; i < len; i++) {
      address t = _tokens[i];
      uint256 bal = IERC20(t).balanceOf(address(this));
      if (bal > 0) {
        uint256 tokenAmountOut = bmul(ratio, bal);
        _pushUnderlying(t, dst, tokenAmountOut);
        emit LOG_EXIT(src, t, tokenAmountOut);
        tokenAmountsOut[i] = tokenAmountOut;
      } else {
        tokenAmountsOut[i] = 0;
      }
    }
  }

  function exitPool(uint256 poolAmountIn, uint256[] calldata minAmountsOut)
    external
    override
    _lock_
    _initialized_
  {
    uint256 len = minAmountsOut.length;
    uint256[] memory tokenAmountsOut =
      _redeemTokensTo(msg.sender, msg.sender, poolAmountIn);
    require(len == tokenAmountsOut.length, "ERR_ARR_LEN");
    for (uint256 i = 0; i < len; i++) {
      require(tokenAmountsOut[i] >= minAmountsOut[i], "ERR_LIMIT_OUT");
    }
  }

  function exitPoolTo(address to, uint256 poolAmountIn)
    external
    override
    _lock_
    _initialized_
  {
    _redeemTokensTo(msg.sender, to, poolAmountIn);
  }

  function redeemAll() external override _lock_ _initialized_ {
    _redeemTokensTo(msg.sender, msg.sender, balanceOf[msg.sender]);
  }
}

File 2 of 6 : IndexPoolToken.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
pragma abicoder v2;

import "./IndexPoolMath.sol";

abstract contract IndexPoolToken is IndexPoolMath {
  function _move(
    address src,
    address dst,
    uint256 amt
  ) internal {
    require(src != pair && dst != pair, "ERR_UNI_TRANSFER");
    require(balanceOf[src] >= amt, "ERR_INSUFFICIENT_BAL");
    balanceOf[src] = bsub(balanceOf[src], amt);
    balanceOf[dst] = badd(balanceOf[dst], amt);
    emit Transfer(src, dst, amt);
  }

  function _burn(address src, uint256 amount) internal {
    require(amount > 0, "ERR_NULL_AMOUNT");
    require(balanceOf[src] >= amount, "ERR_INSUFFICIENT_BAL");
    balanceOf[src] = bsub(balanceOf[src], amount);
    totalSupply = bsub(totalSupply, amount);
    emit Transfer(src, address(0), amount);
  }

  function approve(address dst, uint256 amt) external override returns (bool) {
    allowance[msg.sender][dst] = amt;
    emit Approval(msg.sender, dst, amt);
    return true;
  }

  function transfer(address dst, uint256 amt)
    external
    override
    _initialized_
    returns (bool)
  {
    _move(msg.sender, dst, amt);
    return true;
  }

  function transferFrom(
    address src,
    address dst,
    uint256 amt
  ) external override _initialized_ returns (bool) {
    require(
      msg.sender == src || amt <= allowance[src][msg.sender],
      "ERR_BTOKEN_BAD_CALLER"
    );
    _move(src, dst, amt);
    if (msg.sender != src && allowance[src][msg.sender] != type(uint256).max) {
      allowance[src][msg.sender] = bsub(allowance[src][msg.sender], amt);
      emit Approval(src, msg.sender, allowance[src][msg.sender]);
    }
    return true;
  }
}

File 3 of 6 : IndexPoolMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
pragma abicoder v2;

import "./IndexPoolBase.sol";

abstract contract IndexPoolMath is IndexPoolBase {
  function badd(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "ERR_ADD_OVERFLOW");
    return c;
  }

  function bsub(uint256 a, uint256 b) internal pure returns (uint256) {
    (uint256 c, bool flag) = bsubSign(a, b);
    require(!flag, "ERR_SUB_UNDERFLOW");
    return c;
  }

  function bsubSign(uint256 a, uint256 b)
    internal
    pure
    returns (uint256, bool)
  {
    if (a >= b) {
      return (a - b, false);
    } else {
      return (b - a, true);
    }
  }

  function bmul(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c0 = a * b;
    require(a == 0 || c0 / a == b, "ERR_MUL_OVERFLOW");
    uint256 c1 = c0 + (BONE / 2);
    require(c1 >= c0, "ERR_MUL_OVERFLOW");
    uint256 c2 = c1 / BONE;
    return c2;
  }

  function bdiv(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, "ERR_DIV_ZERO");
    uint256 c0 = a * BONE;
    require(a == 0 || c0 / a == BONE, "ERR_DIV_INTERNAL");
    uint256 c1 = c0 + (b / 2);
    require(c1 >= c0, "ERR_DIV_INTERNAL");
    uint256 c2 = c1 / b;
    return c2;
  }
}

File 4 of 6 : IndexPoolBase.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
pragma abicoder v2;

import "./interfaces/IRestrictedIndexPool.sol";

abstract contract IndexPoolBase is IRestrictedIndexPool {
  uint256 internal constant BONE = 10**18;
  uint8 public constant override decimals = 18;

  /* Storage */

  mapping(address => uint256) public override balanceOf;

  mapping(address => mapping(address => uint256)) public override allowance;

  uint256 public override totalSupply;

  string public override name;

  string public override symbol;

  bool internal _mutex;

  address public override getController;

  address internal _unbindHandler;

  bool public override isPublicSwap;

  uint256 public override getSwapFee;

  address[] internal _tokens;

  mapping(address => Record) internal _records;

  uint256 public override getTotalDenormalizedWeight;

  mapping(address => uint256) internal _minimumBalances;

  address public override getExitFeeRecipient;

  address public pair;

  /* View function constants */

  uint256 public constant override getExitFee = 0;

  modifier _lock_ {
    require(!_mutex, "ERR_REENTRY");
    _mutex = true;
    _;
    _mutex = false;
  }

  modifier _initialized_ {
    require(pair != address(0), "ERR_NOT_INITIALIZED");
    _;
  }

  function initialize(address _uniBurn, address _pair) external override {
    require(pair == address(0), "ERR_INITIALIZED");
    address[] memory tokens = _tokens;
    for (uint256 i; i < tokens.length; i++) {
      address token = tokens[i];
      require(
        IERC20(token).balanceOf(address(this)) >= _records[token].balance,
        "Balances not reinstated"
      );
    }
    balanceOf[_uniBurn] = balanceOf[_pair];
    balanceOf[_pair] = 0;
    pair = _pair;
  }

  function isBound(address t) external view override returns (bool) {
    return _records[t].bound;
  }

  function getNumTokens() external view override returns (uint256) {
    return _tokens.length;
  }

  function getCurrentTokens()
    external
    view
    override
    returns (address[] memory tokens)
  {
    tokens = _tokens;
  }

  function getCurrentDesiredTokens()
    external
    view
    override
    returns (address[] memory tokens)
  {
    address[] memory tempTokens = _tokens;
    tokens = new address[](tempTokens.length);
    uint256 usedIndex = 0;
    for (uint256 i = 0; i < tokens.length; i++) {
      address token = tempTokens[i];
      if (_records[token].desiredDenorm > 0) {
        tokens[usedIndex++] = token;
      }
    }
    assembly {
      mstore(tokens, usedIndex)
    }
  }

  function getDenormalizedWeight(address token)
    external
    view
    override
    returns (
      uint256 /* denorm */
    )
  {
    return getTokenRecord(token).denorm;
  }

  function getTokenRecord(address token)
    public
    view
    override
    returns (Record memory record)
  {
    record = _records[token];
    record.balance = IERC20(token).balanceOf(address(this));
    require(record.bound, "ERR_NOT_BOUND");
  }

  function getBalance(address token) external view override returns (uint256) {
    return getTokenRecord(token).balance;
  }

  function getUsedBalance(address token)
    external
    view
    override
    returns (uint256)
  {
    Record memory record = getTokenRecord(token);
    require(record.bound, "ERR_NOT_BOUND");
    if (!record.ready) {
      return _minimumBalances[token];
    }
    return record.balance;
  }
}

File 5 of 6 : IRestrictedIndexPool.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;
pragma experimental ABIEncoderV2;

import "./IERC20.sol";

interface IRestrictedIndexPool is IERC20 {
  event LOG_EXIT(
    address indexed caller,
    address indexed tokenOut,
    uint256 tokenAmountOut
  );

  struct Record {
    bool bound;
    bool ready;
    uint40 lastDenormUpdate;
    uint96 denorm;
    uint96 desiredDenorm;
    uint8 index;
    uint256 balance;
  }

  function initialize(address _lpBurn, address _pair) external;

  function exitPool(uint256 poolAmountIn, uint256[] calldata minAmountsOut)
    external;

  function exitPoolTo(address to, uint256 poolAmountIn) external;

  function redeemAll() external;

  function isPublicSwap() external view returns (bool);

  function getSwapFee()
    external
    view
    returns (
      uint256 /* swapFee */
    );

  function getExitFee()
    external
    view
    returns (
      uint256 /* exitFee */
    );

  function getController() external view returns (address);

  function getExitFeeRecipient() external view returns (address);

  function isBound(address t) external view returns (bool);

  function getNumTokens() external view returns (uint256);

  function getCurrentTokens() external view returns (address[] memory tokens);

  function getCurrentDesiredTokens()
    external
    view
    returns (address[] memory tokens);

  function getDenormalizedWeight(address token)
    external
    view
    returns (
      uint256 /* denorm */
    );

  function getTokenRecord(address token)
    external
    view
    returns (Record memory record);

  function getTotalDenormalizedWeight() external view returns (uint256);

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

  function getUsedBalance(address token) external view returns (uint256);
}

File 6 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

interface IERC20 {
  event Approval(address indexed src, address indexed dst, uint256 amt);
  event Transfer(address indexed src, address indexed dst, uint256 amt);

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

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

  function decimals() external view returns (uint8);

  function totalSupply() external view returns (uint256);

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"src","type":"address"},{"indexed":true,"internalType":"address","name":"dst","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmountOut","type":"uint256"}],"name":"LOG_EXIT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"src","type":"address"},{"indexed":true,"internalType":"address","name":"dst","type":"address"},{"indexed":false,"internalType":"uint256","name":"amt","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolAmountIn","type":"uint256"},{"internalType":"uint256[]","name":"minAmountsOut","type":"uint256[]"}],"name":"exitPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"poolAmountIn","type":"uint256"}],"name":"exitPoolTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getController","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentDesiredTokens","outputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentTokens","outputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getDenormalizedWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExitFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExitFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSwapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenRecord","outputs":[{"components":[{"internalType":"bool","name":"bound","type":"bool"},{"internalType":"bool","name":"ready","type":"bool"},{"internalType":"uint40","name":"lastDenormUpdate","type":"uint40"},{"internalType":"uint96","name":"denorm","type":"uint96"},{"internalType":"uint96","name":"desiredDenorm","type":"uint96"},{"internalType":"uint8","name":"index","type":"uint8"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct IRestrictedIndexPool.Record","name":"record","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalDenormalizedWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getUsedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_uniBurn","type":"address"},{"internalType":"address","name":"_pair","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"t","type":"address"}],"name":"isBound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611acc806100206000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063865bcccb116100f9578063cc77828d11610097578063dd62ed3e11610071578063dd62ed3e14610368578063ecb0116a1461037b578063f8b2cb4f14610383578063fde924f714610396576101c4565b8063cc77828d14610350578063cd2ed8fb14610358578063d4cadf6814610360576101c4565b806395d89b41116100d357806395d89b411461031a578063a8aa1b3114610322578063a9059cbb1461032a578063b02f0b731461033d576101c4565b8063865bcccb146102f7578063936c3477146102ff578063948d8ce614610307576101c4565b80633018205f116101665780634aa4e0b5116101405780634aa4e0b51461029e57806364c7d661146102b157806370a08231146102d15780637a5ef66a146102e4576101c4565b80633018205f14610261578063313ce56714610276578063485cc9551461028b576101c4565b806318160ddd116101a257806318160ddd1461021c57806323b872dd146102315780632f37b624146102445780632f4350c214610257576101c4565b8063039209af146101c957806306fdde03146101e7578063095ea7b3146101fc575b600080fd5b6101d161039e565b6040516101de91906116b5565b60405180910390f35b6101ef6104e1565b6040516101de919061170d565b61020f61020a366004611592565b61056f565b6040516101de9190611702565b6102246105d9565b6040516101de9190611a78565b61020f61023f366004611557565b6105df565b61020f61025236600461150b565b610750565b61025f610772565b005b6102696107f3565b6040516101de9190611688565b61027e610807565b6040516101de9190611a81565b61025f610299366004611525565b61080c565b6102246102ac36600461150b565b6109b8565b6102c46102bf36600461150b565b610a18565b6040516101de9190611a0d565b6102246102df36600461150b565b610b46565b61025f6102f2366004611592565b610b58565b610269610bca565b610224610bd9565b61022461031536600461150b565b610bdf565b6101ef610bfd565b610269610c58565b61020f610338366004611592565b610c67565b61025f61034b3660046115f3565b610ca6565b6101d1610d98565b610224610dfa565b610224610e00565b610224610376366004611525565b610e06565b610224610e23565b61022461039136600461150b565b610e28565b61020f610e33565b6060600060088054806020026020016040519081016040528092919081815260200182805480156103f857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116103da575b50505050509050805167ffffffffffffffff8111801561041757600080fd5b50604051908082528060200260200182016040528015610441578160200160208202803683370190505b5091506000805b83518110156104da57600083828151811061045f57fe5b6020908102919091018101516001600160a01b03811660009081526009909252604090912054909150600160981b90046001600160601b0316156104d157808584806001019550815181106104b057fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b50600101610448565b5082525090565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105675780601f1061053c57610100808354040283529160200191610567565b820191906000526020600020905b81548152906001019060200180831161054a57829003601f168201915b505050505081565b3360008181526001602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105c8908690611a78565b60405180910390a350600192915050565b60025481565b600d546000906001600160a01b03166106135760405162461bcd60e51b815260040161060a9061176a565b60405180910390fd5b336001600160a01b038516148061064d57506001600160a01b03841660009081526001602090815260408083203384529091529020548211155b6106695760405162461bcd60e51b815260040161060a9061183f565b610674848484610e43565b336001600160a01b038516148015906106b257506001600160a01b038416600090815260016020908152604080832033845290915290205460001914155b15610746576001600160a01b03841660009081526001602090815260408083203384529091529020546106e59083610f74565b6001600160a01b038516600081815260016020908152604080832033808552925291829020849055905190927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259161073d9190611a78565b60405180910390a35b5060019392505050565b6001600160a01b03811660009081526009602052604090205460ff165b919050565b60055460ff16156107955760405162461bcd60e51b815260040161060a9061186e565b6005805460ff19166001179055600d546001600160a01b03166107ca5760405162461bcd60e51b815260040161060a9061176a565b336000818152602081905260409020546107e691908190610fad565b506005805460ff19169055565b60055461010090046001600160a01b031681565b601281565b600d546001600160a01b0316156108355760405162461bcd60e51b815260040161060a906117ec565b6000600880548060200260200160405190810160405280929190818152602001828054801561088d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161086f575b5050505050905060005b81518110156109735760008282815181106108ae57fe5b6020908102919091018101516001600160a01b038116600081815260099093526040928390206001015492516370a0823160e01b8152919350906370a08231906108fc903090600401611688565b60206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c91906115db565b101561096a5760405162461bcd60e51b815260040161060a90611958565b50600101610897565b50506001600160a01b039081166000818152602081905260408082208054959094168252812093909355808352919055600d80546001600160a01b0319169091179055565b6000806109c483610a18565b80519091506109e55760405162461bcd60e51b815260040161060a90611893565b8060200151610a0e5750506001600160a01b0381166000908152600b602052604090205461076d565b60c0015192915050565b610a206114b8565b506001600160a01b038116600081815260096020908152604091829020825160e081018452815460ff808216151583526101008204811615159483019490945264ffffffffff62010000820416828601526001600160601b03670100000000000000820481166060840152600160981b8204166080830152600160f81b900490921660a08301526001015460c082015290516370a0823160e01b81529091906370a0823190610ad3903090600401611688565b60206040518083038186803b158015610aeb57600080fd5b505afa158015610aff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2391906115db565b60c0820152805161076d5760405162461bcd60e51b815260040161060a90611893565b60006020819052908152604090205481565b60055460ff1615610b7b5760405162461bcd60e51b815260040161060a9061186e565b6005805460ff19166001179055600d546001600160a01b0316610bb05760405162461bcd60e51b815260040161060a9061176a565b610bbb338383610fad565b50506005805460ff1916905550565b600c546001600160a01b031681565b600a5481565b6000610bea82610a18565b606001516001600160601b031692915050565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105675780601f1061053c57610100808354040283529160200191610567565b600d546001600160a01b031681565b600d546000906001600160a01b0316610c925760405162461bcd60e51b815260040161060a9061176a565b610c9d338484610e43565b50600192915050565b60055460ff1615610cc95760405162461bcd60e51b815260040161060a9061186e565b6005805460ff19166001179055600d546001600160a01b0316610cfe5760405162461bcd60e51b815260040161060a9061176a565b806000610d0c338087610fad565b905080518214610d2e5760405162461bcd60e51b815260040161060a906118e4565b60005b82811015610d8657848482818110610d4557fe5b90506020020135828281518110610d5857fe5b60200260200101511015610d7e5760405162461bcd60e51b815260040161060a90611797565b600101610d31565b50506005805460ff1916905550505050565b60606008805480602002602001604051908101604052809291908181526020018280548015610df057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610dd2575b5050505050905090565b60085490565b60075481565b600160209081526000928352604080842090915290825290205481565b600081565b6000610a0e82610a18565b600654600160a01b900460ff1681565b600d546001600160a01b03848116911614801590610e6f5750600d546001600160a01b03838116911614155b610e8b5760405162461bcd60e51b815260040161060a90611740565b6001600160a01b038316600090815260208190526040902054811115610ec35760405162461bcd60e51b815260040161060a906117be565b6001600160a01b038316600090815260208190526040902054610ee69082610f74565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f159082611173565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f67908590611a78565b60405180910390a3505050565b6000806000610f83858561119f565b915091508015610fa55760405162461bcd60e51b815260040161060a906119b8565b509392505050565b6008546060908067ffffffffffffffff81118015610fca57600080fd5b50604051908082528060200260200182016040528015610ff4578160200160208202803683370190505b50600254909250600061100785836111c4565b90506110138786611263565b60005b838110156111685760006008828154811061102d57fe5b60009182526020822001546040516370a0823160e01b81526001600160a01b03909116925082906370a0823190611068903090600401611688565b60206040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b891906115db565b905080156111435760006110cc8583611351565b90506110d9838b836113c3565b826001600160a01b03168b6001600160a01b03167fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed8360405161111c9190611a78565b60405180910390a38088858151811061113157fe5b6020026020010181815250505061115e565b600087848151811061115157fe5b6020026020010181815250505b5050600101611016565b505050509392505050565b6000828201838110156111985760405162461bcd60e51b815260040161060a906119e3565b9392505050565b6000808284106111b557505080820360006111bd565b505081810360015b9250929050565b6000816111e35760405162461bcd60e51b815260040161060a90611932565b670de0b6b3a7640000830283158061120b5750670de0b6b3a764000084828161120857fe5b04145b6112275760405162461bcd60e51b815260040161060a90611815565b6002830481018181101561124d5760405162461bcd60e51b815260040161060a90611815565b600084828161125857fe5b049695505050505050565b600081116112835760405162461bcd60e51b815260040161060a90611909565b6001600160a01b0382166000908152602081905260409020548111156112bb5760405162461bcd60e51b815260040161060a906117be565b6001600160a01b0382166000908152602081905260409020546112de9082610f74565b6001600160a01b0383166000908152602081905260409020556002546113049082610f74565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611345908590611a78565b60405180910390a35050565b600082820283158061136b57508284828161136857fe5b04145b6113875760405162461bcd60e51b815260040161060a906118ba565b6706f05b59d3b200008101818110156113b25760405162461bcd60e51b815260040161060a906118ba565b6000670de0b6b3a764000082611258565b600080846001600160a01b031663a9059cbb60e01b85856040516024016113eb92919061169c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611429919061166c565b6000604051808303816000865af19150503d8060008114611466576040519150601f19603f3d011682016040523d82523d6000602084013e61146b565b606091505b509150915081801561149557508051158061149557508080602001905181019061149591906115bb565b6114b15760405162461bcd60e51b815260040161060a9061198f565b5050505050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b80356001600160a01b038116811461076d57600080fd5b60006020828403121561151c578081fd5b611198826114f4565b60008060408385031215611537578081fd5b611540836114f4565b915061154e602084016114f4565b90509250929050565b60008060006060848603121561156b578081fd5b611574846114f4565b9250611582602085016114f4565b9150604084013590509250925092565b600080604083850312156115a4578182fd5b6115ad836114f4565b946020939093013593505050565b6000602082840312156115cc578081fd5b81518015158114611198578182fd5b6000602082840312156115ec578081fd5b5051919050565b600080600060408486031215611607578283fd5b83359250602084013567ffffffffffffffff80821115611625578384fd5b818601915086601f830112611638578384fd5b813581811115611646578485fd5b8760208083028501011115611659578485fd5b6020830194508093505050509250925092565b6000825161167e818460208701611a8f565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156116f65783516001600160a01b0316835292840192918401916001016116d1565b50909695505050505050565b901515815260200190565b600060208252825180602084015261172c816040850160208701611a8f565b601f01601f19169190910160400192915050565b60208082526010908201526f22a9292faaa724afaa2920a729a322a960811b604082015260600190565b60208082526013908201527211549497d393d517d253925512505312569151606a1b604082015260600190565b6020808252600d908201526c11549497d31253525517d3d555609a1b604082015260600190565b60208082526014908201527311549497d25394d551919250d251539517d0905360621b604082015260600190565b6020808252600f908201526e11549497d253925512505312569151608a1b604082015260600190565b60208082526010908201526f11549497d1125597d25395115493905360821b604082015260600190565b60208082526015908201527422a9292fa12a27a5a2a72fa120a22fa1a0a62622a960591b604082015260600190565b6020808252600b908201526a4552525f5245454e54525960a81b604082015260600190565b6020808252600d908201526c11549497d393d517d093d55391609a1b604082015260600190565b60208082526010908201526f4552525f4d554c5f4f564552464c4f5760801b604082015260600190565b6020808252600b908201526a22a9292fa0a9292fa622a760a91b604082015260600190565b6020808252600f908201526e11549497d395531317d05353d55395608a1b604082015260600190565b6020808252600c908201526b4552525f4449565f5a45524f60a01b604082015260600190565b60208082526017908201527f42616c616e636573206e6f74207265696e737461746564000000000000000000604082015260600190565b6020808252600f908201526e4552525f45524332305f46414c534560881b604082015260600190565b6020808252601190820152704552525f5355425f554e444552464c4f5760781b604082015260600190565b60208082526010908201526f4552525f4144445f4f564552464c4f5760801b604082015260600190565b600060e08201905082511515825260208301511515602083015264ffffffffff604084015116604083015260608301516001600160601b038082166060850152806080860151166080850152505060ff60a08401511660a083015260c083015160c083015292915050565b90815260200190565b60ff91909116815260200190565b60005b83811015611aaa578181015183820152602001611a92565b83811115611ab9576000848401525b5050505056fea164736f6c6343000706000a

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063865bcccb116100f9578063cc77828d11610097578063dd62ed3e11610071578063dd62ed3e14610368578063ecb0116a1461037b578063f8b2cb4f14610383578063fde924f714610396576101c4565b8063cc77828d14610350578063cd2ed8fb14610358578063d4cadf6814610360576101c4565b806395d89b41116100d357806395d89b411461031a578063a8aa1b3114610322578063a9059cbb1461032a578063b02f0b731461033d576101c4565b8063865bcccb146102f7578063936c3477146102ff578063948d8ce614610307576101c4565b80633018205f116101665780634aa4e0b5116101405780634aa4e0b51461029e57806364c7d661146102b157806370a08231146102d15780637a5ef66a146102e4576101c4565b80633018205f14610261578063313ce56714610276578063485cc9551461028b576101c4565b806318160ddd116101a257806318160ddd1461021c57806323b872dd146102315780632f37b624146102445780632f4350c214610257576101c4565b8063039209af146101c957806306fdde03146101e7578063095ea7b3146101fc575b600080fd5b6101d161039e565b6040516101de91906116b5565b60405180910390f35b6101ef6104e1565b6040516101de919061170d565b61020f61020a366004611592565b61056f565b6040516101de9190611702565b6102246105d9565b6040516101de9190611a78565b61020f61023f366004611557565b6105df565b61020f61025236600461150b565b610750565b61025f610772565b005b6102696107f3565b6040516101de9190611688565b61027e610807565b6040516101de9190611a81565b61025f610299366004611525565b61080c565b6102246102ac36600461150b565b6109b8565b6102c46102bf36600461150b565b610a18565b6040516101de9190611a0d565b6102246102df36600461150b565b610b46565b61025f6102f2366004611592565b610b58565b610269610bca565b610224610bd9565b61022461031536600461150b565b610bdf565b6101ef610bfd565b610269610c58565b61020f610338366004611592565b610c67565b61025f61034b3660046115f3565b610ca6565b6101d1610d98565b610224610dfa565b610224610e00565b610224610376366004611525565b610e06565b610224610e23565b61022461039136600461150b565b610e28565b61020f610e33565b6060600060088054806020026020016040519081016040528092919081815260200182805480156103f857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116103da575b50505050509050805167ffffffffffffffff8111801561041757600080fd5b50604051908082528060200260200182016040528015610441578160200160208202803683370190505b5091506000805b83518110156104da57600083828151811061045f57fe5b6020908102919091018101516001600160a01b03811660009081526009909252604090912054909150600160981b90046001600160601b0316156104d157808584806001019550815181106104b057fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b50600101610448565b5082525090565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105675780601f1061053c57610100808354040283529160200191610567565b820191906000526020600020905b81548152906001019060200180831161054a57829003601f168201915b505050505081565b3360008181526001602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906105c8908690611a78565b60405180910390a350600192915050565b60025481565b600d546000906001600160a01b03166106135760405162461bcd60e51b815260040161060a9061176a565b60405180910390fd5b336001600160a01b038516148061064d57506001600160a01b03841660009081526001602090815260408083203384529091529020548211155b6106695760405162461bcd60e51b815260040161060a9061183f565b610674848484610e43565b336001600160a01b038516148015906106b257506001600160a01b038416600090815260016020908152604080832033845290915290205460001914155b15610746576001600160a01b03841660009081526001602090815260408083203384529091529020546106e59083610f74565b6001600160a01b038516600081815260016020908152604080832033808552925291829020849055905190927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259161073d9190611a78565b60405180910390a35b5060019392505050565b6001600160a01b03811660009081526009602052604090205460ff165b919050565b60055460ff16156107955760405162461bcd60e51b815260040161060a9061186e565b6005805460ff19166001179055600d546001600160a01b03166107ca5760405162461bcd60e51b815260040161060a9061176a565b336000818152602081905260409020546107e691908190610fad565b506005805460ff19169055565b60055461010090046001600160a01b031681565b601281565b600d546001600160a01b0316156108355760405162461bcd60e51b815260040161060a906117ec565b6000600880548060200260200160405190810160405280929190818152602001828054801561088d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161086f575b5050505050905060005b81518110156109735760008282815181106108ae57fe5b6020908102919091018101516001600160a01b038116600081815260099093526040928390206001015492516370a0823160e01b8152919350906370a08231906108fc903090600401611688565b60206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c91906115db565b101561096a5760405162461bcd60e51b815260040161060a90611958565b50600101610897565b50506001600160a01b039081166000818152602081905260408082208054959094168252812093909355808352919055600d80546001600160a01b0319169091179055565b6000806109c483610a18565b80519091506109e55760405162461bcd60e51b815260040161060a90611893565b8060200151610a0e5750506001600160a01b0381166000908152600b602052604090205461076d565b60c0015192915050565b610a206114b8565b506001600160a01b038116600081815260096020908152604091829020825160e081018452815460ff808216151583526101008204811615159483019490945264ffffffffff62010000820416828601526001600160601b03670100000000000000820481166060840152600160981b8204166080830152600160f81b900490921660a08301526001015460c082015290516370a0823160e01b81529091906370a0823190610ad3903090600401611688565b60206040518083038186803b158015610aeb57600080fd5b505afa158015610aff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2391906115db565b60c0820152805161076d5760405162461bcd60e51b815260040161060a90611893565b60006020819052908152604090205481565b60055460ff1615610b7b5760405162461bcd60e51b815260040161060a9061186e565b6005805460ff19166001179055600d546001600160a01b0316610bb05760405162461bcd60e51b815260040161060a9061176a565b610bbb338383610fad565b50506005805460ff1916905550565b600c546001600160a01b031681565b600a5481565b6000610bea82610a18565b606001516001600160601b031692915050565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105675780601f1061053c57610100808354040283529160200191610567565b600d546001600160a01b031681565b600d546000906001600160a01b0316610c925760405162461bcd60e51b815260040161060a9061176a565b610c9d338484610e43565b50600192915050565b60055460ff1615610cc95760405162461bcd60e51b815260040161060a9061186e565b6005805460ff19166001179055600d546001600160a01b0316610cfe5760405162461bcd60e51b815260040161060a9061176a565b806000610d0c338087610fad565b905080518214610d2e5760405162461bcd60e51b815260040161060a906118e4565b60005b82811015610d8657848482818110610d4557fe5b90506020020135828281518110610d5857fe5b60200260200101511015610d7e5760405162461bcd60e51b815260040161060a90611797565b600101610d31565b50506005805460ff1916905550505050565b60606008805480602002602001604051908101604052809291908181526020018280548015610df057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610dd2575b5050505050905090565b60085490565b60075481565b600160209081526000928352604080842090915290825290205481565b600081565b6000610a0e82610a18565b600654600160a01b900460ff1681565b600d546001600160a01b03848116911614801590610e6f5750600d546001600160a01b03838116911614155b610e8b5760405162461bcd60e51b815260040161060a90611740565b6001600160a01b038316600090815260208190526040902054811115610ec35760405162461bcd60e51b815260040161060a906117be565b6001600160a01b038316600090815260208190526040902054610ee69082610f74565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f159082611173565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610f67908590611a78565b60405180910390a3505050565b6000806000610f83858561119f565b915091508015610fa55760405162461bcd60e51b815260040161060a906119b8565b509392505050565b6008546060908067ffffffffffffffff81118015610fca57600080fd5b50604051908082528060200260200182016040528015610ff4578160200160208202803683370190505b50600254909250600061100785836111c4565b90506110138786611263565b60005b838110156111685760006008828154811061102d57fe5b60009182526020822001546040516370a0823160e01b81526001600160a01b03909116925082906370a0823190611068903090600401611688565b60206040518083038186803b15801561108057600080fd5b505afa158015611094573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b891906115db565b905080156111435760006110cc8583611351565b90506110d9838b836113c3565b826001600160a01b03168b6001600160a01b03167fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed8360405161111c9190611a78565b60405180910390a38088858151811061113157fe5b6020026020010181815250505061115e565b600087848151811061115157fe5b6020026020010181815250505b5050600101611016565b505050509392505050565b6000828201838110156111985760405162461bcd60e51b815260040161060a906119e3565b9392505050565b6000808284106111b557505080820360006111bd565b505081810360015b9250929050565b6000816111e35760405162461bcd60e51b815260040161060a90611932565b670de0b6b3a7640000830283158061120b5750670de0b6b3a764000084828161120857fe5b04145b6112275760405162461bcd60e51b815260040161060a90611815565b6002830481018181101561124d5760405162461bcd60e51b815260040161060a90611815565b600084828161125857fe5b049695505050505050565b600081116112835760405162461bcd60e51b815260040161060a90611909565b6001600160a01b0382166000908152602081905260409020548111156112bb5760405162461bcd60e51b815260040161060a906117be565b6001600160a01b0382166000908152602081905260409020546112de9082610f74565b6001600160a01b0383166000908152602081905260409020556002546113049082610f74565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611345908590611a78565b60405180910390a35050565b600082820283158061136b57508284828161136857fe5b04145b6113875760405162461bcd60e51b815260040161060a906118ba565b6706f05b59d3b200008101818110156113b25760405162461bcd60e51b815260040161060a906118ba565b6000670de0b6b3a764000082611258565b600080846001600160a01b031663a9059cbb60e01b85856040516024016113eb92919061169c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611429919061166c565b6000604051808303816000865af19150503d8060008114611466576040519150601f19603f3d011682016040523d82523d6000602084013e61146b565b606091505b509150915081801561149557508051158061149557508080602001905181019061149591906115bb565b6114b15760405162461bcd60e51b815260040161060a9061198f565b5050505050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b80356001600160a01b038116811461076d57600080fd5b60006020828403121561151c578081fd5b611198826114f4565b60008060408385031215611537578081fd5b611540836114f4565b915061154e602084016114f4565b90509250929050565b60008060006060848603121561156b578081fd5b611574846114f4565b9250611582602085016114f4565b9150604084013590509250925092565b600080604083850312156115a4578182fd5b6115ad836114f4565b946020939093013593505050565b6000602082840312156115cc578081fd5b81518015158114611198578182fd5b6000602082840312156115ec578081fd5b5051919050565b600080600060408486031215611607578283fd5b83359250602084013567ffffffffffffffff80821115611625578384fd5b818601915086601f830112611638578384fd5b813581811115611646578485fd5b8760208083028501011115611659578485fd5b6020830194508093505050509250925092565b6000825161167e818460208701611a8f565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156116f65783516001600160a01b0316835292840192918401916001016116d1565b50909695505050505050565b901515815260200190565b600060208252825180602084015261172c816040850160208701611a8f565b601f01601f19169190910160400192915050565b60208082526010908201526f22a9292faaa724afaa2920a729a322a960811b604082015260600190565b60208082526013908201527211549497d393d517d253925512505312569151606a1b604082015260600190565b6020808252600d908201526c11549497d31253525517d3d555609a1b604082015260600190565b60208082526014908201527311549497d25394d551919250d251539517d0905360621b604082015260600190565b6020808252600f908201526e11549497d253925512505312569151608a1b604082015260600190565b60208082526010908201526f11549497d1125597d25395115493905360821b604082015260600190565b60208082526015908201527422a9292fa12a27a5a2a72fa120a22fa1a0a62622a960591b604082015260600190565b6020808252600b908201526a4552525f5245454e54525960a81b604082015260600190565b6020808252600d908201526c11549497d393d517d093d55391609a1b604082015260600190565b60208082526010908201526f4552525f4d554c5f4f564552464c4f5760801b604082015260600190565b6020808252600b908201526a22a9292fa0a9292fa622a760a91b604082015260600190565b6020808252600f908201526e11549497d395531317d05353d55395608a1b604082015260600190565b6020808252600c908201526b4552525f4449565f5a45524f60a01b604082015260600190565b60208082526017908201527f42616c616e636573206e6f74207265696e737461746564000000000000000000604082015260600190565b6020808252600f908201526e4552525f45524332305f46414c534560881b604082015260600190565b6020808252601190820152704552525f5355425f554e444552464c4f5760781b604082015260600190565b60208082526010908201526f4552525f4144445f4f564552464c4f5760801b604082015260600190565b600060e08201905082511515825260208301511515602083015264ffffffffff604084015116604083015260608301516001600160601b038082166060850152806080860151166080850152505060ff60a08401511660a083015260c083015160c083015292915050565b90815260200190565b60ff91909116815260200190565b60005b83811015611aaa578181015183820152602001611a92565b83811115611ab9576000848401525b5050505056fea164736f6c6343000706000a

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

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.