ETH Price: $2,677.51 (-0.67%)

Contract

0xbbcec987E4C189FCbAB0a2534c77b3ba89229F11
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Transaction Hash
Method
Block
From
To
Withdraw208423042024-09-27 13:37:2334 hrs ago1727444243IN
0xbbcec987...a89229F11
0 ETH0.0019456118.6
Withdraw208419682024-09-27 12:29:4735 hrs ago1727440187IN
0xbbcec987...a89229F11
0 ETH0.0013263314.33539736
Withdraw208407152024-09-27 8:18:2339 hrs ago1727425103IN
0xbbcec987...a89229F11
0 ETH0.0013067911.9200314
Withdraw208379012024-09-26 22:53:232 days ago1727391203IN
0xbbcec987...a89229F11
0 ETH0.0026448627.68481734
Withdraw208367472024-09-26 19:00:592 days ago1727377259IN
0xbbcec987...a89229F11
0 ETH0.0020433918.63900168
Withdraw208340902024-09-26 10:07:592 days ago1727345279IN
0xbbcec987...a89229F11
0 ETH0.0014310813.8
Withdraw208340652024-09-26 10:02:592 days ago1727344979IN
0xbbcec987...a89229F11
0 ETH0.0012007614.37560173
Withdraw208305572024-09-25 22:19:113 days ago1727302751IN
0xbbcec987...a89229F11
0 ETH0.0013364312.01
Withdraw208266812024-09-25 9:18:473 days ago1727255927IN
0xbbcec987...a89229F11
0 ETH0.0014520713.0489299
Withdraw208163932024-09-23 22:53:355 days ago1727132015IN
0xbbcec987...a89229F11
0 ETH0.0016990915.07904616
Withdraw208095252024-09-22 23:52:355 days ago1727049155IN
0xbbcec987...a89229F11
0 ETH0.0008167.27880929
Withdraw208080662024-09-22 18:59:236 days ago1727031563IN
0xbbcec987...a89229F11
0 ETH0.0013414614.12323363
Withdraw208066442024-09-22 14:13:596 days ago1727014439IN
0xbbcec987...a89229F11
0 ETH0.000825229.87442549
Withdraw207899742024-09-20 6:20:358 days ago1726813235IN
0xbbcec987...a89229F11
0 ETH0.000943149.36760238
Withdraw207891712024-09-20 3:38:478 days ago1726803527IN
0xbbcec987...a89229F11
0 ETH0.000512455.91952739
Withdraw207708632024-09-17 14:15:3511 days ago1726582535IN
0xbbcec987...a89229F11
0 ETH0.0007088120.97840388
Withdraw207708602024-09-17 14:14:5911 days ago1726582499IN
0xbbcec987...a89229F11
0 ETH0.0022045121.8372401
Withdraw207444722024-09-13 21:47:2315 days ago1726264043IN
0xbbcec987...a89229F11
0 ETH0.000699428.37134505
Withdraw207425902024-09-13 15:28:4715 days ago1726241327IN
0xbbcec987...a89229F11
0 ETH0.000310333.71485245
Withdraw207309542024-09-12 0:28:4716 days ago1726100927IN
0xbbcec987...a89229F11
0 ETH0.000187042.23868345
Withdraw207262062024-09-11 8:33:4717 days ago1726043627IN
0xbbcec987...a89229F11
0 ETH0.000190191.68841743
Withdraw207160262024-09-09 22:25:3519 days ago1725920735IN
0xbbcec987...a89229F11
0 ETH0.00022832.02613488
Withdraw207158752024-09-09 21:55:2319 days ago1725918923IN
0xbbcec987...a89229F11
0 ETH0.000283183.39034155
Withdraw207131472024-09-09 12:47:2319 days ago1725886043IN
0xbbcec987...a89229F11
0 ETH0.000383674.01464469
Withdraw207048622024-09-08 9:01:1120 days ago1725786071IN
0xbbcec987...a89229F11
0 ETH0.000297531.74148218
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:
Pool

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 10 : Pool.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interfaces/IPool.sol";

/**
 * @title AirSwap: Withdrawable Token Pool
 * @notice https://www.airswap.io/
 */
