More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 10,890 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Recycle Excess | 27482383 | 42 days ago | IN | 0 ETH | 0.0000002 | ||||
Set Grace Period | 27482364 | 42 days ago | IN | 0 ETH | 0.00000012 | ||||
Set Grace Period | 27482225 | 42 days ago | IN | 0 ETH | 0.0000001 | ||||
Set Grace Period | 27482212 | 42 days ago | IN | 0 ETH | 0.0000001 | ||||
Claim | 27480425 | 42 days ago | IN | 0 ETH | 0.00000028 | ||||
Claim | 27479846 | 42 days ago | IN | 0 ETH | 0.00000019 | ||||
Claim | 27471956 | 42 days ago | IN | 0 ETH | 0.00000024 | ||||
Claim | 27467492 | 42 days ago | IN | 0 ETH | 0.0000004 | ||||
Claim | 27463260 | 42 days ago | IN | 0 ETH | 0.00000052 | ||||
Claim | 27460296 | 42 days ago | IN | 0 ETH | 0.00000067 | ||||
Claim | 27452642 | 42 days ago | IN | 0 ETH | 0.00000036 | ||||
Claim | 27451349 | 42 days ago | IN | 0 ETH | 0.00000035 | ||||
Claim | 27450648 | 43 days ago | IN | 0 ETH | 0.00000025 | ||||
Claim | 27447555 | 43 days ago | IN | 0 ETH | 0.00000043 | ||||
Claim | 27444572 | 43 days ago | IN | 0 ETH | 0.00000032 | ||||
Claim | 27375894 | 44 days ago | IN | 0 ETH | 0.0000009 | ||||
Claim | 27308944 | 46 days ago | IN | 0 ETH | 0.00000024 | ||||
Claim | 27294275 | 46 days ago | IN | 0 ETH | 0.00000028 | ||||
Claim | 27284591 | 46 days ago | IN | 0 ETH | 0.00000029 | ||||
Claim | 27274118 | 47 days ago | IN | 0 ETH | 0.00000027 | ||||
Claim | 27271195 | 47 days ago | IN | 0 ETH | 0.00000027 | ||||
Claim | 27262198 | 47 days ago | IN | 0 ETH | 0.00000034 | ||||
Claim | 27258905 | 47 days ago | IN | 0 ETH | 0.0000027 | ||||
Claim | 27248149 | 47 days ago | IN | 0 ETH | 0.00000017 | ||||
Claim | 27246853 | 47 days ago | IN | 0 ETH | 0.00000031 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xBCeFF752...EC79d061c The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
TokenDistributor
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
No with 200 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "../@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "../@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "../@openzeppelin/contracts-upgradeable/cryptography/MerkleProofUpgradeable.sol"; import "./IMerkleDistributor.sol"; import "./MerkleDistributor.sol"; contract TokenDistributor is MerkleDistributor, OwnableUpgradeable { using SafeMathUpgradeable for uint256; uint256 public constant MAX_BPS = 10000; uint256 public claimsStart; uint256 public gracePeriod; uint256 public epochDuration; uint256 public rewardReductionPerEpoch; uint256 public currentRewardRate; uint256 public finalEpoch; address public rewardsEscrow; event Claimed(uint256 index, address indexed account, uint256 amount, uint256 userClaim, uint256 rewardsEscrowClaim); function initialize( address token_, bytes32 merkleRoot_, uint256 epochDuration_, uint256 rewardReductionPerEpoch_, uint256 claimsStart_, uint256 gracePeriod_, address rewardsEscrow_, address owner_ ) public initializer { __MerkleDistributor_init(token_, merkleRoot_); __Ownable_init(); transferOwnership(owner_); epochDuration = epochDuration_; rewardReductionPerEpoch = rewardReductionPerEpoch_; claimsStart = claimsStart_; gracePeriod = gracePeriod_; rewardsEscrow = rewardsEscrow_; currentRewardRate = 10000; finalEpoch = (currentRewardRate / rewardReductionPerEpoch_) - 1; } /// ===== View Functions ===== /// @dev Get grace period end timestamp function getGracePeriodEnd() public view returns (uint256) { return claimsStart.add(gracePeriod); } /// @dev Get claims start timestamp function getClaimsStartTime() public view returns (uint256) { return claimsStart; } /// @dev Get the next epoch start function getNextEpochStart() public view returns (uint256) { uint256 epoch = getCurrentEpoch(); if (epoch == 0) { return getGracePeriodEnd(); } else { return getGracePeriodEnd().add(epochDuration.mul(epoch)); } } function getTimeUntilNextEpoch() public view returns (uint256) { uint256 epoch = getCurrentEpoch(); if (epoch == 0) { return getGracePeriodEnd().sub(now); } else { return (getGracePeriodEnd().add(epochDuration.mul(epoch))).sub(now); } } /// @dev Get the current epoch number function getCurrentEpoch() public view returns (uint256) { uint256 gracePeriodEnd = claimsStart.add(gracePeriod); if (now < gracePeriodEnd) { return 0; } uint256 secondsPastGracePeriod = now.sub(gracePeriodEnd); return (secondsPastGracePeriod / epochDuration).add(1); } /// @dev Get the rewards % of current epoch function getCurrentRewardsRate() public view returns (uint256) { uint256 epoch = getCurrentEpoch(); if (epoch == 0) return MAX_BPS; if (epoch > finalEpoch) return 0; else return MAX_BPS.sub(epoch.mul(rewardReductionPerEpoch)); } /// @dev Get the rewards % of following epoch function getNextEpochRewardsRate() public view returns (uint256) { uint256 epoch = getCurrentEpoch().add(1); if (epoch == 0) return MAX_BPS; if (epoch > finalEpoch) return 0; else return MAX_BPS.sub(epoch.mul(rewardReductionPerEpoch)); } /// ===== Public Actions ===== function claim( uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) external virtual override { require(now >= claimsStart, "TokenDistributor: Before claim start."); // Intentionally commented out so users can pay gas for others claims // require(account == msg.sender, "TokenDistributor: Can only claim for own account."); require(getCurrentRewardsRate() > 0, "TokenDistributor: Past rewards claim period."); require(!isClaimed(index), "TokenDistributor: Drop already claimed."); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProofUpgradeable.verify(merkleProof, merkleRoot, node), "TokenDistributor: Invalid proof."); // Mark it claimed and send the token. _setClaimed(index); require(getCurrentRewardsRate() <= MAX_BPS, "Excessive Rewards Rate"); uint256 claimable = amount.mul(getCurrentRewardsRate()).div(MAX_BPS); require(IERC20Upgradeable(token).transfer(account, claimable), "Transfer to user failed."); emit Claimed(index, account, amount, claimable, amount.sub(claimable)); } /// ===== Gated Actions: Owner ===== /// @notice After claim period is complete, transfer excess funds to rewardsEscrow function recycleExcess() external onlyOwner { require(getCurrentRewardsRate() == 0 && getCurrentEpoch() > finalEpoch, "Claim period not finished"); uint256 remainingBalance = IERC20Upgradeable(token).balanceOf(address(this)); IERC20Upgradeable(token).transfer(rewardsEscrow, remainingBalance); } function setGracePeriod(uint256 duration) external onlyOwner { gracePeriod = duration; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "../@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "../@openzeppelin/contracts-upgradeable/cryptography/MerkleProofUpgradeable.sol"; import "../@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "./IMerkleDistributor.sol"; contract MerkleDistributor is Initializable, IMerkleDistributor { address public token; bytes32 public merkleRoot; // This is a packed array of booleans. mapping(uint256 => uint256) internal claimedBitMap; function __MerkleDistributor_init(address token_, bytes32 merkleRoot_) public initializer { token = token_; merkleRoot = merkleRoot_; } function isClaimed(uint256 index) public override view returns (bool) { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; uint256 claimedWord = claimedBitMap[claimedWordIndex]; uint256 mask = (1 << claimedBitIndex); return claimedWord & mask == mask; } function _setClaimed(uint256 index) internal { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex); } function claim( uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) external virtual override { require(!isClaimed(index), "MerkleDistributor: Drop already claimed."); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProofUpgradeable.verify(merkleProof, merkleRoot, node), "MerkleDistributor: Invalid proof."); // Mark it claimed and send the token. _setClaimed(index); require(IERC20Upgradeable(token).transfer(account, amount), "MerkleDistributor: Transfer failed."); emit Claimed(index, account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; // Allows anyone to claim a token if they exist in a merkle root. interface IMerkleDistributor { // Returns true if the index has been marked claimed. function isClaimed(uint256 index) external view returns (bool); // Claim the given amount of the token to the given address. Reverts if the inputs are invalid. function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external; // This event is triggered whenever a call to #claim succeeds. event Claimed(uint256 index, address account, uint256 amount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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.4.24 <0.7.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; // solhint-disable-next-line no-inline-assembly assembly { cs := extcodesize(self) } return cs == 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev These functions deal with verification of Merkle trees (hash trees), */ library MerkleProofUpgradeable { /** * @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.6.0; import "../GSN/ContextUpgradeable.sol"; import "../proxy/Initializable.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. */ contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../proxy/Initializable.sol"; /* * @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 GSN 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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"userClaim","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardsEscrowClaim","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","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"},{"inputs":[],"name":"MAX_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"__MerkleDistributor_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimsStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getClaimsStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentRewardsRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGracePeriodEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextEpochRewardsRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextEpochStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTimeUntilNextEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gracePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"},{"internalType":"uint256","name":"epochDuration_","type":"uint256"},{"internalType":"uint256","name":"rewardReductionPerEpoch_","type":"uint256"},{"internalType":"uint256","name":"claimsStart_","type":"uint256"},{"internalType":"uint256","name":"gracePeriod_","type":"uint256"},{"internalType":"address","name":"rewardsEscrow_","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recycleExcess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardReductionPerEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsEscrow","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setGracePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80639e34070f116100de578063f215793211610097578063f51ace7011610071578063f51ace70146105f3578063f9f1f30214610611578063fc0c546a1461061b578063fd967f471461064f5761018e565b8063f21579321461054d578063f2f6596014610581578063f2fde38b146105af5761018e565b80639e34070f146104735780639f2e7b19146104b7578063a06db7dc146104d5578063b97dd9e2146104f3578063be084c7714610511578063e58e230a1461052f5761018e565b8063601839ae1161014b578063829eb92c11610125578063829eb92c146103e55780638d0f7e11146104035780638da5cb5b1461042157806396d857c5146104555761018e565b8063601839ae1461036f57806365c5f94a146103bd578063715018a6146103db5761018e565b806306f46166146101935780632e7ba6ef146101b15780632eb4a7ab1461025e5780633a98d88e1461027c5780634ff0876a1461029a5780635a857e58146102b8575b600080fd5b61019b61066d565b6040518082815260200191505060405180910390f35b61025c600480360360808110156101c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184602083028401116401000000008311171561024c57600080fd5b90919293919293905050506106ec565b005b610266610b95565b6040518082815260200191505060405180910390f35b610284610b9b565b6040518082815260200191505060405180910390f35b6102a2610ba1565b6040518082815260200191505060405180910390f35b61036d60048036036101008110156102cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b005b6103bb6004803603604081101561038557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d43565b005b6103c5610e8b565b6040518082815260200191505060405180910390f35b6103e3610ee6565b005b6103ed611071565b6040518082815260200191505060405180910390f35b61040b611077565b6040518082815260200191505060405180910390f35b6104296110ef565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61045d611119565b6040518082815260200191505060405180910390f35b61049f6004803603602081101561048957600080fd5b8101908080359060200190929190505050611123565b60405180821515815260200191505060405180910390f35b6104bf611175565b6040518082815260200191505060405180910390f35b6104dd61117b565b6040518082815260200191505060405180910390f35b6104fb611181565b6040518082815260200191505060405180910390f35b6105196111ed565b6040518082815260200191505060405180910390f35b610537611252565b6040518082815260200191505060405180910390f35b610555611270565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ad6004803603602081101561059757600080fd5b8101908080359060200190929190505050611296565b005b6105f1600480360360208110156105c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061136a565b005b6105fb61157a565b6040518082815260200191505060405180910390f35b610619611580565b005b610623611896565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106576118bc565b6040518082815260200191505060405180910390f35b600080610678611181565b905060008114156106a55761069d4261068f611252565b6118c290919063ffffffff16565b9150506106e9565b6106e5426106d76106c18460695461190c90919063ffffffff16565b6106c9611252565b61199290919063ffffffff16565b6118c290919063ffffffff16565b9150505b90565b606754421015610747576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121696025913960400191505060405180910390fd5b60006107516111ed565b116107a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806120c8602c913960400191505060405180910390fd5b6107b085611123565b15610806576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061218e6027913960400191505060405180910390fd5b6000858585604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200193505050506040516020818303038152906040528051906020012090506108a8838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060015483611a1a565b61091a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f546f6b656e4469737472696275746f723a20496e76616c69642070726f6f662e81525060200191505060405180910390fd5b61092386611acf565b61271061092e6111ed565b11156109a2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f457863657373697665205265776172647320526174650000000000000000000081525060200191505060405180910390fd5b60006109d26127106109c46109b56111ed565b8861190c90919063ffffffff16565b611b2590919063ffffffff16565b9050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610a6757600080fd5b505af1158015610a7b573d6000803e3d6000fd5b505050506040513d6020811015610a9157600080fd5b8101908080519060200190929190505050610b14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f5472616e7366657220746f2075736572206661696c65642e000000000000000081525060200191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff167f528937b330082d892a98d4e428ab2dcca7844b51d227a1c0ae67f0b5261acbd9888784610b62868b6118c290919063ffffffff16565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050565b60015481565b606c5481565b60695481565b600060019054906101000a900460ff1680610bc65750610bc5611b6f565b5b80610bdc575060008054906101000a900460ff16155b610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061211a602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610c81576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b610c8b8989610d43565b610c93611b86565b610c9c8261136a565b8660698190555085606a81905550846067819055508360688190555082606d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612710606b81905550600186606b5481610d0f57fe5b0403606c819055508015610d385760008060016101000a81548160ff0219169083151502179055505b505050505050505050565b600060019054906101000a900460ff1680610d625750610d61611b6f565b5b80610d78575060008054906101000a900460ff16155b610dcd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061211a602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015610e1d576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b82600060026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816001819055508015610e865760008060016101000a81548160ff0219169083151502179055505b505050565b600080610e96611181565b90506000811415610eb157610ea9611252565b915050610ee3565b610edf610ec98260695461190c90919063ffffffff16565b610ed1611252565b61199290919063ffffffff16565b9150505b90565b610eee611c94565b73ffffffffffffffffffffffffffffffffffffffff16603560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fb0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16603560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000603560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60675481565b6000806110956001611087611181565b61199290919063ffffffff16565b905060008114156110ab576127109150506110ec565b606c548111156110bf5760009150506110ec565b6110e86110d7606a548361190c90919063ffffffff16565b6127106118c290919063ffffffff16565b9150505b90565b6000603560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000606754905090565b600080610100838161113157fe5b0490506000610100848161114157fe5b0690506000600260008481526020019081526020016000205490506000826001901b90508081831614945050505050919050565b606a5481565b60685481565b60008061119b60685460675461199290919063ffffffff16565b9050804210156111af5760009150506111ea565b60006111c482426118c290919063ffffffff16565b90506111e5600160695483816111d657fe5b0461199290919063ffffffff16565b925050505b90565b6000806111f8611181565b9050600081141561120e5761271091505061124f565b606c5481111561122257600091505061124f565b61124b61123a606a548361190c90919063ffffffff16565b6127106118c290919063ffffffff16565b9150505b90565b600061126b60685460675461199290919063ffffffff16565b905090565b606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61129e611c94565b73ffffffffffffffffffffffffffffffffffffffff16603560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611360576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060688190555050565b611372611c94565b73ffffffffffffffffffffffffffffffffffffffff16603560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611434576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806120f46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16603560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380603560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606b5481565b611588611c94565b73ffffffffffffffffffffffffffffffffffffffff16603560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461164a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006116546111ed565b1480156116695750606c54611667611181565b115b6116db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f436c61696d20706572696f64206e6f742066696e69736865640000000000000081525060200191505060405180910390fd5b60008060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561176557600080fd5b505afa158015611779573d6000803e3d6000fd5b505050506040513d602081101561178f57600080fd5b81019080805190602001909291905050509050600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb606d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b505050506040513d602081101561188157600080fd5b81019080805190602001909291905050505050565b600060029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61271081565b600061190483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c9c565b905092915050565b60008083141561191f576000905061198c565b600082840290508284828161193057fe5b0414611987576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806121486021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015611a10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60008082905060005b8551811015611ac1576000868281518110611a3a57fe5b60200260200101519050808311611a815782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250611ab3565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b508080600101915050611a23565b508381149150509392505050565b60006101008281611adc57fe5b04905060006101008381611aec57fe5b069050806001901b6002600084815260200190815260200160002054176002600084815260200190815260200160002081905550505050565b6000611b6783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611d5c565b905092915050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff1680611ba55750611ba4611b6f565b5b80611bbb575060008054906101000a900460ff16155b611c10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061211a602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611c60576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b611c68611e22565b611c70611f20565b8015611c915760008060016101000a81548160ff0219169083151502179055505b50565b600033905090565b6000838311158290611d49576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d0e578082015181840152602081019050611cf3565b50505050905090810190601f168015611d3b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290611e08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611dcd578082015181840152602081019050611db2565b50505050905090810190601f168015611dfa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611e1457fe5b049050809150509392505050565b600060019054906101000a900460ff1680611e415750611e40611b6f565b5b80611e57575060008054906101000a900460ff16155b611eac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061211a602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611efc576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015611f1d5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680611f3f5750611f3e611b6f565b5b80611f55575060008054906101000a900460ff16155b611faa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061211a602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015611ffa576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6000612004611c94565b905080603560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35080156120c45760008060016101000a81548160ff0219169083151502179055505b5056fe546f6b656e4469737472696275746f723a2050617374207265776172647320636c61696d20706572696f642e4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e4469737472696275746f723a204265666f726520636c61696d2073746172742e546f6b656e4469737472696275746f723a2044726f7020616c726561647920636c61696d65642ea2646970667358221220db981dfff9eab77405aef885a6043dec160edc913a6f68e37bb619e19cd9ded764736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.