Source Code
Latest 25 from a total of 10,898 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Batch Unstake | 22658633 | 4 hrs ago | IN | 0 ETH | 0.00014073 | ||||
Batch Unstake | 22643663 | 2 days ago | IN | 0 ETH | 0.00043662 | ||||
Unstake | 22605739 | 7 days ago | IN | 0 ETH | 0.00010829 | ||||
Unstake | 22598829 | 8 days ago | IN | 0 ETH | 0.0003588 | ||||
Batch Restake | 22589990 | 9 days ago | IN | 0 ETH | 0.00058686 | ||||
Batch Restake | 22582913 | 10 days ago | IN | 0 ETH | 0.00056684 | ||||
Batch Restake | 22582909 | 10 days ago | IN | 0 ETH | 0.00085082 | ||||
Stake | 22578548 | 11 days ago | IN | 0 ETH | 0.00015836 | ||||
Stake | 22578542 | 11 days ago | IN | 0 ETH | 0.00014722 | ||||
Batch Stake | 22578345 | 11 days ago | IN | 0 ETH | 0.00041732 | ||||
Stake | 22578342 | 11 days ago | IN | 0 ETH | 0.00018615 | ||||
Batch Restake | 22578191 | 11 days ago | IN | 0 ETH | 0.00022863 | ||||
Batch Restake | 22578075 | 11 days ago | IN | 0 ETH | 0.00020093 | ||||
Batch Restake | 22573730 | 12 days ago | IN | 0 ETH | 0.00038648 | ||||
Batch Restake | 22573578 | 12 days ago | IN | 0 ETH | 0.00039163 | ||||
Batch Restake | 22564256 | 13 days ago | IN | 0 ETH | 0.00016617 | ||||
Batch Restake | 22564251 | 13 days ago | IN | 0 ETH | 0.0002066 | ||||
Batch Stake | 22562980 | 13 days ago | IN | 0 ETH | 0.00032431 | ||||
Unstake | 22550519 | 15 days ago | IN | 0 ETH | 0.00004114 | ||||
Batch Restake | 22549793 | 15 days ago | IN | 0 ETH | 0.00020576 | ||||
Batch Restake | 22549790 | 15 days ago | IN | 0 ETH | 0.00022707 | ||||
Batch Restake | 22549787 | 15 days ago | IN | 0 ETH | 0.00022501 | ||||
Unstake | 22549276 | 15 days ago | IN | 0 ETH | 0.00010915 | ||||
Stake | 22547578 | 15 days ago | IN | 0 ETH | 0.00022763 | ||||
Batch Stake | 22547567 | 15 days ago | IN | 0 ETH | 0.00048276 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
UnifiedStaking
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/IMintableERC20.sol"; import "./libraries/NftStakingPool.sol"; import "./libraries/MinterAccess.sol"; /** * @title Samurai Saga Collections Staking * https://samuraisaga.com */ contract UnifiedStaking is NftStakingPool, MinterAccess { constructor(IMintableERC20 _rewardToken) NftStakingPool(_rewardToken) {} function _sendRewards(address destination, uint256 amount) internal override { uint256 b = rewardToken.balanceOf(address(this)); if (b >= amount) super._sendRewards(destination, amount); else IMintableERC20(address(rewardToken)).mint(destination, amount); } function stakeFrom( address from, uint256 poolId, uint256 tokenId ) external onlyMinters whenPoolOpened(poolId) { require(from != address(0), "Stake: address(0)"); Pool memory pool = getPool(poolId); _stake(from, pool.collection, tokenId, poolId); emit Stake(from, poolId, pool.collection, tokenId); } function batchStakeFrom( address from, uint256 poolId, uint256[] calldata tokenIds ) external onlyMinters whenPoolOpened(poolId) { require(from != address(0), "Stake: address(0)"); Pool memory pool = getPool(poolId); for (uint256 i = 0; i < tokenIds.length; i++) { _stake(from, pool.collection, tokenIds[i], poolId); } emit BatchStake(from, poolId, pool.collection, tokenIds); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IMintableERC20 is IERC20 { function mint(address destination, uint256 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Poolable.sol"; import "./Recoverable.sol"; /** @title NftStakingPool */ contract NftStakingPool is Ownable, Poolable, Recoverable, ReentrancyGuard, ERC721Holder { using SafeERC20 for IERC20; struct PoolDeposit { address owner; uint64 pool; uint256 depositDate; uint256 claimed; } struct MultiStakeParam { uint256[] tokenIds; uint256 poolId; } IERC20 public rewardToken; // poolDeposit per collection and tokenId mapping(address => mapping(uint256 => PoolDeposit)) private _deposits; // user rewards mapping mapping(address => uint256) private _userRewards; event Stake(address indexed account, uint256 poolId, address indexed collection, uint256 tokenId); event Unstake(address indexed account, address indexed collection, uint256 tokenId); event BatchStake(address indexed account, uint256 poolId, address indexed collection, uint256[] tokenIds); event BatchUnstake(address indexed account, address indexed collection, uint256[] tokenIds); event Claimed(address indexed account, address indexed collection, uint256 tokenId, uint256 rewards, uint256 pool); event ClaimedMulti(address indexed account, MultiStakeParam[] groups, uint256 rewards); constructor(IERC20 _rewardToken) { rewardToken = _rewardToken; } function _sendRewards(address destination, uint256 amount) internal virtual { rewardToken.safeTransfer(destination, amount); } function _sendAndUpdateRewards(address account, uint256 amount) internal { if (amount > 0) { _userRewards[account] = _userRewards[account] + amount; _sendRewards(account, amount); } } function _getPendingRewardAmounts(PoolDeposit memory deposit, Pool memory pool) internal view returns (uint256) { uint256 reward = 0; uint256 dt = deposit.depositDate; while (dt != 0 && pool.lockDuration != 0) { dt += pool.lockDuration; if (dt > block.timestamp) break; reward += pool.rewardAmount; if (pool.endRewardDate != 0 && dt > pool.endRewardDate) break; } if (reward <= deposit.claimed) { return 0; } return reward - deposit.claimed; } function _stake( address account, address collection, uint256 tokenId, uint256 poolId ) internal { require(_deposits[collection][tokenId].owner == address(0), "Stake: Token already staked"); // add deposit _deposits[collection][tokenId] = PoolDeposit({ owner: account, pool: uint64(poolId), depositDate: block.timestamp, claimed: 0 }); // transfer token IERC721(collection).safeTransferFrom(account, address(this), tokenId); } /** * @notice Stake a token from the collection */ function stake(uint256 poolId, uint256 tokenId) external nonReentrant whenPoolOpened(poolId) { address account = _msgSender(); Pool memory pool = getPool(poolId); _stake(account, pool.collection, tokenId, poolId); emit Stake(account, poolId, pool.collection, tokenId); } function _unstake( address account, address collection, uint256 tokenId ) internal returns (uint256) { PoolDeposit storage deposit = _deposits[collection][tokenId]; require(isUnlockable(deposit.pool, deposit.depositDate), "Stake: Not yet unstakable"); Pool memory pool = getPool(deposit.pool); uint256 rewards = _getPendingRewardAmounts(deposit, pool); if (rewards > 0) { deposit.claimed += rewards; } // update deposit delete _deposits[collection][tokenId]; // transfer token IERC721(collection).safeTransferFrom(address(this), account, tokenId); return rewards; } /** * @notice Unstake a token */ function unstake(address collection, uint256 tokenId) external nonReentrant { require(_deposits[collection][tokenId].owner == _msgSender(), "Stake: Not owner of token"); address account = _msgSender(); uint256 rewards = _unstake(account, collection, tokenId); _sendAndUpdateRewards(account, rewards); emit Unstake(account, collection, tokenId); } function _restake( uint256 newPoolId, address collection, uint256 tokenId ) internal returns (uint256) { require(isPoolOpened(newPoolId), "Stake: Pool is closed"); require(collectionForPool(newPoolId) == collection, "Stake: Invalid collection"); PoolDeposit storage deposit = _deposits[collection][tokenId]; Pool memory oldPool = getPool(deposit.pool); require(isUnlockable(deposit.pool, deposit.depositDate), "Stake: Not yet unstakable"); uint256 rewards = _getPendingRewardAmounts(deposit, oldPool); // update deposit deposit.pool = uint64(newPoolId); deposit.depositDate = block.timestamp; deposit.claimed = 0; return rewards; } /** * @notice Allow a user to [re]stake a token in a new pool without unstaking it first. */ function restake( uint256 newPoolId, address collection, uint256 tokenId ) external nonReentrant { require(_deposits[collection][tokenId].owner != address(0), "Stake: Token not staked"); require(_deposits[collection][tokenId].owner == _msgSender(), "Stake: Not owner of token"); address account = _msgSender(); uint256 rewards = _restake(newPoolId, collection, tokenId); _sendAndUpdateRewards(account, rewards); emit Unstake(account, collection, tokenId); emit Stake(account, newPoolId, collection, tokenId); } function _batchStake( address account, uint256 poolId, uint256[] memory tokenIds ) internal whenPoolOpened(poolId) { Pool memory pool = getPool(poolId); for (uint256 i = 0; i < tokenIds.length; i++) { _stake(account, pool.collection, tokenIds[i], poolId); } emit BatchStake(account, poolId, pool.collection, tokenIds); } function _batchUnstake( address account, address collection, uint256[] memory tokenIds ) internal { uint256 rewards = 0; for (uint256 i = 0; i < tokenIds.length; i++) { require(_deposits[collection][tokenIds[i]].owner == account, "Stake: Not owner of token"); rewards = rewards + _unstake(account, collection, tokenIds[i]); } _sendAndUpdateRewards(account, rewards); emit BatchUnstake(account, collection, tokenIds); } function _batchRestake( address account, uint256 poolId, address collection, uint256[] memory tokenIds ) internal { uint256 rewards = 0; for (uint256 i = 0; i < tokenIds.length; i++) { require(_deposits[collection][tokenIds[i]].owner == account, "Stake: Not owner of token"); rewards += _restake(poolId, collection, tokenIds[i]); } _sendAndUpdateRewards(account, rewards); emit BatchUnstake(account, collection, tokenIds); emit BatchStake(account, poolId, collection, tokenIds); } /** * @notice Batch stake a list of tokens from the collection */ function batchStake(uint256 poolId, uint256[] calldata tokenIds) external nonReentrant { _batchStake(_msgSender(), poolId, tokenIds); } /** * @notice Batch unstake tokens */ function batchUnstake(address collection, uint256[] calldata tokenIds) external nonReentrant { _batchUnstake(_msgSender(), collection, tokenIds); } /** * @notice Batch restake tokens */ function batchRestake( uint256 poolId, address collection, uint256[] calldata tokenIds ) external nonReentrant { _batchRestake(_msgSender(), poolId, collection, tokenIds); } /** * @notice Batch stake a list of tokens from different collections */ function stakeMulti(MultiStakeParam[] memory groups) external nonReentrant { address account = _msgSender(); for (uint256 i = 0; i < groups.length; i++) { _batchStake(account, groups[i].poolId, groups[i].tokenIds); } } /** * @notice Batch unstake tokens from different collections */ function unstakeMulti(MultiStakeParam[] memory groups) external nonReentrant { address account = _msgSender(); for (uint256 i = 0; i < groups.length; i++) { address collection = getPool(groups[i].poolId).collection; _batchUnstake(account, collection, groups[i].tokenIds); } } /** * @notice Batch restake tokens from different collections */ function restakeMulti(MultiStakeParam[] memory groups) external nonReentrant { address account = _msgSender(); for (uint256 i = 0; i < groups.length; i++) { address collection = getPool(groups[i].poolId).collection; _batchRestake(account, groups[i].poolId, collection, groups[i].tokenIds); } } function claim(address collection, uint256 tokenId) external { address account = _msgSender(); PoolDeposit storage deposit = _deposits[collection][tokenId]; require(deposit.owner == account, "Stake: Not owner of token"); require(isUnlockable(deposit.pool, deposit.depositDate), "Stake: Not yet unstakable"); Pool memory pool = getPool(deposit.pool); uint256 rewards = _getPendingRewardAmounts(deposit, pool); if (rewards > 0) { deposit.claimed += rewards; } _sendAndUpdateRewards(account, rewards); emit Claimed(account, collection, tokenId, rewards, deposit.pool); } function claimMulti(MultiStakeParam[] memory groups) external { address account = _msgSender(); uint256 rewards = 0; for (uint256 i = 0; i < groups.length; i++) { Pool memory pool = getPool(groups[i].poolId); for (uint256 u = 0; u < groups[i].tokenIds.length; u++) { PoolDeposit storage deposit = _deposits[pool.collection][groups[i].tokenIds[u]]; require(deposit.owner == _msgSender(), "Stake: Not owner of token"); require(isUnlockable(deposit.pool, deposit.depositDate), "Stake: Not yet unstakable"); uint256 depositRewards = _getPendingRewardAmounts(deposit, pool); if (depositRewards > 0) { deposit.claimed += depositRewards; rewards += depositRewards; } } } _sendAndUpdateRewards(account, rewards); emit ClaimedMulti(account, groups, rewards); } /** * @notice Checks if a token has been deposited for enough time to get rewards */ function isTokenUnlocked(address collection, uint256 tokenId) public view returns (bool) { require(_deposits[collection][tokenId].owner != address(0), "Stake: Token not staked"); return isUnlocked(_deposits[collection][tokenId].pool, _deposits[collection][tokenId].depositDate); } /** * @notice Get the stake detail for a token (owner, poolId, min unstakable date, reward unlock date) */ function getStakeInfo(address collection, uint256 tokenId) external view returns ( address owner, // owner uint256 poolId, // poolId uint256 depositDate, // deposit date uint256 unlockDate, // unlock date uint256 rewardDate, // reward date uint256 totalClaimed // total claimed ) { if (_deposits[collection][tokenId].owner == address(0)) { return (address(0), 0, 0, 0, 0, 0); } PoolDeposit memory deposit = _deposits[collection][tokenId]; Pool memory pool = getPool(deposit.pool); return ( deposit.owner, deposit.pool, deposit.depositDate, deposit.depositDate + pool.minDuration, deposit.depositDate + pool.lockDuration, deposit.claimed ); } /** * @notice Returns the total reward for a user */ function getUserTotalRewards(address account) external view returns (uint256) { return _userRewards[account]; } function recoverNonFungibleToken(address _token, uint256 _tokenId) external override onlyOwner { // staked tokens cannot be recovered by owner require(_deposits[_token][_tokenId].owner == address(0), "Stake: Cannot recover staked token"); IERC721(_token).transferFrom(address(this), address(msg.sender), _tokenId); emit NonFungibleTokenRecovery(_token, _tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; /** * @title MinterAccess */ abstract contract MinterAccess is Ownable { mapping(address => bool) private _minters; event MinterAdded(address indexed minter); event MinterRemoved(address indexed minter); modifier onlyMinters() { require(_minters[_msgSender()], "Mintable: Caller is not minter"); _; } function isMinter(address account) public view returns (bool) { return _minters[account]; } function addMinter(address minter) external onlyOwner { require(!_minters[minter], "Mintable: Already minter"); _minters[minter] = true; emit MinterAdded(minter); } function removeMinter(address minter) external onlyOwner { require(_minters[minter], "Mintable: Not minter"); _minters[minter] = false; emit MinterRemoved(minter); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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 (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 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 { _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.6.0) (token/ERC721/IERC721.sol) 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`. * * 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; /** * @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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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() { // 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; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; /** @title Poolable. @dev This contract manage configuration of pools */ abstract contract Poolable is Ownable { struct Pool { address collection; // nft collection uint256 lockDuration; // locked timespan uint256 minDuration; // min deposit timespan uint256 endRewardDate; // date to end the rewards uint256 rewardAmount; // amount rewarded when lockDuration is reached } // pools mapping uint256 public poolsLength; mapping(uint256 => Pool) private _pools; /** * @dev Emitted when a pool is created */ event PoolAdded(uint256 poolIndex, Pool pool); /** * @dev Emitted when a pool is updated */ event PoolUpdated(uint256 poolIndex, Pool pool); /** * @dev Modifier that checks that the pool at index `poolIndex` is open */ modifier whenPoolOpened(uint256 poolIndex) { require( isPoolOpened(poolIndex), "Poolable: Pool is closed" ); _; } /** * @dev Modifier that checks that the now() - `depositDate` is above or equal to the min lock duration for pool at index `poolIndex` */ modifier whenUnlocked(uint256 poolIndex, uint256 depositDate) { require(isUnlocked(poolIndex, depositDate), "Poolable: Not unlocked"); _; } function getPool(uint256 poolIndex) public view returns (Pool memory) { require(poolIndex < poolsLength, "Poolable: Invalid poolIndex"); return _pools[poolIndex]; } function addPool(Pool calldata pool) external onlyOwner { uint256 poolIndex = poolsLength; _pools[poolIndex] = pool; poolsLength = poolsLength + 1; emit PoolAdded(poolIndex, _pools[poolIndex]); } function updatePool(uint256 poolIndex, Pool calldata pool) external onlyOwner { require(poolIndex < poolsLength, "Poolable: Invalid poolIndex"); Pool storage editedPool = _pools[poolIndex]; editedPool.lockDuration = pool.lockDuration; editedPool.minDuration = pool.minDuration; editedPool.endRewardDate = pool.endRewardDate; editedPool.rewardAmount = pool.rewardAmount; emit PoolUpdated(poolIndex, editedPool); } function closePool(uint256 poolIndex) external onlyOwner whenPoolOpened(poolIndex) { Pool storage editedPool = _pools[poolIndex]; editedPool.endRewardDate = block.timestamp; emit PoolUpdated(poolIndex, editedPool); } function isUnlocked(uint256 poolIndex, uint256 depositDate) internal view returns (bool) { require(poolIndex < poolsLength, "Poolable: Invalid poolIndex"); require(depositDate < block.timestamp, "Poolable: Invalid deposit date"); return block.timestamp - depositDate >= _pools[poolIndex].lockDuration; } function isUnlockable(uint256 poolIndex, uint256 depositDate) internal view returns (bool) { require(poolIndex < poolsLength, "Poolable: Invalid poolIndex"); require(depositDate < block.timestamp, "Poolable: Invalid deposit date"); return block.timestamp - depositDate >= _pools[poolIndex].minDuration; } function isPoolOpened(uint256 poolIndex) public view returns (bool) { require(poolIndex < poolsLength, "Poolable: Invalid poolIndex"); return _pools[poolIndex].endRewardDate == 0 || _pools[poolIndex].endRewardDate > block.timestamp; } function collectionForPool(uint256 poolIndex) public view returns (address) { require(poolIndex < poolsLength, "Poolable: Invalid poolIndex"); return _pools[poolIndex].collection; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "../interfaces/IRecoverable.sol"; abstract contract Recoverable is Ownable, IRecoverable { using SafeERC20 for IERC20; event NonFungibleTokenRecovery(address indexed token, uint256 tokenId); event TokenRecovery(address indexed token, uint256 amount); event EthRecovery(uint256 amount); /** * @notice Allows the owner to recover non-fungible tokens sent to the contract by mistake * @param _token: NFT token address * @param _tokenId: tokenId * @dev Callable by owner */ function recoverNonFungibleToken(address _token, uint256 _tokenId) external virtual onlyOwner { IERC721(_token).transferFrom(address(this), address(msg.sender), _tokenId); emit NonFungibleTokenRecovery(_token, _tokenId); } /** * @notice Allows the owner to recover tokens sent to the contract by mistake * @param _token: token address * @dev Callable by owner */ function recoverToken(address _token) external virtual onlyOwner { uint256 balance = IERC20(_token).balanceOf(address(this)); require(balance != 0, "Operations: Cannot recover zero balance"); IERC20(_token).safeTransfer(address(msg.sender), balance); emit TokenRecovery(_token, balance); } function recoverEth(address payable _to) external virtual onlyOwner { uint256 balance = address(this).balance; _to.transfer(balance); emit EthRecovery(balance); } }
// 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 // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) 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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRecoverable { /** * @notice Allows the owner to recover non-fungible tokens sent to the NFT contract by mistake and this contract * @param _token: NFT token address * @param _tokenId: tokenId * @dev Callable by owner */ function recoverNonFungibleToken(address _token, uint256 _tokenId) external; /** * @notice Allows the owner to recover tokens sent to the NFT contract and this contract by mistake * @param _token: token address * @dev Callable by owner */ function recoverToken(address _token) external; /** * @notice Allows the owner to recover ETH sent to the NFT contract ans and contract by mistake * @param _to: target address * @dev Callable by owner */ function recoverEth(address payable _to) external; }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IMintableERC20","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"BatchStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"BatchUnstake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewards","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pool","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"components":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"indexed":false,"internalType":"struct NftStakingPool.MultiStakeParam[]","name":"groups","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"rewards","type":"uint256"}],"name":"ClaimedMulti","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EthRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NonFungibleTokenRecovery","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":"uint256","name":"poolIndex","type":"uint256"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"lockDuration","type":"uint256"},{"internalType":"uint256","name":"minDuration","type":"uint256"},{"internalType":"uint256","name":"endRewardDate","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"indexed":false,"internalType":"struct Poolable.Pool","name":"pool","type":"tuple"}],"name":"PoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"lockDuration","type":"uint256"},{"internalType":"uint256","name":"minDuration","type":"uint256"},{"internalType":"uint256","name":"endRewardDate","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"indexed":false,"internalType":"struct Poolable.Pool","name":"pool","type":"tuple"}],"name":"PoolUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolId","type":"uint256"},{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unstake","type":"event"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"lockDuration","type":"uint256"},{"internalType":"uint256","name":"minDuration","type":"uint256"},{"internalType":"uint256","name":"endRewardDate","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"internalType":"struct Poolable.Pool","name":"pool","type":"tuple"}],"name":"addPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchRestake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchStakeFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"internalType":"struct NftStakingPool.MultiStakeParam[]","name":"groups","type":"tuple[]"}],"name":"claimMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"closePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"collectionForPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"getPool","outputs":[{"components":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"lockDuration","type":"uint256"},{"internalType":"uint256","name":"minDuration","type":"uint256"},{"internalType":"uint256","name":"endRewardDate","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"internalType":"struct Poolable.Pool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getStakeInfo","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"depositDate","type":"uint256"},{"internalType":"uint256","name":"unlockDate","type":"uint256"},{"internalType":"uint256","name":"rewardDate","type":"uint256"},{"internalType":"uint256","name":"totalClaimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getUserTotalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"isPoolOpened","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","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":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"recoverEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"recoverNonFungibleToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPoolId","type":"uint256"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"restake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"internalType":"struct NftStakingPool.MultiStakeParam[]","name":"groups","type":"tuple[]"}],"name":"restakeMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"internalType":"struct NftStakingPool.MultiStakeParam[]","name":"groups","type":"tuple[]"}],"name":"stakeMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"internalType":"struct NftStakingPool.MultiStakeParam[]","name":"groups","type":"tuple[]"}],"name":"unstakeMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"lockDuration","type":"uint256"},{"internalType":"uint256","name":"minDuration","type":"uint256"},{"internalType":"uint256","name":"endRewardDate","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"}],"internalType":"struct Poolable.Pool","name":"pool","type":"tuple"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162003b9d38038062003b9d8339810160408190526200003491620000bc565b8062000040336200006c565b6001600355600480546001600160a01b0319166001600160a01b039290921691909117905550620000ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000cf57600080fd5b81516001600160a01b0381168114620000e757600080fd5b9392505050565b613a9f80620000fe6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c80636a68e3a11161011a578063a0e7813f116100ad578063c2a672e01161007c578063c2a672e01461052d578063e1c1ccdb14610540578063f096cc4a14610553578063f2fde38b14610566578063f7c618c11461057957600080fd5b8063a0e7813f146104c8578063aa271e1a146104db578063aad3ec9614610507578063bb0fd1471461051a57600080fd5b80638da5cb5b116100e95780638da5cb5b1461046a578063961de0d71461048f578063983b2d56146104a25780639be65a60146104b557600080fd5b80636a68e3a114610429578063715018a61461043c5780637504db3e146104445780637b0472f01461045757600080fd5b80632a1824891161019d57806346db34141161016c57806346db3414146103b45780634c69b52e146103c757806354d7fe56146103da5780635f33fe32146103ed578063666c4b5c1461040057600080fd5b80632a182489146103315780633092afd51461034457806337de615f146103575780633b521efe1461036a57600080fd5b80631bbda52b116101d95780631bbda52b146102e157806320df0863146102f45780632716ae661461030757806327d99a3f1461031e57600080fd5b80630548afa11461020b578063068bcd8d146102205780630cd7725b14610287578063150b7a02146102aa575b600080fd5b61021e610219366004613214565b61058c565b005b61023361022e36600461335a565b610674565b60405161027e9190600060a0820190506001600160a01b0383511682526020830151602083015260408301516040830152606083015160608301526080830151608083015292915050565b60405180910390f35b61029a610295366004613388565b610755565b604051901515815260200161027e565b6102c86102b83660046133b4565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200161027e565b61021e6102ef3660046134c4565b610818565b61021e610302366004613214565b61089b565b61031060015481565b60405190815260200161027e565b61021e61032c366004613510565b610945565b61029a61033f36600461335a565b610b35565b61021e610352366004613548565b610bb9565b61021e61036536600461335a565b610cb2565b61037d610378366004613388565b610d9f565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c00161027e565b61021e6103c2366004613214565b610eb9565b61021e6103d5366004613565565b611133565b61021e6103e83660046135b2565b61129c565b61021e6103fb3660046135df565b6113a0565b61031061040e366004613548565b6001600160a01b031660009081526006602052604090205490565b61021e61043736600461363b565b61142f565b61021e6114f2565b61021e610452366004613548565b611546565b61021e610465366004613657565b6115f7565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161027e565b61021e61049d366004613679565b6116f2565b61021e6104b0366004613548565b611775565b61021e6104c3366004613548565b611872565b61021e6104d63660046136b5565b6119e2565b61029a6104e9366004613548565b6001600160a01b031660009081526007602052604090205460ff1690565b61021e610515366004613388565b611b8a565b61021e610528366004613388565b611d66565b61021e61053b366004613388565b611ecd565b61047761054e36600461335a565b611ff4565b61021e610561366004613214565b612063565b61021e610574366004613548565b61210c565b600454610477906001600160a01b031681565b6002600354036105d15760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064015b60405180910390fd5b60026003553360005b825181101561066a57600061060b8483815181106105fa576105fa6136f9565b602002602001015160200151610674565b60000151905061065783858481518110610627576106276136f9565b60200260200101516020015183878681518110610646576106466136f9565b6020026020010151600001516121c5565b508061066281613725565b9150506105da565b5050600160035550565b6106af6040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081525090565b60015482106107005760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b50600090815260026020818152604092839020835160a08101855281546001600160a01b0316815260018201549281019290925291820154928101929092526003810154606083015260040154608082015290565b6001600160a01b0382811660009081526005602090815260408083208584529091528120549091166107c95760405162461bcd60e51b815260206004820152601760248201527f5374616b653a20546f6b656e206e6f74207374616b656400000000000000000060448201526064016105c8565b6001600160a01b03831660009081526005602090815260408083208584529091529020805460019091015461080f91600160a01b900467ffffffffffffffff169061235f565b90505b92915050565b6002600354036108585760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b600260035561066a338484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061242692505050565b6002600354036108db5760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003553360005b825181101561066a5760006109048483815181106105fa576105fa6136f9565b6000015190506109328382868581518110610921576109216136f9565b602002602001015160000151612515565b508061093d81613725565b9150506108e4565b6002600354036109855760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003556001600160a01b038281166000908152600560209081526040808320858452909152902054166109fc5760405162461bcd60e51b815260206004820152601760248201527f5374616b653a20546f6b656e206e6f74207374616b656400000000000000000060448201526064016105c8565b6001600160a01b038281166000908152600560209081526040808320858452909152902054163314610a6c5760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b336000610a7a858585612670565b9050610a868282612887565b836001600160a01b0316826001600160a01b03167f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c85604051610acb91815260200190565b60405180910390a3836001600160a01b0316826001600160a01b03167f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f528786604051610b21929190918252602082015260400190565b60405180910390a350506001600355505050565b60006001548210610b885760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b6000828152600260205260409020600301541580610812575050600090815260026020526040902060030154421090565b6000546001600160a01b03163314610c015760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b03811660009081526007602052604090205460ff16610c695760405162461bcd60e51b815260206004820152601460248201527f4d696e7461626c653a204e6f74206d696e74657200000000000000000000000060448201526064016105c8565b6001600160a01b038116600081815260076020526040808220805460ff19169055517fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666929190a250565b6000546001600160a01b03163314610cfa5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b80610d0481610b35565b610d4b5760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b6000828152600260205260409081902042600382015590517fe7a6fec9414f9d354d6894b21624d353d2a9aae8448f3b339124389842f16d4390610d92908590849061373e565b60405180910390a1505050565b6001600160a01b03828116600090815260056020908152604080832085845290915281205490918291829182918291829116610dec57506000945084935083925082915081905080610eaf565b6001600160a01b0388811660009081526005602090815260408083208b84528252808320815160808101835281549586168152600160a01b90950467ffffffffffffffff16928501839052600181015491850191909152600201546060840152610e5590610674565b905081600001518260200151836040015183604001518560400151610e7a9190613782565b84602001518660400151610e8e9190613782565b86606001518467ffffffffffffffff16945097509750975097509750975050505b9295509295509295565b336000805b83518110156110e0576000610ede8583815181106105fa576105fa6136f9565b905060005b858381518110610ef557610ef56136f9565b602002602001015160000151518110156110cb5781516001600160a01b0316600090815260056020526040812087518290899087908110610f3857610f386136f9565b6020026020010151600001518481518110610f5557610f556136f9565b602002602001015181526020019081526020016000209050610f743390565b81546001600160a01b03908116911614610fcc5760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b80546001820154610fee91600160a01b900467ffffffffffffffff16906128d8565b6110365760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b6040805160808101825282546001600160a01b0381168252600160a01b900467ffffffffffffffff166020820152600183015491810191909152600282015460608201526000906110879085612997565b905080156110b657808260020160008282546110a39190613782565b909155506110b390508187613782565b95505b505080806110c390613725565b915050610ee3565b505080806110d890613725565b915050610ebe565b506110eb8282612887565b816001600160a01b03167fe4fc95f1acc8aa83807501db2c2e1ba048569e9ab1b012f273c864cc846186cb848360405161112692919061379a565b60405180910390a2505050565b3360009081526007602052604090205460ff166111925760405162461bcd60e51b815260206004820152601e60248201527f4d696e7461626c653a2043616c6c6572206973206e6f74206d696e746572000060448201526064016105c8565b8161119c81610b35565b6111e35760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b6001600160a01b03841661122d5760405162461bcd60e51b81526020600482015260116024820152705374616b653a206164647265737328302960781b60448201526064016105c8565b600061123884610674565b905061124a8582600001518587612a2e565b805160408051868152602081018690526001600160a01b03928316928816917f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f5291015b60405180910390a35050505050565b6000546001600160a01b031633146112e45760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b60015482106113355760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b6000828152600260208181526040928390209084013560018201558383013591810191909155606083013560038201556080830135600482015590517fe7a6fec9414f9d354d6894b21624d353d2a9aae8448f3b339124389842f16d4390610d92908590849061373e565b6002600354036113e05760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003556114243385858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506121c592505050565b505060016003555050565b6000546001600160a01b031633146114775760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b600154600081815260026020526040902082906114948282613844565b5050600180546114a391613782565b6001556000818152600260205260409081902090517f356640e3b6633150dd0c2f943b91900a10c2c652e67422bd66d6f56af4e99a73916114e69184919061373e565b60405180910390a15050565b6000546001600160a01b0316331461153a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6115446000612b91565b565b6000546001600160a01b0316331461158e5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156115c6573d6000803e3d6000fd5b506040518181527f5c0a34c718716ee467140afbc9fb741fc2980e41d00f04a8f7f635d76484ff47906020016114e6565b6002600354036116375760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003558161164681610b35565b61168d5760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b33600061169985610674565b90506116ab8282600001518688612a2e565b805160408051878152602081018790526001600160a01b03928316928516917f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f529101610b21565b6002600354036117325760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b600260035561066a338484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061251592505050565b6000546001600160a01b031633146117bd5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b03811660009081526007602052604090205460ff16156118265760405162461bcd60e51b815260206004820152601860248201527f4d696e7461626c653a20416c7265616479206d696e746572000000000000000060448201526064016105c8565b6001600160a01b038116600081815260076020526040808220805460ff19166001179055517f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69190a250565b6000546001600160a01b031633146118ba5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611901573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119259190613895565b9050806000036119875760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b60648201526084016105c8565b61199b6001600160a01b0383163383612bee565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e98826040516119d691815260200190565b60405180910390a25050565b3360009081526007602052604090205460ff16611a415760405162461bcd60e51b815260206004820152601e60248201527f4d696e7461626c653a2043616c6c6572206973206e6f74206d696e746572000060448201526064016105c8565b82611a4b81610b35565b611a925760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b6001600160a01b038516611adc5760405162461bcd60e51b81526020600482015260116024820152705374616b653a206164647265737328302960781b60448201526064016105c8565b6000611ae785610674565b905060005b83811015611b2e57611b1c878360000151878785818110611b0f57611b0f6136f9565b9050602002013589612a2e565b80611b2681613725565b915050611aec565b5080600001516001600160a01b0316866001600160a01b03167f5449aee1d152b8abbf0ceead22b19e55a4c0413f2f3c06aef84f79b42cbdf642878787604051611b7a939291906138ae565b60405180910390a3505050505050565b6001600160a01b038281166000908152600560209081526040808320858452909152902080543392168214611bfd5760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b80546001820154611c1f91600160a01b900467ffffffffffffffff16906128d8565b611c675760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b8054600090611c8690600160a01b900467ffffffffffffffff16610674565b6040805160808101825284546001600160a01b0381168252600160a01b900467ffffffffffffffff16602082015260018501549181019190915260028401546060820152909150600090611cda9083612997565b90508015611cfc5780836002016000828254611cf69190613782565b90915550505b611d068482612887565b82546040805187815260208101849052600160a01b90920467ffffffffffffffff16908201526001600160a01b0387811691908616907fd795915374024be1f03204e052bd584b33bb85c9128ede9c54adbe0bbdc2209590606001611b7a565b6000546001600160a01b03163314611dae5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b0382811660009081526005602090815260408083208584529091529020541615611e2c5760405162461bcd60e51b815260206004820152602260248201527f5374616b653a2043616e6e6f74207265636f766572207374616b656420746f6b60448201526132b760f11b60648201526084016105c8565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b158015611e7a57600080fd5b505af1158015611e8e573d6000803e3d6000fd5b50505050816001600160a01b03167f861c3ea25dbda3af0bf5d258ba8582c0276c9446b1479e817be3f1b4a89acf91826040516119d691815260200190565b600260035403611f0d5760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003556001600160a01b038281166000908152600560209081526040808320858452909152902054163314611f825760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b336000611f90828585612c5a565b9050611f9c8282612887565b836001600160a01b0316826001600160a01b03167f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c85604051611fe191815260200190565b60405180910390a3505060016003555050565b600060015482106120475760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b506000908152600260205260409020546001600160a01b031690565b6002600354036120a35760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003553360005b825181101561066a576120fa828483815181106120cb576120cb6136f9565b6020026020010151602001518584815181106120e9576120e96136f9565b602002602001015160000151612426565b8061210481613725565b9150506120ac565b6000546001600160a01b031633146121545760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b0381166121b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105c8565b6121c281612b91565b50565b6000805b82518110156122c457856001600160a01b031660056000866001600160a01b03166001600160a01b031681526020019081526020016000206000858481518110612215576122156136f9565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146122825760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b6122a68585858481518110612299576122996136f9565b6020026020010151612670565b6122b09083613782565b9150806122bc81613725565b9150506121c9565b506122cf8582612887565b826001600160a01b0316856001600160a01b03167f6ba498639b82dbbcdc373fba63b303a8b8d2648f3651012fd73dbd4eecd4838e846040516123129190613945565b60405180910390a3826001600160a01b0316856001600160a01b03167f5449aee1d152b8abbf0ceead22b19e55a4c0413f2f3c06aef84f79b42cbdf642868560405161128d929190613958565b600060015483106123b25760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b4282106124015760405162461bcd60e51b815260206004820152601e60248201527f506f6f6c61626c653a20496e76616c6964206465706f7369742064617465000060448201526064016105c8565b60008381526002602052604090206001015461241d8342613971565b10159392505050565b8161243081610b35565b6124775760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b600061248284610674565b905060005b83518110156124cb576124b98683600001518684815181106124ab576124ab6136f9565b602002602001015188612a2e565b806124c381613725565b915050612487565b5080600001516001600160a01b0316856001600160a01b03167f5449aee1d152b8abbf0ceead22b19e55a4c0413f2f3c06aef84f79b42cbdf642868660405161128d929190613958565b6000805b825181101561261457846001600160a01b031660056000866001600160a01b03166001600160a01b031681526020019081526020016000206000858481518110612565576125656136f9565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146125d25760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b6125f685858584815181106125e9576125e96136f9565b6020026020010151612c5a565b6126009083613782565b91508061260c81613725565b915050612519565b5061261f8482612887565b826001600160a01b0316846001600160a01b03167f6ba498639b82dbbcdc373fba63b303a8b8d2648f3651012fd73dbd4eecd4838e846040516126629190613945565b60405180910390a350505050565b600061267b84610b35565b6126c75760405162461bcd60e51b815260206004820152601560248201527f5374616b653a20506f6f6c20697320636c6f736564000000000000000000000060448201526064016105c8565b826001600160a01b03166126da85611ff4565b6001600160a01b0316146127305760405162461bcd60e51b815260206004820152601960248201527f5374616b653a20496e76616c696420636f6c6c656374696f6e0000000000000060448201526064016105c8565b6001600160a01b03831660009081526005602090815260408083208584529091528120805490919061277290600160a01b900467ffffffffffffffff16610674565b8254600184015491925061279891600160a01b90910467ffffffffffffffff16906128d8565b6127e05760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b6040805160808101825283546001600160a01b0381168252600160a01b900467ffffffffffffffff166020820152600184015491810191909152600283015460608201526000906128319083612997565b83547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b67ffffffffffffffff8a1602178455426001850155600060029094019390935550909150505b9392505050565b80156128d4576001600160a01b0382166000908152600660205260409020546128b1908290613782565b6001600160a01b0383166000908152600660205260409020556128d48282612e24565b5050565b6000600154831061292b5760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b42821061297a5760405162461bcd60e51b815260206004820152601e60248201527f506f6f6c61626c653a20496e76616c6964206465706f7369742064617465000060448201526064016105c8565b6000838152600260208190526040909120015461241d8342613971565b604082015160009081905b80158015906129b45750602084015115155b15612a005760208401516129c89082613782565b9050428111612a005760808401516129e09083613782565b915083606001516000141580156129fa5750836060015181115b156129a2575b84606001518211612a1657600092505050610812565b6060850151612a259083613971565b95945050505050565b6001600160a01b0383811660009081526005602090815260408083208684529091529020541615612aa15760405162461bcd60e51b815260206004820152601b60248201527f5374616b653a20546f6b656e20616c7265616479207374616b6564000000000060448201526064016105c8565b604080516080810182526001600160a01b0386811680835267ffffffffffffffff8581166020808601918252428688019081526000606088018181528c8816808352600585528a83208d845290945290899020975188549451909516600160a01b026001600160e01b031990941694909616939093179190911785559051600185015591516002909301929092559151632142170760e11b81526004810191909152306024820152604481018490526342842e0e90606401600060405180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b5050505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052612c55908490612f16565b505050565b6001600160a01b0382166000908152600560209081526040808320848452909152812080546001820154612c9f91600160a01b900467ffffffffffffffff16906128d8565b612ce75760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b8054600090612d0690600160a01b900467ffffffffffffffff16610674565b6040805160808101825284546001600160a01b0381168252600160a01b900467ffffffffffffffff16602082015260018501549181019190915260028401546060820152909150600090612d5a9083612997565b90508015612d7c5780836002016000828254612d769190613782565b90915550505b6001600160a01b0386811660008181526005602090815260408083208a845290915280822080546001600160e01b0319168155600181018390556002019190915551632142170760e11b8152306004820152918916602483015260448201879052906342842e0e90606401600060405180830381600087803b158015612e0157600080fd5b505af1158015612e15573d6000803e3d6000fd5b50929998505050505050505050565b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612e72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e969190613895565b9050818110612ea957612c558383612fe8565b600480546040516340c10f1960e01b81526001600160a01b0386811693820193909352602481018590529116906340c10f1990604401600060405180830381600087803b158015612ef957600080fd5b505af1158015612f0d573d6000803e3d6000fd5b50505050505050565b6000612f6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612fff9092919063ffffffff16565b805190915015612c555780806020019051810190612f899190613988565b612c555760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105c8565b6004546128d4906001600160a01b03168383612bee565b606061300e8484600085613016565b949350505050565b6060824710156130775760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105c8565b6001600160a01b0385163b6130ce5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105c8565b600080866001600160a01b031685876040516130ea91906139da565b60006040518083038185875af1925050503d8060008114613127576040519150601f19603f3d011682016040523d82523d6000602084013e61312c565b606091505b509150915061313c828286613147565b979650505050505050565b60608315613156575081612880565b8251156131665782518084602001fd5b8160405162461bcd60e51b81526004016105c891906139f6565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156131b9576131b9613180565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156131e8576131e8613180565b604052919050565b600067ffffffffffffffff82111561320a5761320a613180565b5060051b60200190565b6000602080838503121561322757600080fd5b823567ffffffffffffffff8082111561323f57600080fd5b818501915085601f83011261325357600080fd5b8135613266613261826131f0565b6131bf565b81815260059190911b8301840190848101908883111561328557600080fd5b8585015b8381101561334d578035858111156132a057600080fd5b86016040818c03601f190112156132b657600080fd5b6132be613196565b88820135878111156132cf57600080fd5b8201603f81018d136132e057600080fd5b898101356132f0613261826131f0565b81815260059190911b8201604001908b8101908f83111561331057600080fd5b6040840193505b828410156133305783358252928c0192908c0190613317565b845250505060409190910135888201528352918601918601613289565b5098975050505050505050565b60006020828403121561336c57600080fd5b5035919050565b6001600160a01b03811681146121c257600080fd5b6000806040838503121561339b57600080fd5b82356133a681613373565b946020939093013593505050565b600080600080608085870312156133ca57600080fd5b84356133d581613373565b93506020858101356133e681613373565b935060408601359250606086013567ffffffffffffffff8082111561340a57600080fd5b818801915088601f83011261341e57600080fd5b81358181111561343057613430613180565b613442601f8201601f191685016131bf565b9150808252898482850101111561345857600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008083601f84011261348a57600080fd5b50813567ffffffffffffffff8111156134a257600080fd5b6020830191508360208260051b85010111156134bd57600080fd5b9250929050565b6000806000604084860312156134d957600080fd5b83359250602084013567ffffffffffffffff8111156134f757600080fd5b61350386828701613478565b9497909650939450505050565b60008060006060848603121561352557600080fd5b83359250602084013561353781613373565b929592945050506040919091013590565b60006020828403121561355a57600080fd5b813561288081613373565b60008060006060848603121561357a57600080fd5b833561358581613373565b95602085013595506040909401359392505050565b600060a082840312156135ac57600080fd5b50919050565b60008060c083850312156135c557600080fd5b823591506135d6846020850161359a565b90509250929050565b600080600080606085870312156135f557600080fd5b84359350602085013561360781613373565b9250604085013567ffffffffffffffff81111561362357600080fd5b61362f87828801613478565b95989497509550505050565b600060a0828403121561364d57600080fd5b61080f838361359a565b6000806040838503121561366a57600080fd5b50508035926020909101359150565b60008060006040848603121561368e57600080fd5b833561369981613373565b9250602084013567ffffffffffffffff8111156134f757600080fd5b600080600080606085870312156136cb57600080fd5b84356136d681613373565b935060208501359250604085013567ffffffffffffffff81111561362357600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016137375761373761370f565b5060010190565b82815281546001600160a01b03166020820152600182015460408201526002820154606082015260038201546080820152600482015460a082015260c08101612880565b600082198211156137955761379561370f565b500190565b60006040808301818452808651808352606092508286019150828160051b8701016020808a016000805b8581101561382e578a8503605f19018752825180518a875280518b88018190529086019084908b8901905b8083101561380f57835182529288019260019290920191908801906137ef565b50928701519787019790975250968401969450918301916001016137c4565b5050509690960196909652509295945050505050565b813561384f81613373565b6001600160a01b0381166001600160a01b031983541617825550602082013560018201556040820135600282015560608201356003820155608082013560048201555050565b6000602082840312156138a757600080fd5b5051919050565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156138ed57600080fd5b8260051b8085606085013760009201606001918252509392505050565b600081518084526020808501945080840160005b8381101561393a5781518752958201959082019060010161391e565b509495945050505050565b60208152600061080f602083018461390a565b82815260406020820152600061300e604083018461390a565b6000828210156139835761398361370f565b500390565b60006020828403121561399a57600080fd5b8151801515811461288057600080fd5b60005b838110156139c55781810151838201526020016139ad565b838111156139d4576000848401525b50505050565b600082516139ec8184602087016139aa565b9190910192915050565b6020815260008251806020840152613a158160408501602087016139aa565b601f01601f1916919091016040019291505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212205b50a9bed7f01bc2ba2decf5097bd349d3acc6064a271e8bf09bf505a36c315564736f6c634300080e003300000000000000000000000024c487fc99f31181ffdc3b7664b7471ee0506518
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102065760003560e01c80636a68e3a11161011a578063a0e7813f116100ad578063c2a672e01161007c578063c2a672e01461052d578063e1c1ccdb14610540578063f096cc4a14610553578063f2fde38b14610566578063f7c618c11461057957600080fd5b8063a0e7813f146104c8578063aa271e1a146104db578063aad3ec9614610507578063bb0fd1471461051a57600080fd5b80638da5cb5b116100e95780638da5cb5b1461046a578063961de0d71461048f578063983b2d56146104a25780639be65a60146104b557600080fd5b80636a68e3a114610429578063715018a61461043c5780637504db3e146104445780637b0472f01461045757600080fd5b80632a1824891161019d57806346db34141161016c57806346db3414146103b45780634c69b52e146103c757806354d7fe56146103da5780635f33fe32146103ed578063666c4b5c1461040057600080fd5b80632a182489146103315780633092afd51461034457806337de615f146103575780633b521efe1461036a57600080fd5b80631bbda52b116101d95780631bbda52b146102e157806320df0863146102f45780632716ae661461030757806327d99a3f1461031e57600080fd5b80630548afa11461020b578063068bcd8d146102205780630cd7725b14610287578063150b7a02146102aa575b600080fd5b61021e610219366004613214565b61058c565b005b61023361022e36600461335a565b610674565b60405161027e9190600060a0820190506001600160a01b0383511682526020830151602083015260408301516040830152606083015160608301526080830151608083015292915050565b60405180910390f35b61029a610295366004613388565b610755565b604051901515815260200161027e565b6102c86102b83660046133b4565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200161027e565b61021e6102ef3660046134c4565b610818565b61021e610302366004613214565b61089b565b61031060015481565b60405190815260200161027e565b61021e61032c366004613510565b610945565b61029a61033f36600461335a565b610b35565b61021e610352366004613548565b610bb9565b61021e61036536600461335a565b610cb2565b61037d610378366004613388565b610d9f565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c00161027e565b61021e6103c2366004613214565b610eb9565b61021e6103d5366004613565565b611133565b61021e6103e83660046135b2565b61129c565b61021e6103fb3660046135df565b6113a0565b61031061040e366004613548565b6001600160a01b031660009081526006602052604090205490565b61021e61043736600461363b565b61142f565b61021e6114f2565b61021e610452366004613548565b611546565b61021e610465366004613657565b6115f7565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161027e565b61021e61049d366004613679565b6116f2565b61021e6104b0366004613548565b611775565b61021e6104c3366004613548565b611872565b61021e6104d63660046136b5565b6119e2565b61029a6104e9366004613548565b6001600160a01b031660009081526007602052604090205460ff1690565b61021e610515366004613388565b611b8a565b61021e610528366004613388565b611d66565b61021e61053b366004613388565b611ecd565b61047761054e36600461335a565b611ff4565b61021e610561366004613214565b612063565b61021e610574366004613548565b61210c565b600454610477906001600160a01b031681565b6002600354036105d15760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064015b60405180910390fd5b60026003553360005b825181101561066a57600061060b8483815181106105fa576105fa6136f9565b602002602001015160200151610674565b60000151905061065783858481518110610627576106276136f9565b60200260200101516020015183878681518110610646576106466136f9565b6020026020010151600001516121c5565b508061066281613725565b9150506105da565b5050600160035550565b6106af6040518060a0016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081525090565b60015482106107005760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b50600090815260026020818152604092839020835160a08101855281546001600160a01b0316815260018201549281019290925291820154928101929092526003810154606083015260040154608082015290565b6001600160a01b0382811660009081526005602090815260408083208584529091528120549091166107c95760405162461bcd60e51b815260206004820152601760248201527f5374616b653a20546f6b656e206e6f74207374616b656400000000000000000060448201526064016105c8565b6001600160a01b03831660009081526005602090815260408083208584529091529020805460019091015461080f91600160a01b900467ffffffffffffffff169061235f565b90505b92915050565b6002600354036108585760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b600260035561066a338484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061242692505050565b6002600354036108db5760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003553360005b825181101561066a5760006109048483815181106105fa576105fa6136f9565b6000015190506109328382868581518110610921576109216136f9565b602002602001015160000151612515565b508061093d81613725565b9150506108e4565b6002600354036109855760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003556001600160a01b038281166000908152600560209081526040808320858452909152902054166109fc5760405162461bcd60e51b815260206004820152601760248201527f5374616b653a20546f6b656e206e6f74207374616b656400000000000000000060448201526064016105c8565b6001600160a01b038281166000908152600560209081526040808320858452909152902054163314610a6c5760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b336000610a7a858585612670565b9050610a868282612887565b836001600160a01b0316826001600160a01b03167f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c85604051610acb91815260200190565b60405180910390a3836001600160a01b0316826001600160a01b03167f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f528786604051610b21929190918252602082015260400190565b60405180910390a350506001600355505050565b60006001548210610b885760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b6000828152600260205260409020600301541580610812575050600090815260026020526040902060030154421090565b6000546001600160a01b03163314610c015760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b03811660009081526007602052604090205460ff16610c695760405162461bcd60e51b815260206004820152601460248201527f4d696e7461626c653a204e6f74206d696e74657200000000000000000000000060448201526064016105c8565b6001600160a01b038116600081815260076020526040808220805460ff19169055517fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666929190a250565b6000546001600160a01b03163314610cfa5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b80610d0481610b35565b610d4b5760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b6000828152600260205260409081902042600382015590517fe7a6fec9414f9d354d6894b21624d353d2a9aae8448f3b339124389842f16d4390610d92908590849061373e565b60405180910390a1505050565b6001600160a01b03828116600090815260056020908152604080832085845290915281205490918291829182918291829116610dec57506000945084935083925082915081905080610eaf565b6001600160a01b0388811660009081526005602090815260408083208b84528252808320815160808101835281549586168152600160a01b90950467ffffffffffffffff16928501839052600181015491850191909152600201546060840152610e5590610674565b905081600001518260200151836040015183604001518560400151610e7a9190613782565b84602001518660400151610e8e9190613782565b86606001518467ffffffffffffffff16945097509750975097509750975050505b9295509295509295565b336000805b83518110156110e0576000610ede8583815181106105fa576105fa6136f9565b905060005b858381518110610ef557610ef56136f9565b602002602001015160000151518110156110cb5781516001600160a01b0316600090815260056020526040812087518290899087908110610f3857610f386136f9565b6020026020010151600001518481518110610f5557610f556136f9565b602002602001015181526020019081526020016000209050610f743390565b81546001600160a01b03908116911614610fcc5760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b80546001820154610fee91600160a01b900467ffffffffffffffff16906128d8565b6110365760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b6040805160808101825282546001600160a01b0381168252600160a01b900467ffffffffffffffff166020820152600183015491810191909152600282015460608201526000906110879085612997565b905080156110b657808260020160008282546110a39190613782565b909155506110b390508187613782565b95505b505080806110c390613725565b915050610ee3565b505080806110d890613725565b915050610ebe565b506110eb8282612887565b816001600160a01b03167fe4fc95f1acc8aa83807501db2c2e1ba048569e9ab1b012f273c864cc846186cb848360405161112692919061379a565b60405180910390a2505050565b3360009081526007602052604090205460ff166111925760405162461bcd60e51b815260206004820152601e60248201527f4d696e7461626c653a2043616c6c6572206973206e6f74206d696e746572000060448201526064016105c8565b8161119c81610b35565b6111e35760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b6001600160a01b03841661122d5760405162461bcd60e51b81526020600482015260116024820152705374616b653a206164647265737328302960781b60448201526064016105c8565b600061123884610674565b905061124a8582600001518587612a2e565b805160408051868152602081018690526001600160a01b03928316928816917f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f5291015b60405180910390a35050505050565b6000546001600160a01b031633146112e45760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b60015482106113355760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b6000828152600260208181526040928390209084013560018201558383013591810191909155606083013560038201556080830135600482015590517fe7a6fec9414f9d354d6894b21624d353d2a9aae8448f3b339124389842f16d4390610d92908590849061373e565b6002600354036113e05760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003556114243385858585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506121c592505050565b505060016003555050565b6000546001600160a01b031633146114775760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b600154600081815260026020526040902082906114948282613844565b5050600180546114a391613782565b6001556000818152600260205260409081902090517f356640e3b6633150dd0c2f943b91900a10c2c652e67422bd66d6f56af4e99a73916114e69184919061373e565b60405180910390a15050565b6000546001600160a01b0316331461153a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6115446000612b91565b565b6000546001600160a01b0316331461158e5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156115c6573d6000803e3d6000fd5b506040518181527f5c0a34c718716ee467140afbc9fb741fc2980e41d00f04a8f7f635d76484ff47906020016114e6565b6002600354036116375760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003558161164681610b35565b61168d5760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b33600061169985610674565b90506116ab8282600001518688612a2e565b805160408051878152602081018790526001600160a01b03928316928516917f1bd1eb6b4fd3f08e718d7a241c54c4641c9f36004b6949383f48d15a2fcc8f529101610b21565b6002600354036117325760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b600260035561066a338484848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061251592505050565b6000546001600160a01b031633146117bd5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b03811660009081526007602052604090205460ff16156118265760405162461bcd60e51b815260206004820152601860248201527f4d696e7461626c653a20416c7265616479206d696e746572000000000000000060448201526064016105c8565b6001600160a01b038116600081815260076020526040808220805460ff19166001179055517f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69190a250565b6000546001600160a01b031633146118ba5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611901573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119259190613895565b9050806000036119875760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b60648201526084016105c8565b61199b6001600160a01b0383163383612bee565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e98826040516119d691815260200190565b60405180910390a25050565b3360009081526007602052604090205460ff16611a415760405162461bcd60e51b815260206004820152601e60248201527f4d696e7461626c653a2043616c6c6572206973206e6f74206d696e746572000060448201526064016105c8565b82611a4b81610b35565b611a925760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b6001600160a01b038516611adc5760405162461bcd60e51b81526020600482015260116024820152705374616b653a206164647265737328302960781b60448201526064016105c8565b6000611ae785610674565b905060005b83811015611b2e57611b1c878360000151878785818110611b0f57611b0f6136f9565b9050602002013589612a2e565b80611b2681613725565b915050611aec565b5080600001516001600160a01b0316866001600160a01b03167f5449aee1d152b8abbf0ceead22b19e55a4c0413f2f3c06aef84f79b42cbdf642878787604051611b7a939291906138ae565b60405180910390a3505050505050565b6001600160a01b038281166000908152600560209081526040808320858452909152902080543392168214611bfd5760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b80546001820154611c1f91600160a01b900467ffffffffffffffff16906128d8565b611c675760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b8054600090611c8690600160a01b900467ffffffffffffffff16610674565b6040805160808101825284546001600160a01b0381168252600160a01b900467ffffffffffffffff16602082015260018501549181019190915260028401546060820152909150600090611cda9083612997565b90508015611cfc5780836002016000828254611cf69190613782565b90915550505b611d068482612887565b82546040805187815260208101849052600160a01b90920467ffffffffffffffff16908201526001600160a01b0387811691908616907fd795915374024be1f03204e052bd584b33bb85c9128ede9c54adbe0bbdc2209590606001611b7a565b6000546001600160a01b03163314611dae5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b0382811660009081526005602090815260408083208584529091529020541615611e2c5760405162461bcd60e51b815260206004820152602260248201527f5374616b653a2043616e6e6f74207265636f766572207374616b656420746f6b60448201526132b760f11b60648201526084016105c8565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b158015611e7a57600080fd5b505af1158015611e8e573d6000803e3d6000fd5b50505050816001600160a01b03167f861c3ea25dbda3af0bf5d258ba8582c0276c9446b1479e817be3f1b4a89acf91826040516119d691815260200190565b600260035403611f0d5760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003556001600160a01b038281166000908152600560209081526040808320858452909152902054163314611f825760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b336000611f90828585612c5a565b9050611f9c8282612887565b836001600160a01b0316826001600160a01b03167f390b1276974b9463e5d66ab10df69b6f3d7b930eb066a0e66df327edd2cc811c85604051611fe191815260200190565b60405180910390a3505060016003555050565b600060015482106120475760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b506000908152600260205260409020546001600160a01b031690565b6002600354036120a35760405162461bcd60e51b815260206004820152601f6024820152600080516020613a2a83398151915260448201526064016105c8565b60026003553360005b825181101561066a576120fa828483815181106120cb576120cb6136f9565b6020026020010151602001518584815181106120e9576120e96136f9565b602002602001015160000151612426565b8061210481613725565b9150506120ac565b6000546001600160a01b031633146121545760405162461bcd60e51b81526020600482018190526024820152600080516020613a4a83398151915260448201526064016105c8565b6001600160a01b0381166121b95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105c8565b6121c281612b91565b50565b6000805b82518110156122c457856001600160a01b031660056000866001600160a01b03166001600160a01b031681526020019081526020016000206000858481518110612215576122156136f9565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146122825760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b6122a68585858481518110612299576122996136f9565b6020026020010151612670565b6122b09083613782565b9150806122bc81613725565b9150506121c9565b506122cf8582612887565b826001600160a01b0316856001600160a01b03167f6ba498639b82dbbcdc373fba63b303a8b8d2648f3651012fd73dbd4eecd4838e846040516123129190613945565b60405180910390a3826001600160a01b0316856001600160a01b03167f5449aee1d152b8abbf0ceead22b19e55a4c0413f2f3c06aef84f79b42cbdf642868560405161128d929190613958565b600060015483106123b25760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b4282106124015760405162461bcd60e51b815260206004820152601e60248201527f506f6f6c61626c653a20496e76616c6964206465706f7369742064617465000060448201526064016105c8565b60008381526002602052604090206001015461241d8342613971565b10159392505050565b8161243081610b35565b6124775760405162461bcd60e51b8152602060048201526018602482015277141bdbdb18589b194e88141bdbdb081a5cc818db1bdcd95960421b60448201526064016105c8565b600061248284610674565b905060005b83518110156124cb576124b98683600001518684815181106124ab576124ab6136f9565b602002602001015188612a2e565b806124c381613725565b915050612487565b5080600001516001600160a01b0316856001600160a01b03167f5449aee1d152b8abbf0ceead22b19e55a4c0413f2f3c06aef84f79b42cbdf642868660405161128d929190613958565b6000805b825181101561261457846001600160a01b031660056000866001600160a01b03166001600160a01b031681526020019081526020016000206000858481518110612565576125656136f9565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146125d25760405162461bcd60e51b815260206004820152601960248201527829ba30b5b29d102737ba1037bbb732b91037b3103a37b5b2b760391b60448201526064016105c8565b6125f685858584815181106125e9576125e96136f9565b6020026020010151612c5a565b6126009083613782565b91508061260c81613725565b915050612519565b5061261f8482612887565b826001600160a01b0316846001600160a01b03167f6ba498639b82dbbcdc373fba63b303a8b8d2648f3651012fd73dbd4eecd4838e846040516126629190613945565b60405180910390a350505050565b600061267b84610b35565b6126c75760405162461bcd60e51b815260206004820152601560248201527f5374616b653a20506f6f6c20697320636c6f736564000000000000000000000060448201526064016105c8565b826001600160a01b03166126da85611ff4565b6001600160a01b0316146127305760405162461bcd60e51b815260206004820152601960248201527f5374616b653a20496e76616c696420636f6c6c656374696f6e0000000000000060448201526064016105c8565b6001600160a01b03831660009081526005602090815260408083208584529091528120805490919061277290600160a01b900467ffffffffffffffff16610674565b8254600184015491925061279891600160a01b90910467ffffffffffffffff16906128d8565b6127e05760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b6040805160808101825283546001600160a01b0381168252600160a01b900467ffffffffffffffff166020820152600184015491810191909152600283015460608201526000906128319083612997565b83547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b67ffffffffffffffff8a1602178455426001850155600060029094019390935550909150505b9392505050565b80156128d4576001600160a01b0382166000908152600660205260409020546128b1908290613782565b6001600160a01b0383166000908152600660205260409020556128d48282612e24565b5050565b6000600154831061292b5760405162461bcd60e51b815260206004820152601b60248201527f506f6f6c61626c653a20496e76616c696420706f6f6c496e646578000000000060448201526064016105c8565b42821061297a5760405162461bcd60e51b815260206004820152601e60248201527f506f6f6c61626c653a20496e76616c6964206465706f7369742064617465000060448201526064016105c8565b6000838152600260208190526040909120015461241d8342613971565b604082015160009081905b80158015906129b45750602084015115155b15612a005760208401516129c89082613782565b9050428111612a005760808401516129e09083613782565b915083606001516000141580156129fa5750836060015181115b156129a2575b84606001518211612a1657600092505050610812565b6060850151612a259083613971565b95945050505050565b6001600160a01b0383811660009081526005602090815260408083208684529091529020541615612aa15760405162461bcd60e51b815260206004820152601b60248201527f5374616b653a20546f6b656e20616c7265616479207374616b6564000000000060448201526064016105c8565b604080516080810182526001600160a01b0386811680835267ffffffffffffffff8581166020808601918252428688019081526000606088018181528c8816808352600585528a83208d845290945290899020975188549451909516600160a01b026001600160e01b031990941694909616939093179190911785559051600185015591516002909301929092559151632142170760e11b81526004810191909152306024820152604481018490526342842e0e90606401600060405180830381600087803b158015612b7357600080fd5b505af1158015612b87573d6000803e3d6000fd5b5050505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052612c55908490612f16565b505050565b6001600160a01b0382166000908152600560209081526040808320848452909152812080546001820154612c9f91600160a01b900467ffffffffffffffff16906128d8565b612ce75760405162461bcd60e51b81526020600482015260196024820152785374616b653a204e6f742079657420756e7374616b61626c6560381b60448201526064016105c8565b8054600090612d0690600160a01b900467ffffffffffffffff16610674565b6040805160808101825284546001600160a01b0381168252600160a01b900467ffffffffffffffff16602082015260018501549181019190915260028401546060820152909150600090612d5a9083612997565b90508015612d7c5780836002016000828254612d769190613782565b90915550505b6001600160a01b0386811660008181526005602090815260408083208a845290915280822080546001600160e01b0319168155600181018390556002019190915551632142170760e11b8152306004820152918916602483015260448201879052906342842e0e90606401600060405180830381600087803b158015612e0157600080fd5b505af1158015612e15573d6000803e3d6000fd5b50929998505050505050505050565b600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612e72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e969190613895565b9050818110612ea957612c558383612fe8565b600480546040516340c10f1960e01b81526001600160a01b0386811693820193909352602481018590529116906340c10f1990604401600060405180830381600087803b158015612ef957600080fd5b505af1158015612f0d573d6000803e3d6000fd5b50505050505050565b6000612f6b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612fff9092919063ffffffff16565b805190915015612c555780806020019051810190612f899190613988565b612c555760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105c8565b6004546128d4906001600160a01b03168383612bee565b606061300e8484600085613016565b949350505050565b6060824710156130775760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105c8565b6001600160a01b0385163b6130ce5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105c8565b600080866001600160a01b031685876040516130ea91906139da565b60006040518083038185875af1925050503d8060008114613127576040519150601f19603f3d011682016040523d82523d6000602084013e61312c565b606091505b509150915061313c828286613147565b979650505050505050565b60608315613156575081612880565b8251156131665782518084602001fd5b8160405162461bcd60e51b81526004016105c891906139f6565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156131b9576131b9613180565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156131e8576131e8613180565b604052919050565b600067ffffffffffffffff82111561320a5761320a613180565b5060051b60200190565b6000602080838503121561322757600080fd5b823567ffffffffffffffff8082111561323f57600080fd5b818501915085601f83011261325357600080fd5b8135613266613261826131f0565b6131bf565b81815260059190911b8301840190848101908883111561328557600080fd5b8585015b8381101561334d578035858111156132a057600080fd5b86016040818c03601f190112156132b657600080fd5b6132be613196565b88820135878111156132cf57600080fd5b8201603f81018d136132e057600080fd5b898101356132f0613261826131f0565b81815260059190911b8201604001908b8101908f83111561331057600080fd5b6040840193505b828410156133305783358252928c0192908c0190613317565b845250505060409190910135888201528352918601918601613289565b5098975050505050505050565b60006020828403121561336c57600080fd5b5035919050565b6001600160a01b03811681146121c257600080fd5b6000806040838503121561339b57600080fd5b82356133a681613373565b946020939093013593505050565b600080600080608085870312156133ca57600080fd5b84356133d581613373565b93506020858101356133e681613373565b935060408601359250606086013567ffffffffffffffff8082111561340a57600080fd5b818801915088601f83011261341e57600080fd5b81358181111561343057613430613180565b613442601f8201601f191685016131bf565b9150808252898482850101111561345857600080fd5b808484018584013760008482840101525080935050505092959194509250565b60008083601f84011261348a57600080fd5b50813567ffffffffffffffff8111156134a257600080fd5b6020830191508360208260051b85010111156134bd57600080fd5b9250929050565b6000806000604084860312156134d957600080fd5b83359250602084013567ffffffffffffffff8111156134f757600080fd5b61350386828701613478565b9497909650939450505050565b60008060006060848603121561352557600080fd5b83359250602084013561353781613373565b929592945050506040919091013590565b60006020828403121561355a57600080fd5b813561288081613373565b60008060006060848603121561357a57600080fd5b833561358581613373565b95602085013595506040909401359392505050565b600060a082840312156135ac57600080fd5b50919050565b60008060c083850312156135c557600080fd5b823591506135d6846020850161359a565b90509250929050565b600080600080606085870312156135f557600080fd5b84359350602085013561360781613373565b9250604085013567ffffffffffffffff81111561362357600080fd5b61362f87828801613478565b95989497509550505050565b600060a0828403121561364d57600080fd5b61080f838361359a565b6000806040838503121561366a57600080fd5b50508035926020909101359150565b60008060006040848603121561368e57600080fd5b833561369981613373565b9250602084013567ffffffffffffffff8111156134f757600080fd5b600080600080606085870312156136cb57600080fd5b84356136d681613373565b935060208501359250604085013567ffffffffffffffff81111561362357600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016137375761373761370f565b5060010190565b82815281546001600160a01b03166020820152600182015460408201526002820154606082015260038201546080820152600482015460a082015260c08101612880565b600082198211156137955761379561370f565b500190565b60006040808301818452808651808352606092508286019150828160051b8701016020808a016000805b8581101561382e578a8503605f19018752825180518a875280518b88018190529086019084908b8901905b8083101561380f57835182529288019260019290920191908801906137ef565b50928701519787019790975250968401969450918301916001016137c4565b5050509690960196909652509295945050505050565b813561384f81613373565b6001600160a01b0381166001600160a01b031983541617825550602082013560018201556040820135600282015560608201356003820155608082013560048201555050565b6000602082840312156138a757600080fd5b5051919050565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156138ed57600080fd5b8260051b8085606085013760009201606001918252509392505050565b600081518084526020808501945080840160005b8381101561393a5781518752958201959082019060010161391e565b509495945050505050565b60208152600061080f602083018461390a565b82815260406020820152600061300e604083018461390a565b6000828210156139835761398361370f565b500390565b60006020828403121561399a57600080fd5b8151801515811461288057600080fd5b60005b838110156139c55781810151838201526020016139ad565b838111156139d4576000848401525b50505050565b600082516139ec8184602087016139aa565b9190910192915050565b6020815260008251806020840152613a158160408501602087016139aa565b601f01601f1916919091016040019291505056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212205b50a9bed7f01bc2ba2decf5097bd349d3acc6064a271e8bf09bf505a36c315564736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000024c487fc99f31181ffdc3b7664b7471ee0506518
-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x24c487fC99f31181FFdC3b7664b7471EE0506518
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000024c487fc99f31181ffdc3b7664b7471ee0506518
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.