contract Pool is IPool, Ownable2Step {
  using SafeERC20 for IERC20;

  uint256 internal constant MAX_MAX = 100;
  uint256 internal constant MAX_SCALE = 77;

  // Larger the scale, lower the output for a claim
  uint256 public scale;

  // Max percentage for a claim with infinite value
  uint256 public max;

  // Mapping of address to boolean for admin accounts
  mapping(address => bool) public admins;

  // Mapping of tree to account to claim status
  mapping(bytes32 => mapping(address => bool)) public claimed;

  // Mapping of tree to root
  mapping(bytes32 => bytes32) public rootsByTree;

  /**
   * @notice Constructor
   * @param _scale uint256 scale to calculate withdrawal amount
   * @param _max uint256 max to calculate withdrawal amount
   */
  constructor(uint256 _scale, uint256 _max) {
    if (_max > MAX_MAX) revert MaxTooHigh(_max);
    if (_scale > MAX_SCALE) revert ScaleTooHigh(_scale);
    max = _max;
    scale = _scale;
  }

  /**
   * @dev Revert if called by non admin account
   */
  modifier multiAdmin() {
    if (!admins[msg.sender]) revert Unauthorized();
    _;
  }

  /**
   * @notice Transfer out token balances for migrations
   * @param _tokens address[] token balances to transfer
   * @param _dest address destination
   * @dev Only owner
   */
  function drainTo(
    address[] calldata _tokens,
    address _dest
  ) external override onlyOwner {
    for (uint256 i = 0; i < _tokens.length; i++) {
      uint256 _bal = IERC20(_tokens[i]).balanceOf(address(this));
      IERC20(_tokens[i]).safeTransfer(_dest, _bal);
    }
    emit DrainTo(_tokens, _dest);
  }

  /**
   * @notice Set withdrawal scale
   * @param _scale uint256 scale to calculate withdrawal amount
   * @dev Only owner
   */
  function setScale(uint256 _scale) external override onlyOwner {
    if (_scale > MAX_SCALE) revert ScaleTooHigh(_scale);
    scale = _scale;
    emit SetScale(scale);
  }

  /**
   * @notice Set withdrawal max
   * @param _max uint256 max to calculate withdrawal amount
   * @dev Only owner
   */
  function setMax(uint256 _max) external override onlyOwner {
    if (_max > MAX_MAX) revert MaxTooHigh(_max);
    max = _max;
    emit SetMax(max);
  }

  /**
   * @notice Set an admin
   * @param _admin address to set as admin
   * @dev Only owner
   */
  function setAdmin(address _admin) external override onlyOwner {
    if (_admin == address(0)) revert AddressInvalid(_admin);
    admins[_admin] = true;
    emit SetAdmin(_admin);
  }

  /**
   * @notice Unset an admin
   * @param _admin address to unset as admin
   * @dev Only owner
   */
  function unsetAdmin(address _admin) external override onlyOwner {
    if (admins[_admin] != true) revert AdminNotSet(_admin);
    admins[_admin] = false;
    emit UnsetAdmin(_admin);
  }

  /**
   * @notice Enable claims for a merkle tree
   * @param _tree bytes32 a tree identifier
   * @param _root bytes32 a tree root
   */
  function enable(bytes32 _tree, bytes32 _root) external override multiAdmin {
    rootsByTree[_tree] = _root;
    emit Enable(_tree, _root);
  }

  /**
   * @notice Set previous claims for migrations
   * @param _tree bytes32
   * @param _root bytes32
   * @param _accounts address[]
   * @dev Only owner
   */
  function enableAndSetClaimed(
    bytes32 _tree,
    bytes32 _root,
    address[] memory _accounts
  ) external override multiAdmin {
    // Enable the tree if not yet enabled
    if (rootsByTree[_tree] == 0) {
      rootsByTree[_tree] = _root;
      emit Enable(_tree, _root);
    }
    // Iterate and set as claimed if not yet claimed
    for (uint256 i = 0; i < _accounts.length; i++) {
      if (claimed[_tree][_accounts[i]] == false) {
        claimed[_tree][_accounts[i]] = true;
        emit UseClaim(_accounts[i], _tree);
      }
    }
  }

  /**
   * @notice Withdraw tokens using claims
   * @param _claims Claim[] a set of claims
   * @param _token address of a token to withdraw
   * @param _minimum uint256 minimum expected amount
   * @param _recipient address to receive withdrawal
   */
  function withdraw(
    Claim[] memory _claims,
    address _token,
    uint256 _minimum,
    address _recipient
  ) public override returns (uint256 _amount) {
    if (_claims.length <= 0) revert ClaimsNotProvided();

    Claim memory _claim;
    bytes32 _root;
    uint256 _totalValue = 0;

    // Iterate through claims to determine total value
    for (uint256 i = 0; i < _claims.length; i++) {
      _claim = _claims[i];
      _root = rootsByTree[_claim.tree];

      if (_root == 0) revert TreeNotEnabled(_claim.tree);
      if (claimed[_claim.tree][msg.sender]) revert ClaimAlreadyUsed();
      if (!verify(msg.sender, _root, _claim.value, _claim.proof))
        revert ProofInvalid(_claim.tree, _root);

      _totalValue = _totalValue + _claim.value;
      claimed[_claim.tree][msg.sender] = true;
      emit UseClaim(msg.sender, _claim.tree);
    }

    // Determine withdrawable amount given total value
    _amount = calculate(_totalValue, _token);
    if (_amount < _minimum) revert AmountInsufficient(_amount);

    // Transfer withdrawable amount to recipient
    IERC20(_token).safeTransfer(_recipient, _amount);
    emit Withdraw(msg.sender, _recipient, _token, _totalValue, _amount);
  }

  /**
   * @notice Calculate amount for a value and token
   * @param _value uint256 claim value
   * @param _token address claim token
   * @return uint256 amount withdrawable
   */
  function calculate(
    uint256 _value,
    address _token
  ) public view override returns (uint256) {
    uint256 _balance = IERC20(_token).balanceOf(address(this));
    uint256 _divisor = (uint256(10) ** scale) + _value;
    return (max * _value * _balance) / _divisor / MAX_MAX;
  }

  /**
   * @notice Verify a merkle proof
   * @param _claimant address of the claimant
   * @param _root bytes32 merkle root
   * @param _value uint256 merkle value
   * @param _proof bytes32[] merkle proof
   * @return bool whether verified
   */
  function verify(
    address _claimant,
    bytes32 _root,
    uint256 _value,
    bytes32[] memory _proof
  ) public pure override returns (bool) {
    bytes32 _leaf = keccak256(abi.encodePacked(_claimant, _value));
    return MerkleProof.verify(_proof, _root, _leaf);
  }

  /**
   * @notice Get claim status for an account and set of trees
   * @param _account address to check
   * @param _trees bytes32[] an array of tree identifiers
   * @return statuses bool[] an array of claim statuses
   */
  function getStatus(
    address _account,
    bytes32[] calldata _trees
  ) external view returns (bool[] memory) {
    bool[] memory statuses = new bool[](_trees.length);
    for (uint256 i = 0; i < _trees.length; i++) {
      statuses[i] = claimed[_trees[i]][_account];
    }
    return statuses;
  }
}

