Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 22 from a total of 22 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 20075045 | 41 days ago | IN | 0 ETH | 0.00269257 | ||||
Claim | 20075041 | 41 days ago | IN | 0 ETH | 0.00260135 | ||||
Claim | 20075027 | 41 days ago | IN | 0 ETH | 0.0028819 | ||||
Claim | 20075003 | 41 days ago | IN | 0 ETH | 0.00329668 | ||||
Create Reward Po... | 20074703 | 41 days ago | IN | 0 ETH | 0.00097552 | ||||
Create Reward Po... | 20074700 | 41 days ago | IN | 0 ETH | 0.00099195 | ||||
Claim | 19961820 | 57 days ago | IN | 0 ETH | 0.00163652 | ||||
Claim | 19960875 | 57 days ago | IN | 0 ETH | 0.00080336 | ||||
Claim | 19960826 | 57 days ago | IN | 0 ETH | 0.00104483 | ||||
Claim | 19960758 | 57 days ago | IN | 0 ETH | 0.00107057 | ||||
Claim | 19960719 | 57 days ago | IN | 0 ETH | 0.00131611 | ||||
Claim | 19960688 | 57 days ago | IN | 0 ETH | 0.0019501 | ||||
Create Reward Po... | 19960390 | 57 days ago | IN | 0 ETH | 0.00199391 | ||||
Create Reward Po... | 19960384 | 57 days ago | IN | 0 ETH | 0.00171626 | ||||
Claim | 19941341 | 59 days ago | IN | 0 ETH | 0.00058438 | ||||
Claim | 19941262 | 59 days ago | IN | 0 ETH | 0.00063235 | ||||
Update Reward Po... | 19940181 | 60 days ago | IN | 0 ETH | 0.00037919 | ||||
Update Reward Po... | 19939219 | 60 days ago | IN | 0 ETH | 0.00023401 | ||||
Update Reward Po... | 19939205 | 60 days ago | IN | 0 ETH | 0.00023792 | ||||
Create Reward Po... | 19939176 | 60 days ago | IN | 0 ETH | 0.00050624 | ||||
Create Reward Po... | 19939172 | 60 days ago | IN | 0 ETH | 0.00061906 | ||||
0x60806040 | 19938060 | 60 days ago | IN | Create: Reward | 0 ETH | 0.00921358 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Reward
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Reward is Ownable, ReentrancyGuard { struct RewardPool { bool unlocked; address rewardToken; bytes32 whitelistRoot; } RewardPool[] public rewardPools; mapping(uint8 => mapping(address => uint256)) public userRewards; event RewardClaimed(uint8 indexed poolId, address indexed account, uint256 amount); event RewardPoolCreated(uint8 indexed poolId, bool unlocked, address rewardToken, bytes32 whitelistRoot); event RewardPoolUpdated(uint8 indexed poolId, bool unlocked, address rewardToken, bytes32 whitelistRoot); constructor() Ownable() { } function claim(uint8 _poolId, uint256 _amount, bytes32[] calldata _proof) public nonReentrant { require(rewardPools[_poolId].unlocked, "Pool is locked"); require(userRewards[_poolId][msg.sender] == 0, "Already claimed"); //safe engough for this case bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _amount)); require(MerkleProof.verify(_proof, rewardPools[_poolId].whitelistRoot, leaf), "Invalid proof"); userRewards[_poolId][msg.sender] = _amount; require(IERC20(rewardPools[_poolId].rewardToken).transfer(msg.sender, _amount), "Transfer failed"); emit RewardClaimed(_poolId, msg.sender, _amount); } function createRewardPool(RewardPool calldata _rewardPool) public onlyOwner { rewardPools.push(_rewardPool); emit RewardPoolCreated( uint8(rewardPools.length - 1), _rewardPool.unlocked, _rewardPool.rewardToken, _rewardPool.whitelistRoot ); } function updateRewardPool(uint8 _poolId, RewardPool calldata _pool) public onlyOwner { RewardPool storage rewardPool = rewardPools[_poolId]; rewardPool.unlocked = _pool.unlocked; rewardPool.rewardToken = _pool.rewardToken; rewardPool.whitelistRoot = _pool.whitelistRoot; emit RewardPoolUpdated(_poolId, _pool.unlocked, _pool.rewardToken, _pool.whitelistRoot); } function emergencyWithdraw(address _token, uint256 _amount) public onlyOwner { bool result = IERC20(_token).transfer(msg.sender, _amount); require(result, "Transfer failed"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) 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 making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "remappings": [ "forge-std/=node_modules/forge-std/src/", "ds-test/=node_modules/ds-test/src/", "murky/=lib/murky/src/", "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "@ensdomains/=node_modules/@ensdomains/", "@nomiclabs/=node_modules/@nomiclabs/", "@solidity-parser/=node_modules/@solidity-parser/", "erc4626-tests/=lib/murky/lib/openzeppelin-contracts/lib/erc4626-tests/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/", "openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint8","name":"poolId","type":"uint8"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"poolId","type":"uint8"},{"indexed":false,"internalType":"bool","name":"unlocked","type":"bool"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"bytes32","name":"whitelistRoot","type":"bytes32"}],"name":"RewardPoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"poolId","type":"uint8"},{"indexed":false,"internalType":"bool","name":"unlocked","type":"bool"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"bytes32","name":"whitelistRoot","type":"bytes32"}],"name":"RewardPoolUpdated","type":"event"},{"inputs":[{"internalType":"uint8","name":"_poolId","type":"uint8"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"unlocked","type":"bool"},{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"bytes32","name":"whitelistRoot","type":"bytes32"}],"internalType":"struct Reward.RewardPool","name":"_rewardPool","type":"tuple"}],"name":"createRewardPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPools","outputs":[{"internalType":"bool","name":"unlocked","type":"bool"},{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"bytes32","name":"whitelistRoot","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_poolId","type":"uint8"},{"components":[{"internalType":"bool","name":"unlocked","type":"bool"},{"internalType":"address","name":"rewardToken","type":"address"},{"internalType":"bytes32","name":"whitelistRoot","type":"bytes32"}],"internalType":"struct Reward.RewardPool","name":"_pool","type":"tuple"}],"name":"updateRewardPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"userRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a33610023565b60018055610073565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610eea806100826000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c806395ccea6711610076578063bf84923a1161005b578063bf84923a1461015d578063c4a2b93c14610196578063f2fde38b146101a957600080fd5b806395ccea6714610137578063a8cd15b81461014a57600080fd5b806330d94bcf146100a857806346abf391146100bd578063715018a6146101075780638da5cb5b1461010f575b600080fd5b6100bb6100b6366004610bfa565b6101bc565b005b6100d06100cb366004610c2e565b610305565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060015b60405180910390f35b6100bb610353565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100fe565b6100bb610145366004610c69565b610367565b6100bb610158366004610c95565b61047c565b61018861016b366004610d1f565b600360209081526000928352604080842090915290825290205481565b6040519081526020016100fe565b6100bb6101a4366004610d56565b61084b565b6100bb6101b7366004610d72565b61091f565b6101c46109d6565b600060028360ff16815481106101dc576101dc610d8f565b600091825260209182902060029091020191506101fb90830183610dcc565b81547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169015151781556102356040830160208401610d72565b815473ffffffffffffffffffffffffffffffffffffffff91909116610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9091161781556040820135600182015560ff83167fbf13e2bd8c91829ba0cba5999f321a9f5a7be111a2b115bb7209b0ad9455d3826102b76020850185610dcc565b6102c76040860160208701610d72565b60408051921515835273ffffffffffffffffffffffffffffffffffffffff9091166020830152808601359082015260600160405180910390a2505050565b6002818154811061031557600080fd5b60009182526020909120600290910201805460019091015460ff8216925061010090910473ffffffffffffffffffffffffffffffffffffffff169083565b61035b6109d6565b6103656000610a57565b565b61036f6109d6565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905260009073ffffffffffffffffffffffffffffffffffffffff84169063a9059cbb906044016020604051808303816000875af11580156103e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104099190610de9565b905080610477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c6564000000000000000000000000000000000060448201526064015b60405180910390fd5b505050565b610484610acc565b60028460ff168154811061049a5761049a610d8f565b600091825260209091206002909102015460ff16610514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f506f6f6c206973206c6f636b6564000000000000000000000000000000000000604482015260640161046e565b60ff8416600090815260036020908152604080832033845290915290205415610599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920636c61696d65640000000000000000000000000000000000604482015260640161046e565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050610653838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002805490925060ff8a169150811061063b5761063b610d8f565b90600052602060002090600202016001015483610b3f565b6106b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070726f6f6600000000000000000000000000000000000000604482015260640161046e565b60ff8516600081815260036020908152604080832033845290915290208590556002805490919081106106ee576106ee610d8f565b60009182526020909120600290910201546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810186905261010090910473ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af1158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190610de9565b610801576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c65640000000000000000000000000000000000604482015260640161046e565b604051848152339060ff8716907fe740a8ecbede9b32963c2e92e25e49290fb6af8f0ad19b08efb5442ffabe8eed9060200160405180910390a35061084560018055565b50505050565b6108536109d6565b6002805460018101825560008290528291027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace016108918282610e06565b50506002546108a290600190610ea3565b60ff167f0105d5945c508f34ea60bdf5c5fed1a86f5b7ae1f01af8ee02ff19a92ea764666108d36020840184610dcc565b6108e36040850160208601610d72565b60408051921515835273ffffffffffffffffffffffffffffffffffffffff9091166020830152808501359082015260600160405180910390a250565b6109276109d6565b73ffffffffffffffffffffffffffffffffffffffff81166109ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161046e565b6109d381610a57565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161046e565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600260015403610b38576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161046e565b6002600155565b600082610b4c8584610b55565b14949350505050565b600081815b8451811015610b9057610b8682868381518110610b7957610b79610d8f565b6020026020010151610b9a565b9150600101610b5a565b5090505b92915050565b6000818310610bb6576000828152602084905260409020610bc5565b60008381526020839052604090205b9392505050565b803560ff81168114610bdd57600080fd5b919050565b600060608284031215610bf457600080fd5b50919050565b60008060808385031215610c0d57600080fd5b610c1683610bcc565b9150610c258460208501610be2565b90509250929050565b600060208284031215610c4057600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146109d357600080fd5b60008060408385031215610c7c57600080fd5b8235610c8781610c47565b946020939093013593505050565b60008060008060608587031215610cab57600080fd5b610cb485610bcc565b935060208501359250604085013567ffffffffffffffff80821115610cd857600080fd5b818701915087601f830112610cec57600080fd5b813581811115610cfb57600080fd5b8860208260051b8501011115610d1057600080fd5b95989497505060200194505050565b60008060408385031215610d3257600080fd5b610d3b83610bcc565b91506020830135610d4b81610c47565b809150509250929050565b600060608284031215610d6857600080fd5b610bc58383610be2565b600060208284031215610d8457600080fd5b8135610bc581610c47565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80151581146109d357600080fd5b600060208284031215610dde57600080fd5b8135610bc581610dbe565b600060208284031215610dfb57600080fd5b8151610bc581610dbe565b8135610e1181610dbe565b81547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811691151560ff1691821783556020840135610e4f81610c47565b74ffffffffffffffffffffffffffffffffffffffff008160081b16837fffffffffffffffffffffff000000000000000000000000000000000000000000841617178455505050604082013560018201555050565b81810381811115610b94577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea164736f6c6343000817000a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a35760003560e01c806395ccea6711610076578063bf84923a1161005b578063bf84923a1461015d578063c4a2b93c14610196578063f2fde38b146101a957600080fd5b806395ccea6714610137578063a8cd15b81461014a57600080fd5b806330d94bcf146100a857806346abf391146100bd578063715018a6146101075780638da5cb5b1461010f575b600080fd5b6100bb6100b6366004610bfa565b6101bc565b005b6100d06100cb366004610c2e565b610305565b60408051931515845273ffffffffffffffffffffffffffffffffffffffff9092166020840152908201526060015b60405180910390f35b6100bb610353565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100fe565b6100bb610145366004610c69565b610367565b6100bb610158366004610c95565b61047c565b61018861016b366004610d1f565b600360209081526000928352604080842090915290825290205481565b6040519081526020016100fe565b6100bb6101a4366004610d56565b61084b565b6100bb6101b7366004610d72565b61091f565b6101c46109d6565b600060028360ff16815481106101dc576101dc610d8f565b600091825260209182902060029091020191506101fb90830183610dcc565b81547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169015151781556102356040830160208401610d72565b815473ffffffffffffffffffffffffffffffffffffffff91909116610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff9091161781556040820135600182015560ff83167fbf13e2bd8c91829ba0cba5999f321a9f5a7be111a2b115bb7209b0ad9455d3826102b76020850185610dcc565b6102c76040860160208701610d72565b60408051921515835273ffffffffffffffffffffffffffffffffffffffff9091166020830152808601359082015260600160405180910390a2505050565b6002818154811061031557600080fd5b60009182526020909120600290910201805460019091015460ff8216925061010090910473ffffffffffffffffffffffffffffffffffffffff169083565b61035b6109d6565b6103656000610a57565b565b61036f6109d6565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905260009073ffffffffffffffffffffffffffffffffffffffff84169063a9059cbb906044016020604051808303816000875af11580156103e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104099190610de9565b905080610477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c6564000000000000000000000000000000000060448201526064015b60405180910390fd5b505050565b610484610acc565b60028460ff168154811061049a5761049a610d8f565b600091825260209091206002909102015460ff16610514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f506f6f6c206973206c6f636b6564000000000000000000000000000000000000604482015260640161046e565b60ff8416600090815260036020908152604080832033845290915290205415610599576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f416c726561647920636c61696d65640000000000000000000000000000000000604482015260640161046e565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050610653838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002805490925060ff8a169150811061063b5761063b610d8f565b90600052602060002090600202016001015483610b3f565b6106b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f496e76616c69642070726f6f6600000000000000000000000000000000000000604482015260640161046e565b60ff8516600081815260036020908152604080832033845290915290208590556002805490919081106106ee576106ee610d8f565b60009182526020909120600290910201546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810186905261010090910473ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044016020604051808303816000875af1158015610777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079b9190610de9565b610801576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c65640000000000000000000000000000000000604482015260640161046e565b604051848152339060ff8716907fe740a8ecbede9b32963c2e92e25e49290fb6af8f0ad19b08efb5442ffabe8eed9060200160405180910390a35061084560018055565b50505050565b6108536109d6565b6002805460018101825560008290528291027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace016108918282610e06565b50506002546108a290600190610ea3565b60ff167f0105d5945c508f34ea60bdf5c5fed1a86f5b7ae1f01af8ee02ff19a92ea764666108d36020840184610dcc565b6108e36040850160208601610d72565b60408051921515835273ffffffffffffffffffffffffffffffffffffffff9091166020830152808501359082015260600160405180910390a250565b6109276109d6565b73ffffffffffffffffffffffffffffffffffffffff81166109ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161046e565b6109d381610a57565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161046e565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600260015403610b38576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161046e565b6002600155565b600082610b4c8584610b55565b14949350505050565b600081815b8451811015610b9057610b8682868381518110610b7957610b79610d8f565b6020026020010151610b9a565b9150600101610b5a565b5090505b92915050565b6000818310610bb6576000828152602084905260409020610bc5565b60008381526020839052604090205b9392505050565b803560ff81168114610bdd57600080fd5b919050565b600060608284031215610bf457600080fd5b50919050565b60008060808385031215610c0d57600080fd5b610c1683610bcc565b9150610c258460208501610be2565b90509250929050565b600060208284031215610c4057600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146109d357600080fd5b60008060408385031215610c7c57600080fd5b8235610c8781610c47565b946020939093013593505050565b60008060008060608587031215610cab57600080fd5b610cb485610bcc565b935060208501359250604085013567ffffffffffffffff80821115610cd857600080fd5b818701915087601f830112610cec57600080fd5b813581811115610cfb57600080fd5b8860208260051b8501011115610d1057600080fd5b95989497505060200194505050565b60008060408385031215610d3257600080fd5b610d3b83610bcc565b91506020830135610d4b81610c47565b809150509250929050565b600060608284031215610d6857600080fd5b610bc58383610be2565b600060208284031215610d8457600080fd5b8135610bc581610c47565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80151581146109d357600080fd5b600060208284031215610dde57600080fd5b8135610bc581610dbe565b600060208284031215610dfb57600080fd5b8151610bc581610dbe565b8135610e1181610dbe565b81547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811691151560ff1691821783556020840135610e4f81610c47565b74ffffffffffffffffffffffffffffffffffffffff008160081b16837fffffffffffffffffffffff000000000000000000000000000000000000000000841617178455505050604082013560018201555050565b81810381811115610b94577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea164736f6c6343000817000a
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.