More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 271 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 19116463 | 214 days ago | IN | 0 ETH | 0.00197137 | ||||
Claim Rewards | 19116084 | 214 days ago | IN | 0 ETH | 0.00236401 | ||||
Claim Rewards | 19116071 | 214 days ago | IN | 0 ETH | 0.00273521 | ||||
Claim Rewards | 19109509 | 215 days ago | IN | 0 ETH | 0.00258078 | ||||
Claim Rewards | 19100936 | 216 days ago | IN | 0 ETH | 0.00579046 | ||||
Unstake | 18613983 | 284 days ago | IN | 0 ETH | 0.01676641 | ||||
Claim Rewards | 18289615 | 330 days ago | IN | 0 ETH | 0.00096576 | ||||
Unstake | 18148959 | 349 days ago | IN | 0 ETH | 0.00113153 | ||||
Claim Rewards | 18148953 | 349 days ago | IN | 0 ETH | 0.00134659 | ||||
Stake | 18030642 | 366 days ago | IN | 0 ETH | 0.05609309 | ||||
Unstake | 18006531 | 369 days ago | IN | 0 ETH | 0.00197177 | ||||
Stake | 17981254 | 373 days ago | IN | 0 ETH | 0.01105108 | ||||
Unstake | 17981241 | 373 days ago | IN | 0 ETH | 0.00387802 | ||||
Unstake | 17981229 | 373 days ago | IN | 0 ETH | 0.00409816 | ||||
Claim Rewards | 17971944 | 374 days ago | IN | 0 ETH | 0.00352711 | ||||
Stake | 17787500 | 400 days ago | IN | 0 ETH | 0.00627107 | ||||
Stake | 17783785 | 401 days ago | IN | 0 ETH | 0.00569123 | ||||
Claim Rewards | 17738673 | 407 days ago | IN | 0 ETH | 0.00273215 | ||||
Stake | 17697709 | 413 days ago | IN | 0 ETH | 0.00397814 | ||||
Stake | 17674444 | 416 days ago | IN | 0 ETH | 0.00473868 | ||||
Claim Rewards | 17667544 | 417 days ago | IN | 0 ETH | 0.00344261 | ||||
Stake | 17644644 | 420 days ago | IN | 0 ETH | 0.00569341 | ||||
Stake | 17574692 | 430 days ago | IN | 0 ETH | 0.00332641 | ||||
Stake | 17573797 | 430 days ago | IN | 0 ETH | 0.00517702 | ||||
Stake | 17546796 | 434 days ago | IN | 0 ETH | 0.00335213 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
NFTStaking
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2023-03-09 */ // SPDX-License-Identifier: MIT // File @openzeppelin/contracts/utils/[email protected] // 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; } } // File @openzeppelin/contracts/access/[email protected] // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions 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); } } // File @openzeppelin/contracts/security/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File @openzeppelin/contracts/token/ERC20/[email protected] // 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); } // File @openzeppelin/contracts/utils/introspection/[email protected] // 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); } // File @openzeppelin/contracts/token/ERC721/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; /** * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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); } // File @openzeppelin/contracts/utils/[email protected] // OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } // File @openzeppelin/contracts/token/ERC20/extensions/[email protected] // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } // File @openzeppelin/contracts/token/ERC20/utils/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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"); } } } // File @openzeppelin/contracts/utils/structs/[email protected] // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } } // File contracts/NFTVariable.sol pragma solidity 0.8.18; contract NFTStaking is Ownable, ReentrancyGuard { using EnumerableSet for EnumerableSet.AddressSet; using EnumerableSet for EnumerableSet.UintSet; IERC721 public immutable mriNFT; IERC20 public rewardToken; struct Stake { uint256 amountStaked; uint256 timestampLastUpdate; uint256 claimedRewards; uint256 rewardDebt; EnumerableSet.UintSet nftIds; } struct RarityMultiplier { uint8 other; uint8 rare; uint8 epic; uint8 legendary; } struct PoolInfo { uint64 startStakingTime; uint64 endStakingTime; uint64 totalNFTStaked; // Rewards are cumulated once every hour. uint256 rewardsPerHour; uint256 rewardsForWithdraw; uint256 accTokenPerShare; // Accumulated Tokens per share of rarity } // map staker address to stake details mapping(address => Stake) private stakes; //mapping(address => EnumerableSet.UintSet) private nftIdsOfUser; mapping(uint256 => uint8) public IDsRarity; // mapping each rarity to its number of NFTs staked mapping(uint8 => uint16) public totalNFTByRarity; uint256 lastRewardTime; // map staker to total staking time // Rewards per hour per token in wei. // Based on the amount of NFT staked and their rarity a multiplier is applied RarityMultiplier rarityMultiplier = RarityMultiplier(1, 2, 3, 4); // list of stakers // EnumerableSet.AddressSet private stakersArray; // All the staking pool details PoolInfo public poolInfo; // Mapping of Token Id to staker. Made for the Staking contract to remeber // who to send back the ERC721 Token to. mapping(uint256 => address) public stakerAddress; error Unstake_NoTokensStaked(); error Stake_NotOwnedNFT(); error InvalidEndBlock(); error InvalidStakingPeriod(); event RewardsPerHourChanged(uint256 newRewardsPerHour); event StakeNFT(address indexed staker, uint256[] tokenIds); event UnstakeNFT(address indexed staker, uint256[] tokenIds); event EmergencyWithdraw(uint256 percentage); event SetStakingPeriod(uint256 startStakingTime, uint256 endStakingTime); event SetRewardToken(address rewardToken); event RarityMultiplierChanged(uint8 other, uint8 rare, uint8 epic, uint8 legendary); constructor(address _nftContractAddress, address _rewardToken) { rewardToken = IERC20(_rewardToken); mriNFT = IERC721(_nftContractAddress); } /** * @dev Stake one or more ERC721 Tokens: For every new Token Id in param transferFrom user to this Smart Contract, * increment the amountStaked and map msg.sender to the Token Id of the staked token * to later send back on withdrawal. * Finally give timeOfLastUpdate the value of now. * If address already has ERC721 Token/s staked, calculate the rewards. * @param _tokenIds Array of ERC721 Token Ids to stake */ function stake(uint256[] calldata _tokenIds) external nonReentrant { _claimRewards(); uint256 len = _tokenIds.length; for (uint256 i; i < len; ++i) { if( mriNFT.ownerOf(_tokenIds[i]) != msg.sender ){ revert Stake_NotOwnedNFT(); } mriNFT.transferFrom(msg.sender, address(this), _tokenIds[i]); stakerAddress[_tokenIds[i]] = msg.sender; totalNFTByRarity[IDsRarity[_tokenIds[i]]] += 1; stakes[msg.sender].nftIds.add(_tokenIds[i]); } stakes[msg.sender].amountStaked += uint64(len); stakes[msg.sender].timestampLastUpdate = block.timestamp; stakes[msg.sender].rewardDebt = calculateRarity(msg.sender) * poolInfo.accTokenPerShare; poolInfo.totalNFTStaked += uint64(len); emit StakeNFT(msg.sender, _tokenIds); } /** * @dev Withdraw one or more ERC721 Tokens : Check if user has any ERC721 Tokens Staked and if he tried to withdraw, * calculate the rewards and store them in the unclaimedRewards and for each * ERC721 Token in param: check if msg.sender is the original staker, decrement * the amountStaked of the user and transfer the ERC721 token back to them * @param _tokenIds Array of ERC721 Token Ids to unstake */ function unstake(uint256[] calldata _tokenIds) external nonReentrant { if( stakes[msg.sender].amountStaked == 0 ) { revert Unstake_NoTokensStaked(); } _claimRewards(); uint256 len = _tokenIds.length; for (uint256 i; i < len; ++i) { require(stakerAddress[_tokenIds[i]] == msg.sender); mriNFT.transferFrom(address(this), msg.sender, _tokenIds[i]); stakerAddress[_tokenIds[i]] = address(0); totalNFTByRarity[IDsRarity[_tokenIds[i]]] -= 1; stakes[msg.sender].nftIds.remove(_tokenIds[i]); } stakes[msg.sender].amountStaked -= len; stakes[msg.sender].timestampLastUpdate = block.timestamp; //stakes[msg.sender].unclaimedRewards = 0; stakes[msg.sender].rewardDebt = calculateRarity(msg.sender) * poolInfo.accTokenPerShare; poolInfo.totalNFTStaked -= uint64(len); emit UnstakeNFT(msg.sender, _tokenIds); } /** * @dev Emergency unstake: unstake NFT without caring about calcultating rewards * For regular unstake use the unstake function, this must be called only in case of emergency * param: _tokenIds Array of ERC721 Token Ids to unstake */ function emergencyUnstake(uint256[] calldata _tokenIds) external nonReentrant { if( stakes[msg.sender].amountStaked == 0 ) { revert Unstake_NoTokensStaked(); } uint256 len = _tokenIds.length; for (uint256 i; i < len; ++i) { require(stakerAddress[_tokenIds[i]] == msg.sender); stakerAddress[_tokenIds[i]] = address(0); mriNFT.transferFrom(address(this), msg.sender, _tokenIds[i]); totalNFTByRarity[IDsRarity[_tokenIds[i]]] -= 1; stakes[msg.sender].nftIds.remove(i); } stakes[msg.sender].amountStaked -= len; stakes[msg.sender].timestampLastUpdate = block.timestamp; poolInfo.totalNFTStaked -= uint64(len); emit UnstakeNFT(msg.sender, _tokenIds); } /** * @dev Update the rewards emitted by the pool: If the pool is active, */ function updatePoolRewards() public { uint256 updateRewardInterval = 0; if( block.timestamp <= poolInfo.endStakingTime && block.timestamp >= poolInfo.startStakingTime && lastRewardTime < block.timestamp ){ updateRewardInterval = block.timestamp - lastRewardTime; } lastRewardTime = block.timestamp; uint256 rewards; if (updateRewardInterval > 0 ) { uint256 totalStaked = poolInfo.totalNFTStaked; if (totalStaked > 0) { rewards = (updateRewardInterval * poolInfo.rewardsPerHour) / 3600; } } else{ return; } uint16 _totalRarityStaked = getTotalRarityStaked(); if( poolInfo.startStakingTime < block.timestamp && _totalRarityStaked > 0){ if( poolInfo.rewardsForWithdraw + rewards <= rewardToken.balanceOf(address(this)) ){ poolInfo.rewardsForWithdraw += rewards; poolInfo.accTokenPerShare += (rewards / _totalRarityStaked ); } else if( poolInfo.rewardsForWithdraw < rewardToken.balanceOf(address(this)) ) { poolInfo.accTokenPerShare += (rewardToken.balanceOf(address(this)) - poolInfo.rewardsForWithdraw) / _totalRarityStaked ; poolInfo.rewardsForWithdraw = rewardToken.balanceOf(address(this)); } } } /** * @dev Claim rewards for the msg.sender * Calculate rewards for the msg.sender, check if there are any rewards * claim, set unclaimedRewards to 0 and transfer the ERC20 Reward token * to the user. */ function _claimRewards() internal { updatePoolRewards(); uint256 rewards = calculateRewards(msg.sender); uint16 stakerRarity = calculateRarity(msg.sender); stakes[msg.sender].timestampLastUpdate = block.timestamp; if( rewards == 0){ return; } if( poolInfo.rewardsForWithdraw >= rewards && rewardToken.balanceOf(address(this)) >= rewards) poolInfo.rewardsForWithdraw -= rewards; else return; stakes[msg.sender].rewardDebt = stakerRarity * poolInfo.accTokenPerShare; // stakes[msg.sender].unclaimedRewards = 0; stakes[msg.sender].claimedRewards += rewards; rewardToken.transfer(msg.sender, rewards); } /** * @dev Claim rewards for the msg.sender */ function claimRewards() external nonReentrant { _claimRewards(); } /** * @dev Set the rewards per hour * as the rewards are calculated passively, the rewards must be calculated for each staker first * then the rewards variable can be changed: there is the risk of reaching the gas limit per block * @param _rewardsPerHour New value for rewards per hour */ function setRewardsPerHour( uint256 _rewardsPerHour ) public onlyOwner { updatePoolRewards(); poolInfo.rewardsPerHour = _rewardsPerHour; emit RewardsPerHourChanged(_rewardsPerHour); } ////////////////////////// view ////////////////////////// /** * @dev Get all the info of a user stake status * @param _user Address of the user * @return _amountStaked Amount of staked ERC721 Tokens * @return _timestampLastUpdate Available rewards * @return nftIds Array of ERC721 Token Ids staked by the user * @return _availableRewards Available rewards for the user */ function userStakeInfo(address _user) public view returns (uint256 _amountStaked, uint256 _timestampLastUpdate, uint256[] memory nftIds, uint256 _availableRewards, uint256 totalRewards ) { _availableRewards = availableRewards(_user); return ( stakes[_user].amountStaked, stakes[_user].timestampLastUpdate, stakes[_user].nftIds.values(), _availableRewards, stakes[_user].claimedRewards ); } /** * @dev Get the available rewards for the given _user. * Dinamically updates the ui for the current available rewards * @param _user Address of the user * @return _rewards Available rewards for the param _user */ function availableRewards(address _user) public view returns (uint256) { if (stakes[_user].amountStaked == 0 || rewardToken.balanceOf(address(this)) == 0 || rewardToken.balanceOf(address(this)) < poolInfo.rewardsForWithdraw) { return 0; } Stake storage _stake = stakes[_user]; uint16 stakerRarity = calculateRarity(_user); uint256 deltaStakeTime; uint256 _accTokenPerShare; if( poolInfo.startStakingTime <= _stake.timestampLastUpdate){ if( block.timestamp < poolInfo.endStakingTime ){ // staking started and still ongoing deltaStakeTime = block.timestamp - _stake.timestampLastUpdate; } else if( block.timestamp > poolInfo.endStakingTime && poolInfo.endStakingTime > _stake.timestampLastUpdate) deltaStakeTime = poolInfo.endStakingTime - _stake.timestampLastUpdate; } _accTokenPerShare = poolInfo.accTokenPerShare + (deltaStakeTime * poolInfo.rewardsPerHour / getTotalRarityStaked()) / 3600; //= accTokenPerShare uint256 _rewards = (stakerRarity * _accTokenPerShare ) - _stake.rewardDebt; return _rewards; } ////////////////////////// internal ////////////////////////// /** * @dev Calculate rewards for a given user * Calculate rewards for param _staker by calculating the time passed * since last update in hours and mulitplying it to ERC721 Tokens Staked * and rewardsPerHour. * @param _user Address of the user * @return _rewards Rewards for the given user */ function calculateRewards(address _user) internal view returns (uint256 _rewards) { Stake storage _stake = stakes[_user]; uint16 stakerRarity = calculateRarity(_user); uint256 pendingRewards = stakerRarity * poolInfo.accTokenPerShare - _stake.rewardDebt; return pendingRewards; } /** * @dev Change the staking period * @param _startStakingTime : new start time for the next staking period * @param _endStakingTime: new end time for the next staking period */ function changeStakingPeriod(uint64 _startStakingTime, uint64 _endStakingTime ) public onlyOwner { if(_endStakingTime < block.timestamp || _startStakingTime > _endStakingTime) revert InvalidStakingPeriod(); poolInfo.startStakingTime = _startStakingTime; poolInfo.endStakingTime = _endStakingTime; emit SetStakingPeriod( _startStakingTime , _endStakingTime); } /** * @dev Load rarity values for each NFT: the rarity is a number between 1 and 5, * the the ids array must have the same length of the rarity array * different portion of ids can be loaded in different calls (to not incur in gas limits) * @param rarity: array of rarities * @param ids: array of ids * @notice this function can only be called by the owner */ function loadRarityRank(uint8[] memory rarity, uint256[] memory ids) external onlyOwner { for (uint256 i = 0; i < rarity.length; i++) { IDsRarity[ids[i]] = rarity[i]; } } /** * @dev Emergency withdraw of the reward token * @param percentage: percentage of the reward token to withdraw * @notice this function can only be called by the owner * emits EmergencyWithdraw event */ function emergencyWithdraw(uint256 percentage) external onlyOwner { bool success = rewardToken.transfer(msg.sender, rewardToken.balanceOf(address(this)) * percentage / 100); if(!success) revert(); emit EmergencyWithdraw(rewardToken.balanceOf(address(this)) * percentage / 100); } /** * @dev SetRarityMultiplier: set the multiplier for each rarity * @param other: array of multipliers for each rarity * @param rare: array of multipliers for each rarity * @param epic: array of multipliers for each rarity * @param legendary: array of multipliers for each rarity * emits RarityMultiplierChanged event */ function setRarityMultiplier(uint8 other, uint8 rare, uint8 epic, uint8 legendary) public onlyOwner { rarityMultiplier.other = other; rarityMultiplier.rare = rare; rarityMultiplier.epic = epic; rarityMultiplier.legendary = legendary; emit RarityMultiplierChanged(other, rare, epic, legendary); } /** * @dev SetRewardsPerHour: set the rewards per hour * */ function getTotalRarityStaked() public view returns (uint16 _totalRarityStaked) { _totalRarityStaked = totalNFTByRarity[uint8(0)] * rarityMultiplier.other + totalNFTByRarity[uint8(3)] * rarityMultiplier.rare + totalNFTByRarity[uint8(4)] * rarityMultiplier.epic + totalNFTByRarity[uint8(5)] * rarityMultiplier.legendary; } /** * @dev Calculate the total rarity of the NFTs staked by the user * @param user: address of the user * @return _totalRarity total rarity of the NFTs staked by the user */ function calculateRarity(address user) internal view returns (uint16 _totalRarity) { uint256[] memory nftIds = stakes[user].nftIds.values(); for (uint256 i = 0; i < nftIds.length; i++) { if( IDsRarity[nftIds[i]] == 0 ) // Common/Uncommon _totalRarity += rarityMultiplier.other; else if( IDsRarity[nftIds[i]] == 3 ) // Rare _totalRarity += rarityMultiplier.rare; else if( IDsRarity[nftIds[i]] == 4 ) // Epic _totalRarity += rarityMultiplier.epic; else if (IDsRarity[nftIds[i]] == 5 ) // Legendary _totalRarity += rarityMultiplier.legendary; } return _totalRarity; } /** * @dev Set the address of the reward token * @param _rewardToken: the reward token address * @notice this function can only be called by the owner */ function setRewardToken(address _rewardToken) external onlyOwner { rewardToken = IERC20(_rewardToken); emit SetRewardToken(_rewardToken); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_nftContractAddress","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidEndBlock","type":"error"},{"inputs":[],"name":"InvalidStakingPeriod","type":"error"},{"inputs":[],"name":"Stake_NotOwnedNFT","type":"error"},{"inputs":[],"name":"Unstake_NoTokensStaked","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"percentage","type":"uint256"}],"name":"EmergencyWithdraw","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":"uint8","name":"other","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"rare","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"epic","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"legendary","type":"uint8"}],"name":"RarityMultiplierChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRewardsPerHour","type":"uint256"}],"name":"RewardsPerHourChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"}],"name":"SetRewardToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startStakingTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endStakingTime","type":"uint256"}],"name":"SetStakingPeriod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"StakeNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"UnstakeNFT","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"IDsRarity","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"availableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_startStakingTime","type":"uint64"},{"internalType":"uint64","name":"_endStakingTime","type":"uint64"}],"name":"changeStakingPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"emergencyUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percentage","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalRarityStaked","outputs":[{"internalType":"uint16","name":"_totalRarityStaked","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"rarity","type":"uint8[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"loadRarityRank","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mriNFT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolInfo","outputs":[{"internalType":"uint64","name":"startStakingTime","type":"uint64"},{"internalType":"uint64","name":"endStakingTime","type":"uint64"},{"internalType":"uint64","name":"totalNFTStaked","type":"uint64"},{"internalType":"uint256","name":"rewardsPerHour","type":"uint256"},{"internalType":"uint256","name":"rewardsForWithdraw","type":"uint256"},{"internalType":"uint256","name":"accTokenPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"other","type":"uint8"},{"internalType":"uint8","name":"rare","type":"uint8"},{"internalType":"uint8","name":"epic","type":"uint8"},{"internalType":"uint8","name":"legendary","type":"uint8"}],"name":"setRarityMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"setRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsPerHour","type":"uint256"}],"name":"setRewardsPerHour","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"totalNFTByRarity","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePoolRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userStakeInfo","outputs":[{"internalType":"uint256","name":"_amountStaked","type":"uint256"},{"internalType":"uint256","name":"_timestampLastUpdate","type":"uint256"},{"internalType":"uint256[]","name":"nftIds","type":"uint256[]"},{"internalType":"uint256","name":"_availableRewards","type":"uint256"},{"internalType":"uint256","name":"totalRewards","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
610120604052600160a052600260c052600360e0526004610100526007805463ffffffff191663040302011790553480156200003a57600080fd5b50604051620026dc380380620026dc8339810160408190526200005d91620000ff565b620000683362000092565b60018055600280546001600160a01b0319166001600160a01b039283161790551660805262000137565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000fa57600080fd5b919050565b600080604083850312156200011357600080fd5b6200011e83620000e2565b91506200012e60208401620000e2565b90509250929050565b60805161256d6200016f60003960008181610307015281816104c701528181610595015281816110720152611314015261256d6000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063bf0e5b951161007c578063bf0e5b9514610371578063e449f34114610384578063ece5b5be14610397578063f2fde38b1461039f578063f7c618c1146103b2578063f854a27f146103c557600080fd5b80638da5cb5b146102a1578063937b0cf1146102c657806394067045146102d9578063a6fe524414610302578063b22fbc2f14610329578063b5a5e5091461035e57600080fd5b80635312ea8e116101155780635312ea8e146101e25780635a2f3d09146101f55780636f83a1de1461026b578063715018a61461027e5780638aee8127146102865780638c37b9001461029957600080fd5b8063039a1623146101525780630fbf0a9314610167578063257ddfef1461017a578063372500ab146101b65780634ead4327146101be575b600080fd5b610165610160366004611fec565b6103e6565b005b61016561017536600461201f565b6104a8565b61019e6101883660046120a4565b60056020526000908152604090205461ffff1681565b60405161ffff90911681526020015b60405180910390f35b610165610862565b6101d16101cc3660046120d4565b61087d565b6040516101ad9594939291906120f1565b6101656101f0366004612150565b6108ea565b600854600954600a54600b5461022d936001600160401b0380821694600160401b8304821694600160801b9093049091169290919086565b604080516001600160401b039788168152958716602087015293909516928401929092526060830152608082015260a081019190915260c0016101ad565b610165610279366004612169565b610ab0565b610165610b4f565b6101656102943660046120d4565b610b61565b610165610bbe565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101ad565b6101656102d4366004612291565b610ed4565b6102ae6102e7366004612150565b600c602052600090815260409020546001600160a01b031681565b6102ae7f000000000000000000000000000000000000000000000000000000000000000081565b61034c610337366004612150565b60046020526000908152604090205460ff1681565b60405160ff90911681526020016101ad565b61016561036c366004612150565b610f59565b61016561037f36600461201f565b610f9e565b61016561039236600461201f565b611283565b61019e611564565b6101656103ad3660046120d4565b61169e565b6002546102ae906001600160a01b031681565b6103d86103d33660046120d4565b61171c565b6040519081526020016101ad565b6103ee61196f565b42816001600160401b031610806104165750806001600160401b0316826001600160401b0316115b15610434576040516309f55df560e41b815260040160405180910390fd5b600880546001600160401b038481166fffffffffffffffffffffffffffffffff199092168217600160401b918516918202179092556040805191825260208201929092527f58de8c7b5e7c520287c9b981c8f628a4c08a47a9eb8dcf06f20782efddb731b391015b60405180910390a15050565b6104b06119c9565b6104b8611a22565b8060005b8181101561075557337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e86868581811061050657610506612350565b905060200201356040518263ffffffff1660e01b815260040161052b91815260200190565b602060405180830381865afa158015610548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056c9190612366565b6001600160a01b031614610593576040516304fa5e4b60e11b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd33308787868181106105d6576105d6612350565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561062d57600080fd5b505af1158015610641573d6000803e3d6000fd5b5050505033600c600086868581811061065c5761065c612350565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160056000600460008888878181106106b1576106b1612350565b6020908102929092013583525081810192909252604090810160009081205460ff168452918301939093529101812080549091906106f490849061ffff16612399565b92506101000a81548161ffff021916908361ffff16021790555061074484848381811061072357610723612350565b33600090815260036020908152604090912060040193910201359050611bbf565b5061074e816123b4565b90506104bc565b5033600090815260036020526040812080546001600160401b038416929061077e9084906123cd565b909155505033600081815260036020526040902042600190910155600b54906107a690611bd4565b61ffff166107b491906123e0565b3360009081526003602081905260409091200155600880548291906010906107ed908490600160801b90046001600160401b03166123f7565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550336001600160a01b03167f1b8c28a861677c5b3b8831f33525650871ec61463da5ed7ae1d08d4628711a86848460405161084c929190612417565b60405180910390a25061085e60018055565b5050565b61086a6119c9565b610872611a22565b61087b60018055565b565b600080606060008061088e8661171c565b6001600160a01b03871660009081526003602052604090208054600182015492945091906108be90600401611d6a565b6001600160a01b0398909816600090815260036020526040902060020154919890979650929450925050565b6108f261196f565b6002546040516370a0823160e01b81523060048201526000916001600160a01b03169063a9059cbb903390606490869085906370a0823190602401602060405180830381865afa15801561094a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096e9190612450565b61097891906123e0565b6109829190612469565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156109cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f1919061248b565b9050806109fd57600080fd5b6002546040516370a0823160e01b81523060048201527f99d7f8b71cfb9126984f7a5eed3a40e64a8959e9b0e442221546fb04ec6a489c9160649185916001600160a01b0316906370a0823190602401602060405180830381865afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e9190612450565b610a9891906123e0565b610aa29190612469565b60405190815260200161049c565b610ab861196f565b6007805460ff86811661ffff1990921682176101008783169081029190911763ffff000019166201000087841690810263ff00000019169190911763010000009387169384021790945560408051938452602084019190915282810193909352606082015290517f9d814305d0218a4440163385ac21c7b64a23ecb5a0ae7826c26c81089b60b2009181900360800190a150505050565b610b5761196f565b61087b6000611d7e565b610b6961196f565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f6f8c206ce9f10423f2b99164314c3e6e47f872d0d56a1c072c5e5bb4a9b9cd36906020015b60405180910390a150565b600854600090600160401b90046001600160401b03164211801590610bee57506008546001600160401b03164210155b8015610bfb575042600654105b15610c1057600654610c0d90426124ad565b90505b426006556000811561085e57600854600160801b90046001600160401b03168015610c5357600954610e1090610c4690856123e0565b610c509190612469565b91505b506000610c5e611564565b600854909150426001600160401b03909116108015610c81575060008161ffff16115b15610ecf576002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf29190612450565b600a54610d009084906123cd565b11610d4b578160086002016000828254610d1a91906123cd565b90915550610d2e905061ffff821683612469565b600b8054600090610d409084906123cd565b90915550610ecf9050565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db79190612450565b600a541015610ecf57600a546002546040516370a0823160e01b815230600482015261ffff841692916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e349190612450565b610e3e91906124ad565b610e489190612469565b600b8054600090610e5a9084906123cd565b90915550506002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecb9190612450565b600a555b505050565b610edc61196f565b60005b8251811015610ecf57828181518110610efa57610efa612350565b602002602001015160046000848481518110610f1857610f18612350565b6020026020010151815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610f51906123b4565b915050610edf565b610f6161196f565b610f69610bbe565b60098190556040518181527ffa93e4da71ed3ee8dcf7b91dfa77d3b58456a629609ad05b3960a9005ec4920c90602001610bb3565b610fa66119c9565b336000908152600360205260408120549003610fd5576040516393c2cdc760e01b815260040160405180910390fd5b8060005b818110156111c45733600c6000868685818110610ff857610ff8612350565b60209081029290920135835250810191909152604001600020546001600160a01b03161461102557600080fd5b6000600c600086868581811061103d5761103d612350565b6020908102929092013583525081019190915260400160002080546001600160a01b0319166001600160a01b039283161790557f0000000000000000000000000000000000000000000000000000000000000000166323b872dd30338787868181106110ab576110ab612350565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561110257600080fd5b505af1158015611116573d6000803e3d6000fd5b505050506001600560006004600088888781811061113657611136612350565b6020908102929092013583525081810192909252604090810160009081205460ff1684529183019390935291018120805490919061117990849061ffff166124c0565b825461ffff9182166101009390930a9283029190920219909116179055503360009081526003602052604090206111b39060040182611dce565b506111bd816123b4565b9050610fd9565b5033600090815260036020526040812080548392906111e49084906124ad565b90915550503360009081526003602052604090204260019091015560088054829190601090611224908490600160801b90046001600160401b03166124db565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550336001600160a01b03167f155b8fa10c7506c4abd48e722aab6cadc4a286bcbcc4576dd0e3c2f1ad335a88848460405161084c929190612417565b61128b6119c9565b3360009081526003602052604081205490036112ba576040516393c2cdc760e01b815260040160405180910390fd5b6112c2611a22565b8060005b818110156114d55733600c60008686858181106112e5576112e5612350565b60209081029290920135835250810191909152604001600020546001600160a01b03161461131257600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd303387878681811061135557611355612350565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156113ac57600080fd5b505af11580156113c0573d6000803e3d6000fd5b505050506000600c60008686858181106113dc576113dc612350565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001600560006004600088888781811061143157611431612350565b6020908102929092013583525081810192909252604090810160009081205460ff1684529183019390935291018120805490919061147490849061ffff166124c0565b92506101000a81548161ffff021916908361ffff1602179055506114c48484838181106114a3576114a3612350565b33600090815260036020908152604090912060040193910201359050611dce565b506114ce816123b4565b90506112c6565b5033600090815260036020526040812080548392906114f59084906124ad565b909155505033600081815260036020526040902042600190910155600b549061151d90611bd4565b61ffff1661152b91906123e0565b336000908152600360208190526040909120015560088054829190601090611224908490600160801b90046001600160401b03166124db565b600754600560008181526020919091527f458b30c2d72bfd2c6317304a4594ecbafe5f729d3111b65fdc3a33bd48e5432d5490916115b191630100000090910460ff169061ffff166124fb565b600754600460005260056020527f3eec716f11ba9e820c81ca75eb978ffb45831ef8b7a53e5e422c26008e1ca6d5546115f79162010000900460ff169061ffff166124fb565b600754600360005260056020527fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc05461163c91610100900460ff169061ffff166124fb565b6007546000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5461167b9160ff169061ffff166124fb565b6116859190612399565b61168f9190612399565b6116999190612399565b905090565b6116a661196f565b6001600160a01b0381166117105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61171981611d7e565b50565b6001600160a01b03811660009081526003602052604081205415806117aa57506002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a89190612450565b155b806118215750600a546002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156117fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181f9190612450565b105b1561182e57506000919050565b6001600160a01b03821660009081526003602052604081209061185084611bd4565b600183015460085491925060009182916001600160401b039091161161190057600854600160401b90046001600160401b03164210156118a057600184015461189990426124ad565b9150611900565b600854600160401b90046001600160401b0316421180156118d657506001840154600854600160401b90046001600160401b0316115b156119005760018401546008546118fd9190600160401b90046001600160401b03166124ad565b91505b610e1061190b611564565b61ffff166008600101548461192091906123e0565b61192a9190612469565b6119349190612469565b600b5461194191906123cd565b905060008460030154828561ffff1661195a91906123e0565b61196491906124ad565b979650505050505050565b6000546001600160a01b0316331461087b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611707565b600260015403611a1b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611707565b6002600155565b611a2a610bbe565b6000611a3533611dda565b90506000611a4233611bd4565b33600090815260036020526040812042600190910155909150829003611a66575050565b600a548211801590611ae257506002546040516370a0823160e01b815230600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa158015611abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adf9190612450565b10155b1561085e578160086002016000828254611afc91906124ad565b90915550611b079050565b600b54611b189061ffff83166123e0565b33600090815260036020819052604082209081019290925560029091018054849290611b459084906123cd565b909155505060025460405163a9059cbb60e01b8152336004820152602481018490526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecf919061248b565b6000611bcb8383611e2b565b90505b92915050565b6001600160a01b03811660009081526003602052604081208190611bfa90600401611d6a565b905060005b8151811015611d635760046000838381518110611c1e57611c1e612350565b602090810291909101810151825281019190915260400160009081205460ff169003611c5b57600754611c549060ff1684612399565b9250611d51565b60046000838381518110611c7157611c71612350565b60209081029190910181015182528101919091526040016000205460ff16600303611cab57600754611c5490610100900460ff1684612399565b60046000838381518110611cc157611cc1612350565b60209081029190910181015182528101919091526040016000205460ff16600403611cfc57600754611c549062010000900460ff1684612399565b60046000838381518110611d1257611d12612350565b60209081029190910181015182528101919091526040016000205460ff16600503611d5157600754611d4e906301000000900460ff1684612399565b92505b80611d5b816123b4565b915050611bff565b5050919050565b60606000611d7783611e7a565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611bcb8383611ed6565b6001600160a01b038116600090815260036020526040812081611dfc84611bd4565b6003830154600b54919250600091611e189061ffff85166123e0565b611e2291906124ad565b95945050505050565b6000818152600183016020526040812054611e7257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611bce565b506000611bce565b606081600001805480602002602001604051908101604052809291908181526020018280548015611eca57602002820191906000526020600020905b815481526020019060010190808311611eb6575b50505050509050919050565b60008181526001830160205260408120548015611fbf576000611efa6001836124ad565b8554909150600090611f0e906001906124ad565b9050818114611f73576000866000018281548110611f2e57611f2e612350565b9060005260206000200154905080876000018481548110611f5157611f51612350565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611f8457611f84612521565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611bce565b6000915050611bce565b5092915050565b80356001600160401b0381168114611fe757600080fd5b919050565b60008060408385031215611fff57600080fd5b61200883611fd0565b915061201660208401611fd0565b90509250929050565b6000806020838503121561203257600080fd5b82356001600160401b038082111561204957600080fd5b818501915085601f83011261205d57600080fd5b81358181111561206c57600080fd5b8660208260051b850101111561208157600080fd5b60209290920196919550909350505050565b803560ff81168114611fe757600080fd5b6000602082840312156120b657600080fd5b611bcb82612093565b6001600160a01b038116811461171957600080fd5b6000602082840312156120e657600080fd5b8135611d77816120bf565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156121385784518352938301939183019160010161211c565b50506060850196909652505050608001529392505050565b60006020828403121561216257600080fd5b5035919050565b6000806000806080858703121561217f57600080fd5b61218885612093565b935061219660208601612093565b92506121a460408601612093565b91506121b260608601612093565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156121fb576121fb6121bd565b604052919050565b60006001600160401b0382111561221c5761221c6121bd565b5060051b60200190565b600082601f83011261223757600080fd5b8135602061224c61224783612203565b6121d3565b82815260059290921b8401810191818101908684111561226b57600080fd5b8286015b84811015612286578035835291830191830161226f565b509695505050505050565b600080604083850312156122a457600080fd5b82356001600160401b03808211156122bb57600080fd5b818501915085601f8301126122cf57600080fd5b813560206122df61224783612203565b82815260059290921b840181019181810190898411156122fe57600080fd5b948201945b838610156123235761231486612093565b82529482019490820190612303565b9650508601359250508082111561233957600080fd5b5061234685828601612226565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561237857600080fd5b8151611d77816120bf565b634e487b7160e01b600052601160045260246000fd5b61ffff818116838216019080821115611fc957611fc9612383565b6000600182016123c6576123c6612383565b5060010190565b80820180821115611bce57611bce612383565b8082028115828204841417611bce57611bce612383565b6001600160401b03818116838216019080821115611fc957611fc9612383565b6020808252810182905260006001600160fb1b0383111561243757600080fd5b8260051b80856040850137919091016040019392505050565b60006020828403121561246257600080fd5b5051919050565b60008261248657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561249d57600080fd5b81518015158114611d7757600080fd5b81810381811115611bce57611bce612383565b61ffff828116828216039080821115611fc957611fc9612383565b6001600160401b03828116828216039080821115611fc957611fc9612383565b61ffff81811683821602808216919082811461251957612519612383565b505092915050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220cdeb34b92783dc0a885c41339e32f36d9304454656bccc6b1441c3008281af5864736f6c63430008120033000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc000000000000000000000000337dd23d05c27bff099d3604938bfc23a9b25820
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063bf0e5b951161007c578063bf0e5b9514610371578063e449f34114610384578063ece5b5be14610397578063f2fde38b1461039f578063f7c618c1146103b2578063f854a27f146103c557600080fd5b80638da5cb5b146102a1578063937b0cf1146102c657806394067045146102d9578063a6fe524414610302578063b22fbc2f14610329578063b5a5e5091461035e57600080fd5b80635312ea8e116101155780635312ea8e146101e25780635a2f3d09146101f55780636f83a1de1461026b578063715018a61461027e5780638aee8127146102865780638c37b9001461029957600080fd5b8063039a1623146101525780630fbf0a9314610167578063257ddfef1461017a578063372500ab146101b65780634ead4327146101be575b600080fd5b610165610160366004611fec565b6103e6565b005b61016561017536600461201f565b6104a8565b61019e6101883660046120a4565b60056020526000908152604090205461ffff1681565b60405161ffff90911681526020015b60405180910390f35b610165610862565b6101d16101cc3660046120d4565b61087d565b6040516101ad9594939291906120f1565b6101656101f0366004612150565b6108ea565b600854600954600a54600b5461022d936001600160401b0380821694600160401b8304821694600160801b9093049091169290919086565b604080516001600160401b039788168152958716602087015293909516928401929092526060830152608082015260a081019190915260c0016101ad565b610165610279366004612169565b610ab0565b610165610b4f565b6101656102943660046120d4565b610b61565b610165610bbe565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101ad565b6101656102d4366004612291565b610ed4565b6102ae6102e7366004612150565b600c602052600090815260409020546001600160a01b031681565b6102ae7f000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc81565b61034c610337366004612150565b60046020526000908152604090205460ff1681565b60405160ff90911681526020016101ad565b61016561036c366004612150565b610f59565b61016561037f36600461201f565b610f9e565b61016561039236600461201f565b611283565b61019e611564565b6101656103ad3660046120d4565b61169e565b6002546102ae906001600160a01b031681565b6103d86103d33660046120d4565b61171c565b6040519081526020016101ad565b6103ee61196f565b42816001600160401b031610806104165750806001600160401b0316826001600160401b0316115b15610434576040516309f55df560e41b815260040160405180910390fd5b600880546001600160401b038481166fffffffffffffffffffffffffffffffff199092168217600160401b918516918202179092556040805191825260208201929092527f58de8c7b5e7c520287c9b981c8f628a4c08a47a9eb8dcf06f20782efddb731b391015b60405180910390a15050565b6104b06119c9565b6104b8611a22565b8060005b8181101561075557337f000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc6001600160a01b0316636352211e86868581811061050657610506612350565b905060200201356040518263ffffffff1660e01b815260040161052b91815260200190565b602060405180830381865afa158015610548573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056c9190612366565b6001600160a01b031614610593576040516304fa5e4b60e11b815260040160405180910390fd5b7f000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc6001600160a01b03166323b872dd33308787868181106105d6576105d6612350565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561062d57600080fd5b505af1158015610641573d6000803e3d6000fd5b5050505033600c600086868581811061065c5761065c612350565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160056000600460008888878181106106b1576106b1612350565b6020908102929092013583525081810192909252604090810160009081205460ff168452918301939093529101812080549091906106f490849061ffff16612399565b92506101000a81548161ffff021916908361ffff16021790555061074484848381811061072357610723612350565b33600090815260036020908152604090912060040193910201359050611bbf565b5061074e816123b4565b90506104bc565b5033600090815260036020526040812080546001600160401b038416929061077e9084906123cd565b909155505033600081815260036020526040902042600190910155600b54906107a690611bd4565b61ffff166107b491906123e0565b3360009081526003602081905260409091200155600880548291906010906107ed908490600160801b90046001600160401b03166123f7565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550336001600160a01b03167f1b8c28a861677c5b3b8831f33525650871ec61463da5ed7ae1d08d4628711a86848460405161084c929190612417565b60405180910390a25061085e60018055565b5050565b61086a6119c9565b610872611a22565b61087b60018055565b565b600080606060008061088e8661171c565b6001600160a01b03871660009081526003602052604090208054600182015492945091906108be90600401611d6a565b6001600160a01b0398909816600090815260036020526040902060020154919890979650929450925050565b6108f261196f565b6002546040516370a0823160e01b81523060048201526000916001600160a01b03169063a9059cbb903390606490869085906370a0823190602401602060405180830381865afa15801561094a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096e9190612450565b61097891906123e0565b6109829190612469565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156109cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f1919061248b565b9050806109fd57600080fd5b6002546040516370a0823160e01b81523060048201527f99d7f8b71cfb9126984f7a5eed3a40e64a8959e9b0e442221546fb04ec6a489c9160649185916001600160a01b0316906370a0823190602401602060405180830381865afa158015610a6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8e9190612450565b610a9891906123e0565b610aa29190612469565b60405190815260200161049c565b610ab861196f565b6007805460ff86811661ffff1990921682176101008783169081029190911763ffff000019166201000087841690810263ff00000019169190911763010000009387169384021790945560408051938452602084019190915282810193909352606082015290517f9d814305d0218a4440163385ac21c7b64a23ecb5a0ae7826c26c81089b60b2009181900360800190a150505050565b610b5761196f565b61087b6000611d7e565b610b6961196f565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f6f8c206ce9f10423f2b99164314c3e6e47f872d0d56a1c072c5e5bb4a9b9cd36906020015b60405180910390a150565b600854600090600160401b90046001600160401b03164211801590610bee57506008546001600160401b03164210155b8015610bfb575042600654105b15610c1057600654610c0d90426124ad565b90505b426006556000811561085e57600854600160801b90046001600160401b03168015610c5357600954610e1090610c4690856123e0565b610c509190612469565b91505b506000610c5e611564565b600854909150426001600160401b03909116108015610c81575060008161ffff16115b15610ecf576002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf29190612450565b600a54610d009084906123cd565b11610d4b578160086002016000828254610d1a91906123cd565b90915550610d2e905061ffff821683612469565b600b8054600090610d409084906123cd565b90915550610ecf9050565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610d93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db79190612450565b600a541015610ecf57600a546002546040516370a0823160e01b815230600482015261ffff841692916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e349190612450565b610e3e91906124ad565b610e489190612469565b600b8054600090610e5a9084906123cd565b90915550506002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecb9190612450565b600a555b505050565b610edc61196f565b60005b8251811015610ecf57828181518110610efa57610efa612350565b602002602001015160046000848481518110610f1857610f18612350565b6020026020010151815260200190815260200160002060006101000a81548160ff021916908360ff1602179055508080610f51906123b4565b915050610edf565b610f6161196f565b610f69610bbe565b60098190556040518181527ffa93e4da71ed3ee8dcf7b91dfa77d3b58456a629609ad05b3960a9005ec4920c90602001610bb3565b610fa66119c9565b336000908152600360205260408120549003610fd5576040516393c2cdc760e01b815260040160405180910390fd5b8060005b818110156111c45733600c6000868685818110610ff857610ff8612350565b60209081029290920135835250810191909152604001600020546001600160a01b03161461102557600080fd5b6000600c600086868581811061103d5761103d612350565b6020908102929092013583525081019190915260400160002080546001600160a01b0319166001600160a01b039283161790557f000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc166323b872dd30338787868181106110ab576110ab612350565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561110257600080fd5b505af1158015611116573d6000803e3d6000fd5b505050506001600560006004600088888781811061113657611136612350565b6020908102929092013583525081810192909252604090810160009081205460ff1684529183019390935291018120805490919061117990849061ffff166124c0565b825461ffff9182166101009390930a9283029190920219909116179055503360009081526003602052604090206111b39060040182611dce565b506111bd816123b4565b9050610fd9565b5033600090815260036020526040812080548392906111e49084906124ad565b90915550503360009081526003602052604090204260019091015560088054829190601090611224908490600160801b90046001600160401b03166124db565b92506101000a8154816001600160401b0302191690836001600160401b03160217905550336001600160a01b03167f155b8fa10c7506c4abd48e722aab6cadc4a286bcbcc4576dd0e3c2f1ad335a88848460405161084c929190612417565b61128b6119c9565b3360009081526003602052604081205490036112ba576040516393c2cdc760e01b815260040160405180910390fd5b6112c2611a22565b8060005b818110156114d55733600c60008686858181106112e5576112e5612350565b60209081029290920135835250810191909152604001600020546001600160a01b03161461131257600080fd5b7f000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc6001600160a01b03166323b872dd303387878681811061135557611355612350565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156113ac57600080fd5b505af11580156113c0573d6000803e3d6000fd5b505050506000600c60008686858181106113dc576113dc612350565b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001600560006004600088888781811061143157611431612350565b6020908102929092013583525081810192909252604090810160009081205460ff1684529183019390935291018120805490919061147490849061ffff166124c0565b92506101000a81548161ffff021916908361ffff1602179055506114c48484838181106114a3576114a3612350565b33600090815260036020908152604090912060040193910201359050611dce565b506114ce816123b4565b90506112c6565b5033600090815260036020526040812080548392906114f59084906124ad565b909155505033600081815260036020526040902042600190910155600b549061151d90611bd4565b61ffff1661152b91906123e0565b336000908152600360208190526040909120015560088054829190601090611224908490600160801b90046001600160401b03166124db565b600754600560008181526020919091527f458b30c2d72bfd2c6317304a4594ecbafe5f729d3111b65fdc3a33bd48e5432d5490916115b191630100000090910460ff169061ffff166124fb565b600754600460005260056020527f3eec716f11ba9e820c81ca75eb978ffb45831ef8b7a53e5e422c26008e1ca6d5546115f79162010000900460ff169061ffff166124fb565b600754600360005260056020527fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc05461163c91610100900460ff169061ffff166124fb565b6007546000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5461167b9160ff169061ffff166124fb565b6116859190612399565b61168f9190612399565b6116999190612399565b905090565b6116a661196f565b6001600160a01b0381166117105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61171981611d7e565b50565b6001600160a01b03811660009081526003602052604081205415806117aa57506002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117a89190612450565b155b806118215750600a546002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156117fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181f9190612450565b105b1561182e57506000919050565b6001600160a01b03821660009081526003602052604081209061185084611bd4565b600183015460085491925060009182916001600160401b039091161161190057600854600160401b90046001600160401b03164210156118a057600184015461189990426124ad565b9150611900565b600854600160401b90046001600160401b0316421180156118d657506001840154600854600160401b90046001600160401b0316115b156119005760018401546008546118fd9190600160401b90046001600160401b03166124ad565b91505b610e1061190b611564565b61ffff166008600101548461192091906123e0565b61192a9190612469565b6119349190612469565b600b5461194191906123cd565b905060008460030154828561ffff1661195a91906123e0565b61196491906124ad565b979650505050505050565b6000546001600160a01b0316331461087b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611707565b600260015403611a1b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611707565b6002600155565b611a2a610bbe565b6000611a3533611dda565b90506000611a4233611bd4565b33600090815260036020526040812042600190910155909150829003611a66575050565b600a548211801590611ae257506002546040516370a0823160e01b815230600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa158015611abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adf9190612450565b10155b1561085e578160086002016000828254611afc91906124ad565b90915550611b079050565b600b54611b189061ffff83166123e0565b33600090815260036020819052604082209081019290925560029091018054849290611b459084906123cd565b909155505060025460405163a9059cbb60e01b8152336004820152602481018490526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015611b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecf919061248b565b6000611bcb8383611e2b565b90505b92915050565b6001600160a01b03811660009081526003602052604081208190611bfa90600401611d6a565b905060005b8151811015611d635760046000838381518110611c1e57611c1e612350565b602090810291909101810151825281019190915260400160009081205460ff169003611c5b57600754611c549060ff1684612399565b9250611d51565b60046000838381518110611c7157611c71612350565b60209081029190910181015182528101919091526040016000205460ff16600303611cab57600754611c5490610100900460ff1684612399565b60046000838381518110611cc157611cc1612350565b60209081029190910181015182528101919091526040016000205460ff16600403611cfc57600754611c549062010000900460ff1684612399565b60046000838381518110611d1257611d12612350565b60209081029190910181015182528101919091526040016000205460ff16600503611d5157600754611d4e906301000000900460ff1684612399565b92505b80611d5b816123b4565b915050611bff565b5050919050565b60606000611d7783611e7a565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611bcb8383611ed6565b6001600160a01b038116600090815260036020526040812081611dfc84611bd4565b6003830154600b54919250600091611e189061ffff85166123e0565b611e2291906124ad565b95945050505050565b6000818152600183016020526040812054611e7257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611bce565b506000611bce565b606081600001805480602002602001604051908101604052809291908181526020018280548015611eca57602002820191906000526020600020905b815481526020019060010190808311611eb6575b50505050509050919050565b60008181526001830160205260408120548015611fbf576000611efa6001836124ad565b8554909150600090611f0e906001906124ad565b9050818114611f73576000866000018281548110611f2e57611f2e612350565b9060005260206000200154905080876000018481548110611f5157611f51612350565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611f8457611f84612521565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611bce565b6000915050611bce565b5092915050565b80356001600160401b0381168114611fe757600080fd5b919050565b60008060408385031215611fff57600080fd5b61200883611fd0565b915061201660208401611fd0565b90509250929050565b6000806020838503121561203257600080fd5b82356001600160401b038082111561204957600080fd5b818501915085601f83011261205d57600080fd5b81358181111561206c57600080fd5b8660208260051b850101111561208157600080fd5b60209290920196919550909350505050565b803560ff81168114611fe757600080fd5b6000602082840312156120b657600080fd5b611bcb82612093565b6001600160a01b038116811461171957600080fd5b6000602082840312156120e657600080fd5b8135611d77816120bf565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156121385784518352938301939183019160010161211c565b50506060850196909652505050608001529392505050565b60006020828403121561216257600080fd5b5035919050565b6000806000806080858703121561217f57600080fd5b61218885612093565b935061219660208601612093565b92506121a460408601612093565b91506121b260608601612093565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156121fb576121fb6121bd565b604052919050565b60006001600160401b0382111561221c5761221c6121bd565b5060051b60200190565b600082601f83011261223757600080fd5b8135602061224c61224783612203565b6121d3565b82815260059290921b8401810191818101908684111561226b57600080fd5b8286015b84811015612286578035835291830191830161226f565b509695505050505050565b600080604083850312156122a457600080fd5b82356001600160401b03808211156122bb57600080fd5b818501915085601f8301126122cf57600080fd5b813560206122df61224783612203565b82815260059290921b840181019181810190898411156122fe57600080fd5b948201945b838610156123235761231486612093565b82529482019490820190612303565b9650508601359250508082111561233957600080fd5b5061234685828601612226565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561237857600080fd5b8151611d77816120bf565b634e487b7160e01b600052601160045260246000fd5b61ffff818116838216019080821115611fc957611fc9612383565b6000600182016123c6576123c6612383565b5060010190565b80820180821115611bce57611bce612383565b8082028115828204841417611bce57611bce612383565b6001600160401b03818116838216019080821115611fc957611fc9612383565b6020808252810182905260006001600160fb1b0383111561243757600080fd5b8260051b80856040850137919091016040019392505050565b60006020828403121561246257600080fd5b5051919050565b60008261248657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561249d57600080fd5b81518015158114611d7757600080fd5b81810381811115611bce57611bce612383565b61ffff828116828216039080821115611fc957611fc9612383565b6001600160401b03828116828216039080821115611fc957611fc9612383565b61ffff81811683821602808216919082811461251957612519612383565b505092915050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220cdeb34b92783dc0a885c41339e32f36d9304454656bccc6b1441c3008281af5864736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc000000000000000000000000337dd23d05c27bff099d3604938bfc23a9b25820
-----Decoded View---------------
Arg [0] : _nftContractAddress (address): 0xD16e7b3B91f96d027AB46a951Fa7f81708F9e7bC
Arg [1] : _rewardToken (address): 0x337DD23d05c27bff099d3604938BFc23A9B25820
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d16e7b3b91f96d027ab46a951fa7f81708f9e7bc
Arg [1] : 000000000000000000000000337dd23d05c27bff099d3604938bfc23a9b25820
Deployed Bytecode Sourcemap
45266:17814:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58857:425;;;;;;:::i;:::-;;:::i;:::-;;48393:937;;;;;;:::i;:::-;;:::i;46461:48::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1593:6:1;1581:19;;;1563:38;;1551:2;1536:18;46461:48:0;;;;;;;;54618:82;;;:::i;55709:638::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;60161:326::-;;;;;;:::i;:::-;;:::i;46914:24::-;;;;;;;;;;;-1:-1:-1;;;;;46914:24:0;;;;-1:-1:-1;;;46914:24:0;;;;;-1:-1:-1;;;46914:24:0;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3446:15:1;;;3428:34;;3498:15;;;3493:2;3478:18;;3471:43;3550:15;;;;3530:18;;;3523:43;;;;3597:2;3582:18;;3575:34;3640:3;3625:19;;3618:35;3684:3;3669:19;;3662:35;;;;3378:3;3363:19;46914:24:0;3110:593:1;60864:345:0;;;;;;:::i;:::-;;:::i;2817:103::-;;;:::i;62898:163::-;;;;;;:::i;:::-;;:::i;52050:1469::-;;;:::i;2169:87::-;2215:7;2242:6;-1:-1:-1;;;;;2242:6:0;2169:87;;;-1:-1:-1;;;;;4270:32:1;;;4252:51;;4240:2;4225:18;2169:87:0;4106:203:1;59705:206:0;;;;;;:::i;:::-;;:::i;47075:48::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;47075:48:0;;;45440:31;;;;;46355:42;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;7117:4:1;7105:17;;;7087:36;;7075:2;7060:18;46355:42:0;6945:184:1;55030:242:0;;;;;;:::i;:::-;;:::i;51099:849::-;;;;;;:::i;:::-;;:::i;49793:1027::-;;;;;;:::i;:::-;;:::i;61304:452::-;;;:::i;3075:201::-;;;;;;:::i;:::-;;:::i;45478:25::-;;;;;-1:-1:-1;;;;;45478:25:0;;;56605:1250;;;;;;:::i;:::-;;:::i;:::-;;;7502:25:1;;;7490:2;7475:18;56605:1250:0;7356:177:1;58857:425:0;2055:13;:11;:13::i;:::-;58986:15:::1;58968;-1:-1:-1::0;;;;;58968:33:0::1;;:72;;;;59025:15;-1:-1:-1::0;;;;;59005:35:0::1;:17;-1:-1:-1::0;;;;;59005:35:0::1;;58968:72;58965:119;;;59062:22;;-1:-1:-1::0;;;59062:22:0::1;;;;;;;;;;;58965:119;59105:8;:45:::0;;-1:-1:-1;;;;;59105:45:0;;::::1;-1:-1:-1::0;;59161:41:0;;;;;-1:-1:-1;;;59161:41:0;;::::1;::::0;;::::1;;::::0;;;59220:54:::1;::::0;;7747:34:1;;;7812:2;7797:18;;7790:43;;;;59220:54:0::1;::::0;7683:18:1;59220:54:0::1;;;;;;;;58857:425:::0;;:::o;48393:937::-;5985:21;:19;:21::i;:::-;48482:15:::1;:13;:15::i;:::-;48522:9:::0;48508:11:::1;48549:450;48569:3;48565:1;:7;48549:450;;;48647:10;48615:6;-1:-1:-1::0;;;;;48615:14:0::1;;48630:9:::0;;48640:1;48630:12;;::::1;;;;;:::i;:::-;;;;;;;48615:28;;;;;;;;;;;;;7502:25:1::0;;7490:2;7475:18;;7356:177;48615:28:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;48615:42:0::1;;48594:141;;48700:19;;-1:-1:-1::0;;;48700:19:0::1;;;;;;;;;;;48594:141;48751:6;-1:-1:-1::0;;;;;48751:19:0::1;;48771:10;48791:4;48798:9;;48808:1;48798:12;;;;;;;:::i;:::-;48751:60;::::0;-1:-1:-1;;;;;;48751:60:0::1;::::0;;;;;;-1:-1:-1;;;;;8490:15:1;;;48751:60:0::1;::::0;::::1;8472:34:1::0;8542:15;;;;8522:18;;;8515:43;-1:-1:-1;48798:12:0::1;::::0;;::::1;;;8574:18:1::0;;;8567:34;8407:18;;48751:60:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;48856:10;48826:13;:27;48840:9;;48850:1;48840:12;;;;;;;:::i;:::-;;;;;;;48826:27;;;;;;;;;;;;:40;;;;;-1:-1:-1::0;;;;;48826:40:0::1;;;;;-1:-1:-1::0;;;;;48826:40:0::1;;;;;;48926:1;48881:16;:41;48898:9;:23;48908:9;;48918:1;48908:12;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;::::1;;48898:23:::0;;-1:-1:-1;48898:23:0;;::::1;::::0;;;;;;;;-1:-1:-1;48898:23:0;;;;::::1;;48881:41:::0;;;;::::1;::::0;;;;;;;;:46;;:41;;-1:-1:-1;48881:46:0::1;::::0;;;::::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;48942:43;48972:9;;48982:1;48972:12;;;;;;;:::i;:::-;48949:10;48942:18;::::0;;;:6:::1;48972:12;48942:18:::0;;;;;;;:25:::1;;::::0;48972:12;::::1;;;::::0;-1:-1:-1;48942:29:0::1;:43::i;:::-;-1:-1:-1::0;48574:3:0::1;::::0;::::1;:::i;:::-;;;48549:450;;;-1:-1:-1::0;49018:10:0::1;49011:18;::::0;;;:6:::1;:18;::::0;;;;:46;;-1:-1:-1;;;;;49011:46:0;::::1;::::0;:18;:46:::1;::::0;;;::::1;:::i;:::-;::::0;;;-1:-1:-1;;49075:10:0::1;49068:18;::::0;;;:6:::1;:18;::::0;;;;49109:15:::1;49068:38;::::0;;::::1;:56:::0;49197:25;;;49167:27:::1;::::0;:15:::1;:27::i;:::-;:55;;;;;;:::i;:::-;49142:10;49135:18;::::0;;;:6:::1;:18;::::0;;;;;;;:29:::1;:87:::0;49235:8:::1;:38:::0;;49269:3;;49235:8;:23:::1;::::0;:38:::1;::::0;49269:3;;-1:-1:-1;;;49235:38:0;::::1;-1:-1:-1::0;;;;;49235:38:0::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;49235:38:0::1;;;;;-1:-1:-1::0;;;;;49235:38:0::1;;;;;;49300:10;-1:-1:-1::0;;;;;49291:31:0::1;;49312:9;;49291:31;;;;;;;:::i;:::-;;;;;;;;48460:870;6029:20:::0;5423:1;6549:22;;6366:213;6029:20;48393:937;;:::o;54618:82::-;5985:21;:19;:21::i;:::-;54675:15:::1;:13;:15::i;:::-;6029:20:::0;5423:1;6549:22;;6366:213;6029:20;54618:82::o;55709:638::-;55795:21;55837:28;55886:23;55929:25;55974:20;56050:23;56067:5;56050:16;:23::i;:::-;-1:-1:-1;;;;;56110:13:0;;;;;;:6;:13;;;;;:26;;56156:33;;;;56030:43;;-1:-1:-1;56110:26:0;56156:33;56208:29;;:20;;:27;:29::i;:::-;-1:-1:-1;;;;;56292:13:0;;;;;;;;:6;:13;;;;;:28;;;56084:255;;;;;-1:-1:-1;55709:638:0;;-1:-1:-1;56292:28:0;-1:-1:-1;;55709:638:0:o;60161:326::-;2055:13;:11;:13::i;:::-;60255:11:::1;::::0;60288:36:::1;::::0;-1:-1:-1;;;60288:36:0;;60318:4:::1;60288:36;::::0;::::1;4252:51:1::0;60240:12:0::1;::::0;-1:-1:-1;;;;;60255:11:0::1;::::0;:20:::1;::::0;60276:10:::1;::::0;60340:3:::1;::::0;60327:10;;60255:11;;60288:21:::1;::::0;4225:18:1;;60288:36:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;;;:::i;:::-;:55;;;;:::i;:::-;60255:89;::::0;-1:-1:-1;;;;;;60255:89:0::1;::::0;;;;;;-1:-1:-1;;;;;10596:32:1;;;60255:89:0::1;::::0;::::1;10578:51:1::0;10645:18;;;10638:34;10551:18;;60255:89:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;60240:104;;60359:7;60355:34;;60381:8;::::0;::::1;60355:34;60423:11;::::0;:36:::1;::::0;-1:-1:-1;;;60423:36:0;;60453:4:::1;60423:36;::::0;::::1;4252:51:1::0;60405:74:0::1;::::0;60475:3:::1;::::0;60462:10;;-1:-1:-1;;;;;60423:11:0::1;::::0;:21:::1;::::0;4225:18:1;;60423:36:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;;;:::i;:::-;:55;;;;:::i;:::-;60405:74;::::0;7502:25:1;;;7490:2;7475:18;60405:74:0::1;7356:177:1::0;60864:345:0;2055:13;:11;:13::i;:::-;60975:16:::1;:30:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;61016:28:0;;;;;60975:30:::1;61016:28:::0;;::::1;::::0;;::::1;::::0;;;::::1;-1:-1:-1::0;;61094:38:0;61055:28;;;::::1;::::0;;::::1;-1:-1:-1::0;;61094:38:0;;;;;;;;::::1;::::0;;::::1;;::::0;;;61148:53:::1;::::0;;11180:36:1;;;11247:2;11232:18;;11225:45;;;;11286:18;;;11279:45;;;;11355:2;11340:18;;11333:45;61148:53:0;;::::1;::::0;;;;11167:3:1;61148:53:0;;::::1;60864:345:::0;;;;:::o;2817:103::-;2055:13;:11;:13::i;:::-;2882:30:::1;2909:1;2882:18;:30::i;62898:163::-:0;2055:13;:11;:13::i;:::-;62974:11:::1;:34:::0;;-1:-1:-1;;;;;;62974:34:0::1;-1:-1:-1::0;;;;;62974:34:0;::::1;::::0;;::::1;::::0;;;63024:28:::1;::::0;4252:51:1;;;63024:28:0::1;::::0;4240:2:1;4225:18;63024:28:0::1;;;;;;;;62898:163:::0;:::o;52050:1469::-;52165:8;:23;52099:28;;-1:-1:-1;;;52165:23:0;;-1:-1:-1;;;;;52165:23:0;52146:15;:42;;;;:104;;-1:-1:-1;52225:8:0;:25;-1:-1:-1;;;;;52225:25:0;52206:15;:44;;52146:104;:153;;;;;52284:15;52267:14;;:32;52146:153;52142:250;;;52366:14;;52348:32;;:15;:32;:::i;:::-;52325:55;;52142:250;52420:15;52403:14;:32;52448:15;52478:24;;52474:296;;52542:8;:23;-1:-1:-1;;;52542:23:0;;-1:-1:-1;;;;;52542:23:0;52584:15;;52580:132;;52654:23;;52681:4;;52631:46;;:20;:46;:::i;:::-;52630:55;;;;:::i;:::-;52620:65;;52580:132;52505:218;52780:25;52808:22;:20;:22::i;:::-;52845:8;:25;52780:50;;-1:-1:-1;52873:15:0;-1:-1:-1;;;;;52845:25:0;;;:43;:69;;;;;52913:1;52892:18;:22;;;52845:69;52841:669;;;52975:11;;:36;;-1:-1:-1;;;52975:36:0;;53005:4;52975:36;;;4252:51:1;-1:-1:-1;;;;;52975:11:0;;;;:21;;4225:18:1;;52975:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;52934:27;;:37;;52964:7;;52934:37;:::i;:::-;:77;52930:567;;53063:7;53032:8;:27;;;:38;;;;;;;:::i;:::-;;;;-1:-1:-1;53119:28:0;;-1:-1:-1;53119:28:0;;;:7;:28;:::i;:::-;53089:25;:60;;:25;;:60;;;;;:::i;:::-;;;;-1:-1:-1;52930:567:0;;-1:-1:-1;52930:567:0;;53218:11;;:36;;-1:-1:-1;;;53218:36:0;;53248:4;53218:36;;;4252:51:1;-1:-1:-1;;;;;53218:11:0;;;;:21;;4225:18:1;;53218:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;53188:27;;:66;53184:313;;;53346:27;;;53307:11;:36;;-1:-1:-1;;;53307:36:0;;53337:4;53307:36;;;4252:51:1;53306:89:0;;;;53346:27;-1:-1:-1;;;;;53307:11:0;;:21;;4225:18:1;;53307:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:66;;;;:::i;:::-;53306:89;;;;:::i;:::-;53276:25;:119;;:25;;:119;;;;;:::i;:::-;;;;-1:-1:-1;;53445:11:0;;:36;;-1:-1:-1;;;53445:36:0;;53475:4;53445:36;;;4252:51:1;-1:-1:-1;;;;;53445:11:0;;;;:21;;4225:18:1;;53445:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;53415:27;:66;53184:313;52086:1433;;;52050:1469::o;59705:206::-;2055:13;:11;:13::i;:::-;59809:9:::1;59804:100;59828:6;:13;59824:1;:17;59804:100;;;59883:6;59890:1;59883:9;;;;;;;;:::i;:::-;;;;;;;59863;:17;59873:3;59877:1;59873:6;;;;;;;;:::i;:::-;;;;;;;59863:17;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;59843:3;;;;;:::i;:::-;;;;59804:100;;55030:242:::0;2055:13;:11;:13::i;:::-;55129:19:::1;:17;:19::i;:::-;55161:23:::0;:41;;;55220:38:::1;::::0;7502:25:1;;;55220:38:0::1;::::0;7490:2:1;7475:18;55220:38:0::1;7356:177:1::0;51099:849:0;5985:21;:19;:21::i;:::-;51212:10:::1;51205:18;::::0;;;:6:::1;:18;::::0;;;;:31;:36;;51188:124:::1;;51276:24;;-1:-1:-1::0;;;51276:24:0::1;;;;;;;;;;;51188:124;51346:9:::0;51332:11:::1;51373:350;51393:3;51389:1;:7;51373:350;;;51459:10;51428:13;:27;51442:9:::0;;51452:1;51442:12;;::::1;;;;;:::i;:::-;;::::0;;::::1;::::0;;;::::1;;51428:27:::0;;-1:-1:-1;51428:27:0;::::1;::::0;;;;;;-1:-1:-1;51428:27:0;;-1:-1:-1;;;;;51428:27:0::1;:41;51420:50;;;::::0;::::1;;51523:1;51485:13;:27;51499:9;;51509:1;51499:12;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;::::1;;51485:27:::0;;-1:-1:-1;51485:27:0;::::1;::::0;;;;;;-1:-1:-1;51485:27:0;:40;;-1:-1:-1;;;;;;51485:40:0::1;-1:-1:-1::0;;;;;51485:40:0;;::::1;;::::0;;51540:6:::1;:19;;51568:4;51575:10;51587:9:::0;;51597:1;51587:12;;::::1;;;;;:::i;:::-;51540:60;::::0;-1:-1:-1;;;;;;51540:60:0::1;::::0;;;;;;-1:-1:-1;;;;;8490:15:1;;;51540:60:0::1;::::0;::::1;8472:34:1::0;8542:15;;;;8522:18;;;8515:43;-1:-1:-1;51587:12:0::1;::::0;;::::1;;;8574:18:1::0;;;8567:34;8407:18;;51540:60:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;51660:1;51615:16;:41;51632:9;:23;51642:9;;51652:1;51642:12;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;::::1;;51632:23:::0;;-1:-1:-1;51632:23:0;;::::1;::::0;;;;;;;;-1:-1:-1;51632:23:0;;;;::::1;;51615:41:::0;;;;::::1;::::0;;;;;;;;:46;;:41;;-1:-1:-1;51615:46:0::1;::::0;;;::::1;;;:::i;:::-;::::0;;::::1;::::0;;::::1;;::::0;;;::::1;::::0;;::::1;::::0;;;::::1;;::::0;;::::1;;::::0;;-1:-1:-1;51683:10:0::1;-1:-1:-1::0;51676:18:0;;;:6:::1;:18;::::0;;;;:35:::1;::::0;:25:::1;;51709:1:::0;51676:32:::1;:35::i;:::-;-1:-1:-1::0;51398:3:0::1;::::0;::::1;:::i;:::-;;;51373:350;;;-1:-1:-1::0;51740:10:0::1;51733:18;::::0;;;:6:::1;:18;::::0;;;;:38;;51768:3;;51733:18;:38:::1;::::0;51768:3;;51733:38:::1;:::i;:::-;::::0;;;-1:-1:-1;;51789:10:0::1;51782:18;::::0;;;:6:::1;:18;::::0;;;;51823:15:::1;51782:38;::::0;;::::1;:56:::0;51851:8:::1;:38:::0;;51885:3;;51851:8;:23:::1;::::0;:38:::1;::::0;51885:3;;-1:-1:-1;;;51851:38:0;::::1;-1:-1:-1::0;;;;;51851:38:0::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;51851:38:0::1;;;;;-1:-1:-1::0;;;;;51851:38:0::1;;;;;;51918:10;-1:-1:-1::0;;;;;51907:33:0::1;;51930:9;;51907:33;;;;;;;:::i;49793:1027::-:0;5985:21;:19;:21::i;:::-;49897:10:::1;49890:18;::::0;;;:6:::1;:18;::::0;;;;:31;:36;;49873:124:::1;;49961:24;;-1:-1:-1::0;;;49961:24:0::1;;;;;;;;;;;49873:124;50007:15;:13;:15::i;:::-;50047:9:::0;50033:11:::1;50074:361;50094:3;50090:1;:7;50074:361;;;50160:10;50129:13;:27;50143:9:::0;;50153:1;50143:12;;::::1;;;;;:::i;:::-;;::::0;;::::1;::::0;;;::::1;;50129:27:::0;;-1:-1:-1;50129:27:0;::::1;::::0;;;;;;-1:-1:-1;50129:27:0;;-1:-1:-1;;;;;50129:27:0::1;:41;50121:50;;;::::0;::::1;;50186:6;-1:-1:-1::0;;;;;50186:19:0::1;;50214:4;50221:10;50233:9;;50243:1;50233:12;;;;;;;:::i;:::-;50186:60;::::0;-1:-1:-1;;;;;;50186:60:0::1;::::0;;;;;;-1:-1:-1;;;;;8490:15:1;;;50186:60:0::1;::::0;::::1;8472:34:1::0;8542:15;;;;8522:18;;;8515:43;-1:-1:-1;50233:12:0::1;::::0;;::::1;;;8574:18:1::0;;;8567:34;8407:18;;50186:60:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;50299:1;50261:13;:27;50275:9;;50285:1;50275:12;;;;;;;:::i;:::-;;;;;;;50261:27;;;;;;;;;;;;:40;;;;;-1:-1:-1::0;;;;;50261:40:0::1;;;;;-1:-1:-1::0;;;;;50261:40:0::1;;;;;;50361:1;50316:16;:41;50333:9;:23;50343:9;;50353:1;50343:12;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;::::1;;50333:23:::0;;-1:-1:-1;50333:23:0;;::::1;::::0;;;;;;;;-1:-1:-1;50333:23:0;;;;::::1;;50316:41:::0;;;;::::1;::::0;;;;;;;;:46;;:41;;-1:-1:-1;50316:46:0::1;::::0;;;::::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;50377;50410:9;;50420:1;50410:12;;;;;;;:::i;:::-;50384:10;50377:18;::::0;;;:6:::1;50410:12;50377:18:::0;;;;;;;:25:::1;;::::0;50410:12;::::1;;;::::0;-1:-1:-1;50377:32:0::1;:46::i;:::-;-1:-1:-1::0;50099:3:0::1;::::0;::::1;:::i;:::-;;;50074:361;;;-1:-1:-1::0;50454:10:0::1;50447:18;::::0;;;:6:::1;:18;::::0;;;;:38;;50482:3;;50447:18;:38:::1;::::0;50482:3;;50447:38:::1;:::i;:::-;::::0;;;-1:-1:-1;;50503:10:0::1;50496:18;::::0;;;:6:::1;:18;::::0;;;;50537:15:::1;50496:38;::::0;;::::1;:56:::0;50677:25;;;50647:27:::1;::::0;:15:::1;:27::i;:::-;:55;;;;;;:::i;:::-;50622:10;50615:18;::::0;;;:6:::1;:18;::::0;;;;;;;:29:::1;:87:::0;50715:8:::1;:38:::0;;50749:3;;50715:8;:23:::1;::::0;:38:::1;::::0;50749:3;;-1:-1:-1;;;50715:38:0;::::1;-1:-1:-1::0;;;;;50715:38:0::1;;:::i;61304:452::-:0;61712:16;:26;61683:16;61357:25;61683:26;;;;;;;;;;61357:25;;61683:55;;61712:26;;;;;;;61683;;:55;:::i;:::-;61628:16;:21;61622:1;61628:21;61599:26;:16;:26;;;;:50;;61628:21;;;;;;61599:26;;:50;:::i;:::-;61544:16;:21;61538:1;61544:21;61515:26;:16;:26;;;;:50;;61544:21;;;;;;61515:26;;:50;:::i;:::-;61459:16;:22;;61430:26;;:16;:26;;;;:51;;61459:22;;;61430:26;;:51;:::i;:::-;:135;;;;:::i;:::-;:219;;;;:::i;:::-;:308;;;;:::i;:::-;61409:329;;61304:452;:::o;3075:201::-;2055:13;:11;:13::i;:::-;-1:-1:-1;;;;;3164:22:0;::::1;3156:73;;;::::0;-1:-1:-1;;;3156:73:0;;12338:2:1;3156:73:0::1;::::0;::::1;12320:21:1::0;12377:2;12357:18;;;12350:30;12416:34;12396:18;;;12389:62;-1:-1:-1;;;12467:18:1;;;12460:36;12513:19;;3156:73:0::1;;;;;;;;;3240:28;3259:8;3240:18;:28::i;:::-;3075:201:::0;:::o;56605:1250::-;-1:-1:-1;;;;;56691:13:0;;56667:7;56691:13;;;:6;:13;;;;;:26;:31;;:76;;-1:-1:-1;56726:11:0;;:36;;-1:-1:-1;;;56726:36:0;;56756:4;56726:36;;;4252:51:1;-1:-1:-1;;;;;56726:11:0;;;;:21;;4225:18:1;;56726:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:41;56691:76;:146;;;-1:-1:-1;56810:27:0;;;56771:11;:36;;-1:-1:-1;;;56771:36:0;;56801:4;56771:36;;;4252:51:1;-1:-1:-1;;;;;56771:11:0;;;;:21;;4225:18:1;;56771:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:66;56691:146;56687:187;;;-1:-1:-1;56861:1:0;;56605:1250;-1:-1:-1;56605:1250:0:o;56687:187::-;-1:-1:-1;;;;;56907:13:0;;56884:20;56907:13;;;:6;:13;;;;;;56956:22;56914:5;56956:15;:22::i;:::-;57103:26;;;;57074:8;:25;56933:45;;-1:-1:-1;56991:22:0;;;;-1:-1:-1;;;;;57074:25:0;;;:55;57070:507;;57181:8;:23;-1:-1:-1;;;57181:23:0;;-1:-1:-1;;;;;57181:23:0;57163:15;:41;57159:406;;;57312:26;;;;57294:44;;:15;:44;:::i;:::-;57276:62;;57159:406;;;57397:8;:23;-1:-1:-1;;;57397:23:0;;-1:-1:-1;;;;;57397:23:0;57378:15;:42;:98;;;;-1:-1:-1;57450:26:0;;;;57424:8;:23;-1:-1:-1;;;57424:23:0;;-1:-1:-1;;;;;57424:23:0;:52;57378:98;57373:192;;;57539:26;;;;57513:8;:23;:52;;57539:26;-1:-1:-1;;;57513:23:0;;-1:-1:-1;;;;;57513:23:0;:52;:::i;:::-;57495:70;;57373:192;57707:4;57681:22;:20;:22::i;:::-;57637:66;;57654:8;:23;;;57637:14;:40;;;;:::i;:::-;:66;;;;:::i;:::-;57636:75;;;;:::i;:::-;57607:25;;:104;;;;:::i;:::-;57587:124;;57745:16;57802:6;:17;;;57780;57765:12;:32;;;;;;:::i;:::-;57764:55;;;;:::i;:::-;57745:74;56605:1250;-1:-1:-1;;;;;;;56605:1250:0:o;2334:132::-;2215:7;2242:6;-1:-1:-1;;;;;2242:6:0;796:10;2398:23;2390:68;;;;-1:-1:-1;;;2390:68:0;;12745:2:1;2390:68:0;;;12727:21:1;;;12764:18;;;12757:30;12823:34;12803:18;;;12796:62;12875:18;;2390:68:0;12543:356:1;6065:293:0;5467:1;6199:7;;:19;6191:63;;;;-1:-1:-1;;;6191:63:0;;13106:2:1;6191:63:0;;;13088:21:1;13145:2;13125:18;;;13118:30;13184:33;13164:18;;;13157:61;13235:18;;6191:63:0;12904:355:1;6191:63:0;5467:1;6332:7;:18;6065:293::o;53768:772::-;53813:19;:17;:19::i;:::-;53843:15;53861:28;53878:10;53861:16;:28::i;:::-;53843:46;;53900:19;53923:27;53939:10;53923:15;:27::i;:::-;53972:10;53965:18;;;;:6;:18;;;;;54006:15;53965:38;;;;:56;53900:50;;-1:-1:-1;54046:12:0;;;54042:50;;54074:7;;53768:772::o;54042:50::-;54108:27;;:38;-1:-1:-1;54108:38:0;;;:89;;-1:-1:-1;54150:11:0;;:36;;-1:-1:-1;;;54150:36:0;;54180:4;54150:36;;;4252:51:1;54190:7:0;;-1:-1:-1;;;;;54150:11:0;;:21;;4225:18:1;;54150:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:47;;54108:89;54104:182;;;54243:7;54212:8;:27;;;:38;;;;;;;:::i;:::-;;;;-1:-1:-1;54104:182:0;;-1:-1:-1;54104:182:0;;54346:25;;54331:40;;;;;;:::i;:::-;54305:10;54298:18;;;;:6;:18;;;;;;;:29;;;:73;;;;54436:33;;;;:44;;54473:7;;54298:18;54436:44;;54473:7;;54436:44;:::i;:::-;;;;-1:-1:-1;;54491:11:0;;:41;;-1:-1:-1;;;54491:41:0;;54512:10;54491:41;;;10578:51:1;10645:18;;;10638:34;;;-1:-1:-1;;;;;54491:11:0;;;;:20;;10551:18:1;;54491:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;42959:131::-;43026:4;43050:32;43055:3;43075:5;43050:4;:32::i;:::-;43043:39;;42959:131;;;;;:::o;61968:740::-;-1:-1:-1;;;;;62088:12:0;;62030:19;62088:12;;;:6;:12;;;;;62030:19;;62088:28;;:19;;:26;:28::i;:::-;62062:54;;62132:9;62127:541;62151:6;:13;62147:1;:17;62127:541;;;62190:9;:20;62200:6;62207:1;62200:9;;;;;;;;:::i;:::-;;;;;;;;;;;;62190:20;;;;;;;;;;-1:-1:-1;62190:20:0;;;;;;:25;;62186:468;;62271:16;:22;62255:38;;62271:22;;62255:38;;:::i;:::-;;;62186:468;;;62319:9;:20;62329:6;62336:1;62329:9;;;;;;;;:::i;:::-;;;;;;;;;;;;62319:20;;;;;;;;;;-1:-1:-1;62319:20:0;;;;62343:1;62319:25;62315:339;;62389:16;:21;62373:37;;62389:21;;;;;62373:37;;:::i;62315:339::-;62436:9;:20;62446:6;62453:1;62446:9;;;;;;;;:::i;:::-;;;;;;;;;;;;62436:20;;;;;;;;;;-1:-1:-1;62436:20:0;;;;62460:1;62436:25;62432:222;;62506:16;:21;62490:37;;62506:21;;;;;62490:37;;:::i;62432:222::-;62553:9;:20;62563:6;62570:1;62563:9;;;;;;;;:::i;:::-;;;;;;;;;;;;62553:20;;;;;;;;;;-1:-1:-1;62553:20:0;;;;62577:1;62553:25;62549:105;;62628:16;:26;62612:42;;62628:26;;;;;62612:42;;:::i;:::-;;;62549:105;62166:3;;;;:::i;:::-;;;;62127:541;;;;62680:19;61968:740;;;:::o;44876:307::-;44936:16;44965:22;44990:19;44998:3;44990:7;:19::i;:::-;44965:44;44876:307;-1:-1:-1;;;44876:307:0:o;3436:191::-;3510:16;3529:6;;-1:-1:-1;;;;;3546:17:0;;;-1:-1:-1;;;;;;3546:17:0;;;;;;3579:40;;3529:6;;;;;;;3579:40;;3510:16;3579:40;3499:128;3436:191;:::o;43266:137::-;43336:4;43360:35;43368:3;43388:5;43360:7;:35::i;58280:359::-;-1:-1:-1;;;;;58428:13:0;;58371:16;58428:13;;;:6;:13;;;;;58371:16;58475:22;58435:5;58475:15;:22::i;:::-;58578:17;;;;58550:25;;58452:45;;-1:-1:-1;58510:22:0;;58535:40;;;;;;:::i;:::-;:60;;;;:::i;:::-;58510:85;58280:359;-1:-1:-1;;;;;58280:359:0:o;34128:414::-;34191:4;36321:19;;;:12;;;:19;;;;;;34208:327;;-1:-1:-1;34251:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;34434:18;;34412:19;;;:12;;;:19;;;;;;:40;;;;34467:11;;34208:327;-1:-1:-1;34518:5:0;34511:12;;37572:111;37628:16;37664:3;:11;;37657:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37572:111;;;:::o;34718:1420::-;34784:4;34923:19;;;:12;;;:19;;;;;;34959:15;;34955:1176;;35334:21;35358:14;35371:1;35358:10;:14;:::i;:::-;35407:18;;35334:38;;-1:-1:-1;35387:17:0;;35407:22;;35428:1;;35407:22;:::i;:::-;35387:42;;35463:13;35450:9;:26;35446:405;;35497:17;35517:3;:11;;35529:9;35517:22;;;;;;;;:::i;:::-;;;;;;;;;35497:42;;35671:9;35642:3;:11;;35654:13;35642:26;;;;;;;;:::i;:::-;;;;;;;;;;;;:38;;;;35756:23;;;:12;;;:23;;;;;:36;;;35446:405;35932:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;36027:3;:12;;:19;36040:5;36027:19;;;;;;;;;;;36020:26;;;36070:4;36063:11;;;;;;;34955:1176;36114:5;36107:12;;;;;34955:1176;34790:1348;34718:1420;;;;:::o;14:171:1:-;81:20;;-1:-1:-1;;;;;130:30:1;;120:41;;110:69;;175:1;172;165:12;110:69;14:171;;;:::o;190:256::-;256:6;264;317:2;305:9;296:7;292:23;288:32;285:52;;;333:1;330;323:12;285:52;356:28;374:9;356:28;:::i;:::-;346:38;;403:37;436:2;425:9;421:18;403:37;:::i;:::-;393:47;;190:256;;;;;:::o;451:615::-;537:6;545;598:2;586:9;577:7;573:23;569:32;566:52;;;614:1;611;604:12;566:52;654:9;641:23;-1:-1:-1;;;;;724:2:1;716:6;713:14;710:34;;;740:1;737;730:12;710:34;778:6;767:9;763:22;753:32;;823:7;816:4;812:2;808:13;804:27;794:55;;845:1;842;835:12;794:55;885:2;872:16;911:2;903:6;900:14;897:34;;;927:1;924;917:12;897:34;980:7;975:2;965:6;962:1;958:14;954:2;950:23;946:32;943:45;940:65;;;1001:1;998;991:12;940:65;1032:2;1024:11;;;;;1054:6;;-1:-1:-1;451:615:1;;-1:-1:-1;;;;451:615:1:o;1071:156::-;1137:20;;1197:4;1186:16;;1176:27;;1166:55;;1217:1;1214;1207:12;1232:182;1289:6;1342:2;1330:9;1321:7;1317:23;1313:32;1310:52;;;1358:1;1355;1348:12;1310:52;1381:27;1398:9;1381:27;:::i;1612:131::-;-1:-1:-1;;;;;1687:31:1;;1677:42;;1667:70;;1733:1;1730;1723:12;1748:247;1807:6;1860:2;1848:9;1839:7;1835:23;1831:32;1828:52;;;1876:1;1873;1866:12;1828:52;1915:9;1902:23;1934:31;1959:5;1934:31;:::i;2000:920::-;2254:4;2302:3;2291:9;2287:19;2333:6;2322:9;2315:25;2359:2;2397:6;2392:2;2381:9;2377:18;2370:34;2440:3;2435:2;2424:9;2420:18;2413:31;2464:6;2499;2493:13;2530:6;2522;2515:22;2568:3;2557:9;2553:19;2546:26;;2607:2;2599:6;2595:15;2581:29;;2628:1;2638:169;2652:6;2649:1;2646:13;2638:169;;;2713:13;;2701:26;;2782:15;;;;2747:12;;;;2674:1;2667:9;2638:169;;;-1:-1:-1;;2858:2:1;2843:18;;2836:34;;;;-1:-1:-1;;;2901:3:1;2886:19;2879:35;2824:3;2000:920;-1:-1:-1;;;2000:920:1:o;2925:180::-;2984:6;3037:2;3025:9;3016:7;3012:23;3008:32;3005:52;;;3053:1;3050;3043:12;3005:52;-1:-1:-1;3076:23:1;;2925:180;-1:-1:-1;2925:180:1:o;3708:393::-;3786:6;3794;3802;3810;3863:3;3851:9;3842:7;3838:23;3834:33;3831:53;;;3880:1;3877;3870:12;3831:53;3903:27;3920:9;3903:27;:::i;:::-;3893:37;;3949:36;3981:2;3970:9;3966:18;3949:36;:::i;:::-;3939:46;;4004:36;4036:2;4025:9;4021:18;4004:36;:::i;:::-;3994:46;;4059:36;4091:2;4080:9;4076:18;4059:36;:::i;:::-;4049:46;;3708:393;;;;;;;:::o;4314:127::-;4375:10;4370:3;4366:20;4363:1;4356:31;4406:4;4403:1;4396:15;4430:4;4427:1;4420:15;4446:275;4517:2;4511:9;4582:2;4563:13;;-1:-1:-1;;4559:27:1;4547:40;;-1:-1:-1;;;;;4602:34:1;;4638:22;;;4599:62;4596:88;;;4664:18;;:::i;:::-;4700:2;4693:22;4446:275;;-1:-1:-1;4446:275:1:o;4726:181::-;4784:4;-1:-1:-1;;;;;4809:6:1;4806:30;4803:56;;;4839:18;;:::i;:::-;-1:-1:-1;4884:1:1;4880:14;4896:4;4876:25;;4726:181::o;4912:660::-;4966:5;5019:3;5012:4;5004:6;5000:17;4996:27;4986:55;;5037:1;5034;5027:12;4986:55;5073:6;5060:20;5099:4;5123:58;5139:41;5177:2;5139:41;:::i;:::-;5123:58;:::i;:::-;5215:15;;;5301:1;5297:10;;;;5285:23;;5281:32;;;5246:12;;;;5325:15;;;5322:35;;;5353:1;5350;5343:12;5322:35;5389:2;5381:6;5377:15;5401:142;5417:6;5412:3;5409:15;5401:142;;;5483:17;;5471:30;;5521:12;;;;5434;;5401:142;;;-1:-1:-1;5561:5:1;4912:660;-1:-1:-1;;;;;;4912:660:1:o;5577:1140::-;5693:6;5701;5754:2;5742:9;5733:7;5729:23;5725:32;5722:52;;;5770:1;5767;5760:12;5722:52;5810:9;5797:23;-1:-1:-1;;;;;5880:2:1;5872:6;5869:14;5866:34;;;5896:1;5893;5886:12;5866:34;5934:6;5923:9;5919:22;5909:32;;5979:7;5972:4;5968:2;5964:13;5960:27;5950:55;;6001:1;5998;5991:12;5950:55;6037:2;6024:16;6059:4;6083:58;6099:41;6137:2;6099:41;:::i;6083:58::-;6175:15;;;6257:1;6253:10;;;;6245:19;;6241:28;;;6206:12;;;;6281:19;;;6278:39;;;6313:1;6310;6303:12;6278:39;6337:11;;;;6357:146;6373:6;6368:3;6365:15;6357:146;;;6439:21;6456:3;6439:21;:::i;:::-;6427:34;;6390:12;;;;6481;;;;6357:146;;;6522:5;-1:-1:-1;;6565:18:1;;6552:32;;-1:-1:-1;;6596:16:1;;;6593:36;;;6625:1;6622;6615:12;6593:36;;6648:63;6703:7;6692:8;6681:9;6677:24;6648:63;:::i;:::-;6638:73;;;5577:1140;;;;;:::o;7844:127::-;7905:10;7900:3;7896:20;7893:1;7886:31;7936:4;7933:1;7926:15;7960:4;7957:1;7950:15;7976:251;8046:6;8099:2;8087:9;8078:7;8074:23;8070:32;8067:52;;;8115:1;8112;8105:12;8067:52;8147:9;8141:16;8166:31;8191:5;8166:31;:::i;8612:127::-;8673:10;8668:3;8664:20;8661:1;8654:31;8704:4;8701:1;8694:15;8728:4;8725:1;8718:15;8744:168;8811:6;8837:10;;;8849;;;8833:27;;8872:11;;;8869:37;;;8886:18;;:::i;8917:135::-;8956:3;8977:17;;;8974:43;;8997:18;;:::i;:::-;-1:-1:-1;9044:1:1;9033:13;;8917:135::o;9057:125::-;9122:9;;;9143:10;;;9140:36;;;9156:18;;:::i;9187:168::-;9260:9;;;9291;;9308:15;;;9302:22;;9288:37;9278:71;;9329:18;;:::i;9360:180::-;-1:-1:-1;;;;;9465:10:1;;;9477;;;9461:27;;9500:11;;;9497:37;;;9514:18;;:::i;9545:443::-;9734:2;9716:21;;;9753:18;;9746:34;;;-1:-1:-1;;;;;;9792:31:1;;9789:51;;;9836:1;9833;9826:12;9789:51;9870:6;9867:1;9863:14;9927:6;9919;9914:2;9903:9;9899:18;9886:48;9955:22;;;;9979:2;9951:31;;9545:443;-1:-1:-1;;;9545:443:1:o;9993:184::-;10063:6;10116:2;10104:9;10095:7;10091:23;10087:32;10084:52;;;10132:1;10129;10122:12;10084:52;-1:-1:-1;10155:16:1;;9993:184;-1:-1:-1;9993:184:1:o;10182:217::-;10222:1;10248;10238:132;;10292:10;10287:3;10283:20;10280:1;10273:31;10327:4;10324:1;10317:15;10355:4;10352:1;10345:15;10238:132;-1:-1:-1;10384:9:1;;10182:217::o;10683:277::-;10750:6;10803:2;10791:9;10782:7;10778:23;10774:32;10771:52;;;10819:1;10816;10809:12;10771:52;10851:9;10845:16;10904:5;10897:13;10890:21;10883:5;10880:32;10870:60;;10926:1;10923;10916:12;11389:128;11456:9;;;11477:11;;;11474:37;;;11491:18;;:::i;11522:171::-;11590:6;11629:10;;;11617;;;11613:27;;11652:12;;;11649:38;;;11667:18;;:::i;11698:183::-;-1:-1:-1;;;;;11817:10:1;;;11805;;;11801:27;;11840:12;;;11837:38;;;11855:18;;:::i;11886:245::-;11957:6;11995:10;;;12007;;;11991:27;12038:20;;;;11957:6;12077:24;;;12067:58;;12105:18;;:::i;:::-;12067:58;;11886:245;;;;:::o;13264:127::-;13325:10;13320:3;13316:20;13313:1;13306:31;13356:4;13353:1;13346:15;13380:4;13377:1;13370:15
Swarm Source
ipfs://cdeb34b92783dc0a885c41339e32f36d9304454656bccc6b1441c3008281af58
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.