Contract 0x1b32eef640c496b001223c3a99e2bdfaacb8c829

Contract Overview

Balance:
0 CRO

CRO Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x384d4d5da510f66374b5446adea2ef2e18ec6752d550564d764f166d583a3d0bHarvest85229282023-05-27 17:51:036 hrs 30 mins ago0x6e4a78a4e5762f6a1da4471af945248464d6bb56 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.571912 5,500
0x0082950aae0e372b6c4aef0726080cbff8ae176aa70be2c4bf8f26d6db429ca7Harvest85228322023-05-27 17:42:006 hrs 39 mins ago0x47ec58643aceff47a4a069cecff528b10f235022 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.240229 5,500
0x9b2eb8c5de84e7eb33829c3e7118fea5c18a874693fb544d786959970b8d1d1eHarvest85225482023-05-27 17:15:147 hrs 6 mins ago0x09e8b32693365634ea24870eb1c23390fce04e72 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.5719120
0x594616ab4945a906f182e4e8a32de8a55532f5ad9208ac56b5e7578fac972ac4Harvest85223452023-05-27 16:56:007 hrs 25 mins ago0x272d63f6e2f6398f3724bf70541137d2e329b030 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4778620
0x346ec3b06e23f7f9fbcaa65f84fb96ad2955f482c31cee082e4f9a3758c0956bHarvest85170302023-05-27 8:34:1215 hrs 47 mins ago0xe1e7c00bd299cadb5e22d6976368da29988ed0e9 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4118636863460
0x036a470df61f6cc9672348aefc166df7d3bf2f2232c094c8f0065eb2f1efd5a0Harvest85149262023-05-27 5:15:4619 hrs 5 mins ago0x738757107b525421600486dfae847a931f94ba0c IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4929344178450
0x19ab8e50383188ecbb85244a71146dc172283ef48fb3dfe63bb98895a881f715Withdraw85136062023-05-27 3:11:1021 hrs 10 mins ago0x384c0bc1d0ebfbbd2a3fa2ba5e9e365a8b79bc20 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.91298350
0xbcf9491e15d5e978c478a9ef29cbacaafd75c6f7537d1924c91ff18404ce6e38Harvest85125502023-05-27 1:31:3322 hrs 49 mins ago0x7e6eb2123463ca93bd0ef64bbcdde8db16d77c42 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.477862 5,500
0xf4a8ef608c4cbf512dac526645f5d3b255ec0f438e594b181050df2d16550a37Withdraw85122422023-05-27 1:02:2523 hrs 19 mins ago0xc21703d3510e5ae61c5849c7cada24b39c0ab862 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.7286171344390
0x5e40c49b8fde5b8e6b192708be0b4900ac1bf2d9e98f8c4e1a082babf1e17ac3Harvest85075672023-05-26 17:41:161 day 6 hrs agoCronos ID Name teabagging.cro IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4119016378160
0x07073cd827344ca3321104534220ec51764899cecc32085ac95bfb36544588f9Harvest85074172023-05-26 17:27:061 day 6 hrs ago0x272d63f6e2f6398f3724bf70541137d2e329b030 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.5719120
0x44f95e6b875b0bdc7f703da34fc591ae1947fc03736df8d3e1f22f15f6844d41Harvest85057442023-05-26 14:49:201 day 9 hrs ago0x942d8d924e571774df0e9ab1c37f6fa7ca7bd5ad IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.477862 5,500
0x86a9865d22f22fb86881ac52b40f31b4ce309f5653e8de78c67e24460035617fHarvest85049332023-05-26 13:32:461 day 10 hrs ago0x3a111bbcc49a6c58a59feb54d6ed9820d27cf47d IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.5455120
0xdbb6c7b4ccdd9d525615fa4e5db36cb8982a505e1614129caeed453bf74ce989Withdraw85049302023-05-26 13:32:241 day 10 hrs ago0x3a111bbcc49a6c58a59feb54d6ed9820d27cf47d IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO44.01892550
0xe253370893ff14d4a7f568cd80f2162673e37f01813eaf766a39fedacc23a8b9Withdraw85041602023-05-26 12:19:431 day 12 hrs ago0x3a111bbcc49a6c58a59feb54d6ed9820d27cf47d IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO4.050530
0x9c6b782455a36e796835ac8f7c0d3f359b0afcfe0f46b54ff8cc7878b5c7ad03Withdraw85039882023-05-26 12:03:241 day 12 hrs ago0x3a111bbcc49a6c58a59feb54d6ed9820d27cf47d IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO2.01267550
0xf7ffd864d5795c40e3fb7bdc7a7b36bf11be0df2e26ab7ed8f25d23dc6a93413Harvest84982792023-05-26 3:04:581 day 21 hrs ago0x0cf17da8dafaa4925b142dfd6ed46e56fa04df0a IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4119389633040
0x6ce84fd2fdf0bda1d706924fa29cccae2ff268cc1dea14b3774a73d3b5484defHarvest84952372023-05-25 22:16:022 days 2 hrs ago0x578611e5c40e40f1fac3b0d83fd3ca02f27c7a75 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.411951209810
0x8e3d61a874ac01db4b2d06e7fa6fc6e3e48ea77a88ea95cac0e75f770808b307Harvest84888902023-05-25 12:15:272 days 12 hrs ago0x578614c2aa2f1921b493ede7b7c5236a1efd961e IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.477862 5,500
0x8ec5622f8df2e7c5a7016eda748a5dc3e0c64921286f871a47dd4b2b3bfdbec0Stake84867902023-05-25 8:57:202 days 15 hrs ago0x599f4382c116f13542b578f51ac488eea16a8849 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO2.6741719953490
0xb89f51584bbe36b525245fac13e9e0acefcca4714d8274d40d762b75d1d87e1aHarvest84867872023-05-25 8:57:032 days 15 hrs ago0x599f4382c116f13542b578f51ac488eea16a8849 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4025016440130
0x8d11dba49d139864ac6951d3eb6359c68d54faf859ce244b3f6ebb02da9ce36cHarvest84855872023-05-25 7:03:442 days 17 hrs ago0xc21703d3510e5ae61c5849c7cada24b39c0ab862 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.49307552840
0xb38e4ad8972f07769a5207741f70a2add7e799b66e81d3ba3525bf9231357a29Harvest84852472023-05-25 6:31:352 days 17 hrs ago0x738757107b525421600486dfae847a931f94ba0c IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4930771480890
0x684f70aab0d4c3b0b9c6d58b791061cb471820c669a942c0364f36ec784ba4dbHarvest84836482023-05-25 4:00:432 days 20 hrs ago0x195f357e4c3e015c3ad5ae9f47da2c144f074e2c IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.4778620
0xb01c9456314f3e7059a7375cc1a647c12af8d43bf9df668941e5f25aa76d36f0Harvest84809132023-05-24 23:42:253 days 39 mins ago0xe1e7c00bd299cadb5e22d6976368da29988ed0e9 IN  0x1b32eef640c496b001223c3a99e2bdfaacb8c8290 CRO0.412008707580
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SharedNftStaking

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at cronoscan.com on 2023-03-20
*/