File 2 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 10 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.0;

import "./Ownable.sol";

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

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

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

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

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

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

File 4 of 10 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 5 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 6 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 7 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 10 : 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 9 of 10 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.17;

interface IPool {
  struct Claim {
    bytes32 tree;
    uint256 value;
    bytes32[] proof;
  }

  event DrainTo(address[] tokens, address dest);
  event Enable(bytes32 tree, bytes32 root);
  event SetAdmin(address indexed admin);
  event SetMax(uint256 max);
  event SetScale(uint256 scale);
  event UnsetAdmin(address indexed admin);

  event UseClaim(address indexed account, bytes32 indexed tree);
  event Withdraw(
    address indexed account,
    address indexed recipient,
    address indexed token,
    uint256 value,
    uint256 amount
  );

  error AddressInvalid(address);
  error AdminNotSet(address);
  error AmountInsufficient(uint256);
  error ClaimAlreadyUsed();
  error ClaimsNotProvided();
  error MaxTooHigh(uint256);
  error ProofInvalid(bytes32, bytes32);
  error TreeNotEnabled(bytes32);
  error ScaleTooHigh(uint256);
  error Unauthorized();

  function drainTo(address[] calldata tokens, address dest) external;

  function setScale(uint256 _scale) external;

  function setMax(uint256 _max) external;

  function setAdmin(address _admin) external;

  function unsetAdmin(address _admin) external;

  function enable(bytes32 _tree, bytes32 _root) external;

  function enableAndSetClaimed(
    bytes32 _tree,
    bytes32 _root,
    address[] memory _accounts
  ) external;

  function withdraw(
    Claim[] memory claims,
    address token,
    uint256 minimum,
    address recipient
  ) external returns (uint256 amount);

  function calculate(
    uint256 score,
    address token
  ) external view returns (uint256 amount);

  function verify(
    address participant,
    bytes32 root,
    uint256 score,
    bytes32[] memory proof
  ) external pure returns (bool valid);

