More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,008 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 15856753 | 976 days ago | IN | 0 AVAX | 0.00296071 | ||||
Claim | 15856704 | 976 days ago | IN | 0 AVAX | 0.00295922 | ||||
Claim | 15754124 | 979 days ago | IN | 0 AVAX | 0.00307128 | ||||
Claim | 15633446 | 981 days ago | IN | 0 AVAX | 0.003071 | ||||
Claim | 15589403 | 982 days ago | IN | 0 AVAX | 0.00296065 | ||||
Claim | 15573514 | 983 days ago | IN | 0 AVAX | 0.00257589 | ||||
Claim | 15463092 | 985 days ago | IN | 0 AVAX | 0.00295938 | ||||
Claim | 15462998 | 985 days ago | IN | 0 AVAX | 0.00293559 | ||||
Claim | 15462889 | 985 days ago | IN | 0 AVAX | 0.00295906 | ||||
Claim | 15462784 | 985 days ago | IN | 0 AVAX | 0.00250676 | ||||
Claim | 15462670 | 985 days ago | IN | 0 AVAX | 0.00295933 | ||||
Claim | 15461633 | 985 days ago | IN | 0 AVAX | 0.00296097 | ||||
Claim | 15461322 | 985 days ago | IN | 0 AVAX | 0.00295965 | ||||
Claim | 15461140 | 985 days ago | IN | 0 AVAX | 0.00295954 | ||||
Claim | 15460990 | 985 days ago | IN | 0 AVAX | 0.00295991 | ||||
Claim | 15460626 | 985 days ago | IN | 0 AVAX | 0.00296007 | ||||
Claim | 15460460 | 985 days ago | IN | 0 AVAX | 0.00135884 | ||||
Claim | 15460428 | 985 days ago | IN | 0 AVAX | 0.00295959 | ||||
Claim | 15460234 | 985 days ago | IN | 0 AVAX | 0.00295896 | ||||
Claim | 15457876 | 985 days ago | IN | 0 AVAX | 0.00296214 | ||||
Claim | 15457606 | 985 days ago | IN | 0 AVAX | 0.00296012 | ||||
Claim | 15457309 | 985 days ago | IN | 0 AVAX | 0.00250586 | ||||
Claim | 15451064 | 986 days ago | IN | 0 AVAX | 0.00293654 | ||||
Claim | 15450960 | 986 days ago | IN | 0 AVAX | 0.00293617 | ||||
Claim | 15450696 | 986 days ago | IN | 0 AVAX | 0.00293654 |
Loading...
Loading
Contract Name:
KyberSwapDistributor
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 100000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import {ReentrancyGuard} from '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {Address} from '@openzeppelin/contracts/utils/Address.sol'; import {MerkleProof} from '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import {IKyberSwapDistributor} from '../interfaces/distributor/IKyberSwapDistributor.sol'; /** * @title Distributor contract for Kyberswap * **/ contract KyberSwapDistributor is IKyberSwapDistributor, Ownable, ReentrancyGuard { using SafeERC20 for IERC20; using Address for address payable; uint256 public phaseId; //phaseId => Distribution mapping(uint256 => Distribution) public distributionInfo; // wallet => phase id => token => claimedAmount mapping(address => mapping(uint256 => mapping(IERC20 => uint256))) public claimedAmounts; //phaseId => token => total mapping(uint256 => mapping(IERC20 => uint256)) public totalClaimedAmounts; constructor(address admin) { transferOwnership(admin); } receive() external payable {} /** * @dev Allow owner to withdraw reward tokens */ function ownerWithdraw(IERC20[] calldata tokens, uint256[] calldata amounts) external override onlyOwner { for (uint256 i = 0; i < tokens.length; i++) { if (tokens[i] == IERC20(address(0))) { payable(_msgSender()).sendValue(amounts[i]); } else { tokens[i].safeTransfer(_msgSender(), amounts[i]); } } } /** * @dev Claim accumulated rewards for a set of tokens at a phase * @param id phase id number * @param index user reward info index in the array of reward info * during merkle tree generation * @param user wallet address of reward beneficiary * @param tokens array of tokens claimable by reward beneficiary * @param amounts cumulative token amounts claimable by reward beneficiary * @param merkleProof merkle proof of claim **/ function claim( uint256 id, uint256 index, address user, IERC20[] calldata tokens, uint256[] calldata amounts, bytes32[] calldata merkleProof ) external override nonReentrant { // verify if can claim require(isValidClaim(id, index, user, tokens, amounts, merkleProof), 'invalid claim data'); uint256[] memory claimAmounts = new uint256[](tokens.length); // claim each token for (uint256 i = 0; i < tokens.length; i++) { // if none claimable, skip if (amounts[i] == 0) continue; uint256 claimable = amounts[i] - claimedAmounts[user][id][tokens[i]]; if (claimable == 0) continue; if (tokens[i] == IERC20(address(0))) { payable(user).sendValue(claimable); } else { tokens[i].safeTransfer(user, claimable); } claimedAmounts[user][id][tokens[i]] = amounts[i]; claimAmounts[i] = claimable; totalClaimedAmounts[id][tokens[i]] += claimable; } emit Claimed(id, user, tokens, claimAmounts); } /// @notice Propose a new phase distribution, only by admin function proposeDistribution( bytes32 root, uint256 deadline, string memory content ) external override onlyOwner { distributionInfo[phaseId] = Distribution(root, deadline, content); emit PhaseCreated(phaseId++, root, deadline, content); } function updateDistributionTime(uint256 id, uint256 newTime) external onlyOwner { require(phaseId >= id, 'Invalid phase'); require(newTime >= _getBlockTime(), 'Invalid time'); distributionInfo[id].deadline = newTime; emit PhaseUpdated(id, newTime); } /** * @dev Fetch claimed rewards for a set of tokens in a phase * @param id phase Id number * @param user wallet address of reward beneficiary * @param tokens array of tokens claimed by reward beneficiary * @return userClaimedAmounts claimed token amounts by reward beneficiary in a phase **/ function getClaimedAmounts( uint256 id, address user, IERC20[] calldata tokens ) external view override returns (uint256[] memory userClaimedAmounts) { userClaimedAmounts = new uint256[](tokens.length); for (uint256 i = 0; i < tokens.length; i++) { userClaimedAmounts[i] = claimedAmounts[user][id][tokens[i]]; } } function encodeClaim( uint256 id, uint256 index, address account, IERC20[] calldata tokens, uint256[] calldata amounts ) external pure returns (bytes memory encodedData, bytes32 encodedDataHash) { require(tokens.length == amounts.length, 'bad tokens and amounts length'); encodedData = abi.encode(id, index, account, tokens, amounts); encodedDataHash = keccak256(encodedData); } /** * @dev Checks whether a claim is valid or not * @param id phase Id number * @param index user reward info index in the array of reward info * during merkle tree generation * @param user wallet address of reward beneficiary * @param tokens array of tokens claimable by reward beneficiary * @param amounts reward token amounts claimable by reward beneficiary * @param merkleProof merkle proof of claim * @return true if valid claim, false otherwise **/ function isValidClaim( uint256 id, uint256 index, address user, IERC20[] calldata tokens, uint256[] calldata amounts, bytes32[] calldata merkleProof ) public view override returns (bool) { if (tokens.length != amounts.length) return false; if (_getBlockTime() >= distributionInfo[id].deadline) return false; bytes32 node = keccak256(abi.encode(id, index, user, tokens, amounts)); return MerkleProof.verify(merkleProof, distributionInfo[id].root, node); } /// @notice get block timestamp function _getBlockTime() internal view virtual returns (uint32) { return uint32(block.timestamp); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT 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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT 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; /** * @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 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); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } // Check if the computed hash (root) is equal to the provided root return computedHash == root; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; interface IKyberSwapDistributor { struct Distribution { bytes32 root; uint256 deadline; string content; } event Claimed(uint256 indexed id, address user, IERC20[] tokens, uint256[] claimAmounts); event PhaseCreated(uint256 indexed id, bytes32 root, uint256 indexed deadline, string content); event PhaseUpdated(uint256 indexed id, uint256 indexed newTime); /** * @dev Claim accumulated rewards for a set of tokens at a phase * @param id phase Id number * @param index user reward info index in the array of reward info * during merkle tree generation * @param user wallet address of reward beneficiary * @param tokens array of tokens claimable by reward beneficiary * @param amounts cumulative token amounts claimable by reward beneficiary * @param merkleProof merkle proof of claim **/ function claim( uint256 id, uint256 index, address user, IERC20[] calldata tokens, uint256[] calldata amounts, bytes32[] calldata merkleProof ) external; function ownerWithdraw(IERC20[] calldata tokens, uint256[] calldata amounts) external; function proposeDistribution( bytes32 root, uint256 deadline, string memory content ) external; function updateDistributionTime(uint256 id, uint256 newTime) external; /** * @dev Checks whether a claim is valid or not * @param id phase Id number * @param index user reward info index in the array of reward info * during merkle tree generation * @param user wallet address of reward beneficiary * @param tokens array of tokens claimable by reward beneficiary * @param amounts reward token amounts claimable by reward beneficiary * @param merkleProof merkle proof of claim * @return true if valid claim, false otherwise **/ function isValidClaim( uint256 id, uint256 index, address user, IERC20[] calldata tokens, uint256[] calldata amounts, bytes32[] calldata merkleProof ) external view returns (bool); /** * @dev Fetch claimed rewards for a set of tokens in a phase * @param id phase Id number * @param user wallet address of reward beneficiary * @param tokens array of tokens claimed by reward beneficiary * @return userClaimedAmounts claimed token amounts by reward beneficiary in a phase **/ function getClaimedAmounts( uint256 id, address user, IERC20[] calldata tokens ) external view returns (uint256[] memory userClaimedAmounts); }
// SPDX-License-Identifier: MIT 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; } }
{ "optimizer": { "enabled": true, "runs": 100000 }, "metadata": { "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"claimAmounts","type":"uint256[]"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"root","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":false,"internalType":"string","name":"content","type":"string"}],"name":"PhaseCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"PhaseUpdated","type":"event"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"contract IERC20","name":"","type":"address"}],"name":"claimedAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distributionInfo","outputs":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"string","name":"content","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"encodeClaim","outputs":[{"internalType":"bytes","name":"encodedData","type":"bytes"},{"internalType":"bytes32","name":"encodedDataHash","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"}],"name":"getClaimedAmounts","outputs":[{"internalType":"uint256[]","name":"userClaimedAmounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"isValidClaim","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":"contract IERC20[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ownerWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"phaseId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"string","name":"content","type":"string"}],"name":"proposeDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"contract IERC20","name":"","type":"address"}],"name":"totalClaimedAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"updateDistributionTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620021a5380380620021a583398101604081905262000034916200017a565b6200003f3362000055565b600180556200004e81620000a5565b50620001ac565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620001055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381166200016c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620000fc565b620001778162000055565b50565b6000602082840312156200018d57600080fd5b81516001600160a01b0381168114620001a557600080fd5b9392505050565b611fe980620001bc6000396000f3fe6080604052600436106100e05760003560e01c80638da5cb5b1161007f578063cb3b0bab11610059578063cb3b0bab14610286578063f2fde38b146102b3578063f4ec1cf3146102d3578063f960713f146102f357600080fd5b80638da5cb5b1461020357806397e971d014610238578063c390d3311461026657600080fd5b8063390556f2116100bb578063390556f21461017257806358303b1014610192578063662f734e146101b6578063715018a6146101ee57600080fd5b8062db01e0146100ec57806301bc58981461010e5780632b6063a31461014357600080fd5b366100e757005b600080fd5b3480156100f857600080fd5b5061010c6101073660046117c6565b610331565b005b34801561011a57600080fd5b5061012e610129366004611856565b6104d5565b60405190151581526020015b60405180910390f35b34801561014f57600080fd5b5061016361015e366004611918565b6105b6565b60405161013a939291906119ab565b34801561017e57600080fd5b5061010c61018d3660046119d3565b610661565b34801561019e57600080fd5b506101a860025481565b60405190815260200161013a565b3480156101c257600080fd5b506101a86101d1366004611a3f565b600560209081526000928352604080842090915290825290205481565b3480156101fa57600080fd5b5061010c6107f0565b34801561020f57600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013a565b34801561024457600080fd5b50610258610253366004611a6f565b61087d565b60405161013a929190611b05565b34801561027257600080fd5b5061010c610281366004611856565b61092e565b34801561029257600080fd5b506102a66102a1366004611b27565b610db0565b60405161013a9190611bb2565b3480156102bf57600080fd5b5061010c6102ce366004611bc5565b610ecd565b3480156102df57600080fd5b5061010c6102ee366004611c11565b610ffd565b3480156102ff57600080fd5b506101a861030e366004611cf3565b600460209081526000938452604080852082529284528284209052825290205481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b816002541015610423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070686173650000000000000000000000000000000000000060448201526064016103ae565b4263ffffffff16811015610493576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c69642074696d65000000000000000000000000000000000000000060448201526064016103ae565b60008281526003602052604080822060010183905551829184917fa89951a03e2758c1bc16583a91fbb676c836dcda755bf7d40c05625b2bfdccec9190a35050565b60008584146104e6575060006105a9565b60008a8152600360205260409020600101544263ffffffff161061050c575060006105a9565b60008a8a8a8a8a8a8a60405160200161052b9796959493929190611d80565b6040516020818303038152906040528051906020012090506105a5848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600360008e81526020019081526020016000206000015483611125565b9150505b9998505050505050505050565b600360205260009081526040902080546001820154600283018054929391926105de90611e16565b80601f016020809104026020016040519081016040528092919081815260200182805461060a90611e16565b80156106575780601f1061062c57610100808354040283529160200191610657565b820191906000526020600020905b81548152906001019060200180831161063a57829003601f168201915b5050505050905083565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b60005b838110156107e957600085858381811061070157610701611e6a565b90506020020160208101906107169190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1614156107765761077183838381811061074757610747611e6a565b905060200201356107553390565b73ffffffffffffffffffffffffffffffffffffffff16906111d6565b6107d7565b6107d73384848481811061078c5761078c611e6a565b905060200201358787858181106107a5576107a5611e6a565b90506020020160208101906107ba9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff169190611335565b806107e181611ec8565b9150506106e5565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b61087b60006113c2565b565b606060008483146108ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f62616420746f6b656e7320616e6420616d6f756e7473206c656e67746800000060448201526064016103ae565b888888888888886040516020016109079796959493929190611d80565b60405160208183030381529060405291508180519060200120905097509795505050505050565b6002600154141561099b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103ae565b60026001556109b18989898989898989896104d5565b610a17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420636c61696d2064617461000000000000000000000000000060448201526064016103ae565b60008567ffffffffffffffff811115610a3257610a32611be2565b604051908082528060200260200182016040528015610a5b578160200160208202803683370190505b50905060005b86811015610d6157858582818110610a7b57610a7b611e6a565b9050602002013560001415610a8f57610d4f565b73ffffffffffffffffffffffffffffffffffffffff891660009081526004602090815260408083208e84529091528120818a8a85818110610ad257610ad2611e6a565b9050602002016020810190610ae79190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054878784818110610b3457610b34611e6a565b90506020020135610b459190611f01565b905080610b525750610d4f565b6000898984818110610b6657610b66611e6a565b9050602002016020810190610b7b9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff161415610bbc57610bb773ffffffffffffffffffffffffffffffffffffffff8b16826111d6565b610bd3565b610bd38a828b8b868181106107a5576107a5611e6a565b868683818110610be557610be5611e6a565b90506020020135600460008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008e815260200190815260200160002060008b8b86818110610c5057610c50611e6a565b9050602002016020810190610c659190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080838381518110610cb657610cb6611e6a565b60200260200101818152505080600560008e815260200190815260200160002060008b8b86818110610cea57610cea611e6a565b9050602002016020810190610cff9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d489190611f18565b9091555050505b80610d5981611ec8565b915050610a61565b50897f1869cd8d657c37384f585ccf16d7d1baddfcb0552617440f4fefe638726094c489898985604051610d989493929190611f30565b60405180910390a25050600180555050505050505050565b60608167ffffffffffffffff811115610dcb57610dcb611be2565b604051908082528060200260200182016040528015610df4578160200160208202803683370190505b50905060005b82811015610ec45773ffffffffffffffffffffffffffffffffffffffff85166000908152600460209081526040808320898452909152812090858584818110610e4557610e45611e6a565b9050602002016020810190610e5a9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054828281518110610ea757610ea7611e6a565b602090810291909101015280610ebc81611ec8565b915050610dfa565b50949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b73ffffffffffffffffffffffffffffffffffffffff8116610ff1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103ae565b610ffa816113c2565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461107e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b60408051606081018252848152602080820185815282840185815260028054600090815260038552959095208451815591516001830155518051939491936110ce9392850192919091019061172d565b5050600280548492509060006110e383611ec8565b919050557fb920eca87e99c1731d756a5533a92f0e02ae5e4c79d50260a7303364f210ad018584604051611118929190611f72565b60405180910390a3505050565b600081815b85518110156111c957600086828151811061114757611147611e6a565b602002602001015190508083116111895760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506111b6565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806111c181611ec8565b91505061112a565b50831490505b9392505050565b80471015611240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016103ae565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461129a576040519150601f19603f3d011682016040523d82523d6000602084013e61129f565b606091505b5050905080611330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016103ae565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611330908490611437565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611499826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166115439092919063ffffffff16565b80519091501561133057808060200190518101906114b79190611f8b565b611330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103ae565b6060611552848460008561155a565b949350505050565b6060824710156115ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103ae565b843b611654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103ae565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161167d9190611fad565b60006040518083038185875af1925050503d80600081146116ba576040519150601f19603f3d011682016040523d82523d6000602084013e6116bf565b606091505b50915091506116cf8282866116da565b979650505050505050565b606083156116e95750816111cf565b8251156116f95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ae9190611fc9565b82805461173990611e16565b90600052602060002090601f01602090048101928261175b57600085556117a1565b82601f1061177457805160ff19168380011785556117a1565b828001600101855582156117a1579182015b828111156117a1578251825591602001919060010190611786565b506117ad9291506117b1565b5090565b5b808211156117ad57600081556001016117b2565b600080604083850312156117d957600080fd5b50508035926020909101359150565b73ffffffffffffffffffffffffffffffffffffffff81168114610ffa57600080fd5b60008083601f84011261181c57600080fd5b50813567ffffffffffffffff81111561183457600080fd5b6020830191508360208260051b850101111561184f57600080fd5b9250929050565b600080600080600080600080600060c08a8c03121561187457600080fd5b8935985060208a0135975060408a013561188d816117e8565b965060608a013567ffffffffffffffff808211156118aa57600080fd5b6118b68d838e0161180a565b909850965060808c01359150808211156118cf57600080fd5b6118db8d838e0161180a565b909650945060a08c01359150808211156118f457600080fd5b506119018c828d0161180a565b915080935050809150509295985092959850929598565b60006020828403121561192a57600080fd5b5035919050565b60005b8381101561194c578181015183820152602001611934565b8381111561195b576000848401525b50505050565b60008151808452611979816020860160208601611931565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8381528260208201526060604082015260006119ca6060830184611961565b95945050505050565b600080600080604085870312156119e957600080fd5b843567ffffffffffffffff80821115611a0157600080fd5b611a0d8883890161180a565b90965094506020870135915080821115611a2657600080fd5b50611a338782880161180a565b95989497509550505050565b60008060408385031215611a5257600080fd5b823591506020830135611a64816117e8565b809150509250929050565b600080600080600080600060a0888a031215611a8a57600080fd5b87359650602088013595506040880135611aa3816117e8565b9450606088013567ffffffffffffffff80821115611ac057600080fd5b611acc8b838c0161180a565b909650945060808a0135915080821115611ae557600080fd5b50611af28a828b0161180a565b989b979a50959850939692959293505050565b604081526000611b186040830185611961565b90508260208301529392505050565b60008060008060608587031215611b3d57600080fd5b843593506020850135611b4f816117e8565b9250604085013567ffffffffffffffff811115611b6b57600080fd5b611a338782880161180a565b600081518084526020808501945080840160005b83811015611ba757815187529582019590820190600101611b8b565b509495945050505050565b6020815260006111cf6020830184611b77565b600060208284031215611bd757600080fd5b81356111cf816117e8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600060608486031215611c2657600080fd5b8335925060208401359150604084013567ffffffffffffffff80821115611c4c57600080fd5b818601915086601f830112611c6057600080fd5b813581811115611c7257611c72611be2565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611cb857611cb8611be2565b81604052828152896020848701011115611cd157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600080600060608486031215611d0857600080fd5b8335611d13816117e8565b9250602084013591506040840135611d2a816117e8565b809150509250925092565b8183526000602080850194508260005b85811015611ba7578135611d58816117e8565b73ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101611d45565b87815286602082015273ffffffffffffffffffffffffffffffffffffffff8616604082015260a060608201526000611dbc60a083018688611d35565b82810360808401528381527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841115611df457600080fd5b8360051b80866020840137600091016020019081529998505050505050505050565b600181811c90821680611e2a57607f821691505b60208210811415611e64577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611efa57611efa611e99565b5060010190565b600082821015611f1357611f13611e99565b500390565b60008219821115611f2b57611f2b611e99565b500190565b73ffffffffffffffffffffffffffffffffffffffff85168152606060208201526000611f60606083018587611d35565b82810360408401526116cf8185611b77565b8281526040602082015260006115526040830184611961565b600060208284031215611f9d57600080fd5b815180151581146111cf57600080fd5b60008251611fbf818460208701611931565b9190910192915050565b6020815260006111cf602083018461196156fea164736f6c6343000809000a000000000000000000000000375442dcacefc8f93be8a102ea30aa16b658f1e1
Deployed Bytecode
0x6080604052600436106100e05760003560e01c80638da5cb5b1161007f578063cb3b0bab11610059578063cb3b0bab14610286578063f2fde38b146102b3578063f4ec1cf3146102d3578063f960713f146102f357600080fd5b80638da5cb5b1461020357806397e971d014610238578063c390d3311461026657600080fd5b8063390556f2116100bb578063390556f21461017257806358303b1014610192578063662f734e146101b6578063715018a6146101ee57600080fd5b8062db01e0146100ec57806301bc58981461010e5780632b6063a31461014357600080fd5b366100e757005b600080fd5b3480156100f857600080fd5b5061010c6101073660046117c6565b610331565b005b34801561011a57600080fd5b5061012e610129366004611856565b6104d5565b60405190151581526020015b60405180910390f35b34801561014f57600080fd5b5061016361015e366004611918565b6105b6565b60405161013a939291906119ab565b34801561017e57600080fd5b5061010c61018d3660046119d3565b610661565b34801561019e57600080fd5b506101a860025481565b60405190815260200161013a565b3480156101c257600080fd5b506101a86101d1366004611a3f565b600560209081526000928352604080842090915290825290205481565b3480156101fa57600080fd5b5061010c6107f0565b34801561020f57600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161013a565b34801561024457600080fd5b50610258610253366004611a6f565b61087d565b60405161013a929190611b05565b34801561027257600080fd5b5061010c610281366004611856565b61092e565b34801561029257600080fd5b506102a66102a1366004611b27565b610db0565b60405161013a9190611bb2565b3480156102bf57600080fd5b5061010c6102ce366004611bc5565b610ecd565b3480156102df57600080fd5b5061010c6102ee366004611c11565b610ffd565b3480156102ff57600080fd5b506101a861030e366004611cf3565b600460209081526000938452604080852082529284528284209052825290205481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b816002541015610423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070686173650000000000000000000000000000000000000060448201526064016103ae565b4263ffffffff16811015610493576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f496e76616c69642074696d65000000000000000000000000000000000000000060448201526064016103ae565b60008281526003602052604080822060010183905551829184917fa89951a03e2758c1bc16583a91fbb676c836dcda755bf7d40c05625b2bfdccec9190a35050565b60008584146104e6575060006105a9565b60008a8152600360205260409020600101544263ffffffff161061050c575060006105a9565b60008a8a8a8a8a8a8a60405160200161052b9796959493929190611d80565b6040516020818303038152906040528051906020012090506105a5848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600360008e81526020019081526020016000206000015483611125565b9150505b9998505050505050505050565b600360205260009081526040902080546001820154600283018054929391926105de90611e16565b80601f016020809104026020016040519081016040528092919081815260200182805461060a90611e16565b80156106575780601f1061062c57610100808354040283529160200191610657565b820191906000526020600020905b81548152906001019060200180831161063a57829003601f168201915b5050505050905083565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b60005b838110156107e957600085858381811061070157610701611e6a565b90506020020160208101906107169190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1614156107765761077183838381811061074757610747611e6a565b905060200201356107553390565b73ffffffffffffffffffffffffffffffffffffffff16906111d6565b6107d7565b6107d73384848481811061078c5761078c611e6a565b905060200201358787858181106107a5576107a5611e6a565b90506020020160208101906107ba9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff169190611335565b806107e181611ec8565b9150506106e5565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610871576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b61087b60006113c2565b565b606060008483146108ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f62616420746f6b656e7320616e6420616d6f756e7473206c656e67746800000060448201526064016103ae565b888888888888886040516020016109079796959493929190611d80565b60405160208183030381529060405291508180519060200120905097509795505050505050565b6002600154141561099b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103ae565b60026001556109b18989898989898989896104d5565b610a17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420636c61696d2064617461000000000000000000000000000060448201526064016103ae565b60008567ffffffffffffffff811115610a3257610a32611be2565b604051908082528060200260200182016040528015610a5b578160200160208202803683370190505b50905060005b86811015610d6157858582818110610a7b57610a7b611e6a565b9050602002013560001415610a8f57610d4f565b73ffffffffffffffffffffffffffffffffffffffff891660009081526004602090815260408083208e84529091528120818a8a85818110610ad257610ad2611e6a565b9050602002016020810190610ae79190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054878784818110610b3457610b34611e6a565b90506020020135610b459190611f01565b905080610b525750610d4f565b6000898984818110610b6657610b66611e6a565b9050602002016020810190610b7b9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff161415610bbc57610bb773ffffffffffffffffffffffffffffffffffffffff8b16826111d6565b610bd3565b610bd38a828b8b868181106107a5576107a5611e6a565b868683818110610be557610be5611e6a565b90506020020135600460008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008e815260200190815260200160002060008b8b86818110610c5057610c50611e6a565b9050602002016020810190610c659190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080838381518110610cb657610cb6611e6a565b60200260200101818152505080600560008e815260200190815260200160002060008b8b86818110610cea57610cea611e6a565b9050602002016020810190610cff9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d489190611f18565b9091555050505b80610d5981611ec8565b915050610a61565b50897f1869cd8d657c37384f585ccf16d7d1baddfcb0552617440f4fefe638726094c489898985604051610d989493929190611f30565b60405180910390a25050600180555050505050505050565b60608167ffffffffffffffff811115610dcb57610dcb611be2565b604051908082528060200260200182016040528015610df4578160200160208202803683370190505b50905060005b82811015610ec45773ffffffffffffffffffffffffffffffffffffffff85166000908152600460209081526040808320898452909152812090858584818110610e4557610e45611e6a565b9050602002016020810190610e5a9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054828281518110610ea757610ea7611e6a565b602090810291909101015280610ebc81611ec8565b915050610dfa565b50949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b73ffffffffffffffffffffffffffffffffffffffff8116610ff1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016103ae565b610ffa816113c2565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461107e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103ae565b60408051606081018252848152602080820185815282840185815260028054600090815260038552959095208451815591516001830155518051939491936110ce9392850192919091019061172d565b5050600280548492509060006110e383611ec8565b919050557fb920eca87e99c1731d756a5533a92f0e02ae5e4c79d50260a7303364f210ad018584604051611118929190611f72565b60405180910390a3505050565b600081815b85518110156111c957600086828151811061114757611147611e6a565b602002602001015190508083116111895760408051602081018590529081018290526060016040516020818303038152906040528051906020012092506111b6565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b50806111c181611ec8565b91505061112a565b50831490505b9392505050565b80471015611240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016103ae565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461129a576040519150601f19603f3d011682016040523d82523d6000602084013e61129f565b606091505b5050905080611330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016103ae565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052611330908490611437565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611499826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166115439092919063ffffffff16565b80519091501561133057808060200190518101906114b79190611f8b565b611330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103ae565b6060611552848460008561155a565b949350505050565b6060824710156115ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103ae565b843b611654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103ae565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161167d9190611fad565b60006040518083038185875af1925050503d80600081146116ba576040519150601f19603f3d011682016040523d82523d6000602084013e6116bf565b606091505b50915091506116cf8282866116da565b979650505050505050565b606083156116e95750816111cf565b8251156116f95782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ae9190611fc9565b82805461173990611e16565b90600052602060002090601f01602090048101928261175b57600085556117a1565b82601f1061177457805160ff19168380011785556117a1565b828001600101855582156117a1579182015b828111156117a1578251825591602001919060010190611786565b506117ad9291506117b1565b5090565b5b808211156117ad57600081556001016117b2565b600080604083850312156117d957600080fd5b50508035926020909101359150565b73ffffffffffffffffffffffffffffffffffffffff81168114610ffa57600080fd5b60008083601f84011261181c57600080fd5b50813567ffffffffffffffff81111561183457600080fd5b6020830191508360208260051b850101111561184f57600080fd5b9250929050565b600080600080600080600080600060c08a8c03121561187457600080fd5b8935985060208a0135975060408a013561188d816117e8565b965060608a013567ffffffffffffffff808211156118aa57600080fd5b6118b68d838e0161180a565b909850965060808c01359150808211156118cf57600080fd5b6118db8d838e0161180a565b909650945060a08c01359150808211156118f457600080fd5b506119018c828d0161180a565b915080935050809150509295985092959850929598565b60006020828403121561192a57600080fd5b5035919050565b60005b8381101561194c578181015183820152602001611934565b8381111561195b576000848401525b50505050565b60008151808452611979816020860160208601611931565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8381528260208201526060604082015260006119ca6060830184611961565b95945050505050565b600080600080604085870312156119e957600080fd5b843567ffffffffffffffff80821115611a0157600080fd5b611a0d8883890161180a565b90965094506020870135915080821115611a2657600080fd5b50611a338782880161180a565b95989497509550505050565b60008060408385031215611a5257600080fd5b823591506020830135611a64816117e8565b809150509250929050565b600080600080600080600060a0888a031215611a8a57600080fd5b87359650602088013595506040880135611aa3816117e8565b9450606088013567ffffffffffffffff80821115611ac057600080fd5b611acc8b838c0161180a565b909650945060808a0135915080821115611ae557600080fd5b50611af28a828b0161180a565b989b979a50959850939692959293505050565b604081526000611b186040830185611961565b90508260208301529392505050565b60008060008060608587031215611b3d57600080fd5b843593506020850135611b4f816117e8565b9250604085013567ffffffffffffffff811115611b6b57600080fd5b611a338782880161180a565b600081518084526020808501945080840160005b83811015611ba757815187529582019590820190600101611b8b565b509495945050505050565b6020815260006111cf6020830184611b77565b600060208284031215611bd757600080fd5b81356111cf816117e8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600060608486031215611c2657600080fd5b8335925060208401359150604084013567ffffffffffffffff80821115611c4c57600080fd5b818601915086601f830112611c6057600080fd5b813581811115611c7257611c72611be2565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611cb857611cb8611be2565b81604052828152896020848701011115611cd157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600080600060608486031215611d0857600080fd5b8335611d13816117e8565b9250602084013591506040840135611d2a816117e8565b809150509250925092565b8183526000602080850194508260005b85811015611ba7578135611d58816117e8565b73ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101611d45565b87815286602082015273ffffffffffffffffffffffffffffffffffffffff8616604082015260a060608201526000611dbc60a083018688611d35565b82810360808401528381527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841115611df457600080fd5b8360051b80866020840137600091016020019081529998505050505050505050565b600181811c90821680611e2a57607f821691505b60208210811415611e64577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611efa57611efa611e99565b5060010190565b600082821015611f1357611f13611e99565b500390565b60008219821115611f2b57611f2b611e99565b500190565b73ffffffffffffffffffffffffffffffffffffffff85168152606060208201526000611f60606083018587611d35565b82810360408401526116cf8185611b77565b8281526040602082015260006115526040830184611961565b600060208284031215611f9d57600080fd5b815180151581146111cf57600080fd5b60008251611fbf818460208701611931565b9190910192915050565b6020815260006111cf602083018461196156fea164736f6c6343000809000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000375442dcacefc8f93be8a102ea30aa16b658f1e1
-----Decoded View---------------
Arg [0] : admin (address): 0x375442dCACEfc8F93be8A102EA30Aa16b658f1E1
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000375442dcacefc8f93be8a102ea30aa16b658f1e1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.