// Sources flattened with hardhat v2.12.1 https://hardhat.org

// File @openzeppelin/contracts/utils/[email protected]

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}


// 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/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/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/utils/[email protected]


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


// File @openzeppelin/contracts/token/ERC20/utils/[email protected]


// OpenZeppelin Contracts (last updated v4.7.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/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.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}


// File @openzeppelin/contracts/token/ERC721/[email protected]


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}


// File @openzeppelin/contracts/utils/structs/[email protected]


// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

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) {
        return _values(set._inner);
    }

    // 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 on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @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/nft/SharedNftStaking.sol



pragma solidity ^0.8.4;





contract SharedNftStaking is Ownable, IERC721Receiver {
    using EnumerableSet for EnumerableSet.UintSet;
    using SafeERC20 for IERC20;

    struct UserInfo {
        EnumerableSet.UintSet stakedNfts;
        uint256 unpaid;
        uint256 rewardDebt;
    }

    /// @dev Staking NFT address
    IERC721 public immutable stakingNft;

    /// @dev Reward Token address
    IERC20 public immutable rewardToken;

    /// @dev Max NFTs that a user can stake
    uint256 public maxLimit = 1e4;

    /// @dev Reward amount per day
    uint256 public emission;

    uint256 public lastRewardTime;
    uint256 public accRewardPerShare;

    /// @dev Total staked supply
    uint256 public totalStaked;

    // Info of each user that stakes LP tokens.
    mapping(address => UserInfo) private userInfo;

    event MaxLimitUpdated(uint256 limit);
    event EmissionUpdated(uint256 emission);
    event Staked(address indexed account, uint256[] ids);
    event Withdrawn(address indexed account, uint256[] ids);
    event Harvested(address indexed account, uint256 paid, uint256 unpaid);

    constructor(
        address _stakingNft,
        address _rewardToken,
        uint256 _emission
    ) {
        IERC20(_rewardToken).balanceOf(address(this));
        IERC721(_stakingNft).balanceOf(address(this));

        stakingNft = IERC721(_stakingNft);
        rewardToken = IERC20(_rewardToken);
        emission = _emission;
    }

    /// @dev Update max nft count available per user
    function updateMaxLimit(uint256 _limit) external onlyOwner {
        require(_limit > 0, "Invalid value");
        maxLimit = _limit;
    }

    /// @dev Update emission value
    function updateEmission(uint256 _emission) external onlyOwner {
        emit EmissionUpdated(_emission);
        emission = _emission;
    }

    /// @dev View user info
    function viewUserInfo(address _account)
        external
        view
        returns (
            uint256, // Unpaid rewards (not paid in the last harvest)
            uint256, // Unused param, just for matching the common type
            uint256 // Total staked count
        )
    {
        UserInfo storage user = userInfo[_account];
        return (user.unpaid, 0, user.stakedNfts.length());
    }

    /// @dev View user staked nfts, pagination is needed
    function stakedNfts(
        address _account,
        uint256 _offset,
        uint256 _count
    ) external view returns (uint256[] memory) {
        uint256[] memory nfts;
        UserInfo storage user = userInfo[_account];
        if (_count == 0 || _offset >= user.stakedNfts.length()) {
            // Return an empty array
            nfts = new uint256[](0);
        } else {
            if (_offset + _count > user.stakedNfts.length()) {
                _count = user.stakedNfts.length() - _offset;
            }

            nfts = new uint256[](_count);
            uint256 index;
            for (index = 0; index < _count; index++) {
                nfts[index] = user.stakedNfts.at(_offset + index);
            }
        }
        return nfts;
    }

    /// @notice Update reward variables of the staking pool to be up-to-date.
    function updatePool() public {
        if (block.timestamp <= lastRewardTime) return;

        if (totalStaked == 0) {
            lastRewardTime = block.timestamp;
            return;
        }

        uint256 rewardAmount = ((block.timestamp - lastRewardTime) * emission) /
            1 days;

        accRewardPerShare += rewardAmount / totalStaked;
        lastRewardTime = block.timestamp;
    }

    /// @dev Check if the user staked the nft of token id
    function isStaked(address _account, uint256 _id)
        public
        view
        returns (bool)
    {
        return userInfo[_account].stakedNfts.contains(_id);
    }

    /// @dev Calculate pending rewads of the user
    function pendingRewards(address _account) public view returns (uint256) {
        UserInfo storage user = userInfo[_account];

        uint256 _accRewardPerShare_ = accRewardPerShare;
        if (lastRewardTime < block.timestamp && totalStaked > 0) {
            uint256 rewardAmount = ((block.timestamp - lastRewardTime) *
                emission) / 1 days;
            _accRewardPerShare_ += rewardAmount / totalStaked;
        }

        return
            user.stakedNfts.length() *
            _accRewardPerShare_ +
            user.unpaid -
            user.rewardDebt;
    }

    /// @notice Harvest rewards from the staking pool
    function harvest() external {
        UserInfo storage user = userInfo[_msgSender()];
        updatePool();
        uint256 pending = pendingRewards(_msgSender());
        if (pending > 0) {
            uint256 amountSent = safeRewardTransfer(_msgSender(), pending);
            user.unpaid = pending - amountSent;

            emit Harvested(_msgSender(), amountSent, pending - amountSent);
        }
        user.rewardDebt = user.stakedNfts.length() * accRewardPerShare;
    }

    /// @notice Stake nft tokens in the pool, require verification to match with rarity
    function stake(uint256[] memory _ids) external {
        UserInfo storage user = userInfo[_msgSender()];
        uint256 countToStake = _ids.length;

        require(
            countToStake > 0 &&
                user.stakedNfts.length() + countToStake <= maxLimit,
            "Invalid amount"
        );

        updatePool();
        user.unpaid = pendingRewards(_msgSender());

        for (uint256 i = 0; i < countToStake; i++) {
            stakingNft.safeTransferFrom(_msgSender(), address(this), _ids[i]);
            user.stakedNfts.add(_ids[i]);
        }

        totalStaked += countToStake;
        user.rewardDebt = user.stakedNfts.length() * accRewardPerShare;

        emit Staked(_msgSender(), _ids);
    }

    /// @notice Withdraw nfts from the staking pool
    function withdraw(uint256[] memory _ids) external {
        UserInfo storage user = userInfo[_msgSender()];
        uint256 countToWithdraw = _ids.length;
        require(countToWithdraw > 0, "Invalid zero amount");
	
	updatePool();

        user.unpaid = pendingRewards(_msgSender());

        for (uint256 i = 0; i < countToWithdraw; i++) {
            require(user.stakedNfts.contains(_ids[i]), "Not owned");
            stakingNft.safeTransferFrom(address(this), _msgSender(), _ids[i]);
            user.stakedNfts.remove(_ids[i]);
        }

        totalStaked -= countToWithdraw;
        user.rewardDebt = user.stakedNfts.length() * accRewardPerShare;

        emit Withdrawn(_msgSender(), _ids);
    }

    /// @notice Safe transfer rewards to the user
    /// @return : real amount transferred
    function safeRewardTransfer(address _to, uint256 _amount)
        internal
        returns (uint256)
    {
        uint256 bal = rewardToken.balanceOf(address(this));
        _amount = bal >= _amount ? _amount : bal;
        if (_amount > 0) rewardToken.safeTransfer(_to, _amount);
        return _amount;
    }

    /**
     * @notice It allows the admin to recover wrong tokens sent to the contract
     * @dev This function is only callable by admin.
     */
    function recoverTokens(address _token, uint256 _amount) external onlyOwner {
        IERC20(_token).safeTransfer(_msgSender(), _amount);
    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingNft","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_emission","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"emission","type":"uint256"}],"name":"EmissionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"paid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"unpaid","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"MaxLimitUpdated","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":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"accRewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRewardTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","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":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"stakedNfts","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingNft","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_emission","type":"uint256"}],"name":"updateEmission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"updateMaxLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"viewUserInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040526127106001553480156200001757600080fd5b50604051620018d1380380620018d18339810160408190526200003a91620001ce565b620000453362000161565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156200008557600080fd5b505afa1580156200009a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c091906200020e565b506040516370a0823160e01b81523060048201526001600160a01b038416906370a082319060240160206040518083038186803b1580156200010157600080fd5b505afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c91906200020e565b506001600160601b0319606093841b81166080529190921b1660a05260025562000227565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001c957600080fd5b919050565b600080600060608486031215620001e3578283fd5b620001ee84620001b1565b9250620001fe60208501620001b1565b9150604084015190509250925092565b60006020828403121562000220578081fd5b5051919050565b60805160601c60a05160601c6116626200026f6000396000818161032301528181610d680152610e090152600081816102180152818161040701526108af01526116626000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063817b1cd2116100b8578063983d95ce1161007c578063983d95ce146102a2578063a37d9850146102b5578063a474d76f146102e3578063e3161ddd14610303578063f2fde38b1461030b578063f7c618c11461031e57600080fd5b8063817b1cd21461026d578063827c049e146102765780638da5cb5b1461027f5780639231cf7414610290578063939d62371461029957600080fd5b806331d7a2621161010a57806331d7a262146101d55780634641257d146101e85780635451da1b146101f05780636982d81514610213578063715018a61461025257806378e722391461025a57600080fd5b8063069c9fae146101475780630fbf0a931461015c578063150b7a021461016f5780631a861d26146101ab57806329144bdb146101c2575b600080fd5b61015a610155366004611330565b610345565b005b61015a61016a36600461138b565b610365565b61018d61017d366004611278565b630a85bd0160e11b949350505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6101b460015481565b6040519081526020016101a2565b61015a6101d0366004611453565b610589565b6101b46101e336600461125e565b6105d6565b61015a61068c565b6102036101fe366004611330565b61073c565b60405190151581526020016101a2565b61023a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101a2565b61015a610767565b61015a610268366004611453565b61077b565b6101b460055481565b6101b460025481565b6000546001600160a01b031661023a565b6101b460035481565b6101b460045481565b61015a6102b036600461138b565b6107bb565b6102c86102c336600461125e565b610a24565b604080519384526020840192909252908201526060016101a2565b6102f66102f1366004611359565b610a5d565b6040516101a2919061149f565b61015a610b96565b61015a61031936600461125e565b610c06565b61023a7f000000000000000000000000000000000000000000000000000000000000000081565b61034d610c7f565b6103616001600160a01b0383163383610cd9565b5050565b3360009081526006602052604090208151801580159061039a57506001548161038d84610d30565b6103979190611547565b11155b6103dc5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b60448201526064015b60405180910390fd5b6103e4610b96565b6103ed336105d6565b600283015560005b81811015610510576001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166342842e0e333087858151811061044e57634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156104a857600080fd5b505af11580156104bc573d6000803e3d6000fd5b505050506104fd8482815181106104e357634e487b7160e01b600052603260045260246000fd5b602002602001015184600001610d3a90919063ffffffff16565b5080610508816115e5565b9150506103f5565b5080600560008282546105239190611547565b909155505060045461053483610d30565b61053e919061157f565b6003830155336001600160a01b03167f134b166c6094cc1ccbf1e3353ce5c3cd9fd29869051bdb999895854d77cc5ef68460405161057c919061149f565b60405180910390a2505050565b610591610c7f565b600081116105d15760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b60448201526064016103d3565b600155565b6001600160a01b03811660009081526006602052604081206004546003544211801561060457506000600554115b156106525760006201518060025460035442610620919061159e565b61062a919061157f565b610634919061155f565b905060055481610644919061155f565b61064e9083611547565b9150505b600382015460028301548261066685610d30565b610670919061157f565b61067a9190611547565b610684919061159e565b949350505050565b3360009081526006602052604090206106a3610b96565b60006106ae336105d6565b9050801561071a5760006106c23383610d46565b90506106ce818361159e565b6002840155337f81ca9b2c230070eaa84787556b1aaf18bf1e2f07ea5d3dae4819db77a1a5b22482610700818661159e565b6040805192835260208301919091520160405180910390a2505b60045461072683610d30565b610730919061157f565b82600301819055505050565b6001600160a01b038216600090815260066020526040812061075e9083610e38565b90505b92915050565b61076f610c7f565b6107796000610e50565b565b610783610c7f565b6040518181527fb114240d54ce08081cbd18870dc3b6cd4091bb86ff29d2ad41906c2a2d6723d49060200160405180910390a1600255565b33600090815260066020526040902081518061080f5760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081e995c9bc8185b5bdd5b9d606a1b60448201526064016103d3565b610817610b96565b610820336105d6565b600283015560005b818110156109b85761086d84828151811061085357634e487b7160e01b600052603260045260246000fd5b602002602001015184600001610e3890919063ffffffff16565b6108a55760405162461bcd60e51b8152602060048201526009602482015268139bdd081bdddb995960ba1b60448201526064016103d3565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166342842e0e30338785815181106108f657634e487b7160e01b600052603260045260246000fd5b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561095057600080fd5b505af1158015610964573d6000803e3d6000fd5b505050506109a584828151811061098b57634e487b7160e01b600052603260045260246000fd5b602002602001015184600001610ea090919063ffffffff16565b50806109b0816115e5565b915050610828565b5080600560008282546109cb919061159e565b90915550506004546109dc83610d30565b6109e6919061157f565b6003830155336001600160a01b03167ff35c46796392b0deae18b1c5ac3cc50df76b67ef9bcf256df595a3607aab62588460405161057c919061149f565b6001600160a01b038116600090815260066020526040812060028101548291829182610a4f83610d30565b935093509350509193909250565b6001600160a01b03831660009081526006602052604090206060908190831580610a8f5750610a8b81610d30565b8510155b15610aaa576040805160008152602081019091529150610b8b565b610ab381610d30565b610abd8587611547565b1115610ada5784610acd82610d30565b610ad7919061159e565b93505b8367ffffffffffffffff811115610b0157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610b2a578160200160208202803683370190505b50915060005b84811015610b8957610b4c610b458288611547565b8390610eac565b838281518110610b6c57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610b81816115e5565b915050610b30565b505b5090505b9392505050565b6003544211610ba157565b600554610bae5742600355565b60006201518060025460035442610bc5919061159e565b610bcf919061157f565b610bd9919061155f565b905060055481610be9919061155f565b60046000828254610bfa9190611547565b90915550504260035550565b610c0e610c7f565b6001600160a01b038116610c735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103d3565b610c7c81610e50565b50565b6000546001600160a01b031633146107795760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103d3565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d2b908490610eb8565b505050565b6000610761825490565b600061075e8383610f8a565b6040516370a0823160e01b815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b158015610daa57600080fd5b505afa158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de2919061146b565b905082811015610df25780610df4565b825b92508215610e3057610e306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585610cd9565b509092915050565b6000818152600183016020526040812054151561075e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061075e8383610fd9565b600061075e83836110f6565b6000610f0d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661112e9092919063ffffffff16565b805190915015610d2b5780806020019051810190610f2b9190611433565b610d2b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103d3565b6000818152600183016020526040812054610fd157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610761565b506000610761565b600081815260018301602052604081205480156110ec576000610ffd60018361159e565b85549091506000906110119060019061159e565b905081811461109257600086600001828154811061103f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061107057634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b85548690806110b157634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610761565b6000915050610761565b600082600001828154811061111b57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60606106848484600085856001600160a01b0385163b6111905760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103d3565b600080866001600160a01b031685876040516111ac9190611483565b60006040518083038185875af1925050503d80600081146111e9576040519150601f19603f3d011682016040523d82523d6000602084013e6111ee565b606091505b50915091506111fe828286611209565b979650505050505050565b60608315611218575081610b8f565b8251156112285782518084602001fd5b8160405162461bcd60e51b81526004016103d391906114e3565b80356001600160a01b038116811461125957600080fd5b919050565b60006020828403121561126f578081fd5b61075e82611242565b6000806000806080858703121561128d578283fd5b61129685611242565b935060206112a5818701611242565b935060408601359250606086013567ffffffffffffffff808211156112c8578384fd5b818801915088601f8301126112db578384fd5b8135818111156112ed576112ed611616565b6112ff601f8201601f19168501611516565b91508082528984828501011115611314578485fd5b8084840185840137810190920192909252939692955090935050565b60008060408385031215611342578182fd5b61134b83611242565b946020939093013593505050565b60008060006060848603121561136d578283fd5b61137684611242565b95602085013595506040909401359392505050565b6000602080838503121561139d578182fd5b823567ffffffffffffffff808211156113b4578384fd5b818501915085601f8301126113c7578384fd5b8135818111156113d9576113d9611616565b8060051b91506113ea848301611516565b8181528481019084860184860187018a1015611404578788fd5b8795505b83861015611426578035835260019590950194918601918601611408565b5098975050505050505050565b600060208284031215611444578081fd5b81518015158114610b8f578182fd5b600060208284031215611464578081fd5b5035919050565b60006020828403121561147c578081fd5b5051919050565b600082516114958184602087016115b5565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156114d7578351835292840192918401916001016114bb565b50909695505050505050565b60208152600082518060208401526115028160408501602087016115b5565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561153f5761153f611616565b604052919050565b6000821982111561155a5761155a611600565b500190565b60008261157a57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561159957611599611600565b500290565b6000828210156115b0576115b0611600565b500390565b60005b838110156115d05781810151838201526020016115b8565b838111156115df576000848401525b50505050565b60006000198214156115f9576115f9611600565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220ed8612f712fa6ecfbd4f3d63f5e7383b986883262415b7bd528a58e0e9288e5a64736f6c63430008040033000000000000000000000000c7e77c602d549747ab33c2f0137cbcb42eef2bb800000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79770000000000000000000000000000000000000000000000821ab0d44149800000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c7e77c602d549747ab33c2f0137cbcb42eef2bb800000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c79770000000000000000000000000000000000000000000000821ab0d44149800000

