Latest 25 from a total of 1,894 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 24471191 | 11 days ago | IN | 0 ETH | 0.00021032 | ||||
| Withdraw | 24471172 | 11 days ago | IN | 0 ETH | 0.00086509 | ||||
| Withdraw | 24471011 | 11 days ago | IN | 0 ETH | 0.00023058 | ||||
| Withdraw | 24447904 | 14 days ago | IN | 0 ETH | 0.00023399 | ||||
| Withdraw | 24447901 | 14 days ago | IN | 0 ETH | 0.00023205 | ||||
| Withdraw | 24447899 | 14 days ago | IN | 0 ETH | 0.00024158 | ||||
| Withdraw | 24426413 | 17 days ago | IN | 0 ETH | 0.00002997 | ||||
| Withdraw | 24418025 | 18 days ago | IN | 0 ETH | 0.00000609 | ||||
| Withdraw | 24417892 | 18 days ago | IN | 0 ETH | 0.0002121 | ||||
| Withdraw | 24416381 | 18 days ago | IN | 0 ETH | 0.00024662 | ||||
| Withdraw | 24414569 | 19 days ago | IN | 0 ETH | 0.00019433 | ||||
| Enable | 24413501 | 19 days ago | IN | 0 ETH | 0.00000317 | ||||
| Withdraw | 24376033 | 24 days ago | IN | 0 ETH | 0.00001264 | ||||
| Withdraw | 24373881 | 24 days ago | IN | 0 ETH | 0.00024174 | ||||
| Withdraw | 24373878 | 24 days ago | IN | 0 ETH | 0.00024433 | ||||
| Withdraw | 24360652 | 26 days ago | IN | 0 ETH | 0.00022824 | ||||
| Withdraw | 24294805 | 35 days ago | IN | 0 ETH | 0.00020538 | ||||
| Withdraw | 24278216 | 38 days ago | IN | 0 ETH | 0.00061116 | ||||
| Withdraw | 24199916 | 49 days ago | IN | 0 ETH | 0.0001932 | ||||
| Withdraw | 24185004 | 51 days ago | IN | 0 ETH | 0.00000729 | ||||
| Withdraw | 24184870 | 51 days ago | IN | 0 ETH | 0.00003332 | ||||
| Withdraw | 24184786 | 51 days ago | IN | 0 ETH | 0.0000197 | ||||
| Withdraw | 24183153 | 51 days ago | IN | 0 ETH | 0.00001032 | ||||
| Enable | 24176987 | 52 days ago | IN | 0 ETH | 0.00001735 | ||||
| Withdraw | 24172038 | 53 days ago | IN | 0 ETH | 0.00032275 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Pool
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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;
}
}// 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);
}
}// 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);
}
}// 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);
}// 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);
}// 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));
}
}// 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);
}
}
}// 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;
}
}// 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)
}
}
}// 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);
}{
"optimizer": {
"enabled": true,
"runs": 999999
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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"}]Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Net Worth in USD
$13,382.20
Net Worth in ETH
6.921817
Token Allocations
CBBTC
4.06%
USDC
4.05%
QNT
3.77%
Others
88.11%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 4.06% | $65,840.56 | 0.0082546 | $543.49 | |
| ETH | 3.77% | $64.29 | 7.8535 | $504.9 | |
| ETH | 3.24% | $0.10854 | 3,996.8953 | $433.82 | |
| ETH | 2.70% | $0.257602 | 1,403.8815 | $361.64 | |
| ETH | 2.41% | $1,586.17 | 0.2034 | $322.56 | |
| ETH | 2.38% | $0.999996 | 318.9436 | $318.94 | |
| ETH | 2.26% | $3.75 | 80.8012 | $303 | |
| ETH | 2.19% | $112.64 | 2.6048 | $293.4 | |
| ETH | 2.14% | $0.390201 | 733.1039 | $286.06 | |
| ETH | 2.13% | $0.999786 | 285.3534 | $285.29 | |
| ETH | 2.11% | $1.42 | 198.7455 | $282.22 | |
| ETH | 2.09% | $0.990688 | 282.7529 | $280.12 | |
| ETH | 1.98% | $0.297383 | 892.8302 | $265.51 | |
| ETH | 1.91% | $1 | 255.1881 | $255.19 | |
| ETH | 1.82% | $1.3 | 186.9125 | $242.99 | |
| ETH | 1.81% | $0.156519 | 1,550.6512 | $242.71 | |
| ETH | 1.80% | $0.103115 | 2,331.811 | $240.44 | |
| ETH | 1.79% | $8.7 | 27.5588 | $239.76 | |
| ETH | 1.78% | $1 | 238.0377 | $238.04 | |
| ETH | 1.78% | $65,681.04 | 0.00361717 | $237.58 | |
| ETH | 1.74% | $0.026136 | 8,906.7741 | $232.78 | |
| ETH | 1.72% | $0.242155 | 950.8602 | $230.26 | |
| ETH | 1.68% | $0.018378 | 12,235.6683 | $224.87 | |
| ETH | 1.64% | $0.000004 | 59,774,033.5763 | $219.97 | |
| ETH | 1.58% | $0.000029 | 7,383,393.7315 | $211.31 | |
| ETH | 1.57% | $0.003656 | 57,523.3022 | $210.28 | |
| ETH | 1.56% | $0.998791 | 208.8754 | $208.62 | |
| ETH | 1.55% | $1,933.34 | 0.1073 | $207.42 | |
| ETH | 1.44% | $0.201183 | 958.6913 | $192.87 | |
| ETH | 1.42% | $0.083653 | 2,272.2487 | $190.08 | |
| ETH | 1.39% | $0.103265 | 1,803.1381 | $186.2 | |
| ETH | 1.39% | <$0.000001 | 1,159,532,470.3096 | $185.86 | |
| ETH | 1.36% | $0.0959 | 1,892.3025 | $181.47 | |
| ETH | 1.34% | $0.999814 | 179.142 | $179.11 | |
| ETH | 1.31% | $1,926.83 | 0.0909 | $175.15 | |
| ETH | 1.26% | $2,622.38 | 0.0644 | $168.88 | |
| ETH | 1.09% | $0.301513 | 481.8901 | $145.3 | |
| ETH | 1.08% | $1 | 144.927 | $144.93 | |
| ETH | 1.03% | $0.067063 | 2,057.1217 | $137.96 | |
| ETH | 1.02% | $0.999387 | 136.3198 | $136.24 | |
| ETH | 0.98% | $2,361.56 | 0.0557 | $131.63 | |
| ETH | 0.96% | $0.16563 | 775.7433 | $128.49 | |
| ETH | 0.90% | $0.000006 | 20,718,957.4595 | $119.96 | |
| ETH | 0.88% | <$0.000001 | 680,319,631.6595 | $117.5 | |
| ETH | 0.87% | $2,165.27 | 0.0537 | $116.35 | |
| ETH | 0.84% | $0.091224 | 1,234.9658 | $112.66 | |
| ETH | 0.78% | $177.22 | 0.5867 | $103.97 | |
| ETH | 0.76% | $0.0443 | 2,285.4323 | $101.24 | |
| ETH | 0.53% | $0.000975 | 73,198.8394 | $71.4 | |
| ETH | 0.53% | $18.43 | 3.8184 | $70.37 | |
| ETH | 0.52% | $0.313593 | 222.1531 | $69.67 | |
| ETH | 0.48% | $0.040869 | 1,587.0855 | $64.86 | |
| ETH | 0.48% | $0.09523 | 678.0754 | $64.57 | |
| ETH | 0.47% | $0.000068 | 914,575.1798 | $62.44 | |
| ETH | 0.46% | $0.108459 | 572.0196 | $62.04 | |
| ETH | 0.43% | $0.332049 | 174.0557 | $57.8 | |
| ETH | 0.38% | $0.033565 | 1,529.427 | $51.34 | |
| ETH | 0.37% | $0.073699 | 663.0433 | $48.87 | |
| ETH | 0.35% | $0.020133 | 2,310.6857 | $46.52 | |
| ETH | 0.31% | $0.995193 | 42.2295 | $42.03 | |
| ETH | 0.31% | $0.107889 | 381.751 | $41.19 | |
| ETH | 0.31% | $1.85 | 22.2213 | $41.11 | |
| ETH | 0.30% | $0.039651 | 1,014.7322 | $40.23 | |
| ETH | 0.26% | $0.213293 | 164.837 | $35.16 | |
| ETH | 0.26% | $1.18 | 29.7782 | $35.14 | |
| ETH | 0.24% | $1.81 | 17.4289 | $31.55 | |
| ETH | 0.21% | $1.63 | 16.8655 | $27.49 | |
| ETH | 0.20% | $0.223113 | 120.7225 | $26.93 | |
| ETH | 0.20% | $0.011031 | 2,403.5991 | $26.51 | |
| ETH | 0.19% | $2.16 | 11.6828 | $25.23 | |
| ETH | 0.17% | $0.068838 | 331.6831 | $22.83 | |
| ETH | 0.17% | $0.000764 | 29,469.4506 | $22.51 | |
| ETH | 0.16% | $1.26 | 17.3548 | $21.87 | |
| ETH | 0.16% | $0.187683 | 115.4096 | $21.66 | |
| ETH | 0.16% | $0.023498 | 912.851 | $21.45 | |
| ETH | 0.14% | $0.001071 | 17,036.2618 | $18.24 | |
| ETH | 0.13% | $0.100778 | 175.7907 | $17.72 | |
| ETH | 0.12% | $0.009401 | 1,773.7537 | $16.67 | |
| ETH | 0.12% | $0.000032 | 521,504.1137 | $16.49 | |
| ETH | 0.12% | $6.35 | 2.5542 | $16.22 | |
| ETH | 0.10% | $5,259.03 | 0.002642 | $13.89 | |
| ETH | 0.10% | <$0.000001 | 2,018,707,298.6056 | $13.54 | |
| ETH | 0.10% | $0.001359 | 9,848.1865 | $13.38 | |
| ETH | 0.10% | $0.006786 | 1,891.8258 | $12.84 | |
| ETH | 0.10% | $0.208252 | 61.2323 | $12.75 | |
| ETH | 0.08% | $0.008675 | 1,274.6919 | $11.06 | |
| ETH | 0.08% | $0.045457 | 235.4402 | $10.7 | |
| ETH | 0.08% | $0.040642 | 256.2719 | $10.42 | |
| ETH | 0.06% | $0.570704 | 15.063 | $8.6 | |
| ETH | 0.06% | $6.05 | 1.3908 | $8.41 | |
| ETH | 0.06% | $0.101709 | 82.4109 | $8.38 | |
| ETH | 0.06% | $0.018553 | 405.3761 | $7.52 | |
| ETH | 0.06% | $0.00063 | 11,919.6241 | $7.51 | |
| ETH | 0.06% | $0.099957 | 74.317 | $7.43 | |
| ETH | 0.04% | $0.996464 | 5.9598 | $5.94 | |
| ETH | 0.04% | $0.014607 | 365.7599 | $5.34 | |
| ETH | 0.04% | $0.020258 | 251.997 | $5.1 | |
| ETH | 0.04% | $0.048933 | 102.5268 | $5.02 | |
| ETH | 0.04% | $0.134645 | 36.9855 | $4.98 | |
| ETH | 0.03% | $0.71224 | 6.4375 | $4.59 | |
| ETH | 0.03% | $0.03721 | 108.7043 | $4.04 | |
| ETH | 0.03% | $4.22 | 0.9271 | $3.91 | |
| ETH | 0.03% | $0.012488 | 306.4407 | $3.83 | |
| ETH | 0.03% | $0.016106 | 234.3122 | $3.77 | |
| ETH | 0.02% | $0.999512 | 2.76 | $2.76 | |
| ETH | 0.02% | $0.2355 | 11.4869 | $2.71 | |
| ETH | 0.02% | $0.990184 | 2.4494 | $2.43 | |
| ETH | 0.02% | $0.007788 | 271.0672 | $2.11 | |
| ETH | 0.02% | $0.062538 | 33.2032 | $2.08 | |
| ETH | 0.01% | $1.63 | 1.2173 | $1.98 | |
| ETH | 0.01% | $0.42447 | 4.5009 | $1.91 | |
| ETH | 0.01% | $0.000183 | 9,866.6008 | $1.81 | |
| ETH | 0.01% | $0.000183 | 9,373.2708 | $1.72 | |
| ETH | 0.01% | $0.000615 | 2,463.9423 | $1.51 | |
| ETH | 0.01% | $81.85 | 0.0166 | $1.36 | |
| ETH | <0.01% | $0.106196 | 9.8534 | $1.05 | |
| ETH | <0.01% | $0.001159 | 873.9531 | $1.01 | |
| ETH | <0.01% | $0.00065 | 1,392.953 | $0.905 | |
| ETH | <0.01% | $0.010486 | 22.5281 | $0.2362 | |
| ETH | <0.01% | $0.00091 | 146.3122 | $0.1331 | |
| BSC | 0.31% | $0.937398 | 44.3209 | $41.55 | |
| BSC | 0.31% | $1.58 | 25.8198 | $40.89 | |
| BSC | 0.29% | $1 | 38.2553 | $38.27 | |
| BSC | 0.27% | $0.999971 | 35.9407 | $35.94 | |
| BSC | 0.26% | $612.81 | 0.0572 | $35.05 | |
| BSC | 0.25% | $0.277586 | 120.9464 | $33.57 | |
| BSC | 0.24% | $0.99999 | 32.7405 | $32.74 | |
| BSC | 0.24% | $8.96 | 3.5362 | $31.69 | |
| BSC | 0.23% | $1,927.75 | 0.0161 | $31.04 | |
| BSC | 0.23% | $0.093521 | 326.6731 | $30.55 | |
| BSC | 0.02% | $0.049997 | 53.785 | $2.69 | |
| BSC | 0.01% | $1.36 | 0.9931 | $1.35 | |
| BSC | <0.01% | <$0.000001 | 804,828 | $0.174 | |
| LINEA | 1.79% | $0.999908 | 240.1904 | $240.17 | |
| LINEA | 0.56% | $2,256.8 | 0.0333 | $75.09 | |
| LINEA | 0.17% | $1 | 22.237 | $22.24 | |
| LINEA | 0.03% | $2,766.65 | 0.00165569 | $4.58 | |
| LINEA | <0.01% | $1 | 0.3231 | $0.323 | |
| LINEA | <0.01% | $76,131 | 0.00000231 | $0.1758 | |
| ARB | 1.95% | $0.862588 | 302.827 | $261.21 | |
| AVAX | 0.15% | $0.999955 | 20.0129 | $20.01 | |
| AVAX | 0.14% | $0.99999 | 19.1954 | $19.2 | |
| AVAX | 0.14% | $0.99999 | 18.6302 | $18.63 | |
| AVAX | 0.03% | $8.96 | 0.3958 | $3.55 | |
| BASE | 0.07% | $0.999966 | 10.0052 | $10 | |
| BASE | 0.02% | $0.019895 | 160 | $3.18 | |
| BASE | <0.01% | $0.00004 | 10,862.43 | $0.433 | |
| BASE | <0.01% | $0.00 | 225 | $0.00 | |
| POL | 0.02% | $1 | 2.9323 | $2.93 | |
| POL | 0.02% | $0.998295 | 2.607 | $2.6 | |
| POL | 0.02% | $0.999908 | 2.2387 | $2.24 | |
| POL | 0.02% | $0.00 | 2.2199 | $0.00 | |
| POL | 0.01% | $0.108669 | 17.0772 | $1.86 |
Loading...
Loading
Loading...
Loading
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.