More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 146 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 15487325 | 803 days ago | IN | 0 ETH | 0.00066745 | ||||
Drain To | 15220137 | 845 days ago | IN | 0 ETH | 0.01434175 | ||||
Drain To | 15220128 | 845 days ago | IN | 0 ETH | 0.0046936 | ||||
Drain To | 15220125 | 845 days ago | IN | 0 ETH | 0.00072663 | ||||
Withdraw Protect... | 15218870 | 845 days ago | IN | 0 ETH | 0.00256951 | ||||
Drain To | 15178538 | 852 days ago | IN | 0 ETH | 0.00396836 | ||||
Withdraw Protect... | 15174758 | 852 days ago | IN | 0 ETH | 0.00084042 | ||||
Withdraw Protect... | 15174756 | 852 days ago | IN | 0 ETH | 0.00056194 | ||||
Withdraw Protect... | 15174756 | 852 days ago | IN | 0 ETH | 0.033617 | ||||
Withdraw Protect... | 15171313 | 853 days ago | IN | 0 ETH | 0.00149217 | ||||
Withdraw Protect... | 15170132 | 853 days ago | IN | 0 ETH | 0.00218897 | ||||
Withdraw Protect... | 15168733 | 853 days ago | IN | 0 ETH | 0.00294841 | ||||
Withdraw Protect... | 15168707 | 853 days ago | IN | 0 ETH | 0.00415908 | ||||
Withdraw Protect... | 15166977 | 853 days ago | IN | 0 ETH | 0.00249413 | ||||
Withdraw Protect... | 15166821 | 854 days ago | IN | 0 ETH | 0.00170551 | ||||
Withdraw Protect... | 15164977 | 854 days ago | IN | 0 ETH | 0.00161146 | ||||
Withdraw Protect... | 15161675 | 854 days ago | IN | 0 ETH | 0.00742926 | ||||
Withdraw Protect... | 15160076 | 855 days ago | IN | 0 ETH | 0.00110293 | ||||
Withdraw Protect... | 15159922 | 855 days ago | IN | 0 ETH | 0.0017999 | ||||
Withdraw Protect... | 15156026 | 855 days ago | IN | 0 ETH | 0.00203019 | ||||
Withdraw Protect... | 15152023 | 856 days ago | IN | 0 ETH | 0.00130029 | ||||
Withdraw Protect... | 15152005 | 856 days ago | IN | 0 ETH | 0.00069376 | ||||
Withdraw Protect... | 15149623 | 856 days ago | IN | 0 ETH | 0.00162473 | ||||
Withdraw Protect... | 15146237 | 857 days ago | IN | 0 ETH | 0.00079899 | ||||
Withdraw Protect... | 15145922 | 857 days ago | IN | 0 ETH | 0.002088 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Pool
Compiler Version
v0.8.7+commit.e28d00a7
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.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@airswap/staking/contracts/interfaces/IStaking.sol"; import "./interfaces/IPool.sol"; /** * @title AirSwap Pool: Claim Tokens * @notice https://www.airswap.io/ */ contract Pool is IPool, Ownable { using SafeERC20 for IERC20; bytes32 public constant DOMAIN_TYPEHASH = keccak256( abi.encodePacked( "EIP712Domain(", "string name,", "string version,", "uint256 chainId,", "address verifyingContract", ")" ) ); bytes32 public constant CLAIM_TYPEHASH = keccak256( abi.encodePacked( "Claim(", "uint256 nonce,", "uint256 expiry,", "address participant,", "uint256 score", ")" ) ); bytes32 public constant DOMAIN_NAME = keccak256("POOL"); bytes32 public constant DOMAIN_VERSION = keccak256("1"); uint256 public immutable DOMAIN_CHAIN_ID; bytes32 public immutable DOMAIN_SEPARATOR; uint256 internal constant MAX_PERCENTAGE = 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 score uint256 public max; // Mapping of address to boolean to enable admin accounts mapping(address => bool) public admins; /** * @notice Double mapping of signers to nonce groups to nonce states * @dev The nonce group is computed as nonce / 256, so each group of 256 sequential nonces uses the same key * @dev The nonce states are encoded as 256 bits, for each nonce in the group 0 means available and 1 means used */ mapping(address => mapping(uint256 => uint256)) internal noncesClaimed; // Staking contract address address public stakingContract; // Staking token address address public stakingToken; /** * @notice Constructor * @param _scale uint256 * @param _max uint256 * @param _stakingContract address * @param _stakingToken address */ constructor( uint256 _scale, uint256 _max, address _stakingContract, address _stakingToken ) { require(_max <= MAX_PERCENTAGE, "MAX_TOO_HIGH"); require(_scale <= MAX_SCALE, "SCALE_TOO_HIGH"); scale = _scale; max = _max; stakingContract = _stakingContract; stakingToken = _stakingToken; admins[msg.sender] = true; uint256 currentChainId = getChainId(); DOMAIN_CHAIN_ID = currentChainId; DOMAIN_SEPARATOR = keccak256( abi.encode( DOMAIN_TYPEHASH, DOMAIN_NAME, DOMAIN_VERSION, currentChainId, this ) ); IERC20(stakingToken).safeApprove(stakingContract, 2**256 - 1); } /** * @notice Set scale * @dev Only owner * @param _scale uint256 */ function setScale(uint256 _scale) external override onlyOwner { require(_scale <= MAX_SCALE, "SCALE_TOO_HIGH"); scale = _scale; emit SetScale(scale); } /** * @notice Set max * @dev Only owner * @param _max uint256 */ function setMax(uint256 _max) external override onlyOwner { require(_max <= MAX_PERCENTAGE, "MAX_TOO_HIGH"); max = _max; emit SetMax(max); } /** * @notice Add admin address * @dev Only owner * @param _admin address */ function addAdmin(address _admin) external override onlyOwner { require(_admin != address(0), "INVALID_ADDRESS"); admins[_admin] = true; } /** * @notice Remove admin address * @dev Only owner * @param _admin address */ function removeAdmin(address _admin) external override onlyOwner { require(admins[_admin] == true, "ADMIN_NOT_SET"); admins[_admin] = false; } /** * @notice Set staking contract address * @dev Only owner * @param _stakingContract address */ function setStakingContract(address _stakingContract) external override onlyOwner { require(_stakingContract != address(0), "INVALID_ADDRESS"); // set allowance on old staking contract to zero IERC20(stakingToken).safeApprove(stakingContract, 0); stakingContract = _stakingContract; IERC20(stakingToken).safeApprove(stakingContract, 2**256 - 1); } /** * @notice Set staking token address * @dev Only owner * @param _stakingToken address */ function setStakingToken(address _stakingToken) external override onlyOwner { require(_stakingToken != address(0), "INVALID_ADDRESS"); // set allowance on old staking token to zero IERC20(stakingToken).safeApprove(stakingContract, 0); stakingToken = _stakingToken; IERC20(stakingToken).safeApprove(stakingContract, 2**256 - 1); } /** * @notice Admin function to migrate funds * @dev Only owner * @param tokens address[] * @param dest address */ 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 Withdraw tokens from the pool using a signed claim * @param token address * @param nonce uint256 * @param expiry uint256 * @param score uint256 * @param v uint8 "v" value of the ECDSA signature * @param r bytes32 "r" value of the ECDSA signature * @param s bytes32 "s" value of the ECDSA signature */ function withdraw( address token, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external override { withdrawProtected(0, msg.sender, token, nonce, expiry, msg.sender, score, v, r, s); } /** * @notice Withdraw tokens from the pool using a signed claim and send to recipient * @param minimumAmount uint256 * @param token address * @param recipient address * @param nonce uint256 * @param expiry uint256 * @param score uint256 * @param v uint8 "v" value of the ECDSA signature * @param r bytes32 "r" value of the ECDSA signature * @param s bytes32 "s" value of the ECDSA signature */ function withdrawWithRecipient( uint256 minimumAmount, address token, address recipient, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external override { withdrawProtected( minimumAmount, recipient, token, nonce, expiry, msg.sender, score, v, r, s ); } /** * @notice Withdraw tokens from the pool using a signed claim and stake * @param minimumAmount uint256 * @param token address * @param nonce uint256 * @param expiry uint256 * @param score uint256 * @param v uint8 "v" value of the ECDSA signature * @param r bytes32 "r" value of the ECDSA signature * @param s bytes32 "s" value of the ECDSA signature */ function withdrawAndStake( uint256 minimumAmount, address token, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external override { require(token == address(stakingToken), "INVALID_TOKEN"); _checkValidClaim(nonce, expiry, msg.sender, score, v, r, s); uint256 amount = _withdrawCheck(score, token, minimumAmount); IStaking(stakingContract).stakeFor(msg.sender, amount); emit Withdraw(nonce, expiry, msg.sender, token, amount, score); } /** * @notice Withdraw tokens from the pool using signature and stake for another account * @param minimumAmount uint256 * @param token address * @param account address * @param nonce uint256 * @param expiry uint256 * @param score uint256 * @param v uint8 "v" value of the ECDSA signature * @param r bytes32 "r" value of the ECDSA signature * @param s bytes32 "s" value of the ECDSA signature */ function withdrawAndStakeFor( uint256 minimumAmount, address token, address account, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external override { require(token == address(stakingToken), "INVALID_TOKEN"); _checkValidClaim(nonce, expiry, msg.sender, score, v, r, s); uint256 amount = _withdrawCheck(score, token, minimumAmount); IStaking(stakingContract).stakeFor(account, amount); emit Withdraw(nonce, expiry, msg.sender, token, amount, score); } /** * @notice Withdraw tokens from the pool using a signed claim * @param minimumAmount uint256 * @param token address * @param participant address * @param nonce uint256 * @param expiry uint256 * @param score uint256 * @param v uint8 "v" value of the ECDSA signature * @param r bytes32 "r" value of the ECDSA signature * @param s bytes32 "s" value of the ECDSA signature */ function withdrawProtected( uint256 minimumAmount, address recipient, address token, uint256 nonce, uint256 expiry, address participant, uint256 score, uint8 v, bytes32 r, bytes32 s ) public override returns (uint256) { _checkValidClaim(nonce, expiry, participant, score, v, r, s); uint256 amount = _withdrawCheck(score, token, minimumAmount); IERC20(token).safeTransfer(recipient, amount); emit Withdraw(nonce, expiry, participant, token, amount, score); return amount; } /** * @notice Calculate output amount for an input score * @param score uint256 * @param token address * @return amount uint256 amount to claim based on balance, scale, and max */ function calculate(uint256 score, address token) public view override returns (uint256 amount) { uint256 balance = IERC20(token).balanceOf(address(this)); uint256 divisor = (uint256(10)**scale) + score; return (max * score * balance) / divisor / 100; } /** * @notice Verify a signature * @param nonce uint256 * @param expiry uint256 * @param participant address * @param score uint256 * @param v uint8 "v" value of the ECDSA signature * @param r bytes32 "r" value of the ECDSA signature * @param s bytes32 "s" value of the ECDSA signature */ function verify( uint256 nonce, uint256 expiry, address participant, uint256 score, uint8 v, bytes32 r, bytes32 s ) public view override returns (bool valid) { require(DOMAIN_CHAIN_ID == getChainId(), "CHAIN_ID_CHANGED"); require(expiry > block.timestamp, "EXPIRY_PASSED"); bytes32 claimHash = keccak256( abi.encode(CLAIM_TYPEHASH, nonce, expiry, participant, score) ); address signatory = ecrecover( keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, claimHash)), v, r, s ); admins[signatory] && !nonceUsed(participant, nonce) ? valid = true : valid = false; } /** * @notice Returns true if the nonce has been used * @param participant address * @param nonce uint256 */ function nonceUsed(address participant, uint256 nonce) public view override returns (bool) { uint256 groupKey = nonce / 256; uint256 indexInGroup = nonce % 256; return (noncesClaimed[participant][groupKey] >> indexInGroup) & 1 == 1; } /** * @notice Returns the current chainId using the chainid opcode * @return id uint256 The chain id */ function getChainId() public view returns (uint256 id) { // no-inline-assembly assembly { id := chainid() } } /** * @notice Checks Claim Nonce, Expiry, Participant, Score, Signature * @param nonce uint256 * @param expiry uint256 * @param participant address * @param score uint256 * @param v uint8 "v" value of the ECDSA signature * @param r bytes32 "r" value of the ECDSA signature * @param s bytes32 "s" value of the ECDSA signature */ function _checkValidClaim( uint256 nonce, uint256 expiry, address participant, uint256 score, uint8 v, bytes32 r, bytes32 s ) internal { require(DOMAIN_CHAIN_ID == getChainId(), "CHAIN_ID_CHANGED"); require(expiry > block.timestamp, "EXPIRY_PASSED"); bytes32 claimHash = keccak256( abi.encode(CLAIM_TYPEHASH, nonce, expiry, participant, score) ); address signatory = ecrecover( keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, claimHash)), v, r, s ); require(admins[signatory], "UNAUTHORIZED"); require(_markNonceAsUsed(participant, nonce), "NONCE_ALREADY_USED"); } /** * @notice Marks a nonce as used for the given participant * @param participant address * @param nonce uint256 * @return bool True if nonce was not marked as used already */ function _markNonceAsUsed(address participant, uint256 nonce) internal returns (bool) { uint256 groupKey = nonce / 256; uint256 indexInGroup = nonce % 256; uint256 group = noncesClaimed[participant][groupKey]; // If it is already used, return false if ((group >> indexInGroup) & 1 == 1) { return false; } noncesClaimed[participant][groupKey] = group | (uint256(1) << indexInGroup); return true; } /** * @notice Withdraw tokens from the pool using a score * @param score uint256 * @param token address * @param minimumAmount uint256 */ function _withdrawCheck( uint256 score, address token, uint256 minimumAmount ) internal view returns (uint256) { require(score > 0, "SCORE_MUST_BE_PROVIDED"); uint256 amount = calculate(score, token); require(amount >= minimumAmount, "INSUFFICIENT_AMOUNT"); return amount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IStaking { struct Stake { uint256 duration; uint256 balance; uint256 timestamp; } // ERC-20 Transfer event event Transfer(address indexed from, address indexed to, uint256 tokens); // Schedule timelock event event ScheduleDurationChange(uint256 indexed unlockTimestamp); // Cancel timelock event event CancelDurationChange(); // Complete timelock event event CompleteDurationChange(uint256 indexed newDuration); // Propose Delegate event event ProposeDelegate(address indexed delegate, address indexed account); // Set Delegate event event SetDelegate(address indexed delegate, address indexed account); /** * @notice Stake tokens * @param amount uint256 */ function stake(uint256 amount) external; /** * @notice Unstake tokens * @param amount uint256 */ function unstake(uint256 amount) external; /** * @notice Receive stakes for an account * @param account address */ function getStakes(address account) external view returns (Stake memory accountStake); /** * @notice Total balance of all accounts (ERC-20) */ function totalSupply() external view returns (uint256); /** * @notice Balance of an account (ERC-20) */ function balanceOf(address account) external view returns (uint256); /** * @notice Decimals of underlying token (ERC-20) */ function decimals() external view returns (uint8); /** * @notice Stake tokens for an account * @param account address * @param amount uint256 */ function stakeFor(address account, uint256 amount) external; /** * @notice Available amount for an account * @param account uint256 */ function available(address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IPool { event Withdraw( uint256 indexed nonce, uint256 indexed expiry, address indexed account, address token, uint256 amount, uint256 score ); event SetScale(uint256 scale); event SetMax(uint256 max); event DrainTo(address[] tokens, address dest); function setScale(uint256 _scale) external; function setMax(uint256 _max) external; function addAdmin(address _admin) external; function removeAdmin(address _admin) external; function setStakingContract(address _stakingContract) external; function setStakingToken(address _stakingToken) external; function drainTo(address[] calldata tokens, address dest) external; function withdraw( address token, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external; function withdrawWithRecipient( uint256 minimumAmount, address token, address recipient, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external; function withdrawAndStake( uint256 minimumAmount, address token, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external; function withdrawAndStakeFor( uint256 minimumAmount, address token, address account, uint256 nonce, uint256 expiry, uint256 score, uint8 v, bytes32 r, bytes32 s ) external; function withdrawProtected( uint256 minimumAmount, address recipient, address token, uint256 nonce, uint256 expiry, address participant, uint256 score, uint8 v, bytes32 r, bytes32 s ) external returns (uint256); function calculate(uint256 score, address token) external view returns (uint256 amount); function verify( uint256 nonce, uint256 expiry, address participant, uint256 score, uint8 v, bytes32 r, bytes32 s ) external view returns (bool valid); function nonceUsed(address participant, uint256 nonce) external view returns (bool); }
// 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 v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "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
[{"inputs":[{"internalType":"uint256","name":"_scale","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"},{"internalType":"address","name":"_stakingContract","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":"uint256","name":"nonce","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"expiry","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"score","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CLAIM_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_CHAIN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_NAME","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_VERSION","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"addAdmin","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":"score","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"name":"calculate","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"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":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"participant","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"scale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"_stakingContract","type":"address"}],"name":"setStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingToken","type":"address"}],"name":"setStakingToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"verify","outputs":[{"internalType":"bool","name":"valid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minimumAmount","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdrawAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minimumAmount","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdrawAndStakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minimumAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdrawProtected","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minimumAmount","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint256","name":"score","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdrawWithRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b506040516200372238038062003722833981016040819052620000349162000700565b6200003f336200028c565b6064831115620000855760405162461bcd60e51b815260206004820152600c60248201526b09a82b0bea89e9ebe90928e960a31b60448201526064015b60405180910390fd5b604d841115620000c95760405162461bcd60e51b815260206004820152600e60248201526d0a68682988abea89e9ebe90928e960931b60448201526064016200007c565b60018481556002849055600580546001600160a01b038086166001600160a01b0319928316179092556006805492851692909116919091179055336000908152600360205260408120805460ff1916909217909155620001264690565b60808190526040516c08a92a06e626488dedac2d2dc5609b1b60208201526b1cdd1c9a5b99c81b985b594b60a21b602d8201526e1cdd1c9a5b99c81d995c9cda5bdb8b608a1b60398201526f1d5a5b9d0c8d4d8818da185a5b92590b60821b60488201527f6164647265737320766572696679696e67436f6e7472616374000000000000006058820152602960f81b607182015290915060720160408051601f198184030181528282528051602091820120908301527f5d5c2d2522b7f6ec8d1c86f44956b9ecd4376b1842cd263d54a5368aa149486d908201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209182012060a05260055460065462000281926001600160a01b039182169291909116906000199062001bc6620002dc821b17901c565b5050505050620007d1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015806200036a5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b1580156200032d57600080fd5b505afa15801562000342573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003689190620006e6565b155b620003de5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016200007c565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620004369185916200043b16565b505050565b600062000497826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200051960201b62001dda179092919060201c565b805190915015620004365780806020019051810190620004b89190620006c2565b620004365760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016200007c565b60606200052a848460008562000534565b90505b9392505050565b606082471015620005975760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016200007c565b843b620005e75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016200007c565b600080866001600160a01b031685876040516200060591906200074b565b60006040518083038185875af1925050503d806000811462000644576040519150601f19603f3d011682016040523d82523d6000602084013e62000649565b606091505b5090925090506200065c82828662000667565b979650505050505050565b60608315620006785750816200052d565b825115620006895782518084602001fd5b8160405162461bcd60e51b81526004016200007c919062000769565b80516001600160a01b0381168114620006bd57600080fd5b919050565b600060208284031215620006d557600080fd5b815180151581146200052d57600080fd5b600060208284031215620006f957600080fd5b5051919050565b600080600080608085870312156200071757600080fd5b84519350602085015192506200073060408601620006a5565b91506200074060608601620006a5565b905092959194509250565b600082516200075f8184602087016200079e565b9190910192915050565b60208152600082518060208401526200078a8160408501602087016200079e565b601f01601f19169190910160400192915050565b60005b83811015620007bb578181015183820152602001620007a1565b83811115620007cb576000848401525b50505050565b60805160a051612f0f620008136000396000818161028901528181610ca601526120d10152600081816102c301528181610a400152611e6b0152612f0f6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806370480275116101045780639dd373b9116100a2578063db1f0c7611610071578063db1f0c7614610457578063ee99205c1461046a578063f2fde38b1461048a578063f51e181a1461049d57600080fd5b80639dd373b9146103f7578063acb8cc491461040a578063b09013a214610431578063d73000e91461044457600080fd5b806372f702f3116100de57806372f702f31461035a578063796f077b1461039f5780637e747bea146103c65780638da5cb5b146103d957600080fd5b8063704802751461032c578063715018a61461033f578063716042d91461034757600080fd5b80633408e4701161017c578063429b62e51161014b578063429b62e5146102e55780635a1d249d146103085780636ac5db191461031b5780636b0509b11461032457600080fd5b80633408e4701461027e5780633644e515146102845780633edc3519146102ab578063416f281d146102be57600080fd5b80631fe9eabc116101b85780631fe9eabc1461022f57806320606b70146102425780632e0f5429146102585780632f56af001461026b57600080fd5b80631647795e146101df5780631785f53c146102075780631e9b12ef1461021c575b600080fd5b6101f26101ed366004612807565b6104a6565b60405190151581526020015b60405180910390f35b61021a6102153660046127ec565b61050b565b005b61021a61022a3660046127ec565b610671565b61021a61023d36600461293a565b61080f565b61024a610937565b6040519081526020016101fe565b6101f2610266366004612b13565b610a3b565b61021a610279366004612a28565b610e10565b4661024a565b61024a7f000000000000000000000000000000000000000000000000000000000000000081565b61021a6102b936600461293a565b610e2e565b61024a7f000000000000000000000000000000000000000000000000000000000000000081565b6101f26102f33660046127ec565b60036020526000908152604090205460ff1681565b61024a61031636600461296c565b610f4f565b61024a60025481565b61024a61104a565b61021a61033a3660046127ec565b611139565b61021a611286565b61021a610355366004612831565b611313565b60065461037a9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b61024a7f5d5c2d2522b7f6ec8d1c86f44956b9ecd4376b1842cd263d54a5368aa149486d81565b61021a6103d4366004612aa6565b611330565b60005473ffffffffffffffffffffffffffffffffffffffff1661037a565b61021a6104053660046127ec565b6114c3565b61024a7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc681565b61021a61043f366004612894565b61165f565b61021a610452366004612a28565b611852565b61024a610465366004612998565b6119e9565b60055461037a9073ffffffffffffffffffffffffffffffffffffffff1681565b61021a6104983660046127ec565b611a99565b61024a60015481565b6000806104b561010084612c57565b905060006104c561010085612e38565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260046020908152604080832095835294905292909220546001921c82169091149150505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610591576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604090205460ff161515600114610625576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f41444d494e5f4e4f545f534554000000000000000000000000000000000000006044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff16600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f494e56414c49445f4144445245535300000000000000000000000000000000006044820152606401610588565b60055460065461079a9173ffffffffffffffffffffffffffffffffffffffff91821691166000611bc6565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560055461080c92167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611bc6565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b60648111156108fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4d41585f544f4f5f4849474800000000000000000000000000000000000000006044820152606401610588565b60028190556040518181527fc2c862cda8964d16d060904e01f55bf7e4ea5e59759ca1c20db551079e0d5eed906020015b60405180910390a150565b6040517f454950373132446f6d61696e280000000000000000000000000000000000000060208201527f737472696e67206e616d652c0000000000000000000000000000000000000000602d8201527f737472696e672076657273696f6e2c000000000000000000000000000000000060398201527f75696e7432353620636861696e49642c0000000000000000000000000000000060488201527f6164647265737320766572696679696e67436f6e74726163740000000000000060588201527f290000000000000000000000000000000000000000000000000000000000000060718201526072015b6040516020818303038152906040528051906020012081565b6000467f000000000000000000000000000000000000000000000000000000000000000014610ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f434841494e5f49445f4348414e474544000000000000000000000000000000006044820152606401610588565b428711610b2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4558504952595f504153534544000000000000000000000000000000000000006044820152606401610588565b6040517f436c61696d28000000000000000000000000000000000000000000000000000060208201527f75696e74323536206e6f6e63652c00000000000000000000000000000000000060268201527f75696e74323536206578706972792c000000000000000000000000000000000060348201527f61646472657373207061727469636970616e742c00000000000000000000000060438201527f75696e743235362073636f72650000000000000000000000000000000000000060578201527f29000000000000000000000000000000000000000000000000000000000000006064820152600090606501604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015281018a90526060810189905273ffffffffffffffffffffffffffffffffffffffff8816608082015260a0810187905260c001604051602081830303815290604052805190602001209050600060017f000000000000000000000000000000000000000000000000000000000000000083604051602001610d089291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff891690820152606081018790526080810186905260a0016020604051602081039080840390855afa158015610d84573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff811660009081526003602052919091205490925060ff1690508015610dee5750610dec888b6104a6565b155b610dfc576000925082610e02565b60019250825b505050979650505050505050565b610e2289888a8989338a8a8a8a6119e9565b50505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610eaf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b604d811115610f1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f5343414c455f544f4f5f484947480000000000000000000000000000000000006044820152606401610588565b60018190556040518181527fb7f1dd786998967316283c7e129a0bbeaf046b77f2f51afe39bb89a10f29a00e9060200161092c565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b158015610fb957600080fd5b505afa158015610fcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff19190612953565b9050600084600154600a6110059190612ccc565b61100f9190612c3f565b905060648183876002546110239190612d92565b61102d9190612d92565b6110379190612c57565b6110419190612c57565b95945050505050565b6040517f436c61696d28000000000000000000000000000000000000000000000000000060208201527f75696e74323536206e6f6e63652c00000000000000000000000000000000000060268201527f75696e74323536206578706972792c000000000000000000000000000000000060348201527f61646472657373207061727469636970616e742c00000000000000000000000060438201527f75696e743235362073636f72650000000000000000000000000000000000000060578201527f29000000000000000000000000000000000000000000000000000000000000006064820152606501610a22565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff8116611237576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f494e56414c49445f4144445245535300000000000000000000000000000000006044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff16600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314611307576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b6113116000611df3565b565b611326600033898989338a8a8a8a6119e9565b5050505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff8881169116146113b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f544f4b454e000000000000000000000000000000000000006044820152606401610588565b6113c386863387878787611e68565b60006113d085898b6122e7565b6005546040517f2ee409080000000000000000000000000000000000000000000000000000000081523360048201526024810183905291925073ffffffffffffffffffffffffffffffffffffffff1690632ee4090890604401600060405180830381600087803b15801561144357600080fd5b505af1158015611457573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8c1681526020810185905290810188905233925088915089907faaf3e8be924534753bc291b29aca3f9e644a7ece9fd26c95e3390ec71870a8929060600160405180910390a4505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff81166115c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f494e56414c49445f4144445245535300000000000000000000000000000000006044820152606401610588565b6005546006546115ec9173ffffffffffffffffffffffffffffffffffffffff91821691166000611bc6565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560065461080c9216907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611bc6565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b60005b828110156118115760008484838181106116ff576116ff612eaa565b905060200201602081019061171491906127ec565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a082319060240160206040518083038186803b15801561177b57600080fd5b505afa15801561178f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b39190612953565b90506117fe83828787868181106117cc576117cc612eaa565b90506020020160208101906117e191906127ec565b73ffffffffffffffffffffffffffffffffffffffff1691906123ca565b508061180981612dff565b9150506116e3565b507f4b713dd63c7c270b811762a754d42e5d79ea1ba9d3a0899d73eab3e38b50cd6f83838360405161184593929190612b76565b60405180910390a1505050565b60065473ffffffffffffffffffffffffffffffffffffffff8981169116146118d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f544f4b454e000000000000000000000000000000000000006044820152606401610588565b6118e586863387878787611e68565b60006118f2858a8c6122e7565b6005546040517f2ee4090800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350911690632ee4090890604401600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8d1681526020810185905290810188905233925088915089907faaf3e8be924534753bc291b29aca3f9e644a7ece9fd26c95e3390ec71870a8929060600160405180910390a450505050505050505050565b60006119fa88888888888888611e68565b6000611a07868b8e6122e7565b9050611a2a73ffffffffffffffffffffffffffffffffffffffff8b168c836123ca565b6040805173ffffffffffffffffffffffffffffffffffffffff8c81168252602082018490529181018890529088169089908b907faaf3e8be924534753bc291b29aca3f9e644a7ece9fd26c95e3390ec71870a8929060600160405180910390a49b9a5050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611b1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff8116611bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610588565b61080c81611df3565b801580611c7557506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611c3b57600080fd5b505afa158015611c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c739190612953565b155b611d01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610588565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611dd59084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612420565b505050565b6060611de9848460008561252c565b90505b9392505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b467f000000000000000000000000000000000000000000000000000000000000000014611ef1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f434841494e5f49445f4348414e474544000000000000000000000000000000006044820152606401610588565b428611611f5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4558504952595f504153534544000000000000000000000000000000000000006044820152606401610588565b6040517f436c61696d28000000000000000000000000000000000000000000000000000060208201527f75696e74323536206e6f6e63652c00000000000000000000000000000000000060268201527f75696e74323536206578706972792c000000000000000000000000000000000060348201527f61646472657373207061727469636970616e742c00000000000000000000000060438201527f75696e743235362073636f72650000000000000000000000000000000000000060578201527f29000000000000000000000000000000000000000000000000000000000000006064820152600090606501604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015281018990526060810188905273ffffffffffffffffffffffffffffffffffffffff8716608082015260a0810186905260c001604051602081830303815290604052805190602001209050600060017f0000000000000000000000000000000000000000000000000000000000000000836040516020016121339291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018690526080810185905260a0016020604051602081039080840390855afa1580156121af573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff811660009081526003602052919091205490925060ff16905061226c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610588565b612276878a6126ac565b6122dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e4f4e43455f414c52454144595f5553454400000000000000000000000000006044820152606401610588565b505050505050505050565b6000808411612352576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f53434f52455f4d5553545f42455f50524f5649444544000000000000000000006044820152606401610588565b600061235e8585610f4f565b905082811015611de9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e53554646494349454e545f414d4f554e54000000000000000000000000006044820152606401610588565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611dd59084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611d53565b6000612482826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611dda9092919063ffffffff16565b805190915015611dd557808060200190518101906124a09190612918565b611dd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610588565b6060824710156125be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610588565b843b612626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610588565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161264f9190612b5a565b60006040518083038185875af1925050503d806000811461268c576040519150601f19603f3d011682016040523d82523d6000602084013e612691565b606091505b50915091506126a182828661275f565b979650505050505050565b6000806126bb61010084612c57565b905060006126cb61010085612e38565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600460209081526040808320868452909152902054909150600181831c811614156127185760009350505050610505565b73ffffffffffffffffffffffffffffffffffffffff861660009081526004602090815260408083209583529490529290922060019182901b92909217909155905092915050565b6060831561276e575081611dec565b82511561277e5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105889190612bee565b803573ffffffffffffffffffffffffffffffffffffffff811681146127d657600080fd5b919050565b803560ff811681146127d657600080fd5b6000602082840312156127fe57600080fd5b611dec826127b2565b6000806040838503121561281a57600080fd5b612823836127b2565b946020939093013593505050565b600080600080600080600060e0888a03121561284c57600080fd5b612855886127b2565b9650602088013595506040880135945060608801359350612878608089016127db565b925060a0880135915060c0880135905092959891949750929550565b6000806000604084860312156128a957600080fd5b833567ffffffffffffffff808211156128c157600080fd5b818601915086601f8301126128d557600080fd5b8135818111156128e457600080fd5b8760208260051b85010111156128f957600080fd5b60209283019550935061290f91860190506127b2565b90509250925092565b60006020828403121561292a57600080fd5b81518015158114611dec57600080fd5b60006020828403121561294c57600080fd5b5035919050565b60006020828403121561296557600080fd5b5051919050565b6000806040838503121561297f57600080fd5b8235915061298f602084016127b2565b90509250929050565b6000806000806000806000806000806101408b8d0312156129b857600080fd5b8a3599506129c860208c016127b2565b98506129d660408c016127b2565b975060608b0135965060808b013595506129f260a08c016127b2565b945060c08b01359350612a0760e08c016127db565b92506101008b013591506101208b013590509295989b9194979a5092959850565b60008060008060008060008060006101208a8c031215612a4757600080fd5b89359850612a5760208b016127b2565b9750612a6560408b016127b2565b965060608a0135955060808a0135945060a08a01359350612a8860c08b016127db565b925060e08a013591506101008a013590509295985092959850929598565b600080600080600080600080610100898b031215612ac357600080fd5b88359750612ad360208a016127b2565b9650604089013595506060890135945060808901359350612af660a08a016127db565b925060c0890135915060e089013590509295985092959890939650565b600080600080600080600060e0888a031215612b2e57600080fd5b8735965060208801359550612b45604089016127b2565b945060608801359350612878608089016127db565b60008251612b6c818460208701612dcf565b9190910192915050565b6040808252810183905260008460608301825b86811015612bc45773ffffffffffffffffffffffffffffffffffffffff612baf846127b2565b16825260209283019290910190600101612b89565b50809250505073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b6020815260008251806020840152612c0d816040850160208701612dcf565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008219821115612c5257612c52612e4c565b500190565b600082612c6657612c66612e7b565b500490565b600181815b80851115612cc457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612caa57612caa612e4c565b80851615612cb757918102915b93841c9390800290612c70565b509250929050565b6000611dec8383600082612ce257506001610505565b81612cef57506000610505565b8160018114612d055760028114612d0f57612d2b565b6001915050610505565b60ff841115612d2057612d20612e4c565b50506001821b610505565b5060208310610133831016604e8410600b8410161715612d4e575081810a610505565b612d588383612c6b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612d8a57612d8a612e4c565b029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612dca57612dca612e4c565b500290565b60005b83811015612dea578181015183820152602001612dd2565b83811115612df9576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612e3157612e31612e4c565b5060010190565b600082612e4757612e47612e7b565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220e5c58c30caf932b115e978b79eb2ff8d8d946f24196e390bd639cc575cd66bbf64736f6c63430008070033000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000640000000000000000000000006d88b09805b90dad911e5c5a512eedd984d6860b00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806370480275116101045780639dd373b9116100a2578063db1f0c7611610071578063db1f0c7614610457578063ee99205c1461046a578063f2fde38b1461048a578063f51e181a1461049d57600080fd5b80639dd373b9146103f7578063acb8cc491461040a578063b09013a214610431578063d73000e91461044457600080fd5b806372f702f3116100de57806372f702f31461035a578063796f077b1461039f5780637e747bea146103c65780638da5cb5b146103d957600080fd5b8063704802751461032c578063715018a61461033f578063716042d91461034757600080fd5b80633408e4701161017c578063429b62e51161014b578063429b62e5146102e55780635a1d249d146103085780636ac5db191461031b5780636b0509b11461032457600080fd5b80633408e4701461027e5780633644e515146102845780633edc3519146102ab578063416f281d146102be57600080fd5b80631fe9eabc116101b85780631fe9eabc1461022f57806320606b70146102425780632e0f5429146102585780632f56af001461026b57600080fd5b80631647795e146101df5780631785f53c146102075780631e9b12ef1461021c575b600080fd5b6101f26101ed366004612807565b6104a6565b60405190151581526020015b60405180910390f35b61021a6102153660046127ec565b61050b565b005b61021a61022a3660046127ec565b610671565b61021a61023d36600461293a565b61080f565b61024a610937565b6040519081526020016101fe565b6101f2610266366004612b13565b610a3b565b61021a610279366004612a28565b610e10565b4661024a565b61024a7fb83e3e00c6678cc6f78c02d83284c9af53bc18cb33a65be777531aab1bf854f181565b61021a6102b936600461293a565b610e2e565b61024a7f000000000000000000000000000000000000000000000000000000000000000181565b6101f26102f33660046127ec565b60036020526000908152604090205460ff1681565b61024a61031636600461296c565b610f4f565b61024a60025481565b61024a61104a565b61021a61033a3660046127ec565b611139565b61021a611286565b61021a610355366004612831565b611313565b60065461037a9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b61024a7f5d5c2d2522b7f6ec8d1c86f44956b9ecd4376b1842cd263d54a5368aa149486d81565b61021a6103d4366004612aa6565b611330565b60005473ffffffffffffffffffffffffffffffffffffffff1661037a565b61021a6104053660046127ec565b6114c3565b61024a7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc681565b61021a61043f366004612894565b61165f565b61021a610452366004612a28565b611852565b61024a610465366004612998565b6119e9565b60055461037a9073ffffffffffffffffffffffffffffffffffffffff1681565b61021a6104983660046127ec565b611a99565b61024a60015481565b6000806104b561010084612c57565b905060006104c561010085612e38565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260046020908152604080832095835294905292909220546001921c82169091149150505b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610591576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602052604090205460ff161515600114610625576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f41444d494e5f4e4f545f534554000000000000000000000000000000000000006044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff16600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff811661076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f494e56414c49445f4144445245535300000000000000000000000000000000006044820152606401610588565b60055460065461079a9173ffffffffffffffffffffffffffffffffffffffff91821691166000611bc6565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560055461080c92167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611bc6565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b60648111156108fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4d41585f544f4f5f4849474800000000000000000000000000000000000000006044820152606401610588565b60028190556040518181527fc2c862cda8964d16d060904e01f55bf7e4ea5e59759ca1c20db551079e0d5eed906020015b60405180910390a150565b6040517f454950373132446f6d61696e280000000000000000000000000000000000000060208201527f737472696e67206e616d652c0000000000000000000000000000000000000000602d8201527f737472696e672076657273696f6e2c000000000000000000000000000000000060398201527f75696e7432353620636861696e49642c0000000000000000000000000000000060488201527f6164647265737320766572696679696e67436f6e74726163740000000000000060588201527f290000000000000000000000000000000000000000000000000000000000000060718201526072015b6040516020818303038152906040528051906020012081565b6000467f000000000000000000000000000000000000000000000000000000000000000114610ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f434841494e5f49445f4348414e474544000000000000000000000000000000006044820152606401610588565b428711610b2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4558504952595f504153534544000000000000000000000000000000000000006044820152606401610588565b6040517f436c61696d28000000000000000000000000000000000000000000000000000060208201527f75696e74323536206e6f6e63652c00000000000000000000000000000000000060268201527f75696e74323536206578706972792c000000000000000000000000000000000060348201527f61646472657373207061727469636970616e742c00000000000000000000000060438201527f75696e743235362073636f72650000000000000000000000000000000000000060578201527f29000000000000000000000000000000000000000000000000000000000000006064820152600090606501604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015281018a90526060810189905273ffffffffffffffffffffffffffffffffffffffff8816608082015260a0810187905260c001604051602081830303815290604052805190602001209050600060017fb83e3e00c6678cc6f78c02d83284c9af53bc18cb33a65be777531aab1bf854f183604051602001610d089291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff891690820152606081018790526080810186905260a0016020604051602081039080840390855afa158015610d84573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff811660009081526003602052919091205490925060ff1690508015610dee5750610dec888b6104a6565b155b610dfc576000925082610e02565b60019250825b505050979650505050505050565b610e2289888a8989338a8a8a8a6119e9565b50505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610eaf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b604d811115610f1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f5343414c455f544f4f5f484947480000000000000000000000000000000000006044820152606401610588565b60018190556040518181527fb7f1dd786998967316283c7e129a0bbeaf046b77f2f51afe39bb89a10f29a00e9060200161092c565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff8416906370a082319060240160206040518083038186803b158015610fb957600080fd5b505afa158015610fcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff19190612953565b9050600084600154600a6110059190612ccc565b61100f9190612c3f565b905060648183876002546110239190612d92565b61102d9190612d92565b6110379190612c57565b6110419190612c57565b95945050505050565b6040517f436c61696d28000000000000000000000000000000000000000000000000000060208201527f75696e74323536206e6f6e63652c00000000000000000000000000000000000060268201527f75696e74323536206578706972792c000000000000000000000000000000000060348201527f61646472657373207061727469636970616e742c00000000000000000000000060438201527f75696e743235362073636f72650000000000000000000000000000000000000060578201527f29000000000000000000000000000000000000000000000000000000000000006064820152606501610a22565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff8116611237576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f494e56414c49445f4144445245535300000000000000000000000000000000006044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff16600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314611307576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b6113116000611df3565b565b611326600033898989338a8a8a8a6119e9565b5050505050505050565b60065473ffffffffffffffffffffffffffffffffffffffff8881169116146113b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f544f4b454e000000000000000000000000000000000000006044820152606401610588565b6113c386863387878787611e68565b60006113d085898b6122e7565b6005546040517f2ee409080000000000000000000000000000000000000000000000000000000081523360048201526024810183905291925073ffffffffffffffffffffffffffffffffffffffff1690632ee4090890604401600060405180830381600087803b15801561144357600080fd5b505af1158015611457573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8c1681526020810185905290810188905233925088915089907faaf3e8be924534753bc291b29aca3f9e644a7ece9fd26c95e3390ec71870a8929060600160405180910390a4505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611544576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff81166115c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f494e56414c49445f4144445245535300000000000000000000000000000000006044820152606401610588565b6005546006546115ec9173ffffffffffffffffffffffffffffffffffffffff91821691166000611bc6565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560065461080c9216907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611bc6565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b60005b828110156118115760008484838181106116ff576116ff612eaa565b905060200201602081019061171491906127ec565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a082319060240160206040518083038186803b15801561177b57600080fd5b505afa15801561178f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b39190612953565b90506117fe83828787868181106117cc576117cc612eaa565b90506020020160208101906117e191906127ec565b73ffffffffffffffffffffffffffffffffffffffff1691906123ca565b508061180981612dff565b9150506116e3565b507f4b713dd63c7c270b811762a754d42e5d79ea1ba9d3a0899d73eab3e38b50cd6f83838360405161184593929190612b76565b60405180910390a1505050565b60065473ffffffffffffffffffffffffffffffffffffffff8981169116146118d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f494e56414c49445f544f4b454e000000000000000000000000000000000000006044820152606401610588565b6118e586863387878787611e68565b60006118f2858a8c6122e7565b6005546040517f2ee4090800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015260248201849052929350911690632ee4090890604401600060405180830381600087803b15801561196857600080fd5b505af115801561197c573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff8d1681526020810185905290810188905233925088915089907faaf3e8be924534753bc291b29aca3f9e644a7ece9fd26c95e3390ec71870a8929060600160405180910390a450505050505050505050565b60006119fa88888888888888611e68565b6000611a07868b8e6122e7565b9050611a2a73ffffffffffffffffffffffffffffffffffffffff8b168c836123ca565b6040805173ffffffffffffffffffffffffffffffffffffffff8c81168252602082018490529181018890529088169089908b907faaf3e8be924534753bc291b29aca3f9e644a7ece9fd26c95e3390ec71870a8929060600160405180910390a49b9a5050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611b1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610588565b73ffffffffffffffffffffffffffffffffffffffff8116611bbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610588565b61080c81611df3565b801580611c7557506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e9060440160206040518083038186803b158015611c3b57600080fd5b505afa158015611c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c739190612953565b155b611d01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610588565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611dd59084907f095ea7b300000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612420565b505050565b6060611de9848460008561252c565b90505b9392505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b467f000000000000000000000000000000000000000000000000000000000000000114611ef1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f434841494e5f49445f4348414e474544000000000000000000000000000000006044820152606401610588565b428611611f5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f4558504952595f504153534544000000000000000000000000000000000000006044820152606401610588565b6040517f436c61696d28000000000000000000000000000000000000000000000000000060208201527f75696e74323536206e6f6e63652c00000000000000000000000000000000000060268201527f75696e74323536206578706972792c000000000000000000000000000000000060348201527f61646472657373207061727469636970616e742c00000000000000000000000060438201527f75696e743235362073636f72650000000000000000000000000000000000000060578201527f29000000000000000000000000000000000000000000000000000000000000006064820152600090606501604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083015281018990526060810188905273ffffffffffffffffffffffffffffffffffffffff8716608082015260a0810186905260c001604051602081830303815290604052805190602001209050600060017fb83e3e00c6678cc6f78c02d83284c9af53bc18cb33a65be777531aab1bf854f1836040516020016121339291907f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600084529083018083525260ff881690820152606081018690526080810185905260a0016020604051602081039080840390855afa1580156121af573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff811660009081526003602052919091205490925060ff16905061226c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610588565b612276878a6126ac565b6122dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e4f4e43455f414c52454144595f5553454400000000000000000000000000006044820152606401610588565b505050505050505050565b6000808411612352576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f53434f52455f4d5553545f42455f50524f5649444544000000000000000000006044820152606401610588565b600061235e8585610f4f565b905082811015611de9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f494e53554646494349454e545f414d4f554e54000000000000000000000000006044820152606401610588565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611dd59084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401611d53565b6000612482826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611dda9092919063ffffffff16565b805190915015611dd557808060200190518101906124a09190612918565b611dd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610588565b6060824710156125be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610588565b843b612626576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610588565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161264f9190612b5a565b60006040518083038185875af1925050503d806000811461268c576040519150601f19603f3d011682016040523d82523d6000602084013e612691565b606091505b50915091506126a182828661275f565b979650505050505050565b6000806126bb61010084612c57565b905060006126cb61010085612e38565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600460209081526040808320868452909152902054909150600181831c811614156127185760009350505050610505565b73ffffffffffffffffffffffffffffffffffffffff861660009081526004602090815260408083209583529490529290922060019182901b92909217909155905092915050565b6060831561276e575081611dec565b82511561277e5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105889190612bee565b803573ffffffffffffffffffffffffffffffffffffffff811681146127d657600080fd5b919050565b803560ff811681146127d657600080fd5b6000602082840312156127fe57600080fd5b611dec826127b2565b6000806040838503121561281a57600080fd5b612823836127b2565b946020939093013593505050565b600080600080600080600060e0888a03121561284c57600080fd5b612855886127b2565b9650602088013595506040880135945060608801359350612878608089016127db565b925060a0880135915060c0880135905092959891949750929550565b6000806000604084860312156128a957600080fd5b833567ffffffffffffffff808211156128c157600080fd5b818601915086601f8301126128d557600080fd5b8135818111156128e457600080fd5b8760208260051b85010111156128f957600080fd5b60209283019550935061290f91860190506127b2565b90509250925092565b60006020828403121561292a57600080fd5b81518015158114611dec57600080fd5b60006020828403121561294c57600080fd5b5035919050565b60006020828403121561296557600080fd5b5051919050565b6000806040838503121561297f57600080fd5b8235915061298f602084016127b2565b90509250929050565b6000806000806000806000806000806101408b8d0312156129b857600080fd5b8a3599506129c860208c016127b2565b98506129d660408c016127b2565b975060608b0135965060808b013595506129f260a08c016127b2565b945060c08b01359350612a0760e08c016127db565b92506101008b013591506101208b013590509295989b9194979a5092959850565b60008060008060008060008060006101208a8c031215612a4757600080fd5b89359850612a5760208b016127b2565b9750612a6560408b016127b2565b965060608a0135955060808a0135945060a08a01359350612a8860c08b016127db565b925060e08a013591506101008a013590509295985092959850929598565b600080600080600080600080610100898b031215612ac357600080fd5b88359750612ad360208a016127b2565b9650604089013595506060890135945060808901359350612af660a08a016127db565b925060c0890135915060e089013590509295985092959890939650565b600080600080600080600060e0888a031215612b2e57600080fd5b8735965060208801359550612b45604089016127b2565b945060608801359350612878608089016127db565b60008251612b6c818460208701612dcf565b9190910192915050565b6040808252810183905260008460608301825b86811015612bc45773ffffffffffffffffffffffffffffffffffffffff612baf846127b2565b16825260209283019290910190600101612b89565b50809250505073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b6020815260008251806020840152612c0d816040850160208701612dcf565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008219821115612c5257612c52612e4c565b500190565b600082612c6657612c66612e7b565b500490565b600181815b80851115612cc457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612caa57612caa612e4c565b80851615612cb757918102915b93841c9390800290612c70565b509250929050565b6000611dec8383600082612ce257506001610505565b81612cef57506000610505565b8160018114612d055760028114612d0f57612d2b565b6001915050610505565b60ff841115612d2057612d20612e4c565b50506001821b610505565b5060208310610133831016604e8410600b8410161715612d4e575081810a610505565b612d588383612c6b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612d8a57612d8a612e4c565b029392505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612dca57612dca612e4c565b500290565b60005b83811015612dea578181015183820152602001612dd2565b83811115612df9576000848401525b50505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612e3157612e31612e4c565b5060010190565b600082612e4757612e47612e7b565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220e5c58c30caf932b115e978b79eb2ff8d8d946f24196e390bd639cc575cd66bbf64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000640000000000000000000000006d88b09805b90dad911e5c5a512eedd984d6860b00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a
-----Decoded View---------------
Arg [0] : _scale (uint256): 10
Arg [1] : _max (uint256): 100
Arg [2] : _stakingContract (address): 0x6d88B09805b90dad911E5C5A512eEDd984D6860B
Arg [3] : _stakingToken (address): 0x27054b13b1B798B345b591a4d22e6562d47eA75a
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [2] : 0000000000000000000000006d88b09805b90dad911e5c5a512eedd984d6860b
Arg [3] : 00000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a
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.