  function getStatus(
    address _account,
    bytes32[] calldata _trees
  ) external returns (bool[] memory statuses);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_scale","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"AddressInvalid","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"AdminNotSet","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"AmountInsufficient","type":"error"},{"inputs":[],"name":"ClaimAlreadyUsed","type":"error"},{"inputs":[],"name":"ClaimsNotProvided","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"MaxTooHigh","type":"error"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"ProofInvalid","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ScaleTooHigh","type":"error"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"TreeNotEnabled","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"},{"indexed":false,"internalType":"address","name":"dest","type":"address"}],"name":"DrainTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"tree","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"Enable","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"}],"name":"SetAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"max","type":"uint256"}],"name":"SetMax","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"scale","type":"uint256"}],"name":"SetScale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"}],"name":"UnsetAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"bytes32","name":"tree","type":"bytes32"}],"name":"UseClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"admins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"calculate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"address","name":"_dest","type":"address"}],"name":"drainTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tree","type":"bytes32"},{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"enable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tree","type":"bytes32"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"address[]","name":"_accounts","type":"address[]"}],"name":"enableAndSetClaimed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bytes32[]","name":"_trees","type":"bytes32[]"}],"name":"getStatus","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"rootsByTree","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_scale","type":"uint256"}],"name":"setScale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"unsetAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_claimant","type":"address"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"tree","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"internalType":"struct IPool.Claim[]","name":"_claims","type":"tuple[]"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_minimum","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200205c3803806200205c833981016040819052620000349162000117565b6200003f336200009d565b60648111156200006a5760405163b200946f60e01b8152600481018290526024015b60405180910390fd5b604d821115620000915760405163321a710f60e21b81526004810183905260240162000061565b6003556002556200013c565b600180546001600160a01b0319169055620000c481620000c7602090811b6200113817901c565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156200012b57600080fd5b505080516020909101519092909150565b611f10806200014c6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80636ac5db19116100d8578063b09013a21161008c578063e30c397811610066578063e30c397814610348578063f2fde38b14610366578063f51e181a1461037957600080fd5b8063b09013a2146102f4578063b86675e014610307578063dfcae6221461031a57600080fd5b8063715018a6116100bd578063715018a6146102a557806379ba5097146102ad5780638da5cb5b146102b557600080fd5b80636ac5db1914610289578063704b6c021461029257600080fd5b806341aa0b371161012f5780634d253b50116101145780634d253b50146102355780635a1187b7146102485780635a1d249d1461027657600080fd5b806341aa0b37146101ff578063429b62e51461021257600080fd5b8063249da60511610160578063249da605146101a45780633a1c1a6f146101cc5780633edc3519146101ec57600080fd5b80631fc48d281461017c5780631fe9eabc14610191575b600080fd5b61018f61018a366004611606565b610382565b005b61018f61019f366004611628565b61041a565b6101b76101b23660046117a0565b6104a1565b60405190151581526020015b60405180910390f35b6101df6101da36600461184d565b61050e565b6040516101c391906118a0565b61018f6101fa366004611628565b610615565b61018f61020d3660046118e6565b610690565b6101b7610220366004611993565b60046020526000908152604090205460ff1681565b61018f610243366004611993565b6108a0565b610268610256366004611628565b60066020526000908152604090205481565b6040519081526020016101c3565b6102686102843660046119ae565b610998565b61026860035481565b61018f6102a0366004611993565b610a86565b61018f610b6a565b61018f610b7e565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c3565b61018f6103023660046119da565b610c33565b610268610315366004611a2e565b610d9e565b6101b76103283660046119ae565b600560209081526000928352604080842090915290825290205460ff1681565b60015473ffffffffffffffffffffffffffffffffffffffff166102cf565b61018f610374366004611993565b611088565b61026860025481565b3360009081526004602052604090205460ff166103cb576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602090815260409182902083905581518481529081018390527fd4ec60c08440ea870fccde76e064d496b2ba9fe0cb488d7788ab666d53ef7e8a910160405180910390a15050565b6104226111ad565b6064811115610465576040517fb200946f000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b60038190556040518181527fc2c862cda8964d16d060904e01f55bf7e4ea5e59759ca1c20db551079e0d5eed906020015b60405180910390a150565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602082015260348101839052600090819060540160405160208183030381529060405280519060200120905061050283868361122e565b9150505b949350505050565b606060008267ffffffffffffffff81111561052b5761052b61166a565b604051908082528060200260200182016040528015610554578160200160208202803683370190505b50905060005b8381101561060c576005600086868481811061057857610578611b6f565b90506020020135815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168282815181106105ea576105ea611b6f565b911515602092830291909101909101528061060481611bcd565b91505061055a565b50949350505050565b61061d6111ad565b604d81111561065b576040517fc869c43c0000000000000000000000000000000000000000000000000000000081526004810182905260240161045c565b60028190556040518181527fb7f1dd786998967316283c7e129a0bbeaf046b77f2f51afe39bb89a10f29a00e90602001610496565b3360009081526004602052604090205460ff166106d9576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260066020526040812054900361073a5760008381526006602090815260409182902084905581518581529081018490527fd4ec60c08440ea870fccde76e064d496b2ba9fe0cb488d7788ab666d53ef7e8a910160405180910390a15b60005b815181101561089a5760056000858152602001908152602001600020600083838151811061076d5761076d611b6f565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160009081205460ff16151590036108885760008481526005602052604081208351600192908590859081106107d1576107d1611b6f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508382828151811061083d5761083d611b6f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167fb3cf16e0e9fea81a7e797f97fe0fecaae4731866107df01f9916b83a7ff062b260405160405180910390a35b8061089281611bcd565b91505061073d565b50505050565b6108a86111ad565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604090205460ff161515600114610924576040517f4dc6d0ac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff811660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f529cb60a080fcfbcdedc90ee02044792419af59c6a6b701dafc80aa9be2747c79190a250565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b9190611c05565b9050600084600254600a610a3f9190611d3e565b610a499190611d4a565b90506064818387600354610a5d9190611d5d565b610a679190611d5d565b610a719190611d74565b610a7b9190611d74565b925050505b92915050565b610a8e6111ad565b73ffffffffffffffffffffffffffffffffffffffff8116610af3576040517f8641435100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff811660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f5a272403b402d892977df56625f4164ccaf70ca3863991c43ecfe76a6905b0a19190a250565b610b726111ad565b610b7c6000611244565b565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e65720000000000000000000000000000000000000000000000606482015260840161045c565b610c3081611244565b50565b610c3b6111ad565b60005b82811015610d5d576000848483818110610c5a57610c5a611b6f565b9050602002016020810190610c6f9190611993565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015610cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cff9190611c05565b9050610d4a8382878786818110610d1857610d18611b6f565b9050602002016020810190610d2d9190611993565b73ffffffffffffffffffffffffffffffffffffffff169190611275565b5080610d5581611bcd565b915050610c3e565b507f4b713dd63c7c270b811762a754d42e5d79ea1ba9d3a0899d73eab3e38b50cd6f838383604051610d9193929190611daf565b60405180910390a1505050565b600080855111610dda576040517f872e34a500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160608082018352600080835260208301819052928201529080805b8851811015610fba57888181518110610e1457610e14611b6f565b602002602001015193506006600085600001518152602001908152602001600020549250826000801b03610e7a5783516040517f5b0c2226000000000000000000000000000000000000000000000000000000008152600481019190915260240161045c565b8351600090815260056020908152604080832033845290915290205460ff1615610ed0576040517fead7077b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee43384866020015187604001516104a1565b610f275783516040517f0397af8f00000000000000000000000000000000000000000000000000000000815260048101919091526024810184905260440161045c565b6020840151610f369083611d4a565b8451600090815260056020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055875190519395509290917fb3cf16e0e9fea81a7e797f97fe0fecaae4731866107df01f9916b83a7ff062b291a380610fb281611bcd565b915050610df9565b50610fc58188610998565b935085841015611004576040517fdc998f2b0000000000000000000000000000000000000000000000000000000081526004810185905260240161045c565b61102573ffffffffffffffffffffffffffffffffffffffff88168686611275565b604080518281526020810186905273ffffffffffffffffffffffffffffffffffffffff808a16929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4505050949350505050565b6110906111ad565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556110f360005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b60008261123b8584611307565b14949350505050565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610c3081611138565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611302908490611354565b505050565b600081815b845181101561134c576113388286838151811061132b5761132b611b6f565b6020026020010151611463565b91508061134481611bcd565b91505061130c565b509392505050565b60006113b6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114959092919063ffffffff16565b90508051600014806113d75750808060200190518101906113d79190611e27565b611302576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161045c565b600081831061147f57600082815260208490526040902061148e565b60008381526020839052604090205b9392505050565b60606105068484600085856000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114c99190611e6d565b60006040518083038185875af1925050503d8060008114611506576040519150601f19603f3d011682016040523d82523d6000602084013e61150b565b606091505b509150915061151c87838387611527565b979650505050505050565b606083156115bd5782516000036115b65773ffffffffffffffffffffffffffffffffffffffff85163b6115b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161045c565b5081610506565b61050683838151156115d25781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045c9190611e89565b6000806040838503121561161957600080fd5b50508035926020909101359150565b60006020828403121561163a57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461166557600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156116bc576116bc61166a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117095761170961166a565b604052919050565b600067ffffffffffffffff82111561172b5761172b61166a565b5060051b60200190565b600082601f83011261174657600080fd5b8135602061175b61175683611711565b6116c2565b82815260059290921b8401810191818101908684111561177a57600080fd5b8286015b84811015611795578035835291830191830161177e565b509695505050505050565b600080600080608085870312156117b657600080fd5b6117bf85611641565b93506020850135925060408501359150606085013567ffffffffffffffff8111156117e957600080fd5b6117f587828801611735565b91505092959194509250565b60008083601f84011261181357600080fd5b50813567ffffffffffffffff81111561182b57600080fd5b6020830191508360208260051b850101111561184657600080fd5b9250929050565b60008060006040848603121561186257600080fd5b61186b84611641565b9250602084013567ffffffffffffffff81111561188757600080fd5b61189386828701611801565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b818110156118da5783511515835292840192918401916001016118bc565b50909695505050505050565b6000806000606084860312156118fb57600080fd5b833592506020808501359250604085013567ffffffffffffffff81111561192157600080fd5b8501601f8101871361193257600080fd5b803561194061175682611711565b81815260059190911b8201830190838101908983111561195f57600080fd5b928401925b828410156119845761197584611641565b82529284019290840190611964565b80955050505050509250925092565b6000602082840312156119a557600080fd5b61148e82611641565b600080604083850312156119c157600080fd5b823591506119d160208401611641565b90509250929050565b6000806000604084860312156119ef57600080fd5b833567ffffffffffffffff811115611a0657600080fd5b611a1286828701611801565b9094509250611a25905060208501611641565b90509250925092565b60008060008060808587031215611a4457600080fd5b67ffffffffffffffff8086351115611a5b57600080fd5b8535860187601f820112611a6e57600080fd5b611a7b6117568235611711565b81358082526020808301929160051b8401018a811115611a9a57600080fd5b602084015b81811015611b3a578581351115611ab557600080fd5b8035850160607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828f03011215611aeb57600080fd5b611af3611699565b6020820135815260408201356020820152606082013588811115611b1657600080fd5b611b258f602083860101611735565b60408301525085525060209384019301611a9f565b505080975050505050611b4f60208601611641565b925060408501359150611b6460608601611641565b905092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611bfe57611bfe611b9e565b5060010190565b600060208284031215611c1757600080fd5b5051919050565b600181815b80851115611c7757817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611c5d57611c5d611b9e565b80851615611c6a57918102915b93841c9390800290611c23565b509250929050565b600082611c8e57506001610a80565b81611c9b57506000610a80565b8160018114611cb15760028114611cbb57611cd7565b6001915050610a80565b60ff841115611ccc57611ccc611b9e565b50506001821b610a80565b5060208310610133831016604e8410600b8410161715611cfa575081810a610a80565b611d048383611c1e565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611d3657611d36611b9e565b029392505050565b600061148e8383611c7f565b80820180821115610a8057610a80611b9e565b8082028115828204841417610a8057610a80611b9e565b600082611daa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6040808252810183905260008460608301825b86811015611dfd5773ffffffffffffffffffffffffffffffffffffffff611de884611641565b16825260209283019290910190600101611dc2565b50809250505073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b600060208284031215611e3957600080fd5b8151801515811461148e57600080fd5b60005b83811015611e64578181015183820152602001611e4c565b50506000910152565b60008251611e7f818460208701611e49565b9190910192915050565b6020815260008251806020840152611ea8816040850160208701611e49565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220c31e896a4a93739443acc6c7ea49c6622e7fcc42bf1f06b9f3123714944b8d3d64736f6c63430008110033000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000064

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101775760003560e01c80636ac5db19116100d8578063b09013a21161008c578063e30c397811610066578063e30c397814610348578063f2fde38b14610366578063f51e181a1461037957600080fd5b8063b09013a2146102f4578063b86675e014610307578063dfcae6221461031a57600080fd5b8063715018a6116100bd578063715018a6146102a557806379ba5097146102ad5780638da5cb5b146102b557600080fd5b80636ac5db1914610289578063704b6c021461029257600080fd5b806341aa0b371161012f5780634d253b50116101145780634d253b50146102355780635a1187b7146102485780635a1d249d1461027657600080fd5b806341aa0b37146101ff578063429b62e51461021257600080fd5b8063249da60511610160578063249da605146101a45780633a1c1a6f146101cc5780633edc3519146101ec57600080fd5b80631fc48d281461017c5780631fe9eabc14610191575b600080fd5b61018f61018a366004611606565b610382565b005b61018f61019f366004611628565b61041a565b6101b76101b23660046117a0565b6104a1565b60405190151581526020015b60405180910390f35b6101df6101da36600461184d565b61050e565b6040516101c391906118a0565b61018f6101fa366004611628565b610615565b61018f61020d3660046118e6565b610690565b6101b7610220366004611993565b60046020526000908152604090205460ff1681565b61018f610243366004611993565b6108a0565b610268610256366004611628565b60066020526000908152604090205481565b6040519081526020016101c3565b6102686102843660046119ae565b610998565b61026860035481565b61018f6102a0366004611993565b610a86565b61018f610b6a565b61018f610b7e565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101c3565b61018f6103023660046119da565b610c33565b610268610315366004611a2e565b610d9e565b6101b76103283660046119ae565b600560209081526000928352604080842090915290825290205460ff1681565b60015473ffffffffffffffffffffffffffffffffffffffff166102cf565b61018f610374366004611993565b611088565b61026860025481565b3360009081526004602052604090205460ff166103cb576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602090815260409182902083905581518481529081018390527fd4ec60c08440ea870fccde76e064d496b2ba9fe0cb488d7788ab666d53ef7e8a910160405180910390a15050565b6104226111ad565b6064811115610465576040517fb200946f000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b60038190556040518181527fc2c862cda8964d16d060904e01f55bf7e4ea5e59759ca1c20db551079e0d5eed906020015b60405180910390a150565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602082015260348101839052600090819060540160405160208183030381529060405280519060200120905061050283868361122e565b9150505b949350505050565b606060008267ffffffffffffffff81111561052b5761052b61166a565b604051908082528060200260200182016040528015610554578160200160208202803683370190505b50905060005b8381101561060c576005600086868481811061057857610578611b6f565b90506020020135815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168282815181106105ea576105ea611b6f565b911515602092830291909101909101528061060481611bcd565b91505061055a565b50949350505050565b61061d6111ad565b604d81111561065b576040517fc869c43c0000000000000000000000000000000000000000000000000000000081526004810182905260240161045c565b60028190556040518181527fb7f1dd786998967316283c7e129a0bbeaf046b77f2f51afe39bb89a10f29a00e90602001610496565b3360009081526004602052604090205460ff166106d9576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260066020526040812054900361073a5760008381526006602090815260409182902084905581518581529081018490527fd4ec60c08440ea870fccde76e064d496b2ba9fe0cb488d7788ab666d53ef7e8a910160405180910390a15b60005b815181101561089a5760056000858152602001908152602001600020600083838151811061076d5761076d611b6f565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160009081205460ff16151590036108885760008481526005602052604081208351600192908590859081106107d1576107d1611b6f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508382828151811061083d5761083d611b6f565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167fb3cf16e0e9fea81a7e797f97fe0fecaae4731866107df01f9916b83a7ff062b260405160405180910390a35b8061089281611bcd565b91505061073d565b50505050565b6108a86111ad565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604090205460ff161515600114610924576040517f4dc6d0ac00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff811660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f529cb60a080fcfbcdedc90ee02044792419af59c6a6b701dafc80aa9be2747c79190a250565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b9190611c05565b9050600084600254600a610a3f9190611d3e565b610a499190611d4a565b90506064818387600354610a5d9190611d5d565b610a679190611d5d565b610a719190611d74565b610a7b9190611d74565b925050505b92915050565b610a8e6111ad565b73ffffffffffffffffffffffffffffffffffffffff8116610af3576040517f8641435100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff811660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f5a272403b402d892977df56625f4164ccaf70ca3863991c43ecfe76a6905b0a19190a250565b610b726111ad565b610b7c6000611244565b565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e65720000000000000000000000000000000000000000000000606482015260840161045c565b610c3081611244565b50565b610c3b6111ad565b60005b82811015610d5d576000848483818110610c5a57610c5a611b6f565b9050602002016020810190610c6f9190611993565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa158015610cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cff9190611c05565b9050610d4a8382878786818110610d1857610d18611b6f565b9050602002016020810190610d2d9190611993565b73ffffffffffffffffffffffffffffffffffffffff169190611275565b5080610d5581611bcd565b915050610c3e565b507f4b713dd63c7c270b811762a754d42e5d79ea1ba9d3a0899d73eab3e38b50cd6f838383604051610d9193929190611daf565b60405180910390a1505050565b600080855111610dda576040517f872e34a500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160608082018352600080835260208301819052928201529080805b8851811015610fba57888181518110610e1457610e14611b6f565b602002602001015193506006600085600001518152602001908152602001600020549250826000801b03610e7a5783516040517f5b0c2226000000000000000000000000000000000000000000000000000000008152600481019190915260240161045c565b8351600090815260056020908152604080832033845290915290205460ff1615610ed0576040517fead7077b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ee43384866020015187604001516104a1565b610f275783516040517f0397af8f00000000000000000000000000000000000000000000000000000000815260048101919091526024810184905260440161045c565b6020840151610f369083611d4a565b8451600090815260056020908152604080832033808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055875190519395509290917fb3cf16e0e9fea81a7e797f97fe0fecaae4731866107df01f9916b83a7ff062b291a380610fb281611bcd565b915050610df9565b50610fc58188610998565b935085841015611004576040517fdc998f2b0000000000000000000000000000000000000000000000000000000081526004810185905260240161045c565b61102573ffffffffffffffffffffffffffffffffffffffff88168686611275565b604080518281526020810186905273ffffffffffffffffffffffffffffffffffffffff808a16929088169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a4505050949350505050565b6110906111ad565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556110f360005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161045c565b60008261123b8584611307565b14949350505050565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610c3081611138565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611302908490611354565b505050565b600081815b845181101561134c576113388286838151811061132b5761132b611b6f565b6020026020010151611463565b91508061134481611bcd565b91505061130c565b509392505050565b60006113b6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166114959092919063ffffffff16565b90508051600014806113d75750808060200190518101906113d79190611e27565b611302576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161045c565b600081831061147f57600082815260208490526040902061148e565b60008381526020839052604090205b9392505050565b60606105068484600085856000808673ffffffffffffffffffffffffffffffffffffffff1685876040516114c99190611e6d565b60006040518083038185875af1925050503d8060008114611506576040519150601f19603f3d011682016040523d82523d6000602084013e61150b565b606091505b509150915061151c87838387611527565b979650505050505050565b606083156115bd5782516000036115b65773ffffffffffffffffffffffffffffffffffffffff85163b6115b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161045c565b5081610506565b61050683838151156115d25781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045c9190611e89565b6000806040838503121561161957600080fd5b50508035926020909101359150565b60006020828403121561163a57600080fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461166557600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156116bc576116bc61166a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117095761170961166a565b604052919050565b600067ffffffffffffffff82111561172b5761172b61166a565b5060051b60200190565b600082601f83011261174657600080fd5b8135602061175b61175683611711565b6116c2565b82815260059290921b8401810191818101908684111561177a57600080fd5b8286015b84811015611795578035835291830191830161177e565b509695505050505050565b600080600080608085870312156117b657600080fd5b6117bf85611641565b93506020850135925060408501359150606085013567ffffffffffffffff8111156117e957600080fd5b6117f587828801611735565b91505092959194509250565b60008083601f84011261181357600080fd5b50813567ffffffffffffffff81111561182b57600080fd5b6020830191508360208260051b850101111561184657600080fd5b9250929050565b60008060006040848603121561186257600080fd5b61186b84611641565b9250602084013567ffffffffffffffff81111561188757600080fd5b61189386828701611801565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b818110156118da5783511515835292840192918401916001016118bc565b50909695505050505050565b6000806000606084860312156118fb57600080fd5b833592506020808501359250604085013567ffffffffffffffff81111561192157600080fd5b8501601f8101871361193257600080fd5b803561194061175682611711565b81815260059190911b8201830190838101908983111561195f57600080fd5b928401925b828410156119845761197584611641565b82529284019290840190611964565b80955050505050509250925092565b6000602082840312156119a557600080fd5b61148e82611641565b600080604083850312156119c157600080fd5b823591506119d160208401611641565b90509250929050565b6000806000604084860312156119ef57600080fd5b833567ffffffffffffffff811115611a0657600080fd5b611a1286828701611801565b9094509250611a25905060208501611641565b90509250925092565b60008060008060808587031215611a4457600080fd5b67ffffffffffffffff8086351115611a5b57600080fd5b8535860187601f820112611a6e57600080fd5b611a7b6117568235611711565b81358082526020808301929160051b8401018a811115611a9a57600080fd5b602084015b81811015611b3a578581351115611ab557600080fd5b8035850160607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0828f03011215611aeb57600080fd5b611af3611699565b6020820135815260408201356020820152606082013588811115611b1657600080fd5b611b258f602083860101611735565b60408301525085525060209384019301611a9f565b505080975050505050611b4f60208601611641565b925060408501359150611b6460608601611641565b905092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611bfe57611bfe611b9e565b5060010190565b600060208284031215611c1757600080fd5b5051919050565b600181815b80851115611c7757817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611c5d57611c5d611b9e565b80851615611c6a57918102915b93841c9390800290611c23565b509250929050565b600082611c8e57506001610a80565b81611c9b57506000610a80565b8160018114611cb15760028114611cbb57611cd7565b6001915050610a80565b60ff841115611ccc57611ccc611b9e565b50506001821b610a80565b5060208310610133831016604e8410600b8410161715611cfa575081810a610a80565b611d048383611c1e565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611d3657611d36611b9e565b029392505050565b600061148e8383611c7f565b80820180821115610a8057610a80611b9e565b8082028115828204841417610a8057610a80611b9e565b600082611daa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6040808252810183905260008460608301825b86811015611dfd5773ffffffffffffffffffffffffffffffffffffffff611de884611641565b16825260209283019290910190600101611dc2565b50809250505073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b600060208284031215611e3957600080fd5b8151801515811461148e57600080fd5b60005b83811015611e64578181015183820152602001611e4c565b50506000910152565b60008251611e7f818460208701611e49565b9190910192915050565b6020815260008251806020840152611ea8816040850160208701611e49565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220c31e896a4a93739443acc6c7ea49c6622e7fcc42bf1f06b9f3123714944b8d3d64736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : _scale (uint256): 10
Arg [1] : _max (uint256): 100

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000064


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
Chain Token Portfolio % Price Amount Value
ETH5.15%$2,677.510.5343$1,430.58
ETH4.86%$163.68.2592$1,351.21
ETH4.79%$11,330.9018$1,332.23
ETH4.71%$0.4228093,097.042$1,309.46
ETH4.68%$11,299.7521$1,299.75
ETH4.28%$0.000011106,392,110.5469$1,190.53
ETH4.22%$1.59737.5796$1,172.75
ETH3.98%$4.7235.4402$1,106.57
ETH3.97%$0.6730451,640.682$1,104.25
ETH3.88%$11,079.5072$1,079.51
ETH3.78%$0.0000253,595,161.0321$1,051
ETH3.44%$65,5510.0146$957.33
ETH3.29%$12.8970.8416$913.15
ETH3.00%$0.2569573,240.9619$832.79
ETH2.99%$6.51127.764$831.74
ETH2.47%$0.995934689.2061$686.4
ETH2.41%$2,673.390.2507$670.34
ETH2.10%$0.1860413,138.7747$583.94
ETH1.92%$1.77301.7763$534.14
ETH1.85%$0.3059021,684.5881$515.32
ETH1.75%$7.5764.4227$487.68
ETH1.71%$3.57133.2419$475.14
ETH1.65%$0.904519506.1877$457.86
ETH1.64%$0.02404218,980.1693$456.31
ETH1.64%$0.999515455.8537$455.63
ETH1.36%$0.2354861,600.0796$376.8
ETH1.25%$0.817732426.0309$348.38
ETH1.22%$1.05324.2395$339.8
ETH1.21%$0.2910411,153.1127$335.6
ETH1.17%$1.33245.0821$325.96
ETH1.17%$0.0328569,866.6008$324.18
ETH1.08%$2150.51$301.02
ETH1.08%$1,685.220.1774$298.9
ETH1.04%$2.65108.7043$288.07
ETH0.83%$1230.075$230.31
ETH0.61%$5.7229.7782$170.33
ETH0.50%$0.326474421.9728$137.76
ETH0.46%$11.3811.3423$129.08
ETH0.29%$0.301217267.7796$80.66
ETH<0.01%<$0.0000015,933,837.6072$0.3965
BSC0.61%$0.1281381,314.6683$168.46
BSC0.57%$4.7933.1276$158.83
BSC0.54%$2,673.450.0563$150.58
BSC0.52%$0.398496363.4484$144.83
BSC0.52%$0.99995144.2715$144.26
BSC0.51%$1142.6561$142.66
BSC0.50%$1139.7175$139.88
BSC0.48%$600.420.2241$134.58
BSC0.48%$29.24.607$134.53
BSC<0.01%$0.6135490.9931$0.6093
BSC<0.01%$0.1004122$0.2008
LINEA0.86%$1240.1904$240.19
LINEA0.32%$2,6740.0333$88.98
LINEA0.08%$122.237$22.24
LINEA0.02%$3,152.180.00165569$5.22
LINEA<0.01%$11.0085$1.01
LINEA<0.01%$0.9998670.3231$0.323
LINEA<0.01%$65,5080.00000231$0.1513
AVAX0.08%$123.191$23.19
AVAX0.07%$0.99988519.1954$19.19
AVAX0.07%$0.99988518.6302$18.63
AVAX0.04%$29.250.3958$11.58
POL0.06%$0.99980316.7998$16.8
POL0.05%$114.6908$14.69
POL0.05%$0.99997414.3385$14.34
POL0.05%$0.42289633.2562$14.06
POL0.04%$0.99997411.7721$11.77
ARB<0.01%$2,675.370.00004075$0.109
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.