Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 49 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18735049 | 325 days ago | IN | 0 ETH | 0.00586528 | ||||
Get Reward | 18735044 | 325 days ago | IN | 0 ETH | 0.00515424 | ||||
Withdraw | 18712642 | 329 days ago | IN | 0 ETH | 0.00818704 | ||||
Get Reward | 18712640 | 329 days ago | IN | 0 ETH | 0.00679362 | ||||
Withdraw | 18654994 | 337 days ago | IN | 0 ETH | 0.00229297 | ||||
Get Reward | 18654991 | 337 days ago | IN | 0 ETH | 0.00145144 | ||||
Withdraw | 18649606 | 337 days ago | IN | 0 ETH | 0.00231731 | ||||
Withdraw | 18649600 | 337 days ago | IN | 0 ETH | 0.0029016 | ||||
Withdraw | 18633289 | 340 days ago | IN | 0 ETH | 0.00281435 | ||||
Withdraw | 18633286 | 340 days ago | IN | 0 ETH | 0.00243378 | ||||
Get Reward | 18633284 | 340 days ago | IN | 0 ETH | 0.00187215 | ||||
Withdraw | 18612332 | 343 days ago | IN | 0 ETH | 0.00396407 | ||||
Withdraw | 18612324 | 343 days ago | IN | 0 ETH | 0.00311627 | ||||
Get Reward | 18612321 | 343 days ago | IN | 0 ETH | 0.00263397 | ||||
Stake | 18591030 | 346 days ago | IN | 0 ETH | 0.0021563 | ||||
Get Reward | 18578352 | 347 days ago | IN | 0 ETH | 0.00400678 | ||||
Get Reward | 18562231 | 350 days ago | IN | 0 ETH | 0.00261067 | ||||
Withdraw | 18527393 | 354 days ago | IN | 0 ETH | 0.00425693 | ||||
Get Reward | 18527387 | 354 days ago | IN | 0 ETH | 0.00332772 | ||||
Get Reward | 18477901 | 361 days ago | IN | 0 ETH | 0.00181159 | ||||
Get Reward | 18422690 | 369 days ago | IN | 0 ETH | 0.00198905 | ||||
Get Reward | 18227770 | 396 days ago | IN | 0 ETH | 0.00139267 | ||||
Stake | 18220438 | 397 days ago | IN | 0 ETH | 0.00179692 | ||||
Get Reward | 18020280 | 425 days ago | IN | 0 ETH | 0.00176248 | ||||
Get Reward | 17813057 | 454 days ago | IN | 0 ETH | 0.00176241 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
17386620 | 514 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
ClayStakingRewards
Compiler Version
v0.8.16+commit.07a7930e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IClayToken.sol"; /** User can stake Sumero LP Tokens (received by providing liquidity to a Liquidity Pool on Sumero) to earn CLAY rewards. User can unstake the Sumero LP tokens and claim rewards at any point in time. Rewards would depend on your - time period of stake - percentage of your staked tokens with respect to total staked tokens Owner of this contract can perform following actions: - pause / unpause this contract in case of closure of Staking Rewards scheme or other unforseen circumstances - change reward rate */ contract ClayStakingRewards is Ownable, ReentrancyGuard, Pausable { IClayToken public immutable clayToken; // Staking token would be Sumero LP tokens IERC20 public immutable stakingToken; // reward rate i.e. reward in wei rewarded per second for staking a whole token uint256 public rewardRate; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; uint256 public periodFinish; // Contract lifetime. uint256 public maxReward; // Max reward that this contract will emit during it's lifetime. mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; uint256 private _totalSupply; mapping(address => uint256) private _balances; constructor( address _stakedToken, address _clayToken, uint256 _periodFinish, uint256 _maxReward ) { require( _stakedToken != address(0) && _clayToken != address(0), "ClayStakingRewards: ZERO_ADDRESS" ); stakingToken = IERC20(_stakedToken); clayToken = IClayToken(_clayToken); periodFinish = _periodFinish; maxReward = _maxReward; rewardRate = _maxReward / (_periodFinish - block.timestamp); } /* ========== VIEWS ========== */ function totalSupply() external view returns (uint256) { return _totalSupply; } function balanceOf(address account) external view returns (uint256) { return _balances[account]; } function lastRewardTimeApplicable() public view returns (uint256) { return block.timestamp < periodFinish ? block.timestamp : periodFinish; } // Gives the rewards calculation till the block.timestamp // If the protocol has L(t) tokens staked at time t, then this function returns rewards from time t to block.timestamp // i.e, Rewards generated from the time where first ever staking happened in this contract, till now. function rewardPerToken() public view returns (uint256) { if (_totalSupply == 0) { return rewardPerTokenStored; } return rewardPerTokenStored + ((rewardRate * (lastRewardTimeApplicable() - lastUpdateTime) * 1e18) / _totalSupply); } function earned(address _account) public view returns (uint256) { return ((_balances[_account] * (rewardPerToken() - userRewardPerTokenPaid[_account])) / 1e18) + rewards[_account]; } /* ========== MODIFIERS ========== */ modifier updateReward(address _account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastRewardTimeApplicable(); rewards[_account] = earned(_account); userRewardPerTokenPaid[_account] = rewardPerTokenStored; _; } modifier notExpired { require( periodFinish > block.timestamp, "ClayStakingRewards: STAKING_PERIOD_EXPIRED" ); _; } /* ========== MUTATIVE FUNCTIONS ========== */ function stake(uint256 _amount) external nonReentrant whenNotPaused notExpired updateReward(msg.sender) { require(_amount > 0, "ClayStakingRewards: AMOUNT_IS_ZERO"); _totalSupply += _amount; _balances[msg.sender] += _amount; bool success = stakingToken.transferFrom( msg.sender, address(this), _amount ); require(success, "ClayStakingRewards: TRANSFER_FAILED"); emit Staked(msg.sender, _amount); } function withdraw(uint256 _amount) public nonReentrant updateReward(msg.sender) { require(_amount > 0, "ClayStakingRewards: AMOUNT_IS_ZERO"); require( _amount <= _balances[msg.sender], "ClayStakingRewards: INSUFFICIENT_BALANCE" ); _totalSupply -= _amount; _balances[msg.sender] -= _amount; bool success = stakingToken.transfer(msg.sender, _amount); require(success, "ClayStakingRewards: TRANSFER_FAILED"); emit Withdrawn(msg.sender, _amount); } function exit() external { withdraw(_balances[msg.sender]); getReward(); } function getReward() public nonReentrant updateReward(msg.sender) { uint256 reward = rewards[msg.sender]; require(reward > 0, "ClayStakingRewards: NO_REWARDS"); rewards[msg.sender] = 0; // Sumero Owner needs to grant MINTER_ROLE for CLAY to StakingRewards clayToken.mint(msg.sender, reward); emit RewardPaid(msg.sender, reward); } /* ========== RESTRICTED FUNCTIONS ========== */ function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function updateMaxReward(uint256 _maxReward) external onlyOwner notExpired { rewardPerTokenStored = rewardPerToken(); require( ((rewardPerTokenStored * _totalSupply) / 1e18) < _maxReward, "ClayStakingRewards: INVALID_MAX_REWARD_AMOUNT" ); lastUpdateTime = block.timestamp; maxReward = _maxReward; rewardRate = (_maxReward - ((rewardPerTokenStored * _totalSupply) / 1e18)) / (periodFinish - block.timestamp); emit RewardRateUpdated(rewardRate); } // Added to support recovering LP Rewards from other systems function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner { require( tokenAddress != address(stakingToken), "Cannot withdraw the staking token" ); IERC20(tokenAddress).transfer(owner(), tokenAmount); emit Recovered(tokenAddress, tokenAmount); } /* ========== EVENTS ========== */ event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardRateUpdated(uint256 rewardRate); event Recovered(address token, uint256 amount); }
// 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.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// 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.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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the Clay Token. */ interface IClayToken { function mint(address account, uint256 amount) external; function burn(address account, uint256 amount) external; function balanceOf(address account) external view returns (uint256); function transferFrom( address from, address to, uint256 amount ) external returns (bool); function totalSupply() external view returns (uint256); }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_stakedToken","type":"address"},{"internalType":"address","name":"_clayToken","type":"address"},{"internalType":"uint256","name":"_periodFinish","type":"uint256"},{"internalType":"uint256","name":"_maxReward","type":"uint256"}],"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardRate","type":"uint256"}],"name":"RewardRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clayToken","outputs":[{"internalType":"contract IClayToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastRewardTimeApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxReward","type":"uint256"}],"name":"updateMaxReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b50604051620013cc380380620013cc83398101604081905262000034916200016f565b6200003f3362000102565b600180556002805460ff191690556001600160a01b038416158015906200006e57506001600160a01b03831615155b620000bf5760405162461bcd60e51b815260206004820181905260248201527f436c61795374616b696e67526577617264733a205a45524f5f41444452455353604482015260640160405180910390fd5b6001600160a01b0380851660a052831660805260068290556007819055620000e84283620001b7565b620000f49082620001df565b600355506200020292505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200016a57600080fd5b919050565b600080600080608085870312156200018657600080fd5b620001918562000152565b9350620001a16020860162000152565b6040860151606090960151949790965092505050565b81810381811115620001d957634e487b7160e01b600052601160045260246000fd5b92915050565b600082620001fd57634e487b7160e01b600052601260045260246000fd5b500490565b60805160a051611188620002446000396000818161025a0152818161053c015281816107cb0152610a2601526000818161033e01526106f101526111886000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c80638980f11f116100de578063c8f33c9111610097578063e9fad8ee11610071578063e9fad8ee14610331578063eb247bc314610339578063ebe2b12b14610360578063f2fde38b1461036957600080fd5b8063c8f33c9114610317578063cd3daf9d14610320578063df136d651461032857600080fd5b80638980f11f146102a55780638b876347146102b85780638da5cb5b146102d8578063a694fc3a146102e9578063b3c5ad78146102fc578063c28903051461030457600080fd5b80635c975abb1161014b578063715018a611610125578063715018a61461024d57806372f702f3146102555780637b0a47ee146102945780638456cb591461029d57600080fd5b80635c975abb1461020557806366a78e6c1461021b57806370a082311461022457600080fd5b80628cc262146101925780630700037d146101b857806318160ddd146101d85780632e1a7d4d146101e05780633d18b912146101f55780633f4ba83a146101fd575b600080fd5b6101a56101a0366004610f7f565b61037c565b6040519081526020015b60405180910390f35b6101a56101c6366004610f7f565b60096020526000908152604090205481565b600a546101a5565b6101f36101ee366004610fa1565b6103f9565b005b6101f3610614565b6101f361078f565b60025460ff1660405190151581526020016101af565b6101a560075481565b6101a5610232366004610f7f565b6001600160a01b03166000908152600b602052604090205490565b6101f361079f565b61027c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101af565b6101a560035481565b6101f36107b1565b6101f36102b3366004610fba565b6107c1565b6101a56102c6366004610f7f565b60086020526000908152604090205481565b6000546001600160a01b031661027c565b6101f36102f7366004610fa1565b61092d565b6101a5610aec565b6101f3610312366004610fa1565b610b05565b6101a560045481565b6101a5610c4a565b6101a560055481565b6101f3610cab565b61027c7f000000000000000000000000000000000000000000000000000000000000000081565b6101a560065481565b6101f3610377366004610f7f565b610ccc565b6001600160a01b0381166000908152600960209081526040808320546008909252822054670de0b6b3a7640000906103b2610c4a565b6103bc9190610ffa565b6001600160a01b0385166000908152600b60205260409020546103df919061100d565b6103e9919061102c565b6103f3919061104e565b92915050565b610401610d42565b3361040a610c4a565b600555610415610aec565b6004556104218161037c565b6001600160a01b038216600090815260096020908152604080832093909355600554600890915291902055816104725760405162461bcd60e51b815260040161046990611061565b60405180910390fd5b336000908152600b60205260409020548211156104e25760405162461bcd60e51b815260206004820152602860248201527f436c61795374616b696e67526577617264733a20494e53554646494349454e546044820152675f42414c414e434560c01b6064820152608401610469565b81600a60008282546104f49190610ffa565b9091555050336000908152600b602052604081208054849290610518908490610ffa565b909155505060405163a9059cbb60e01b8152336004820152602481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561058d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906110a3565b9050806105d05760405162461bcd60e51b8152600401610469906110c5565b60405183815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a2505061061160018055565b50565b61061c610d42565b33610625610c4a565b600555610630610aec565b60045561063c8161037c565b6001600160a01b0382166000908152600960208181526040808420949094556005546008825284842055338352522054806106b95760405162461bcd60e51b815260206004820152601e60248201527f436c61795374616b696e67526577617264733a204e4f5f5245574152445300006044820152606401610469565b3360008181526009602052604080822091909155516340c10f1960e01b81526004810191909152602481018290526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b15801561073557600080fd5b505af1158015610749573d6000803e3d6000fd5b50506040518381523392507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486915060200160405180910390a2505061078d60018055565b565b610797610d9b565b61078d610df5565b6107a7610d9b565b61078d6000610e47565b6107b9610d9b565b61078d610e97565b6107c9610d9b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036108545760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b6064820152608401610469565b816001600160a01b031663a9059cbb6108756000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156108c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e691906110a3565b50604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b610935610d42565b61093d610ed4565b426006541161095e5760405162461bcd60e51b815260040161046990611108565b33610967610c4a565b600555610972610aec565b60045561097e8161037c565b6001600160a01b038216600090815260096020908152604080832093909355600554600890915291902055816109c65760405162461bcd60e51b815260040161046990611061565b81600a60008282546109d8919061104e565b9091555050336000908152600b6020526040812080548492906109fc90849061104e565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9b91906110a3565b905080610aba5760405162461bcd60e51b8152600401610469906110c5565b60405183815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020016105fe565b60006006544210610afe575060065490565b425b905090565b610b0d610d9b565b4260065411610b2e5760405162461bcd60e51b815260040161046990611108565b610b36610c4a565b6005819055600a548291670de0b6b3a764000091610b539161100d565b610b5d919061102c565b10610bc05760405162461bcd60e51b815260206004820152602d60248201527f436c61795374616b696e67526577617264733a20494e56414c49445f4d41585f60448201526c149155d0549117d05353d55395609a1b6064820152608401610469565b4260048190556007829055600654610bd89190610ffa565b670de0b6b3a7640000600a54600554610bf1919061100d565b610bfb919061102c565b610c059083610ffa565b610c0f919061102c565b60038190556040519081527f41d466ebd06fb97e7786086ac8b69b7eb7da798592036251291d34e9791cde019060200160405180910390a150565b6000600a54600003610c5d575060055490565b600a54600454610c6b610aec565b610c759190610ffa565b600354610c82919061100d565b610c9490670de0b6b3a764000061100d565b610c9e919061102c565b600554610b00919061104e565b336000908152600b6020526040902054610cc4906103f9565b61078d610614565b610cd4610d9b565b6001600160a01b038116610d395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610469565b61061181610e47565b600260015403610d945760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610469565b6002600155565b6000546001600160a01b0316331461078d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b610dfd610f1a565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e9f610ed4565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e2a3390565b60025460ff161561078d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610469565b60025460ff1661078d5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610469565b80356001600160a01b0381168114610f7a57600080fd5b919050565b600060208284031215610f9157600080fd5b610f9a82610f63565b9392505050565b600060208284031215610fb357600080fd5b5035919050565b60008060408385031215610fcd57600080fd5b610fd683610f63565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103f3576103f3610fe4565b600081600019048311821515161561102757611027610fe4565b500290565b60008261104957634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156103f3576103f3610fe4565b60208082526022908201527f436c61795374616b696e67526577617264733a20414d4f554e545f49535f5a45604082015261524f60f01b606082015260800190565b6000602082840312156110b557600080fd5b81518015158114610f9a57600080fd5b60208082526023908201527f436c61795374616b696e67526577617264733a205452414e534645525f46414960408201526213115160ea1b606082015260800190565b6020808252602a908201527f436c61795374616b696e67526577617264733a205354414b494e475f5045524960408201526913d117d156141254915160b21b60608201526080019056fea2646970667358221220ae21ff3c6c73afeb1f099b410dfcf504d16b32b46df00b698a07766614aca4c964736f6c6343000810003300000000000000000000000042613121853fa703c2046fd677f3c7e9325e19c0000000000000000000000000b441859e44f19754ee79afa91b081620ddfe269f000000000000000000000000000000000000000000000000000000006564aef00000000000000000000000000000000000000000000d3c21bcecceda10000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018d5760003560e01c80638980f11f116100de578063c8f33c9111610097578063e9fad8ee11610071578063e9fad8ee14610331578063eb247bc314610339578063ebe2b12b14610360578063f2fde38b1461036957600080fd5b8063c8f33c9114610317578063cd3daf9d14610320578063df136d651461032857600080fd5b80638980f11f146102a55780638b876347146102b85780638da5cb5b146102d8578063a694fc3a146102e9578063b3c5ad78146102fc578063c28903051461030457600080fd5b80635c975abb1161014b578063715018a611610125578063715018a61461024d57806372f702f3146102555780637b0a47ee146102945780638456cb591461029d57600080fd5b80635c975abb1461020557806366a78e6c1461021b57806370a082311461022457600080fd5b80628cc262146101925780630700037d146101b857806318160ddd146101d85780632e1a7d4d146101e05780633d18b912146101f55780633f4ba83a146101fd575b600080fd5b6101a56101a0366004610f7f565b61037c565b6040519081526020015b60405180910390f35b6101a56101c6366004610f7f565b60096020526000908152604090205481565b600a546101a5565b6101f36101ee366004610fa1565b6103f9565b005b6101f3610614565b6101f361078f565b60025460ff1660405190151581526020016101af565b6101a560075481565b6101a5610232366004610f7f565b6001600160a01b03166000908152600b602052604090205490565b6101f361079f565b61027c7f00000000000000000000000042613121853fa703c2046fd677f3c7e9325e19c081565b6040516001600160a01b0390911681526020016101af565b6101a560035481565b6101f36107b1565b6101f36102b3366004610fba565b6107c1565b6101a56102c6366004610f7f565b60086020526000908152604090205481565b6000546001600160a01b031661027c565b6101f36102f7366004610fa1565b61092d565b6101a5610aec565b6101f3610312366004610fa1565b610b05565b6101a560045481565b6101a5610c4a565b6101a560055481565b6101f3610cab565b61027c7f000000000000000000000000b441859e44f19754ee79afa91b081620ddfe269f81565b6101a560065481565b6101f3610377366004610f7f565b610ccc565b6001600160a01b0381166000908152600960209081526040808320546008909252822054670de0b6b3a7640000906103b2610c4a565b6103bc9190610ffa565b6001600160a01b0385166000908152600b60205260409020546103df919061100d565b6103e9919061102c565b6103f3919061104e565b92915050565b610401610d42565b3361040a610c4a565b600555610415610aec565b6004556104218161037c565b6001600160a01b038216600090815260096020908152604080832093909355600554600890915291902055816104725760405162461bcd60e51b815260040161046990611061565b60405180910390fd5b336000908152600b60205260409020548211156104e25760405162461bcd60e51b815260206004820152602860248201527f436c61795374616b696e67526577617264733a20494e53554646494349454e546044820152675f42414c414e434560c01b6064820152608401610469565b81600a60008282546104f49190610ffa565b9091555050336000908152600b602052604081208054849290610518908490610ffa565b909155505060405163a9059cbb60e01b8152336004820152602481018390526000907f00000000000000000000000042613121853fa703c2046fd677f3c7e9325e19c06001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561058d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b191906110a3565b9050806105d05760405162461bcd60e51b8152600401610469906110c5565b60405183815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a2505061061160018055565b50565b61061c610d42565b33610625610c4a565b600555610630610aec565b60045561063c8161037c565b6001600160a01b0382166000908152600960208181526040808420949094556005546008825284842055338352522054806106b95760405162461bcd60e51b815260206004820152601e60248201527f436c61795374616b696e67526577617264733a204e4f5f5245574152445300006044820152606401610469565b3360008181526009602052604080822091909155516340c10f1960e01b81526004810191909152602481018290526001600160a01b037f000000000000000000000000b441859e44f19754ee79afa91b081620ddfe269f16906340c10f1990604401600060405180830381600087803b15801561073557600080fd5b505af1158015610749573d6000803e3d6000fd5b50506040518381523392507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486915060200160405180910390a2505061078d60018055565b565b610797610d9b565b61078d610df5565b6107a7610d9b565b61078d6000610e47565b6107b9610d9b565b61078d610e97565b6107c9610d9b565b7f00000000000000000000000042613121853fa703c2046fd677f3c7e9325e19c06001600160a01b0316826001600160a01b0316036108545760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f7420776974686472617720746865207374616b696e6720746f6b656044820152603760f91b6064820152608401610469565b816001600160a01b031663a9059cbb6108756000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156108c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e691906110a3565b50604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b610935610d42565b61093d610ed4565b426006541161095e5760405162461bcd60e51b815260040161046990611108565b33610967610c4a565b600555610972610aec565b60045561097e8161037c565b6001600160a01b038216600090815260096020908152604080832093909355600554600890915291902055816109c65760405162461bcd60e51b815260040161046990611061565b81600a60008282546109d8919061104e565b9091555050336000908152600b6020526040812080548492906109fc90849061104e565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390526000907f00000000000000000000000042613121853fa703c2046fd677f3c7e9325e19c06001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9b91906110a3565b905080610aba5760405162461bcd60e51b8152600401610469906110c5565b60405183815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d906020016105fe565b60006006544210610afe575060065490565b425b905090565b610b0d610d9b565b4260065411610b2e5760405162461bcd60e51b815260040161046990611108565b610b36610c4a565b6005819055600a548291670de0b6b3a764000091610b539161100d565b610b5d919061102c565b10610bc05760405162461bcd60e51b815260206004820152602d60248201527f436c61795374616b696e67526577617264733a20494e56414c49445f4d41585f60448201526c149155d0549117d05353d55395609a1b6064820152608401610469565b4260048190556007829055600654610bd89190610ffa565b670de0b6b3a7640000600a54600554610bf1919061100d565b610bfb919061102c565b610c059083610ffa565b610c0f919061102c565b60038190556040519081527f41d466ebd06fb97e7786086ac8b69b7eb7da798592036251291d34e9791cde019060200160405180910390a150565b6000600a54600003610c5d575060055490565b600a54600454610c6b610aec565b610c759190610ffa565b600354610c82919061100d565b610c9490670de0b6b3a764000061100d565b610c9e919061102c565b600554610b00919061104e565b336000908152600b6020526040902054610cc4906103f9565b61078d610614565b610cd4610d9b565b6001600160a01b038116610d395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610469565b61061181610e47565b600260015403610d945760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610469565b6002600155565b6000546001600160a01b0316331461078d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610469565b610dfd610f1a565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e9f610ed4565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610e2a3390565b60025460ff161561078d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610469565b60025460ff1661078d5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610469565b80356001600160a01b0381168114610f7a57600080fd5b919050565b600060208284031215610f9157600080fd5b610f9a82610f63565b9392505050565b600060208284031215610fb357600080fd5b5035919050565b60008060408385031215610fcd57600080fd5b610fd683610f63565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103f3576103f3610fe4565b600081600019048311821515161561102757611027610fe4565b500290565b60008261104957634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156103f3576103f3610fe4565b60208082526022908201527f436c61795374616b696e67526577617264733a20414d4f554e545f49535f5a45604082015261524f60f01b606082015260800190565b6000602082840312156110b557600080fd5b81518015158114610f9a57600080fd5b60208082526023908201527f436c61795374616b696e67526577617264733a205452414e534645525f46414960408201526213115160ea1b606082015260800190565b6020808252602a908201527f436c61795374616b696e67526577617264733a205354414b494e475f5045524960408201526913d117d156141254915160b21b60608201526080019056fea2646970667358221220ae21ff3c6c73afeb1f099b410dfcf504d16b32b46df00b698a07766614aca4c964736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000042613121853fa703c2046fd677f3c7e9325e19c0000000000000000000000000b441859e44f19754ee79afa91b081620ddfe269f000000000000000000000000000000000000000000000000000000006564aef00000000000000000000000000000000000000000000d3c21bcecceda10000000
-----Decoded View---------------
Arg [0] : _stakedToken (address): 0x42613121853FA703c2046FD677f3c7E9325E19C0
Arg [1] : _clayToken (address): 0xB441859e44F19754eE79AFA91b081620dDFE269f
Arg [2] : _periodFinish (uint256): 1701097200
Arg [3] : _maxReward (uint256): 16000000000000000000000000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000042613121853fa703c2046fd677f3c7e9325e19c0
Arg [1] : 000000000000000000000000b441859e44f19754ee79afa91b081620ddfe269f
Arg [2] : 000000000000000000000000000000000000000000000000000000006564aef0
Arg [3] : 0000000000000000000000000000000000000000000d3c21bcecceda10000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.