-----Decoded View---------------
Arg [0] : _stakingNft (address): 0xc7e77c602d549747ab33c2f0137cbcb42eef2bb8
Arg [1] : _rewardToken (address): 0x06c04b0ad236e7ca3b3189b1d049fe80109c7977
Arg [2] : _emission (uint256): 2400000000000000000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c7e77c602d549747ab33c2f0137cbcb42eef2bb8
Arg [1] : 00000000000000000000000006c04b0ad236e7ca3b3189b1d049fe80109c7977
Arg [2] : 0000000000000000000000000000000000000000000000821ab0d44149800000


Deployed ByteCode Sourcemap

42083:7700:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49421:144;;;;;;:::i;:::-;;:::i;:::-;;47303:747;;;;;;:::i;:::-;;:::i;49573:207::-;;;;;;:::i;:::-;-1:-1:-1;;;49573:207:0;;;;;;;;;;-1:-1:-1;;;;;;5872:33:1;;;5854:52;;5842:2;5827:18;49573:207:0;;;;;;;;42562:29;;;;;;;;;10210:25:1;;;10198:2;10183:18;42562:29:0;10165:76:1;43618:142:0;;;;;;:::i;:::-;;:::i;46056:597::-;;;;;;:::i;:::-;;:::i;46716:490::-;;;:::i;45820:177::-;;;;;;:::i;:::-;;:::i;:::-;;;5683:14:1;;5676:22;5658:41;;5646:2;5631:18;45820:177:0;5613:92:1;42394:35:0;;;;;;;;-1:-1:-1;;;;;4175:32:1;;;4157:51;;4145:2;4130:18;42394:35:0;4112:102:1;2884:103:0;;;:::i;43804:143::-;;;;;;:::i;:::-;;:::i;42779:26::-;;;;;;42636:23;;;;;;2236:87;2282:7;2309:6;-1:-1:-1;;;;;2309:6:0;2236:87;;42668:29;;;;;;42704:32;;;;;;48111:728;;;;;;:::i;:::-;;:::i;43984:415::-;;;;;;:::i;:::-;;:::i;:::-;;;;10701:25:1;;;10757:2;10742:18;;10735:34;;;;10785:18;;;10778:34;10689:2;10674:18;43984:415:0;10656:162:1;44465:786:0;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;45338:415::-;;;:::i;3142:201::-;;;;;;:::i;:::-;;:::i;42473:35::-;;;;;49421:144;2122:13;:11;:13::i;:::-;49507:50:::1;-1:-1:-1::0;;;;;49507:27:0;::::1;861:10:::0;49549:7;49507:27:::1;:50::i;:::-;49421:144:::0;;:::o;47303:747::-;861:10;47361:21;47385:22;;;:8;:22;;;;;47441:11;;47487:16;;;;;:88;;-1:-1:-1;47567:8:0;;47551:12;47524:24;:4;:22;:24::i;:::-;:39;;;;:::i;:::-;:51;;47487:88;47465:152;;;;-1:-1:-1;;;47465:152:0;;7359:2:1;47465:152:0;;;7341:21:1;7398:2;7378:18;;;7371:30;-1:-1:-1;;;7417:18:1;;;7410:44;7471:18;;47465:152:0;;;;;;;;;47630:12;:10;:12::i;:::-;47667:28;861:10;46056:597;:::i;47667:28::-;47653:11;;;:42;47713:9;47708:178;47732:12;47728:1;:16;47708:178;;;-1:-1:-1;;;;;47766:10:0;:27;;861:10;47816:4;47823;47828:1;47823:7;;;;;;-1:-1:-1;;;47823:7:0;;;;;;;;;;;;;;;;;;;47766:65;;-1:-1:-1;;;;;;47766:65:0;;;;;;;-1:-1:-1;;;;;4477:15:1;;;47766:65:0;;;4459:34:1;4529:15;;;;4509:18;;;4502:43;4561:18;;;4554:34;4394:18;;47766:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47846:28;47866:4;47871:1;47866:7;;;;;;-1:-1:-1;;;47866:7:0;;;;;;;;;;;;;;;47846:4;:15;;:19;;:28;;;;:::i;:::-;-1:-1:-1;47746:3:0;;;;:::i;:::-;;;;47708:178;;;;47913:12;47898:11;;:27;;;;;;;:::i;:::-;;;;-1:-1:-1;;47981:17:0;;47954:24;:4;:22;:24::i;:::-;:44;;;;:::i;:::-;47936:15;;;:62;861:10;-1:-1:-1;;;;;48016:26:0;;48037:4;48016:26;;;;;;:::i;:::-;;;;;;;;47303:747;;;:::o;43618:142::-;2122:13;:11;:13::i;:::-;43705:1:::1;43696:6;:10;43688:36;;;::::0;-1:-1:-1;;;43688:36:0;;9155:2:1;43688:36:0::1;::::0;::::1;9137:21:1::0;9194:2;9174:18;;;9167:30;-1:-1:-1;;;9213:18:1;;;9206:43;9266:18;;43688:36:0::1;9127:163:1::0;43688:36:0::1;43735:8;:17:::0;43618:142::o;46056:597::-;-1:-1:-1;;;;;46163:18:0;;46119:7;46163:18;;;:8;:18;;;;;46224:17;;46256:14;;46273:15;-1:-1:-1;46256:51:0;;;;;46306:1;46292:11;;:15;46256:51;46252:244;;;46324:20;46414:6;46402:8;;46367:14;;46349:15;:32;;;;:::i;:::-;46348:62;;;;:::i;:::-;46347:73;;;;:::i;:::-;46324:96;;46473:11;;46458:12;:26;;;;:::i;:::-;46435:49;;;;:::i;:::-;;;46252:244;;46630:15;;;;46603:11;;;;46568:19;46528:24;46630:4;46528:22;:24::i;:::-;:59;;;;:::i;:::-;:86;;;;:::i;:::-;:117;;;;:::i;:::-;46508:137;46056:597;-1:-1:-1;;;;46056:597:0:o;46716:490::-;861:10;46755:21;46779:22;;;:8;:22;;;;;46812:12;:10;:12::i;:::-;46835:15;46853:28;861:10;46056:597;:::i;46853:28::-;46835:46;-1:-1:-1;46896:11:0;;46892:234;;46924:18;46945:41;861:10;46978:7;46945:18;:41::i;:::-;46924:62;-1:-1:-1;47015:20:0;46924:62;47015:7;:20;:::i;:::-;47001:11;;;:34;861:10;47057:57;47081:10;47093:20;47081:10;47093:7;:20;:::i;:::-;47057:57;;;10420:25:1;;;10476:2;10461:18;;10454:34;;;;10393:18;47057:57:0;;;;;;;46892:234;;47181:17;;47154:24;:4;:22;:24::i;:::-;:44;;;;:::i;:::-;47136:4;:15;;:62;;;;46716:490;;:::o;45820:177::-;-1:-1:-1;;;;;45946:18:0;;45917:4;45946:18;;;:8;:18;;;;;:43;;45985:3;45946:38;:43::i;:::-;45939:50;;45820:177;;;;;:::o;2884:103::-;2122:13;:11;:13::i;:::-;2949:30:::1;2976:1;2949:18;:30::i;:::-;2884:103::o:0;43804:143::-;2122:13;:11;:13::i;:::-;43882:26:::1;::::0;10210:25:1;;;43882:26:0::1;::::0;10198:2:1;10183:18;43882:26:0::1;;;;;;;43919:8;:20:::0;43804:143::o;48111:728::-;861:10;48172:21;48196:22;;;:8;:22;;;;;48255:11;;;48277:51;;;;-1:-1:-1;;;48277:51:0;;7702:2:1;48277:51:0;;;7684:21:1;7741:2;7721:18;;;7714:30;-1:-1:-1;;;7760:18:1;;;7753:49;7819:18;;48277:51:0;7674:169:1;48277:51:0;48335:12;:10;:12::i;:::-;48374:28;861:10;46056:597;:::i;48374:28::-;48360:11;;;:42;48420:9;48415:254;48439:15;48435:1;:19;48415:254;;;48484:33;48509:4;48514:1;48509:7;;;;;;-1:-1:-1;;;48509:7:0;;;;;;;;;;;;;;;48484:4;:15;;:24;;:33;;;;:::i;:::-;48476:55;;;;-1:-1:-1;;;48476:55:0;;8050:2:1;48476:55:0;;;8032:21:1;8089:1;8069:18;;;8062:29;-1:-1:-1;;;8107:18:1;;;8100:39;8156:18;;48476:55:0;8022:158:1;48476:55:0;-1:-1:-1;;;;;48546:10:0;:27;;48582:4;861:10;48603:4;48608:1;48603:7;;;;;;-1:-1:-1;;;48603:7:0;;;;;;;;;;;;;;;;;;;48546:65;;-1:-1:-1;;;;;;48546:65:0;;;;;;;-1:-1:-1;;;;;4477:15:1;;;48546:65:0;;;4459:34:1;4529:15;;;;4509:18;;;4502:43;4561:18;;;4554:34;4394:18;;48546:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;48626:31;48649:4;48654:1;48649:7;;;;;;-1:-1:-1;;;48649:7:0;;;;;;;;;;;;;;;48626:4;:15;;:22;;:31;;;;:::i;:::-;-1:-1:-1;48456:3:0;;;;:::i;:::-;;;;48415:254;;;;48696:15;48681:11;;:30;;;;;;;:::i;:::-;;;;-1:-1:-1;;48767:17:0;;48740:24;:4;:22;:24::i;:::-;:44;;;;:::i;:::-;48722:15;;;:62;861:10;-1:-1:-1;;;;;48802:29:0;;48826:4;48802:29;;;;;;:::i;43984:415::-;-1:-1:-1;;;;;44313:18:0;;44088:7;44313:18;;;:8;:18;;;;;44350:11;;;;44088:7;;;;;44366:24;44313:18;44366:22;:24::i;:::-;44342:49;;;;;;;43984:415;;;;;:::o;44465:786::-;-1:-1:-1;;;;;44678:18:0;;44654:21;44678:18;;;:8;:18;;;;;44593:16;;;;44711:11;;;:50;;-1:-1:-1;44737:24:0;:4;:22;:24::i;:::-;44726:7;:35;;44711:50;44707:515;;;44823:16;;;44837:1;44823:16;;;;;;;;;-1:-1:-1;44707:515:0;;;44895:24;:4;:22;:24::i;:::-;44876:16;44886:6;44876:7;:16;:::i;:::-;:43;44872:127;;;44976:7;44949:24;:4;:22;:24::i;:::-;:34;;;;:::i;:::-;44940:43;;44872:127;45036:6;45022:21;;;;;;-1:-1:-1;;;45022:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;45022:21:0;;45015:28;;45058:13;45086:125;45110:6;45102:5;:14;45086:125;;;45160:35;45179:15;45189:5;45179:7;:15;:::i;:::-;45160:4;;:18;:35::i;:::-;45146:4;45151:5;45146:11;;;;;;-1:-1:-1;;;45146:11:0;;;;;;;;;;;;;;;;;;:49;45118:7;;;;:::i;:::-;;;;45086:125;;;44707:515;;-1:-1:-1;45239:4:0;-1:-1:-1;44465:786:0;;;;;;:::o;45338:415::-;45401:14;;45382:15;:33;45378:46;;45338:415::o;45378:46::-;45440:11;;45436:102;;45490:15;45473:14;:32;45338:415::o;45436:102::-;45550:20;45636:6;45611:8;;45593:14;;45575:15;:32;;;;:::i;:::-;45574:45;;;;:::i;:::-;45573:69;;;;:::i;:::-;45550:92;;45691:11;;45676:12;:26;;;;:::i;:::-;45655:17;;:47;;;;;;;:::i;:::-;;;;-1:-1:-1;;45730:15:0;45713:14;:32;-1:-1:-1;45338:415:0:o;3142:201::-;2122:13;:11;:13::i;:::-;-1:-1:-1;;;;;3231:22:0;::::1;3223:73;;;::::0;-1:-1:-1;;;3223:73:0;;6952:2:1;3223:73:0::1;::::0;::::1;6934:21:1::0;6991:2;6971:18;;;6964:30;7030:34;7010:18;;;7003:62;-1:-1:-1;;;7081:18:1;;;7074:36;7127:19;;3223:73:0::1;6924:228:1::0;3223:73:0::1;3307:28;3326:8;3307:18;:28::i;:::-;3142:201:::0;:::o;2401:132::-;2282:7;2309:6;-1:-1:-1;;;;;2309:6:0;861:10;2465:23;2457:68;;;;-1:-1:-1;;;2457:68:0;;8794:2:1;2457:68:0;;;8776:21:1;;;8813:18;;;8806:30;8872:34;8852:18;;;8845:62;8924:18;;2457:68:0;8766:182:1;18242:211:0;18386:58;;;-1:-1:-1;;;;;4791:32:1;;18386:58:0;;;4773:51:1;4840:18;;;;4833:34;;;18386:58:0;;;;;;;;;;4746:18:1;;;;18386:58:0;;;;;;;;-1:-1:-1;;;;;18386:58:0;-1:-1:-1;;;18386:58:0;;;18359:86;;18379:5;;18359:19;:86::i;:::-;18242:211;;;:::o;40527:114::-;40587:7;40614:19;40622:3;33512:18;;33429:109;39765:131;39832:4;39856:32;39861:3;39881:5;39856:4;:32::i;48941:319::-;49074:36;;-1:-1:-1;;;49074:36:0;;49104:4;49074:36;;;4157:51:1;49035:7:0;;;;-1:-1:-1;;;;;49074:11:0;:21;;;;4130:18:1;;49074:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;49060:50;;49138:7;49131:3;:14;;:30;;49158:3;49131:30;;;49148:7;49131:30;49121:40;-1:-1:-1;49176:11:0;;49172:55;;49189:38;-1:-1:-1;;;;;49189:11:0;:24;49214:3;49219:7;49189:24;:38::i;:::-;-1:-1:-1;49245:7:0;;48941:319;-1:-1:-1;;48941:319:0:o;40295:146::-;40372:4;33311:19;;;:12;;;:19;;;;;;:24;;40396:37;33214:129;3503:191;3577:16;3596:6;;-1:-1:-1;;;;;3613:17:0;;;-1:-1:-1;;;;;;3613:17:0;;;;;;3646:40;;3596:6;;;;;;;3646:40;;3577:16;3646:40;3503:191;;:::o;40072:137::-;40142:4;40166:35;40174:3;40194:5;40166:7;:35::i;40995:137::-;41066:7;41101:22;41105:3;41117:5;41101:3;:22::i;21309:716::-;21733:23;21759:69;21787:4;21759:69;;;;;;;;;;;;;;;;;21767:5;-1:-1:-1;;;;;21759:27:0;;;:69;;;;;:::i;:::-;21843:17;;21733:95;;-1:-1:-1;21843:21:0;21839:179;;21940:10;21929:30;;;;;;;;;;;;:::i;:::-;21921:85;;;;-1:-1:-1;;;21921:85:0;;9855:2:1;21921:85:0;;;9837:21:1;9894:2;9874:18;;;9867:30;9933:34;9913:18;;;9906:62;-1:-1:-1;;;9984:18:1;;;9977:40;10034:19;;21921:85:0;9827:232:1;31118:414:0;31181:4;33311:19;;;:12;;;:19;;;;;;31198:327;;-1:-1:-1;31241:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;31424:18;;31402:19;;;:12;;;:19;;;;;;:40;;;;31457:11;;31198:327;-1:-1:-1;31508:5:0;31501:12;;31708:1420;31774:4;31913:19;;;:12;;;:19;;;;;;31949:15;;31945:1176;;32324:21;32348:14;32361:1;32348:10;:14;:::i;:::-;32397:18;;32324:38;;-1:-1:-1;32377:17:0;;32397:22;;32418:1;;32397:22;:::i;:::-;32377:42;;32453:13;32440:9;:26;32436:405;;32487:17;32507:3;:11;;32519:9;32507:22;;;;;;-1:-1:-1;;;32507:22:0;;;;;;;;;;;;;;;;;32487:42;;32661:9;32632:3;:11;;32644:13;32632:26;;;;;;-1:-1:-1;;;32632:26:0;;;;;;;;;;;;;;;;;;;;:38;;;;32746:23;;;:12;;;:23;;;;;:36;;;32436:405;32922:17;;:3;;:17;;;-1:-1:-1;;;32922:17:0;;;;;;;;;;;;;;;;;;;;;;;;;;33017:3;:12;;:19;33030:5;33017:19;;;;;;;;;;;33010:26;;;33060:4;33053:11;;;;;;;31945:1176;33104:5;33097:12;;;;;33892:120;33959:7;33986:3;:11;;33998:5;33986:18;;;;;;-1:-1:-1;;;33986:18:0;;;;;;;;;;;;;;;;;33979:25;;33892:120;;;;:::o;12947:229::-;13084:12;13116:52;13138:6;13146:4;13152:1;13155:12;13084;-1:-1:-1;;;;;10497:19:0;;;14354:60;;;;-1:-1:-1;;;14354:60:0;;9497:2:1;14354:60:0;;;9479:21:1;9536:2;9516:18;;;9509:30;9575:31;9555:18;;;9548:59;9624:18;;14354:60:0;9469:179:1;14354:60:0;14428:12;14442:23;14469:6;-1:-1:-1;;;;;14469:11:0;14488:5;14495:4;14469:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14427:73;;;;14518:51;14535:7;14544:10;14556:12;14518:16;:51::i;:::-;14511:58;14067:510;-1:-1:-1;;;;;;;14067:510:0:o;16753:762::-;16903:12;16932:7;16928:580;;;-1:-1:-1;16963:10:0;16956:17;;16928:580;17077:17;;:21;17073:424;;17325:10;17319:17;17386:15;17373:10;17369:2;17365:19;17358:44;17273:148;17468:12;17461:20;;-1:-1:-1;;;17461:20:0;;;;;;;;:::i;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:2;;177:1;174;167:12;111:2;63:124;;;:::o;192:196::-;251:6;304:2;292:9;283:7;279:23;275:32;272:2;;;325:6;317;310:22;272:2;353:29;372:9;353:29;:::i;393:1025::-;488:6;496;504;512;565:3;553:9;544:7;540:23;536:33;533:2;;;587:6;579;572:22;533:2;615:29;634:9;615:29;:::i;:::-;605:39;;663:2;684:38;718:2;707:9;703:18;684:38;:::i;:::-;674:48;;769:2;758:9;754:18;741:32;731:42;;824:2;813:9;809:18;796:32;847:18;888:2;880:6;877:14;874:2;;;909:6;901;894:22;874:2;952:6;941:9;937:22;927:32;;997:7;990:4;986:2;982:13;978:27;968:2;;1024:6;1016;1009:22;968:2;1065;1052:16;1087:2;1083;1080:10;1077:2;;;1093:18;;:::i;:::-;1135:53;1178:2;1159:13;;-1:-1:-1;;1155:27:1;1151:36;;1135:53;:::i;:::-;1122:66;;1211:2;1204:5;1197:17;1251:7;1246:2;1241;1237;1233:11;1229:20;1226:33;1223:2;;;1277:6;1269;1262:22;1223:2;1337;1332;1328;1324:11;1319:2;1312:5;1308:14;1295:45;1360:14;;1356:23;;;1349:39;;;;523:895;;;;-1:-1:-1;523:895:1;;-1:-1:-1;;523:895:1:o;1423:264::-;1491:6;1499;1552:2;1540:9;1531:7;1527:23;1523:32;1520:2;;;1573:6;1565;1558:22;1520:2;1601:29;1620:9;1601:29;:::i;:::-;1591:39;1677:2;1662:18;;;;1649:32;;-1:-1:-1;;;1510:177:1:o;1692:332::-;1769:6;1777;1785;1838:2;1826:9;1817:7;1813:23;1809:32;1806:2;;;1859:6;1851;1844:22;1806:2;1887:29;1906:9;1887:29;:::i;:::-;1877:39;1963:2;1948:18;;1935:32;;-1:-1:-1;2014:2:1;1999:18;;;1986:32;;1796:228;-1:-1:-1;;;1796:228:1:o;2029:1002::-;2113:6;2144:2;2187;2175:9;2166:7;2162:23;2158:32;2155:2;;;2208:6;2200;2193:22;2155:2;2253:9;2240:23;2282:18;2323:2;2315:6;2312:14;2309:2;;;2344:6;2336;2329:22;2309:2;2387:6;2376:9;2372:22;2362:32;;2432:7;2425:4;2421:2;2417:13;2413:27;2403:2;;2459:6;2451;2444:22;2403:2;2500;2487:16;2522:2;2518;2515:10;2512:2;;;2528:18;;:::i;:::-;2574:2;2571:1;2567:10;2557:20;;2597:28;2621:2;2617;2613:11;2597:28;:::i;:::-;2659:15;;;2690:12;;;;2722:11;;;2752;;;2748:20;;2745:33;-1:-1:-1;2742:2:1;;;2796:6;2788;2781:22;2742:2;2823:6;2814:15;;2838:163;2852:2;2849:1;2846:9;2838:163;;;2909:17;;2897:30;;2870:1;2863:9;;;;;2947:12;;;;2979;;2838:163;;;-1:-1:-1;3020:5:1;2124:907;-1:-1:-1;;;;;;;;2124:907:1:o;3036:297::-;3103:6;3156:2;3144:9;3135:7;3131:23;3127:32;3124:2;;;3177:6;3169;3162:22;3124:2;3214:9;3208:16;3267:5;3260:13;3253:21;3246:5;3243:32;3233:2;;3294:6;3286;3279:22;3338:190;3397:6;3450:2;3438:9;3429:7;3425:23;3421:32;3418:2;;;3471:6;3463;3456:22;3418:2;-1:-1:-1;3499:23:1;;3408:120;-1:-1:-1;3408:120:1:o;3533:194::-;3603:6;3656:2;3644:9;3635:7;3631:23;3627:32;3624:2;;;3677:6;3669;3662:22;3624:2;-1:-1:-1;3705:16:1;;3614:113;-1:-1:-1;3614:113:1:o;3732:274::-;3861:3;3899:6;3893:13;3915:53;3961:6;3956:3;3949:4;3941:6;3937:17;3915:53;:::i;:::-;3984:16;;;;;3869:137;-1:-1:-1;;3869:137:1:o;4878:635::-;5049:2;5101:21;;;5171:13;;5074:18;;;5193:22;;;5020:4;;5049:2;5272:15;;;;5246:2;5231:18;;;5020:4;5318:169;5332:6;5329:1;5326:13;5318:169;;;5393:13;;5381:26;;5462:15;;;;5427:12;;;;5354:1;5347:9;5318:169;;;-1:-1:-1;5504:3:1;;5029:484;-1:-1:-1;;;;;;5029:484:1:o;6362:383::-;6511:2;6500:9;6493:21;6474:4;6543:6;6537:13;6586:6;6581:2;6570:9;6566:18;6559:34;6602:66;6661:6;6656:2;6645:9;6641:18;6636:2;6628:6;6624:15;6602:66;:::i;:::-;6729:2;6708:15;-1:-1:-1;;6704:29:1;6689:45;;;;6736:2;6685:54;;6483:262;-1:-1:-1;;6483:262:1:o;10823:275::-;10894:2;10888:9;10959:2;10940:13;;-1:-1:-1;;10936:27:1;10924:40;;10994:18;10979:34;;11015:22;;;10976:62;10973:2;;;11041:18;;:::i;:::-;11077:2;11070:22;10868:230;;-1:-1:-1;10868:230:1:o;11103:128::-;11143:3;11174:1;11170:6;11167:1;11164:13;11161:2;;;11180:18;;:::i;:::-;-1:-1:-1;11216:9:1;;11151:80::o;11236:217::-;11276:1;11302;11292:2;;-1:-1:-1;;;11327:31:1;;11381:4;11378:1;11371:15;11409:4;11334:1;11399:15;11292:2;-1:-1:-1;11438:9:1;;11282:171::o;11458:168::-;11498:7;11564:1;11560;11556:6;11552:14;11549:1;11546:21;11541:1;11534:9;11527:17;11523:45;11520:2;;;11571:18;;:::i;:::-;-1:-1:-1;11611:9:1;;11510:116::o;11631:125::-;11671:4;11699:1;11696;11693:8;11690:2;;;11704:18;;:::i;:::-;-1:-1:-1;11741:9:1;;11680:76::o;11761:258::-;11833:1;11843:113;11857:6;11854:1;11851:13;11843:113;;;11933:11;;;11927:18;11914:11;;;11907:39;11879:2;11872:10;11843:113;;;11974:6;11971:1;11968:13;11965:2;;;12009:1;12000:6;11995:3;11991:16;11984:27;11965:2;;11814:205;;;:::o;12024:135::-;12063:3;-1:-1:-1;;12084:17:1;;12081:2;;;12104:18;;:::i;:::-;-1:-1:-1;12151:1:1;12140:13;;12071:88::o;12164:127::-;12225:10;12220:3;12216:20;12213:1;12206:31;12256:4;12253:1;12246:15;12280:4;12277:1;12270:15;12296:127;12357:10;12352:3;12348:20;12345:1;12338:31;12388:4;12385:1;12378:15;12412:4;12409:1;12402:15

Swarm Source

ipfs://ed8612f712fa6ecfbd4f3d63f5e7383b986883262415b7bd528a58e0e9288e5a
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.