More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 7,833 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Rewards | 21245483 | 11 hrs ago | IN | 0 ETH | 0.0008464 | ||||
Unstake | 21238693 | 34 hrs ago | IN | 0 ETH | 0.00284218 | ||||
Claim Rewards | 21238687 | 34 hrs ago | IN | 0 ETH | 0.00172449 | ||||
Unstake | 21154068 | 13 days ago | IN | 0 ETH | 0.00161596 | ||||
Claim Rewards | 21154057 | 13 days ago | IN | 0 ETH | 0.00086908 | ||||
Unstake | 21042934 | 28 days ago | IN | 0 ETH | 0.00125393 | ||||
Unstake | 21040578 | 29 days ago | IN | 0 ETH | 0.00067726 | ||||
Claim Rewards | 21040570 | 29 days ago | IN | 0 ETH | 0.00045498 | ||||
Unstake | 20876270 | 52 days ago | IN | 0 ETH | 0.00143517 | ||||
Unstake | 20853108 | 55 days ago | IN | 0 ETH | 0.00398034 | ||||
Claim Rewards | 20692705 | 77 days ago | IN | 0 ETH | 0.00216216 | ||||
Claim Rewards | 20653057 | 83 days ago | IN | 0 ETH | 0.00010985 | ||||
Unstake | 20648942 | 83 days ago | IN | 0 ETH | 0.00023754 | ||||
Claim Rewards | 20560243 | 96 days ago | IN | 0 ETH | 0.00003403 | ||||
Unstake | 20560239 | 96 days ago | IN | 0 ETH | 0.00019322 | ||||
Claim Rewards | 20560235 | 96 days ago | IN | 0 ETH | 0.00012869 | ||||
Unstake | 20516275 | 102 days ago | IN | 0 ETH | 0.00017868 | ||||
Unstake | 20471584 | 108 days ago | IN | 0 ETH | 0.0006494 | ||||
Claim Rewards | 20471575 | 108 days ago | IN | 0 ETH | 0.00031216 | ||||
Unstake | 20390634 | 119 days ago | IN | 0 ETH | 0.00061306 | ||||
Claim Rewards | 20371782 | 122 days ago | IN | 0 ETH | 0.0005065 | ||||
Unstake | 20354082 | 124 days ago | IN | 0 ETH | 0.00043845 | ||||
Claim Rewards | 20354078 | 124 days ago | IN | 0 ETH | 0.00031329 | ||||
Claim Rewards | 20335570 | 127 days ago | IN | 0 ETH | 0.00074226 | ||||
Claim Rewards | 20326705 | 128 days ago | IN | 0 ETH | 0.00119233 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ComicStaking
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import '@openzeppelin/contracts/utils/math/Math.sol'; /* * @title Staking for Pixelvault ERC721 tokens * * @author Niftydude */ contract ComicStaking is Ownable, IERC721Receiver, Pausable, ReentrancyGuard { using EnumerableSet for EnumerableSet.UintSet; IERC20 public immutable rewardToken; IERC721 public immutable stakedTokenContract; uint256 constant MAX_REWARD_CHANGES = 2000; uint128 public rewardPerBlock; uint128 public lockupPeriod = 2592000; // 30 days struct Stake { uint128 lockupExpires; uint128 lastClaimedBlock; } struct RewardChanged { uint128 block; uint128 rewardPerBlock; } RewardChanged[] rewardChanges; event Staked(address indexed account, uint256[] tokenIds); event Unstaked(address indexed account, uint256[] tokenIds); event RewardsClaimed(address indexed account, uint256 amount); event RewardsChanged(uint128 indexed rewardPerBlock); event LockupPeriodChanged(uint128 indexed lockupPeriod); mapping(uint256 => Stake) public stakes; mapping(address => EnumerableSet.UintSet) private stakedTokens; constructor(address _rewardTokenContract, address _stakedTokenContract, uint128 _rewardPerBlock) { rewardToken = IERC20(_rewardTokenContract); stakedTokenContract = IERC721(_stakedTokenContract); rewardPerBlock = _rewardPerBlock; rewardChanges.push(RewardChanged(uint128(block.number), _rewardPerBlock)); } /** * @notice pause staking, unstaking and claiming rewards */ function pause() external onlyOwner { _pause(); } /** * @notice unpause staking, unstaking and claiming rewards */ function unpause() external onlyOwner { _unpause(); } /** * @notice set ERC20 reward amount per block * * @param _rewardPerBlock the reward amount */ function setRewardsPerBlock(uint128 _rewardPerBlock) external onlyOwner { require(rewardChanges.length < MAX_REWARD_CHANGES, "Set rewards: Max reward changes reached"); rewardPerBlock = _rewardPerBlock; rewardChanges.push(RewardChanged(uint128(block.number), _rewardPerBlock)); emit RewardsChanged(_rewardPerBlock); } /** * @notice set lockup period in seconds. * unstaking or claiming rewards not allowed until lockup period expired * * @param _lockupPeriod length of the lockup period in seconds */ function setLockupPeriod(uint128 _lockupPeriod) external onlyOwner { lockupPeriod = _lockupPeriod; emit LockupPeriodChanged(_lockupPeriod); } /** * @notice withdraw reward tokens owned by staking contract * * @param to the token ids to unstake * @param amount the amount of tokens to withdraw */ function withdraw(address to, uint256 amount) external onlyOwner { require( rewardToken.balanceOf(address(this)) >= amount, "Withdraw: balance exceeded"); rewardToken.transfer(to, amount); } /** * @notice stake given token ids for specified user * * @param tokenIds the token ids to stake */ function stake(uint256[] calldata tokenIds) external whenNotPaused nonReentrant { require(tokenIds.length <= 40 && tokenIds.length > 0, "Stake: amount prohibited"); for (uint256 i; i < tokenIds.length; i++) { require(stakedTokenContract.ownerOf(tokenIds[i]) == msg.sender, "Stake: sender not owner"); stakedTokenContract.safeTransferFrom(msg.sender, address(this), tokenIds[i]); stakes[tokenIds[i]] = Stake(uint128(block.timestamp + lockupPeriod), uint128(block.number)); stakedTokens[msg.sender].add(tokenIds[i]); } emit Staked(msg.sender, tokenIds); } /** * @notice unstake given token ids and claim rewards * * @param tokenIds the token ids to unstake */ function unstake(uint256[] calldata tokenIds) external whenNotPaused nonReentrant { require(tokenIds.length <= 40 && tokenIds.length > 0, "Unstake: amount prohibited"); uint256 rewards; for (uint256 i; i < tokenIds.length; i++) { require( stakedTokens[msg.sender].contains(tokenIds[i]), "Unstake: token not staked" ); require( stakes[tokenIds[i]].lockupExpires < block.timestamp, "Unstake: lockup period not expired" ); rewards += calculateRewards(tokenIds[i]); stakedTokens[msg.sender].remove(tokenIds[i]); delete stakes[tokenIds[i]]; stakedTokenContract.safeTransferFrom(address(this), msg.sender, tokenIds[i]); } rewardToken.transfer(msg.sender, rewards); emit Unstaked(msg.sender, tokenIds); emit RewardsClaimed(msg.sender, rewards); } /** * @notice unstake given token ids and forfeit rewards * * @param tokenIds the token ids to unstake */ function exitWithoutRewards(uint256[] calldata tokenIds) external whenNotPaused nonReentrant { require(tokenIds.length <= 40 && tokenIds.length > 0, "Unstake: amount prohibited"); for (uint256 i; i < tokenIds.length; i++) { require( stakedTokens[msg.sender].contains(tokenIds[i]), "Unstake: token not staked" ); stakedTokens[msg.sender].remove(tokenIds[i]); delete stakes[tokenIds[i]]; stakedTokenContract.safeTransferFrom(address(this), msg.sender, tokenIds[i]); } emit Unstaked(msg.sender, tokenIds); } /** * @notice claim rewards for given token ids * * @param tokenIds the token ids to claim for */ function claimRewards(uint256[] calldata tokenIds) external whenNotPaused { require(tokenIds.length > 0, "ClaimRewards: missing token ids"); uint256 rewards; for (uint256 i; i < tokenIds.length; i++) { require( stakedTokens[msg.sender].contains(tokenIds[i]), "ClaimRewards: token not staked" ); require( stakes[tokenIds[i]].lockupExpires < block.timestamp, "ClaimRewards: lockup period not expired" ); rewards += calculateRewards(tokenIds[i]); stakes[tokenIds[i]].lastClaimedBlock = uint128(block.number); } rewardToken.transfer(msg.sender, rewards); emit RewardsClaimed(msg.sender, rewards); } /** * @notice calculate rewards for all staken token ids of a given account * * @param account the account to calculate for */ function calculateRewardsByAccount(address account) external view returns (uint256) { uint256 rewards; for (uint256 i; i < stakedTokens[account].length(); i++) { rewards += calculateRewards(stakedTokens[account].at(i)); } return rewards; } /** * @notice calculate rewards for given token id * * @param tokenID the token id to calculate for */ function calculateRewards(uint256 tokenID) public view returns (uint256) { require(stakes[tokenID].lastClaimedBlock != 0, "token not staked"); uint256 rewards; uint256 blocksPassed; uint128 lastClaimedBlock = stakes[tokenID].lastClaimedBlock; uint256 from; uint256 last; for(uint256 i=0; i < rewardChanges.length; i++) { bool hasNext = i+1 < rewardChanges.length; from = rewardChanges[i].block >= lastClaimedBlock ? rewardChanges[i].block : lastClaimedBlock; last = hasNext ? (rewardChanges[i+1].block >= lastClaimedBlock ? rewardChanges[i+1].block : from ) : block.number; blocksPassed = last - from; rewards += rewardChanges[i].rewardPerBlock * blocksPassed; } return rewards; } /** * @notice return all staked token ids for a given account * * @param account the account to return token ids for */ function stakedTokensOf(address account) external view returns (uint256[] memory) { uint256[] memory tokenIds = new uint256[](stakedTokens[account].length()); for (uint256 i; i < tokenIds.length; i++) { tokenIds[i] = stakedTokens[account].at(i); } return tokenIds; } function onERC721Received(address operator, address, uint256, bytes memory) public view override returns (bytes4) { require(operator == address(this), "Operator not staking contract"); return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT 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 Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { 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 pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute. return (a / 2) + (b / 2) + (((a % 2) + (b % 2)) / 2); } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_rewardTokenContract","type":"address"},{"internalType":"address","name":"_stakedTokenContract","type":"address"},{"internalType":"uint128","name":"_rewardPerBlock","type":"uint128"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint128","name":"lockupPeriod","type":"uint128"}],"name":"LockupPeriodChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint128","name":"rewardPerBlock","type":"uint128"}],"name":"RewardsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","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":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"Unstaked","type":"event"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"calculateRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"calculateRewardsByAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"exitWithoutRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockupPeriod","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"_lockupPeriod","type":"uint128"}],"name":"setLockupPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_rewardPerBlock","type":"uint128"}],"name":"setRewardsPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakedTokenContract","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakedTokensOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakes","outputs":[{"internalType":"uint128","name":"lockupExpires","type":"uint128"},{"internalType":"uint128","name":"lastClaimedBlock","type":"uint128"}],"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":"tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052600280546001600160801b031661278d60881b1790553480156200002757600080fd5b5060405162002401380380620024018339810160408190526200004a916200016d565b620000553362000100565b6000805460ff60a01b1916815560018080556001600160601b0319606095861b81166080529390941b90921660a052600280546001600160801b039283166001600160801b0319909116811790915560408051808201909152438316815260208101918252600380549586018155909352915191518116600160801b029116177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910155620001c5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200016857600080fd5b919050565b60008060006060848603121562000182578283fd5b6200018d8462000150565b92506200019d6020850162000150565b60408501519092506001600160801b0381168114620001ba578182fd5b809150509250925092565b60805160601c60a05160601c6121d862000229600039600081816102910152818161046c015281816105860152818161107c015261163601526000818161038501528181610c510152818161171c015281816118fe01526119f401526121d86000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063a16820f1116100b8578063d5a44f861161007c578063d5a44f86146102d9578063e449f3411461032d578063ee947a7c14610340578063f2fde38b1461035a578063f3fef3a31461036d578063f7c618c11461038057600080fd5b8063a16820f114610259578063ab08d4fc1461026c578063c909c3431461028c578063cf6e2690146102b3578063d3ea4350146102c657600080fd5b80635c975abb1161010a5780635c975abb146101c95780635eac6239146101e6578063715018a6146101f95780638456cb59146102015780638ae39cac146102095780638da5cb5b1461023457600080fd5b80630fbf0a9314610147578063150b7a021461015c5780631f50d4581461018d5780633f4ba83a146101ae5780634bc901da146101b6575b600080fd5b61015a610155366004611efd565b6103a7565b005b61016f61016a366004611df9565b610788565b6040516001600160e01b031990911681526020015b60405180910390f35b6101a061019b366004611dba565b6107f3565b604051908152602001610184565b61015a61086c565b61015a6101c4366004611f8d565b6108a0565b600054600160a01b900460ff166040519015158152602001610184565b61015a6101f4366004611efd565b6109d9565b61015a610d10565b61015a610d44565b60025461021c906001600160801b031681565b6040516001600160801b039091168152602001610184565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610184565b61015a610267366004611f8d565b610d76565b61027f61027a366004611dba565b610dea565b604051610184919061201e565b6102417f000000000000000000000000000000000000000000000000000000000000000081565b61015a6102c1366004611efd565b610ecc565b6101a06102d4366004611fb4565b611181565b61030d6102e7366004611fb4565b6004602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610184565b61015a61033b366004611efd565b6113d4565b60025461021c90600160801b90046001600160801b031681565b61015a610368366004611dba565b611822565b61015a61037b366004611ed2565b6118bd565b6102417f000000000000000000000000000000000000000000000000000000000000000081565b600054600160a01b900460ff16156103da5760405162461bcd60e51b81526004016103d190612062565b60405180910390fd5b600260015414156103fd5760405162461bcd60e51b81526004016103d1906120c1565b60026001556028811180159061041257508015155b61045e5760405162461bcd60e51b815260206004820152601860248201527f5374616b653a20616d6f756e742070726f68696269746564000000000000000060448201526064016103d1565b60005b8181101561073c57337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e8585858181106104b957634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b81526004016104de91815260200190565b60206040518083038186803b1580156104f657600080fd5b505afa15801561050a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052e9190611ddd565b6001600160a01b0316146105845760405162461bcd60e51b815260206004820152601760248201527f5374616b653a2073656e646572206e6f74206f776e657200000000000000000060448201526064016103d1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166342842e0e33308686868181106105d557634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561062c57600080fd5b505af1158015610640573d6000803e3d6000fd5b50506040805180820190915260025490925082915061066f90600160801b90046001600160801b0316426120f8565b6001600160801b03168152602001436001600160801b0316815250600460008585858181106106ae57634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081810192909252604001600020825192909101516001600160801b03908116600160801b02921691909117905561072983838381811061070b57634e487b7160e01b600052603260045260246000fd5b33600090815260056020908152604090912093910201359050611a75565b508061073481612146565b915050610461565b50336001600160a01b03167f134b166c6094cc1ccbf1e3353ce5c3cd9fd29869051bdb999895854d77cc5ef68383604051610778929190611fe4565b60405180910390a2505060018055565b60006001600160a01b03851630146107e25760405162461bcd60e51b815260206004820152601d60248201527f4f70657261746f72206e6f74207374616b696e6720636f6e747261637400000060448201526064016103d1565b50630a85bd0160e11b949350505050565b60008060005b6001600160a01b038416600090815260056020526040902061081a90611a8a565b811015610865576001600160a01b0384166000908152600560205260409020610847906102d49083611a94565b61085190836120f8565b91508061085d81612146565b9150506107f9565b5092915050565b6000546001600160a01b031633146108965760405162461bcd60e51b81526004016103d19061208c565b61089e611aa0565b565b6000546001600160a01b031633146108ca5760405162461bcd60e51b81526004016103d19061208c565b6003546107d01161092d5760405162461bcd60e51b815260206004820152602760248201527f53657420726577617264733a204d617820726577617264206368616e676573206044820152661c995858da195960ca1b60648201526084016103d1565b600280546001600160801b038084166fffffffffffffffffffffffffffffffff199092168217909255604080518082018252438416815260208101838152600380546001810182556000918252925191518616600160801b0291909516177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b909101555190917f69777bc77abbe4e5f73b02ad077b656271cbfc1ff54def747bc11252475fc38a91a250565b600054600160a01b900460ff1615610a035760405162461bcd60e51b81526004016103d190612062565b80610a505760405162461bcd60e51b815260206004820152601f60248201527f436c61696d526577617264733a206d697373696e6720746f6b656e206964730060448201526064016103d1565b6000805b82811015610c3457610a9d848483818110610a7f57634e487b7160e01b600052603260045260246000fd5b33600090815260056020908152604090912093910201359050611b3d565b610ae95760405162461bcd60e51b815260206004820152601e60248201527f436c61696d526577617264733a20746f6b656e206e6f74207374616b6564000060448201526064016103d1565b4260046000868685818110610b0e57634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250810191909152604001600020546001600160801b031610610b8e5760405162461bcd60e51b815260206004820152602760248201527f436c61696d526577617264733a206c6f636b757020706572696f64206e6f7420604482015266195e1c1a5c995960ca1b60648201526084016103d1565b610bbd848483818110610bb157634e487b7160e01b600052603260045260246000fd5b90506020020135611181565b610bc790836120f8565b91504360046000868685818110610bee57634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081019190915260400160002080546001600160801b03928316600160801b02921691909117905580610c2c81612146565b915050610a54565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd59190611f6d565b5060405181815233907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe9060200160405180910390a2505050565b6000546001600160a01b03163314610d3a5760405162461bcd60e51b81526004016103d19061208c565b61089e6000611b55565b6000546001600160a01b03163314610d6e5760405162461bcd60e51b81526004016103d19061208c565b61089e611ba5565b6000546001600160a01b03163314610da05760405162461bcd60e51b81526004016103d19061208c565b600280546001600160801b03808416600160801b810291909216179091556040517f297f471036054ca5b7af43d83852a86324990c1ee06ddd7544b19faa9fe0ee5890600090a250565b6001600160a01b038116600090815260056020526040812060609190610e0f90611a8a565b67ffffffffffffffff811115610e3557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e5e578160200160208202803683370190505b50905060005b8151811015610865576001600160a01b0384166000908152600560205260409020610e8f9082611a94565b828281518110610eaf57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610ec481612146565b915050610e64565b600054600160a01b900460ff1615610ef65760405162461bcd60e51b81526004016103d190612062565b60026001541415610f195760405162461bcd60e51b81526004016103d1906120c1565b600260015560288111801590610f2e57508015155b610f7a5760405162461bcd60e51b815260206004820152601a60248201527f556e7374616b653a20616d6f756e742070726f6869626974656400000000000060448201526064016103d1565b60005b8181101561114557610fa8838383818110610a7f57634e487b7160e01b600052603260045260246000fd5b610ff05760405162461bcd60e51b8152602060048201526019602482015278155b9cdd185ad94e881d1bdad95b881b9bdd081cdd185ad959603a1b60448201526064016103d1565b61103183838381811061101357634e487b7160e01b600052603260045260246000fd5b33600090815260056020908152604090912093910201359050611c0a565b506004600084848481811061105657634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000908120556001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166342842e0e30338686868181106110c357634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561111a57600080fd5b505af115801561112e573d6000803e3d6000fd5b50505050808061113d90612146565b915050610f7d565b50336001600160a01b03167f20748b935fd9f21155c2e98cb2bd5df6fe86f21b193cebaae8d9ad7db0ba54168383604051610778929190611fe4565b600081815260046020526040812054600160801b90046001600160801b03166111df5760405162461bcd60e51b815260206004820152601060248201526f1d1bdad95b881b9bdd081cdd185ad95960821b60448201526064016103d1565b6000828152600460205260408120548190600160801b90046001600160801b03168180805b6003548110156113c85760035460009061121f8360016120f8565b109050846001600160801b03166003838154811061124d57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b0316101561126e57846112a5565b6003828154811061128f57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b03165b6001600160801b03169350806112bb5743611352565b6001600160801b03851660036112d28460016120f8565b815481106112f057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b031610156113115783611352565b600361131e8360016120f8565b8154811061133c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b03165b925061135e848461212f565b9550856003838154811061138257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546113a89190600160801b90046001600160801b0316612110565b6113b290886120f8565b96505080806113c090612146565b915050611204565b50939695505050505050565b600054600160a01b900460ff16156113fe5760405162461bcd60e51b81526004016103d190612062565b600260015414156114215760405162461bcd60e51b81526004016103d1906120c1565b60026001556028811180159061143657508015155b6114825760405162461bcd60e51b815260206004820152601a60248201527f556e7374616b653a20616d6f756e742070726f6869626974656400000000000060448201526064016103d1565b6000805b828110156116ff576114b1848483818110610a7f57634e487b7160e01b600052603260045260246000fd5b6114f95760405162461bcd60e51b8152602060048201526019602482015278155b9cdd185ad94e881d1bdad95b881b9bdd081cdd185ad959603a1b60448201526064016103d1565b426004600086868581811061151e57634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250810191909152604001600020546001600160801b0316106115995760405162461bcd60e51b815260206004820152602260248201527f556e7374616b653a206c6f636b757020706572696f64206e6f74206578706972604482015261195960f21b60648201526084016103d1565b6115bc848483818110610bb157634e487b7160e01b600052603260045260246000fd5b6115c690836120f8565b91506115eb84848381811061101357634e487b7160e01b600052603260045260246000fd5b506004600085858481811061161057634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000908120556001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166342842e0e303387878681811061167d57634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156116d457600080fd5b505af11580156116e8573d6000803e3d6000fd5b5050505080806116f790612146565b915050611486565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561176857600080fd5b505af115801561177c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a09190611f6d565b50336001600160a01b03167f20748b935fd9f21155c2e98cb2bd5df6fe86f21b193cebaae8d9ad7db0ba541684846040516117dc929190611fe4565b60405180910390a260405181815233907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe9060200160405180910390a250506001805550565b6000546001600160a01b0316331461184c5760405162461bcd60e51b81526004016103d19061208c565b6001600160a01b0381166118b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103d1565b6118ba81611b55565b50565b6000546001600160a01b031633146118e75760405162461bcd60e51b81526004016103d19061208c565b6040516370a0823160e01b815230600482015281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561194857600080fd5b505afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119809190611fcc565b10156119ce5760405162461bcd60e51b815260206004820152601a60248201527f57697468647261773a2062616c616e636520657863656564656400000000000060448201526064016103d1565b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b158015611a3857600080fd5b505af1158015611a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a709190611f6d565b505050565b6000611a818383611c16565b90505b92915050565b6000611a84825490565b6000611a818383611c65565b600054600160a01b900460ff16611af05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103d1565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60008181526001830160205260408120541515611a81565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff1615611bcf5760405162461bcd60e51b81526004016103d190612062565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b203390565b6000611a818383611c9d565b6000818152600183016020526040812054611c5d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611a84565b506000611a84565b6000826000018281548110611c8a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60008181526001830160205260408120548015611db0576000611cc160018361212f565b8554909150600090611cd59060019061212f565b9050818114611d56576000866000018281548110611d0357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110611d3457634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d7557634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611a84565b6000915050611a84565b600060208284031215611dcb578081fd5b8135611dd68161218d565b9392505050565b600060208284031215611dee578081fd5b8151611dd68161218d565b60008060008060808587031215611e0e578283fd5b8435611e198161218d565b93506020850135611e298161218d565b925060408501359150606085013567ffffffffffffffff80821115611e4c578283fd5b818701915087601f830112611e5f578283fd5b813581811115611e7157611e71612177565b604051601f8201601f19908116603f01168101908382118183101715611e9957611e99612177565b816040528281528a6020848701011115611eb1578586fd5b82602086016020830137918201602001949094529598949750929550505050565b60008060408385031215611ee4578182fd5b8235611eef8161218d565b946020939093013593505050565b60008060208385031215611f0f578182fd5b823567ffffffffffffffff80821115611f26578384fd5b818501915085601f830112611f39578384fd5b813581811115611f47578485fd5b8660208260051b8501011115611f5b578485fd5b60209290920196919550909350505050565b600060208284031215611f7e578081fd5b81518015158114611dd6578182fd5b600060208284031215611f9e578081fd5b81356001600160801b0381168114611dd6578182fd5b600060208284031215611fc5578081fd5b5035919050565b600060208284031215611fdd578081fd5b5051919050565b6020808252810182905260006001600160fb1b03831115612003578081fd5b8260051b808560408501379190910160400190815292915050565b6020808252825182820181905260009190848201906040850190845b818110156120565783518352928401929184019160010161203a565b50909695505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561210b5761210b612161565b500190565b600081600019048311821515161561212a5761212a612161565b500290565b60008282101561214157612141612161565b500390565b600060001982141561215a5761215a612161565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146118ba57600080fdfea264697066735822122025449ca5cf7d8d6d88c2da47c254071b5b9540a119ad9e2afdeda0443607cd9d64736f6c6343000804003300000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c9480000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101425760003560e01c8063a16820f1116100b8578063d5a44f861161007c578063d5a44f86146102d9578063e449f3411461032d578063ee947a7c14610340578063f2fde38b1461035a578063f3fef3a31461036d578063f7c618c11461038057600080fd5b8063a16820f114610259578063ab08d4fc1461026c578063c909c3431461028c578063cf6e2690146102b3578063d3ea4350146102c657600080fd5b80635c975abb1161010a5780635c975abb146101c95780635eac6239146101e6578063715018a6146101f95780638456cb59146102015780638ae39cac146102095780638da5cb5b1461023457600080fd5b80630fbf0a9314610147578063150b7a021461015c5780631f50d4581461018d5780633f4ba83a146101ae5780634bc901da146101b6575b600080fd5b61015a610155366004611efd565b6103a7565b005b61016f61016a366004611df9565b610788565b6040516001600160e01b031990911681526020015b60405180910390f35b6101a061019b366004611dba565b6107f3565b604051908152602001610184565b61015a61086c565b61015a6101c4366004611f8d565b6108a0565b600054600160a01b900460ff166040519015158152602001610184565b61015a6101f4366004611efd565b6109d9565b61015a610d10565b61015a610d44565b60025461021c906001600160801b031681565b6040516001600160801b039091168152602001610184565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610184565b61015a610267366004611f8d565b610d76565b61027f61027a366004611dba565b610dea565b604051610184919061201e565b6102417f0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c94881565b61015a6102c1366004611efd565b610ecc565b6101a06102d4366004611fb4565b611181565b61030d6102e7366004611fb4565b6004602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610184565b61015a61033b366004611efd565b6113d4565b60025461021c90600160801b90046001600160801b031681565b61015a610368366004611dba565b611822565b61015a61037b366004611ed2565b6118bd565b6102417f00000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea81565b600054600160a01b900460ff16156103da5760405162461bcd60e51b81526004016103d190612062565b60405180910390fd5b600260015414156103fd5760405162461bcd60e51b81526004016103d1906120c1565b60026001556028811180159061041257508015155b61045e5760405162461bcd60e51b815260206004820152601860248201527f5374616b653a20616d6f756e742070726f68696269746564000000000000000060448201526064016103d1565b60005b8181101561073c57337f0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c9486001600160a01b0316636352211e8585858181106104b957634e487b7160e01b600052603260045260246000fd5b905060200201356040518263ffffffff1660e01b81526004016104de91815260200190565b60206040518083038186803b1580156104f657600080fd5b505afa15801561050a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052e9190611ddd565b6001600160a01b0316146105845760405162461bcd60e51b815260206004820152601760248201527f5374616b653a2073656e646572206e6f74206f776e657200000000000000000060448201526064016103d1565b7f0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c9486001600160a01b03166342842e0e33308686868181106105d557634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561062c57600080fd5b505af1158015610640573d6000803e3d6000fd5b50506040805180820190915260025490925082915061066f90600160801b90046001600160801b0316426120f8565b6001600160801b03168152602001436001600160801b0316815250600460008585858181106106ae57634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081810192909252604001600020825192909101516001600160801b03908116600160801b02921691909117905561072983838381811061070b57634e487b7160e01b600052603260045260246000fd5b33600090815260056020908152604090912093910201359050611a75565b508061073481612146565b915050610461565b50336001600160a01b03167f134b166c6094cc1ccbf1e3353ce5c3cd9fd29869051bdb999895854d77cc5ef68383604051610778929190611fe4565b60405180910390a2505060018055565b60006001600160a01b03851630146107e25760405162461bcd60e51b815260206004820152601d60248201527f4f70657261746f72206e6f74207374616b696e6720636f6e747261637400000060448201526064016103d1565b50630a85bd0160e11b949350505050565b60008060005b6001600160a01b038416600090815260056020526040902061081a90611a8a565b811015610865576001600160a01b0384166000908152600560205260409020610847906102d49083611a94565b61085190836120f8565b91508061085d81612146565b9150506107f9565b5092915050565b6000546001600160a01b031633146108965760405162461bcd60e51b81526004016103d19061208c565b61089e611aa0565b565b6000546001600160a01b031633146108ca5760405162461bcd60e51b81526004016103d19061208c565b6003546107d01161092d5760405162461bcd60e51b815260206004820152602760248201527f53657420726577617264733a204d617820726577617264206368616e676573206044820152661c995858da195960ca1b60648201526084016103d1565b600280546001600160801b038084166fffffffffffffffffffffffffffffffff199092168217909255604080518082018252438416815260208101838152600380546001810182556000918252925191518616600160801b0291909516177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b909101555190917f69777bc77abbe4e5f73b02ad077b656271cbfc1ff54def747bc11252475fc38a91a250565b600054600160a01b900460ff1615610a035760405162461bcd60e51b81526004016103d190612062565b80610a505760405162461bcd60e51b815260206004820152601f60248201527f436c61696d526577617264733a206d697373696e6720746f6b656e206964730060448201526064016103d1565b6000805b82811015610c3457610a9d848483818110610a7f57634e487b7160e01b600052603260045260246000fd5b33600090815260056020908152604090912093910201359050611b3d565b610ae95760405162461bcd60e51b815260206004820152601e60248201527f436c61696d526577617264733a20746f6b656e206e6f74207374616b6564000060448201526064016103d1565b4260046000868685818110610b0e57634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250810191909152604001600020546001600160801b031610610b8e5760405162461bcd60e51b815260206004820152602760248201527f436c61696d526577617264733a206c6f636b757020706572696f64206e6f7420604482015266195e1c1a5c995960ca1b60648201526084016103d1565b610bbd848483818110610bb157634e487b7160e01b600052603260045260246000fd5b90506020020135611181565b610bc790836120f8565b91504360046000868685818110610bee57634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081019190915260400160002080546001600160801b03928316600160801b02921691909117905580610c2c81612146565b915050610a54565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea6001600160a01b03169063a9059cbb90604401602060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd59190611f6d565b5060405181815233907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe9060200160405180910390a2505050565b6000546001600160a01b03163314610d3a5760405162461bcd60e51b81526004016103d19061208c565b61089e6000611b55565b6000546001600160a01b03163314610d6e5760405162461bcd60e51b81526004016103d19061208c565b61089e611ba5565b6000546001600160a01b03163314610da05760405162461bcd60e51b81526004016103d19061208c565b600280546001600160801b03808416600160801b810291909216179091556040517f297f471036054ca5b7af43d83852a86324990c1ee06ddd7544b19faa9fe0ee5890600090a250565b6001600160a01b038116600090815260056020526040812060609190610e0f90611a8a565b67ffffffffffffffff811115610e3557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e5e578160200160208202803683370190505b50905060005b8151811015610865576001600160a01b0384166000908152600560205260409020610e8f9082611a94565b828281518110610eaf57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610ec481612146565b915050610e64565b600054600160a01b900460ff1615610ef65760405162461bcd60e51b81526004016103d190612062565b60026001541415610f195760405162461bcd60e51b81526004016103d1906120c1565b600260015560288111801590610f2e57508015155b610f7a5760405162461bcd60e51b815260206004820152601a60248201527f556e7374616b653a20616d6f756e742070726f6869626974656400000000000060448201526064016103d1565b60005b8181101561114557610fa8838383818110610a7f57634e487b7160e01b600052603260045260246000fd5b610ff05760405162461bcd60e51b8152602060048201526019602482015278155b9cdd185ad94e881d1bdad95b881b9bdd081cdd185ad959603a1b60448201526064016103d1565b61103183838381811061101357634e487b7160e01b600052603260045260246000fd5b33600090815260056020908152604090912093910201359050611c0a565b506004600084848481811061105657634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000908120556001600160a01b037f0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c948166342842e0e30338686868181106110c357634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561111a57600080fd5b505af115801561112e573d6000803e3d6000fd5b50505050808061113d90612146565b915050610f7d565b50336001600160a01b03167f20748b935fd9f21155c2e98cb2bd5df6fe86f21b193cebaae8d9ad7db0ba54168383604051610778929190611fe4565b600081815260046020526040812054600160801b90046001600160801b03166111df5760405162461bcd60e51b815260206004820152601060248201526f1d1bdad95b881b9bdd081cdd185ad95960821b60448201526064016103d1565b6000828152600460205260408120548190600160801b90046001600160801b03168180805b6003548110156113c85760035460009061121f8360016120f8565b109050846001600160801b03166003838154811061124d57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b0316101561126e57846112a5565b6003828154811061128f57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b03165b6001600160801b03169350806112bb5743611352565b6001600160801b03851660036112d28460016120f8565b815481106112f057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b031610156113115783611352565b600361131e8360016120f8565b8154811061133c57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160801b03165b925061135e848461212f565b9550856003838154811061138257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546113a89190600160801b90046001600160801b0316612110565b6113b290886120f8565b96505080806113c090612146565b915050611204565b50939695505050505050565b600054600160a01b900460ff16156113fe5760405162461bcd60e51b81526004016103d190612062565b600260015414156114215760405162461bcd60e51b81526004016103d1906120c1565b60026001556028811180159061143657508015155b6114825760405162461bcd60e51b815260206004820152601a60248201527f556e7374616b653a20616d6f756e742070726f6869626974656400000000000060448201526064016103d1565b6000805b828110156116ff576114b1848483818110610a7f57634e487b7160e01b600052603260045260246000fd5b6114f95760405162461bcd60e51b8152602060048201526019602482015278155b9cdd185ad94e881d1bdad95b881b9bdd081cdd185ad959603a1b60448201526064016103d1565b426004600086868581811061151e57634e487b7160e01b600052603260045260246000fd5b60209081029290920135835250810191909152604001600020546001600160801b0316106115995760405162461bcd60e51b815260206004820152602260248201527f556e7374616b653a206c6f636b757020706572696f64206e6f74206578706972604482015261195960f21b60648201526084016103d1565b6115bc848483818110610bb157634e487b7160e01b600052603260045260246000fd5b6115c690836120f8565b91506115eb84848381811061101357634e487b7160e01b600052603260045260246000fd5b506004600085858481811061161057634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000908120556001600160a01b037f0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c948166342842e0e303387878681811061167d57634e487b7160e01b600052603260045260246000fd5b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156116d457600080fd5b505af11580156116e8573d6000803e3d6000fd5b5050505080806116f790612146565b915050611486565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea6001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561176857600080fd5b505af115801561177c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a09190611f6d565b50336001600160a01b03167f20748b935fd9f21155c2e98cb2bd5df6fe86f21b193cebaae8d9ad7db0ba541684846040516117dc929190611fe4565b60405180910390a260405181815233907ffc30cddea38e2bf4d6ea7d3f9ed3b6ad7f176419f4963bd81318067a4aee73fe9060200160405180910390a250506001805550565b6000546001600160a01b0316331461184c5760405162461bcd60e51b81526004016103d19061208c565b6001600160a01b0381166118b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103d1565b6118ba81611b55565b50565b6000546001600160a01b031633146118e75760405162461bcd60e51b81526004016103d19061208c565b6040516370a0823160e01b815230600482015281907f00000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea6001600160a01b0316906370a082319060240160206040518083038186803b15801561194857600080fd5b505afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119809190611fcc565b10156119ce5760405162461bcd60e51b815260206004820152601a60248201527f57697468647261773a2062616c616e636520657863656564656400000000000060448201526064016103d1565b60405163a9059cbb60e01b81526001600160a01b038381166004830152602482018390527f00000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea169063a9059cbb90604401602060405180830381600087803b158015611a3857600080fd5b505af1158015611a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a709190611f6d565b505050565b6000611a818383611c16565b90505b92915050565b6000611a84825490565b6000611a818383611c65565b600054600160a01b900460ff16611af05760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103d1565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60008181526001830160205260408120541515611a81565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff1615611bcf5760405162461bcd60e51b81526004016103d190612062565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b203390565b6000611a818383611c9d565b6000818152600183016020526040812054611c5d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611a84565b506000611a84565b6000826000018281548110611c8a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60008181526001830160205260408120548015611db0576000611cc160018361212f565b8554909150600090611cd59060019061212f565b9050818114611d56576000866000018281548110611d0357634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110611d3457634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d7557634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611a84565b6000915050611a84565b600060208284031215611dcb578081fd5b8135611dd68161218d565b9392505050565b600060208284031215611dee578081fd5b8151611dd68161218d565b60008060008060808587031215611e0e578283fd5b8435611e198161218d565b93506020850135611e298161218d565b925060408501359150606085013567ffffffffffffffff80821115611e4c578283fd5b818701915087601f830112611e5f578283fd5b813581811115611e7157611e71612177565b604051601f8201601f19908116603f01168101908382118183101715611e9957611e99612177565b816040528281528a6020848701011115611eb1578586fd5b82602086016020830137918201602001949094529598949750929550505050565b60008060408385031215611ee4578182fd5b8235611eef8161218d565b946020939093013593505050565b60008060208385031215611f0f578182fd5b823567ffffffffffffffff80821115611f26578384fd5b818501915085601f830112611f39578384fd5b813581811115611f47578485fd5b8660208260051b8501011115611f5b578485fd5b60209290920196919550909350505050565b600060208284031215611f7e578081fd5b81518015158114611dd6578182fd5b600060208284031215611f9e578081fd5b81356001600160801b0381168114611dd6578182fd5b600060208284031215611fc5578081fd5b5035919050565b600060208284031215611fdd578081fd5b5051919050565b6020808252810182905260006001600160fb1b03831115612003578081fd5b8260051b808560408501379190910160400190815292915050565b6020808252825182820181905260009190848201906040850190845b818110156120565783518352928401929184019160010161203a565b50909695505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6000821982111561210b5761210b612161565b500190565b600081600019048311821515161561212a5761212a612161565b500290565b60008282101561214157612141612161565b500390565b600060001982141561215a5761215a612161565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146118ba57600080fdfea264697066735822122025449ca5cf7d8d6d88c2da47c254071b5b9540a119ad9e2afdeda0443607cd9d64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c9480000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _rewardTokenContract (address): 0x30c084890FC07D78F3499ffc818B3225bC8812EA
Arg [1] : _stakedTokenContract (address): 0x5ab21Ec0bfa0B29545230395e3Adaca7d552C948
Arg [2] : _rewardPerBlock (uint128): 0
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000030c084890fc07d78f3499ffc818b3225bc8812ea
Arg [1] : 0000000000000000000000005ab21ec0bfa0b29545230395e3adaca7d552c948
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.