Contract 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf9 2

 

Contract Overview

Balance:
18,877.116092 BNB

BNB Value:
$7,266,179.53 (@ $384.92/BNB)

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf5b1ba902dfbeca88a9a9c3590572d3defc5237c4e46b2fc1706f87835e625bdWithdraw147714752022-01-28 22:14:291 hr 15 mins ago0x1c455cd866e01dbfd9acd132a5e39cef0914aa4c IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045943
0xb37241d006774af3028622a910c314397b7ee11bd2ecbe4a88333add19c50a7bWithdraw147714062022-01-28 22:11:021 hr 18 mins ago0x8c3de1634251d1e51c28844391fc9c11abb9f5e4 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.000331415
0x4be21814a0b40471ae2483edbddb12cbad97a6aa0c5ac29780761b974ebb2b50Withdraw147703672022-01-28 21:19:052 hrs 10 mins ago0x0af72831ce8e1be3298d31f81a9a691b8cb83559 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00039821
0x855929df16217c36a0a207fd7aba7e023dbdcad8494528dc6ffaa13bfb37c090Withdraw147703652022-01-28 21:18:592 hrs 10 mins ago0x0af72831ce8e1be3298d31f81a9a691b8cb83559 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00039827
0x6bbd9cd40c43e3f7a15788075051cc35fbb6018aea6427e5bbbf4983c63f1d52Staking147695392022-01-28 20:37:412 hrs 51 mins ago0x6bd0e7ab4ef8543460858fa69a22e6cc4bade8bb IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf9200 BNB0.000754715
0x4ba627086cc8977af2c7debc9f4612b20f40d4619695b97def69d5b295be735bWithdraw147692652022-01-28 20:23:593 hrs 5 mins ago0x95a2b91bb3a496f5e5e318af48b7072ac612a9b3 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0x7c0935712f8448bc0f8deb953400ff17ffea8a58880b3e29a05f24d222b7b38eStaking147683172022-01-28 19:35:593 hrs 53 mins ago0x42ed7576ba68a306dd0df63e2b3d6066736f8aa7 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0x6dab21f2535467b4b8ef018abc918be70d6b492dc7112a9b6db96d8a2a8fccc1Withdraw147683112022-01-28 19:35:413 hrs 53 mins ago0x42ed7576ba68a306dd0df63e2b3d6066736f8aa7 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0xccc0962ce298edcdfbfff332a4cf3cf0ee332fa8867347e26d9ac75542e0219eStaking147682612022-01-28 19:33:113 hrs 56 mins ago0x314ebe12b61aa1977fdc071eb13adfefeb39024d IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0x0203be6e7196dc9e178e656118c4d6fb354cc4aca591de316ab57ebf254f4532Withdraw147682552022-01-28 19:32:533 hrs 56 mins ago0x314ebe12b61aa1977fdc071eb13adfefeb39024d IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0x3f79211b13210c387f5ce7ddde81178998b6fc2f0e6218e8104919c6dd1696e8Staking147682482022-01-28 19:32:323 hrs 56 mins ago0x00a954188615d50722340b9d112a385f7b935a5c IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0x33c0a53e4158cd6bc5b33e366078cfee31889fcf22119004ac0f863a61fa7007Withdraw147682412022-01-28 19:32:113 hrs 57 mins ago0x00a954188615d50722340b9d112a385f7b935a5c IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0xe382f521dc3b706e6d1736d404c031c7083b5f180d5ec892a6c40db27e40bb42Staking147682322022-01-28 19:31:443 hrs 57 mins ago0x7a997dc67c34966653990e45aef09ef59cb2e0b4 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0x7af709fb7084413232c6fe7a600fc79037ffd15da8777c3f14d3276c163a7104Withdraw147682262022-01-28 19:31:263 hrs 58 mins ago0x7a997dc67c34966653990e45aef09ef59cb2e0b4 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0xf530ad69ca808f88d8bf457aa5ae9aca7406d48db894ab39bc972980dfbac48dStaking147682162022-01-28 19:30:563 hrs 58 mins ago0x3213f0dab8012538c80bd0a648b6bcbe82921a48 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0xfc4f83487c59386e629439207782137a4c0aabe4f819af4c0eb3644334c49fb3Withdraw147682102022-01-28 19:30:383 hrs 58 mins ago0x3213f0dab8012538c80bd0a648b6bcbe82921a48 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0x467244c2e2759f595d3e1a5dd3b63226d488f9d782850855e34679d60cfe6389Staking147682022022-01-28 19:30:143 hrs 59 mins ago0x6b3f026bc81e38dbc80b93e66557ca23f1e40c4f IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0xc00a820a28aa99132b67a9784471e358b04b6e67ac5f6197103b9fa66bb6e053Withdraw147681962022-01-28 19:29:563 hrs 59 mins ago0x6b3f026bc81e38dbc80b93e66557ca23f1e40c4f IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0xa18d093243e98d0053b93d91c6da15b5b28b4a519618802c4b37050b8846d4c0Staking147681882022-01-28 19:29:323 hrs 59 mins ago0xbda14cb3f6b26ce7136cfaaa7f76b541a76f30be IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0x341f8a79dc16e69e47febe67fedda77deb2bd9bb7d5baf0ef50a76c2c4afd324Withdraw147681792022-01-28 19:29:054 hrs ago0xbda14cb3f6b26ce7136cfaaa7f76b541a76f30be IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0x940dd20739d5a24a22518caea26689bd27930b4d7a458db55b7c246f939f55cdStaking147681712022-01-28 19:28:414 hrs ago0xfb1060e5878992d7d1a7a81fbca30045860fd8c1 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0x4a9bad6a526b3ab06bd52ef2b4c6a63125b11eba766d9061a9e15812684e6a7cWithdraw147681622022-01-28 19:28:144 hrs 1 min ago0xfb1060e5878992d7d1a7a81fbca30045860fd8c1 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0x4249fba57fba924ae53675c9694bf0a7baa59c389d9a211b5f934e8041bc31c8Staking147681492022-01-28 19:27:354 hrs 1 min ago0xa349eb3ad9412a84f72a31dee8c1b5ef9e1f1ff3 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
0x8ea53d9247d6816aa334a832f4a24b4cf0fb5b46c610eee6e7c016b59bdaa040Withdraw147681412022-01-28 19:27:114 hrs 2 mins ago0xa349eb3ad9412a84f72a31dee8c1b5ef9e1f1ff3 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00045937
0x5c747a2540b91aefb58c4f20f55b646ba72d9485e0ef8d12ffde07a0c16e00e8Staking147681332022-01-28 19:26:474 hrs 2 mins ago0x981bde9d2f6ab5534d94d9b5eadf07a9ef03b801 IN  0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90 BNB0.00090924
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xb37241d006774af3028622a910c314397b7ee11bd2ecbe4a88333add19c50a7b147714062022-01-28 22:11:021 hr 18 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x8c3de1634251d1e51c28844391fc9c11abb9f5e425 BNB
0x5ccaaa254677e682682a585c79b19377b5fb27e447fe9f21ffc32317cb054cde147678922022-01-28 19:14:444 hrs 14 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x5dbd6b0268159b865c87cdc62911aca652bab7191.5 BNB
0xb4a5a8afdf6d1217dd8245f0c2a8abeed2182ea08fbdefec97258c43aeefa778147670742022-01-28 18:33:504 hrs 55 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xa317b38376db033887060a2690134fd025bf944d166 BNB
0xc196a0bc244fad0ff955242761fca51fc912241f792fd78cecddbab1edabda0b147640062022-01-28 16:00:247 hrs 29 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x2128869820a8b2993cffca20e6767240895ed11b440 BNB
0xb5c8356bb2614563216b619987c621d2ae508d4264b2c05f8f6884f922f3dcdb147633612022-01-28 15:28:098 hrs 1 min ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x045f427a57b10fdc0e6b923951502000a4814fb558 BNB
0x40a18968decba2fad5a8d11003b2cf838ac5db44d7a9f5498d86adc2f845e95b147632782022-01-28 15:24:008 hrs 5 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xc0361d7200dadb232aa0824c3338916ec22773471 BNB
0x80c0a71d8186024a286e52a00fc0d0cc420093daf05621be53d6469007e630c9147630052022-01-28 15:10:218 hrs 19 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xc59938138998a113df580c51e0b29fdedd97d7b72 BNB
0xaac1eac4f5a83aa65d3dbfa288fdbaf99de4e94068086ea407de218d364a09bd147622292022-01-28 14:31:108 hrs 58 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xa568b2b843749d32874ef3f734e6b5f2a60d45852.3 BNB
0xaba73ab398424aec7741dadc01c5312e819ff5e0c2a2a52cf0a0ce6525501553147597352022-01-28 12:26:2711 hrs 3 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x176834f20915df644047a8fc259ef7e5b0420cba45 BNB
0x1618578a020c8529e538d12a6823eb2127a4c1a86b886d805cdc449672e0324d147575772022-01-28 10:38:1612 hrs 51 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x331703aa562336169c11777865448bf263bc52c553 BNB
0x0fc58670764a4c917930dee73a47c191fcc8bf7c0cdeaff3879a7117e367c249147574872022-01-28 10:33:4612 hrs 55 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x4957e9b6096057db58eec78141a7a7c8360e36bb1.7 BNB
0x6d7b9dcd81cabe68df847051429f61737945cb861557402bc5b27fd3f5af4518147540682022-01-28 7:42:4915 hrs 46 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xc2a96c9aa6f2b8582830d7e28809b495c00911901.5 BNB
0x4e05151069424e285ce760fb2c047e7450f3b192d9e02c1cde447451994f927e147529502022-01-28 6:45:4816 hrs 43 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x03e1fbebbb63c03ae8160de9bed4f9789fcb9c521.02 BNB
0xfe0ad94320084f3c7271e682a560229a9fd0d5042dbe108cc39c21a4b4cac11b147493462022-01-28 3:45:3619 hrs 43 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x331703aa562336169c11777865448bf263bc52c540 BNB
0xe055078b1d42fb5c709464f1712b5018f3fb6065eec0ed3324b130e0adc17131147474582022-01-28 2:10:0121 hrs 19 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xb704f7b4a94438d7a3c8bcb64e852e74136f1d3c31 BNB
0x18352e1be4befddecf1ac602f201130f16d6b053c2f7943181910cb1c8bc2e3e147455652022-01-28 0:35:2222 hrs 54 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x4957e9b6096057db58eec78141a7a7c8360e36bb1.3 BNB
0xbf882affa0b6475812bec8f6a3c94a21f2cc4ad15c6ea59d63e4e458c89d3938147437042022-01-27 23:02:171 day 27 mins ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x3a6f37dbaa907271aa668d6b1289f624903e1b854.99 BNB
0x2a80ad5b16bcde7b4a5c542055f35b09dea90d4a22af18f9a88b0a8901e45dd9147371342022-01-27 17:32:031 day 5 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x6fdff33396cb04d3da1046994bae29aacf72b4202 BNB
0x9334e8e2bb13c286000f5134744a027d41ceca1c8c5fe91cdf44172384f64c2b147367112022-01-27 17:10:541 day 6 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x7dc7216f17b850f6db1362399a32542828d58a0e1 BNB
0x3bba0fce1fa575887b9ce93a350c9a61fd1f0dbc133f23fe0055a10660b3dc18147339282022-01-27 14:51:291 day 8 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x64a92166ffc59b821c81c791e0e5f0c27e878ed91.3 BNB
0x009017a521f30fb6cb5ad6ba56fdc07e9f55c97ba88b91afead59ca00f574c2f147317392022-01-27 13:01:211 day 10 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xf7eb82adeff632c0fdba349d4fd69fc3ed0a698a6.1 BNB
0x46469edced1b0da0c524c9a6be996cb5ab346a0b31a431816c270cad9e62c3cd147313532022-01-27 12:42:031 day 10 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x4c96929f5944e016186a51e2f755ba85f1b38c611 BNB
0xd734a8bb4ca98e24881adf5d8a908ce8883dd0480774f3db1f8de0028383f293147305152022-01-27 12:00:091 day 11 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90xf7033bc840b58613e8ae925e784536d62b2887031 BNB
0x39018d515aa78c7eb7b6729cff32adfc68d7e4582158ce3da8c5a343ea54abeb147283212022-01-27 10:10:221 day 13 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x485891f3ef24d7f2f1acf915f192694342f9213a4 BNB
0x1f25326a8baa0b2c41c8bbdcc0c98326f691279be3fb46b397e254dee714ac1a147280252022-01-27 9:55:341 day 13 hrs ago 0xeca6f5cefc7c033d036c5a3a687a7c80f2975bf90x8bdfe1c21058737682eaf44f88dcb374653bd20e2.5 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
elfinStaking

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2021-12-16
*/

pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: @openzeppelin/contracts/math/SafeMath.sol



// File: @openzeppelin/contracts/introspection/IERC165.sol

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
      * - `from` cannot be the zero address.
      * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol

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

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: @openzeppelin/contracts/utils/EnumerableSet.sol

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            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] = toDeleteIndex + 1; // All indexes are 1-based

            // 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) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

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


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

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

// File: @openzeppelin/contracts/utils/Context.sol

/*
 * @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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol

contract elfinStaking is Ownable {
    address private  _owner;
    address private  _cmo;

    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    struct UserStakingInfo {
        uint tokenIndex;
        uint256 stakingAmount;
        uint256 lockDay;
        uint256 stakingTimestamp;
        bool withdrawn;
    }

    struct StakingInfo {
        address user;
        uint userStakingIndex;
    }

    struct PoolInfo {
        IERC20 stakingToken;
        uint256 totalLimit;
        uint256 currentAmount;
        uint256 minStakingAmount;
    }


    uint public duration = 86400;

    mapping(address => uint256) public stakingPledges;

    mapping(address => mapping(uint => UserStakingInfo)) public userStakingInfo;

    mapping(uint256 => StakingInfo) public stakingInfo;

    uint256 public stakingCount = 0;

    mapping(uint => PoolInfo) public poolInfo;



    event ElfinStaking(address user, uint tokenIndex, uint256 amount, uint256 lockDay);

    event ElfinWithdraw(address user, uint userStakingIndex, uint256 amount);


    constructor(address[] memory _token, uint256[] memory _totalLimit, uint256[] memory _minStakingAmount) public {
        _owner  = msg.sender;
        _cmo    = msg.sender;
        for (uint i = 0; i < _token.length; i++) {
            PoolInfo storage info = poolInfo[i];
            info.stakingToken = IERC20(_token[i]);
            info.totalLimit = _totalLimit[i];
            info.minStakingAmount = _minStakingAmount[i];
        }
    }


    function staking(uint token20Index, uint256 amount, uint lockDay) external payable {
        PoolInfo storage pool = poolInfo[token20Index];
        require(amount >= pool.minStakingAmount, "Amount is too small");
        require(lockDay == 10 || lockDay == 15 || lockDay == 20 || lockDay == 25 ,"Lock day only can be 10/15/20/25");
        require(pool.totalLimit > 0, "Token index is wrong");
        require(pool.currentAmount.add(amount) <= pool.totalLimit,"Can't staking more amount");
        pool.currentAmount = pool.currentAmount.add(amount);

        UserStakingInfo storage info = userStakingInfo[_msgSender()][stakingPledges[_msgSender()]];

        stakingPledges[_msgSender()] = stakingPledges[_msgSender()].add(1);
        info.stakingAmount = amount;
        info.lockDay = lockDay;
        info.stakingTimestamp = now;
        info.tokenIndex = token20Index;

        StakingInfo storage stakeInfo = stakingInfo[stakingCount];
        stakeInfo.user = _msgSender();
        stakeInfo.userStakingIndex = stakingPledges[_msgSender()].sub(1);
        stakingCount = stakingCount.add(1);

        if(pool.stakingToken != IERC20(address(0))) {
            poolInfo[token20Index].stakingToken.safeTransferFrom(msg.sender,address(this),amount);
        } else {
            require(amount == msg.value, "Amount must equal call value");
        }
        emit ElfinStaking(_msgSender(), token20Index, amount, lockDay);
    }

    function withdraw(uint userStakingIndex) external {
        UserStakingInfo storage info = userStakingInfo[_msgSender()][userStakingIndex];
        require(canWithdraw(msg.sender, userStakingIndex), "Can not withdraw");
        PoolInfo storage pool = poolInfo[info.tokenIndex];

        pool.currentAmount = pool.currentAmount.sub(info.stakingAmount);
        info.withdrawn = true;

        if(pool.stakingToken == IERC20(address(0))) {
            _msgSender().transfer(info.stakingAmount);
        } else {
            pool.stakingToken.safeTransfer(msg.sender,info.stakingAmount);
        }

        emit ElfinWithdraw(_msgSender(), userStakingIndex, info.stakingAmount);

    }


    function setStakingPool(uint index, address _newToken, uint256 _newTotalLimit, uint256 _minStakingAmount) external onlyCmo {
        PoolInfo storage pool = poolInfo[index];
        require(pool.totalLimit == 0,"Can't set exist token pool");
        pool.stakingToken = IERC20(_newToken);
        pool.totalLimit = _newTotalLimit;
        pool.minStakingAmount = _minStakingAmount;

    }



    function canWithdraw(address user, uint userStakingIndex) public view returns (bool) {
        UserStakingInfo storage info = userStakingInfo[user][userStakingIndex];
        return info.stakingAmount > 0 && now - info.stakingTimestamp >= (info.lockDay).mul(duration) && !info.withdrawn;
    }






    function getCmo() public  view returns(address) {
        return _cmo;
    }


    modifier onlyCmo() {
        require(msg.sender == _cmo);
        _;
    }

    function setCmo(address newCmo) public {
        require(msg.sender == _owner);
        _cmo   = newCmo;
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"_token","type":"address[]"},{"internalType":"uint256[]","name":"_totalLimit","type":"uint256[]"},{"internalType":"uint256[]","name":"_minStakingAmount","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockDay","type":"uint256"}],"name":"ElfinStaking","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"userStakingIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ElfinWithdraw","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"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"userStakingIndex","type":"uint256"}],"name":"canWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCmo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"stakingToken","type":"address"},{"internalType":"uint256","name":"totalLimit","type":"uint256"},{"internalType":"uint256","name":"currentAmount","type":"uint256"},{"internalType":"uint256","name":"minStakingAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCmo","type":"address"}],"name":"setCmo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"_newToken","type":"address"},{"internalType":"uint256","name":"_newTotalLimit","type":"uint256"},{"internalType":"uint256","name":"_minStakingAmount","type":"uint256"}],"name":"setStakingPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"token20Index","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lockDay","type":"uint256"}],"name":"staking","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakingInfo","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"userStakingIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingPledges","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":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userStakingInfo","outputs":[{"internalType":"uint256","name":"tokenIndex","type":"uint256"},{"internalType":"uint256","name":"stakingAmount","type":"uint256"},{"internalType":"uint256","name":"lockDay","type":"uint256"},{"internalType":"uint256","name":"stakingTimestamp","type":"uint256"},{"internalType":"bool","name":"withdrawn","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"userStakingIndex","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526201518060035560006007553480156200001d57600080fd5b5060405162001628380380620016288339810160408190526200004091620001ef565b60006200004c62000157565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018054336001600160a01b0319918216811790925560028054909116909117905560005b83518110156200014d5760008181526008602052604090208451859083908110620000e257fe5b602090810291909101015181546001600160a01b0319166001600160a01b0390911617815583518490839081106200011657fe5b602002602001015181600101819055508282815181106200013357fe5b6020908102919091010151600390910155600101620000bb565b505050506200032b565b3390565b80516001600160a01b03811681146200017357600080fd5b92915050565b600082601f8301126200018a578081fd5b8151620001a16200019b826200030b565b620002e4565b818152915060208083019084810181840286018201871015620001c357600080fd5b60005b84811015620001e457815184529282019290820190600101620001c6565b505050505092915050565b60008060006060848603121562000204578283fd5b83516001600160401b03808211156200021b578485fd5b818601915086601f8301126200022f578485fd5b8151620002406200019b826200030b565b80828252602080830192508086018b8283870289010111156200026157898afd5b8996505b848710156200028f576200027a8c826200015b565b84526001969096019592810192810162000265565b508901519097509350505080821115620002a7578384fd5b620002b58783880162000179565b93506040860151915080821115620002cb578283fd5b50620002da8682870162000179565b9150509250925092565b6040518181016001600160401b03811182821017156200030357600080fd5b604052919050565b60006001600160401b0382111562000321578081fd5b5060209081020190565b6112ed806200033b6000396000f3fe6080604052600436106100e85760003560e01c806350a26bac1161008a578063819ddb7411610059578063819ddb741461025a5780638da5cb5b14610288578063e2ab7cf21461029d578063f2fde38b146102ca576100e8565b806350a26bac146101f257806370b6550414610212578063715018a61461022557806373fb8d0c1461023a576100e8565b80630fb5a6b4116100c65780630fb5a6b41461016b5780631216f42b146101805780631526fe27146101a05780632e1a7d4d146101d0576100e8565b806304d978f1146100ed5780630b91b531146101275780630c540e1414610149575b600080fd5b3480156100f957600080fd5b5061010d610108366004610d47565b6102ea565b60405161011e959493929190611266565b60405180910390f35b34801561013357600080fd5b5061013c610327565b60405161011e9190610e37565b34801561015557600080fd5b5061015e610336565b60405161011e919061125d565b34801561017757600080fd5b5061015e61033c565b34801561018c57600080fd5b5061015e61019b366004610d2c565b610342565b3480156101ac57600080fd5b506101c06101bb366004610d91565b610354565b60405161011e9493929190610e6c565b3480156101dc57600080fd5b506101f06101eb366004610d91565b610385565b005b3480156101fe57600080fd5b506101f061020d366004610da9565b6104ed565b6101f0610220366004610df0565b610563565b34801561023157600080fd5b506101f061083e565b34801561024657600080fd5b506101f0610255366004610d2c565b6108c7565b34801561026657600080fd5b5061027a610275366004610d91565b610900565b60405161011e929190610eb6565b34801561029457600080fd5b5061013c610925565b3480156102a957600080fd5b506102bd6102b8366004610d47565b610934565b60405161011e9190610ecf565b3480156102d657600080fd5b506101f06102e5366004610d2c565b61099b565b6005602090815260009283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919060ff1685565b6002546001600160a01b031690565b60075481565b60035481565b60046020526000908152604090205481565b60086020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909184565b600060056000610393610a5b565b6001600160a01b03166001600160a01b03168152602001908152602001600020600083815260200190815260200160002090506103d03383610934565b6103f55760405162461bcd60e51b81526004016103ec90610fb7565b60405180910390fd5b805460009081526008602052604090206001820154600282015461041891610a5f565b600282015560048201805460ff1916600117905580546001600160a01b031661048557610443610a5b565b6001600160a01b03166108fc83600101549081150290604051600060405180830381858888f1935050505015801561047f573d6000803e3d6000fd5b506104a3565b600182015481546104a3916001600160a01b03909116903390610a87565b7f80603529da5d0c5994cd26157d25edf98f531f20000ed63534e2084222fac3846104cc610a5b565b60018401546040516104e092918791610e4b565b60405180910390a1505050565b6002546001600160a01b0316331461050457600080fd5b60008481526008602052604090206001810154156105345760405162461bcd60e51b81526004016103ec90611104565b80546001600160a01b0319166001600160a01b0394909416939093178355600183019190915560039091015550565b600083815260086020526040902060038101548310156105955760405162461bcd60e51b81526004016103ec90610f0d565b81600a14806105a4575081600f145b806105af5750816014145b806105ba5750816019145b6105d65760405162461bcd60e51b81526004016103ec90611228565b60008160010154116105fa5760405162461bcd60e51b81526004016103ec90611095565b6001810154600282015461060e9085610ae2565b111561062c5760405162461bcd60e51b81526004016103ec90611170565b600281015461063b9084610ae2565b6002820155600060058161064d610a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002060006004600061067b610a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054815260200190815260200160002090506106dd6001600460006106bd610a5b565b6001600160a01b0316815260208101919091526040016000205490610ae2565b600460006106e9610a5b565b6001600160a01b0316815260208082019290925260409081016000908120939093556001840187905560028401869055426003850155878455600754835260069091529020610736610a5b565b81546001600160a01b0319166001600160a01b0391909116178155610782600160046000610762610a5b565b6001600160a01b0316815260208101919091526040016000205490610a5f565b60018083019190915560075461079791610ae2565b60075582546001600160a01b0316156107d3576000868152600860205260409020546107ce906001600160a01b0316333088610b0e565b6107f2565b3485146107f25760405162461bcd60e51b81526004016103ec9061105e565b7f96c96f73e79898694501a3b758a9f14cdd86e4340f5a9712de88d388978531b461081b610a5b565b87878760405161082e9493929190610e6c565b60405180910390a1505050505050565b610846610a5b565b6001600160a01b0316610857610925565b6001600160a01b03161461087d5760405162461bcd60e51b81526004016103ec9061113b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6001546001600160a01b031633146108de57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b600660205260009081526040902080546001909101546001600160a01b039091169082565b6000546001600160a01b031690565b6001600160a01b038216600090815260056020908152604080832084845290915281206001810154158015906109805750600354600282015461097691610b35565b8160030154420310155b80156109915750600481015460ff16155b9150505b92915050565b6109a3610a5b565b6001600160a01b03166109b4610925565b6001600160a01b0316146109da5760405162461bcd60e51b81526004016103ec9061113b565b6001600160a01b038116610a005760405162461bcd60e51b81526004016103ec90610f3a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b600082821115610a815760405162461bcd60e51b81526004016103ec90610fe1565b50900390565b610add8363a9059cbb60e01b8484604051602401610aa6929190610eb6565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b6f565b505050565b600082820183811015610b075760405162461bcd60e51b81526004016103ec90610f80565b9392505050565b610b2f846323b872dd60e01b858585604051602401610aa693929190610e92565b50505050565b600082610b4457506000610995565b82820282848281610b5157fe5b0414610b075760405162461bcd60e51b81526004016103ec906110c3565b6060610bc4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610bfe9092919063ffffffff16565b805190915015610add5780806020019051810190610be29190610d71565b610add5760405162461bcd60e51b81526004016103ec906111de565b6060610c0d8484600085610c15565b949350505050565b606082471015610c375760405162461bcd60e51b81526004016103ec90611018565b610c4085610cd6565b610c5c5760405162461bcd60e51b81526004016103ec906111a7565b60006060866001600160a01b03168587604051610c799190610e1b565b60006040518083038185875af1925050503d8060008114610cb6576040519150601f19603f3d011682016040523d82523d6000602084013e610cbb565b606091505b5091509150610ccb828286610cdc565b979650505050505050565b3b151590565b60608315610ceb575081610b07565b825115610cfb5782518084602001fd5b8160405162461bcd60e51b81526004016103ec9190610eda565b80356001600160a01b038116811461099557600080fd5b600060208284031215610d3d578081fd5b610b078383610d15565b60008060408385031215610d59578081fd5b610d638484610d15565b946020939093013593505050565b600060208284031215610d82578081fd5b81518015158114610b07578182fd5b600060208284031215610da2578081fd5b5035919050565b60008060008060808587031215610dbe578182fd5b8435935060208501356001600160a01b0381168114610ddb578283fd5b93969395505050506040820135916060013590565b600080600060608486031215610e04578283fd5b505081359360208301359350604090920135919050565b60008251610e2d81846020870161128b565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152610ef981604085016020870161128b565b601f01601f19169190910160400192915050565b602080825260139082015272105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b606a1b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526010908201526f43616e206e6f7420776974686472617760801b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601c908201527f416d6f756e74206d75737420657175616c2063616c6c2076616c756500000000604082015260600190565b602080825260149082015273546f6b656e20696e6465782069732077726f6e6760601b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601a908201527f43616e27742073657420657869737420746f6b656e20706f6f6c000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526019908201527f43616e2774207374616b696e67206d6f726520616d6f756e7400000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252818101527f4c6f636b20646179206f6e6c792063616e2062652031302f31352f32302f3235604082015260600190565b90815260200190565b9485526020850193909352604084019190915260608301521515608082015260a00190565b60005b838110156112a657818101518382015260200161128e565b83811115610b2f575050600091015256fea264697066735822122067083259bb07a77105b90d93fd8041a9e04ea61d6da7eb313682f12482a1d16964736f6c634300060c0033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000005f5e100

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000005f5e100

-----Decoded View---------------
Arg [0] : _token (address[]): 0x0000000000000000000000000000000000000000
Arg [1] : _totalLimit (uint256[]): 0
Arg [2] : _minStakingAmount (uint256[]): 100000000

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [8] : 0000000000000000000000000000000000000000000000000000000005f5e100


Deployed ByteCode Sourcemap

41325:4757:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42021:75;;;;;;;;;;-1:-1:-1;42021:75:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;45791:78;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;42164:31::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;41926:28::-;;;;;;;;;;;;;:::i;41963:49::-;;;;;;;;;;-1:-1:-1;41963:49:0;;;;;:::i;:::-;;:::i;42204:41::-;;;;;;;;;;-1:-1:-1;42204:41:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;44361:699::-;;;;;;;;;;-1:-1:-1;44361:699:0;;;;;:::i;:::-;;:::i;:::-;;45070:395;;;;;;;;;;-1:-1:-1;45070:395:0;;;;;:::i;:::-;;:::i;42893:1460::-;;;;;;:::i;:::-;;:::i;40713:148::-;;;;;;;;;;;;;:::i;45964:113::-;;;;;;;;;;-1:-1:-1;45964:113:0;;;;;:::i;:::-;;:::i;42105:50::-;;;;;;;;;;-1:-1:-1;42105:50:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;40062:87::-;;;;;;;;;;;;;:::i;45477:296::-;;;;;;;;;;-1:-1:-1;45477:296:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;41016:244::-;;;;;;;;;;-1:-1:-1;41016:244:0;;;;;:::i;:::-;;:::i;42021:75::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;45791:78::-;45857:4;;-1:-1:-1;;;;;45857:4:0;45791:78;:::o;42164:31::-;;;;:::o;41926:28::-;;;;:::o;41963:49::-;;;;;;;;;;;;;:::o;42204:41::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;42204:41:0;;;;;;;:::o;44361:699::-;44422:28;44453:15;:29;44469:12;:10;:12::i;:::-;-1:-1:-1;;;;;44453:29:0;-1:-1:-1;;;;;44453:29:0;;;;;;;;;;;;:47;44483:16;44453:47;;;;;;;;;;;44422:78;;44519:41;44531:10;44543:16;44519:11;:41::i;:::-;44511:70;;;;-1:-1:-1;;;44511:70:0;;;;;;;:::i;:::-;;;;;;;;;44625:15;;44592:21;44616:25;;;:8;:25;;;;;44698:18;;;;44675;;;;:42;;:22;:42::i;:::-;44654:18;;;:63;44728:14;;;:21;;-1:-1:-1;;44728:21:0;44745:4;44728:21;;;44765:17;;-1:-1:-1;;;;;44765:17:0;44762:206;;44821:12;:10;:12::i;:::-;-1:-1:-1;;;;;44821:21:0;:41;44843:4;:18;;;44821:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;44762:206;;;44937:18;;;;44895:17;;:61;;-1:-1:-1;;;;;44895:17:0;;;;44926:10;;44895:30;:61::i;:::-;44985:65;44999:12;:10;:12::i;:::-;45031:18;;;;44985:65;;;;;45013:16;;44985:65;:::i;:::-;;;;;;;;44361:699;;;:::o;45070:395::-;45931:4;;-1:-1:-1;;;;;45931:4:0;45917:10;:18;45909:27;;;;;;45204:21:::1;45228:15:::0;;;:8:::1;:15;::::0;;;;45262::::1;::::0;::::1;::::0;:20;45254:58:::1;;;;-1:-1:-1::0;;;45254:58:0::1;;;;;;;:::i;:::-;45323:37:::0;;-1:-1:-1;;;;;;45323:37:0::1;-1:-1:-1::0;;;;;45323:37:0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;45371:15:0;::::1;:32:::0;;;;45414:21:::1;::::0;;::::1;:41:::0;-1:-1:-1;45070:395:0:o;42893:1460::-;42987:21;43011:22;;;:8;:22;;;;;43062:21;;;;43052:31;;;43044:63;;;;-1:-1:-1;;;43044:63:0;;;;;;;:::i;:::-;43126:7;43137:2;43126:13;:30;;;;43143:7;43154:2;43143:13;43126:30;:47;;;;43160:7;43171:2;43160:13;43126:47;:64;;;;43177:7;43188:2;43177:13;43126:64;43118:109;;;;-1:-1:-1;;;43118:109:0;;;;;;;:::i;:::-;43264:1;43246:4;:15;;;:19;43238:52;;;;-1:-1:-1;;;43238:52:0;;;;;;;:::i;:::-;43343:15;;;;43309:18;;;;:30;;43332:6;43309:22;:30::i;:::-;:49;;43301:86;;;;-1:-1:-1;;;43301:86:0;;;;;;;:::i;:::-;43419:18;;;;:30;;43442:6;43419:22;:30::i;:::-;43398:18;;;:51;43462:28;43493:15;43462:28;43509:12;:10;:12::i;:::-;-1:-1:-1;;;;;43493:29:0;-1:-1:-1;;;;;43493:29:0;;;;;;;;;;;;:59;43523:14;:28;43538:12;:10;:12::i;:::-;-1:-1:-1;;;;;43523:28:0;-1:-1:-1;;;;;43523:28:0;;;;;;;;;;;;;43493:59;;;;;;;;;;;43462:90;;43596:35;43629:1;43596:14;:28;43611:12;:10;:12::i;:::-;-1:-1:-1;;;;;43596:28:0;;;;;;;;;;;;-1:-1:-1;43596:28:0;;;:32;:35::i;:::-;43565:14;:28;43580:12;:10;:12::i;:::-;-1:-1:-1;;;;;43565:28:0;;;;;;;;;;;;;;;-1:-1:-1;43565:28:0;;;:66;;;;43642:18;;;:27;;;43680:12;;;:22;;;43737:3;43713:21;;;:27;43751:30;;;43838:12;;43826:25;;:11;:25;;;;;43879:12;:10;:12::i;:::-;43862:29;;-1:-1:-1;;;;;;43862:29:0;-1:-1:-1;;;;;43862:29:0;;;;;;;43931:35;-1:-1:-1;43931:14:0;-1:-1:-1;43946:12:0;:10;:12::i;:::-;-1:-1:-1;;;;;43931:28:0;;;;;;;;;;;;-1:-1:-1;43931:28:0;;;:32;:35::i;:::-;43902:26;;;;:64;;;;43992:12;;:19;;:16;:19::i;:::-;43977:12;:34;44027:17;;-1:-1:-1;;;;;44027:17:0;:39;44024:249;;44083:22;;;;:8;:22;;;;;:35;:85;;-1:-1:-1;;;;;44083:35:0;44136:10;44155:4;44161:6;44083:52;:85::i;:::-;44024:249;;;44219:9;44209:6;:19;44201:60;;;;-1:-1:-1;;;44201:60:0;;;;;;;:::i;:::-;44288:57;44301:12;:10;:12::i;:::-;44315;44329:6;44337:7;44288:57;;;;;;;;;:::i;:::-;;;;;;;;42893:1460;;;;;;:::o;40713:148::-;40293:12;:10;:12::i;:::-;-1:-1:-1;;;;;40282:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;40282:23:0;;40274:68;;;;-1:-1:-1;;;40274:68:0;;;;;;;:::i;:::-;40820:1:::1;40804:6:::0;;40783:40:::1;::::0;-1:-1:-1;;;;;40804:6:0;;::::1;::::0;40783:40:::1;::::0;40820:1;;40783:40:::1;40851:1;40834:19:::0;;-1:-1:-1;;;;;;40834:19:0::1;::::0;;40713:148::o;45964:113::-;46036:6;;-1:-1:-1;;;;;46036:6:0;46022:10;:20;46014:29;;;;;;46054:4;:15;;-1:-1:-1;;;;;;46054:15:0;-1:-1:-1;;;;;46054:15:0;;;;;;;;;;45964:113::o;42105:50::-;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;42105:50:0;;;;;:::o;40062:87::-;40108:7;40135:6;-1:-1:-1;;;;;40135:6:0;40062:87;:::o;45477:296::-;-1:-1:-1;;;;;45604:21:0;;45556:4;45604:21;;;:15;:21;;;;;;;;:39;;;;;;;;45661:18;;;;:22;;;;:85;;-1:-1:-1;45737:8:0;;45719:12;;;;45718:28;;:18;:28::i;:::-;45693:4;:21;;;45687:3;:27;:59;;45661:85;:104;;;;-1:-1:-1;45751:14:0;;;;;;45750:15;45661:104;45654:111;;;45477:296;;;;;:::o;41016:244::-;40293:12;:10;:12::i;:::-;-1:-1:-1;;;;;40282:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;40282:23:0;;40274:68;;;;-1:-1:-1;;;40274:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;41105:22:0;::::1;41097:73;;;;-1:-1:-1::0;;;41097:73:0::1;;;;;;;:::i;:::-;41207:6;::::0;;41186:38:::1;::::0;-1:-1:-1;;;;;41186:38:0;;::::1;::::0;41207:6;::::1;::::0;41186:38:::1;::::0;::::1;41235:6;:17:::0;;-1:-1:-1;;;;;;41235:17:0::1;-1:-1:-1::0;;;;;41235:17:0;;;::::1;::::0;;;::::1;::::0;;41016:244::o;38636:106::-;38724:10;38636:106;:::o;12427:158::-;12485:7;12518:1;12513;:6;;12505:49;;;;-1:-1:-1;;;12505:49:0;;;;;;;:::i;:::-;-1:-1:-1;12572:5:0;;;12427:158::o;25249:177::-;25332:86;25352:5;25382:23;;;25407:2;25411:5;25359:58;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;25359:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;25359:58:0;-1:-1:-1;;;;;;25359:58:0;;;;;;;;;;25332:19;:86::i;:::-;25249:177;;;:::o;11965:179::-;12023:7;12055:5;;;12079:6;;;;12071:46;;;;-1:-1:-1;;;12071:46:0;;;;;;;:::i;:::-;12135:1;11965:179;-1:-1:-1;;;11965:179:0:o;25434:205::-;25535:96;25555:5;25585:27;;;25614:4;25620:2;25624:5;25562:68;;;;;;;;;;:::i;25535:96::-;25434:205;;;;:::o;12844:220::-;12902:7;12926:6;12922:20;;-1:-1:-1;12941:1:0;12934:8;;12922:20;12965:5;;;12969:1;12965;:5;:1;12989:5;;;;;:10;12981:56;;;;-1:-1:-1;;;12981:56:0;;;;;;;:::i;27554:761::-;27978:23;28004:69;28032:4;28004:69;;;;;;;;;;;;;;;;;28012:5;-1:-1:-1;;;;;28004:27:0;;;:69;;;;;:::i;:::-;28088:17;;27978:95;;-1:-1:-1;28088:21:0;28084:224;;28230:10;28219:30;;;;;;;;;;;;:::i;:::-;28211:85;;;;-1:-1:-1;;;28211:85:0;;;;;;;:::i;20287:195::-;20390:12;20422:52;20444:6;20452:4;20458:1;20461:12;20422:21;:52::i;:::-;20415:59;20287:195;-1:-1:-1;;;;20287:195:0:o;21339:530::-;21466:12;21524:5;21499:21;:30;;21491:81;;;;-1:-1:-1;;;21491:81:0;;;;;;;:::i;:::-;21591:18;21602:6;21591:10;:18::i;:::-;21583:60;;;;-1:-1:-1;;;21583:60:0;;;;;;;:::i;:::-;21717:12;21731:23;21758:6;-1:-1:-1;;;;;21758:11:0;21778:5;21786:4;21758:33;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21716:75;;;;21809:52;21827:7;21836:10;21848:12;21809:17;:52::i;:::-;21802:59;21339:530;-1:-1:-1;;;;;;;21339:530:0:o;17367:422::-;17734:20;17773:8;;;17367:422::o;23879:742::-;23994:12;24023:7;24019:595;;;-1:-1:-1;24054:10:0;24047:17;;24019:595;24168:17;;:21;24164:439;;24431:10;24425:17;24492:15;24479:10;24475:2;24471:19;24464:44;24379:148;24574:12;24567:20;;-1:-1:-1;;;24567:20:0;;;;;;;;:::i;5:130:-1:-;72:20;;-1:-1;;;;;20801:54;;22048:35;;22038:2;;22097:1;;22087:12;414:241;;518:2;506:9;497:7;493:23;489:32;486:2;;;-1:-1;;524:12;486:2;586:53;631:7;607:22;586:53;:::i;662:366::-;;;783:2;771:9;762:7;758:23;754:32;751:2;;;-1:-1;;789:12;751:2;851:53;896:7;872:22;851:53;:::i;:::-;841:63;941:2;980:22;;;;344:20;;-1:-1;;;745:283::o;1035:257::-;;1147:2;1135:9;1126:7;1122:23;1118:32;1115:2;;;-1:-1;;1153:12;1115:2;223:6;217:13;22194:5;20713:13;20706:21;22172:5;22169:32;22159:2;;-1:-1;;22205:12;1299:241;;1403:2;1391:9;1382:7;1378:23;1374:32;1371:2;;;-1:-1;;1409:12;1371:2;-1:-1;344:20;;1365:175;-1:-1;1365:175::o;1547:617::-;;;;;1702:3;1690:9;1681:7;1677:23;1673:33;1670:2;;;-1:-1;;1709:12;1670:2;344:20;;;-1:-1;1861:2;1900:22;;72:20;-1:-1;;;;;20801:54;;22048:35;;22038:2;;-1:-1;;22087:12;22038:2;1664:500;;1869:63;;-1:-1;;;;1969:2;2008:22;;344:20;;2077:2;2116:22;344:20;;1664:500::o;2171:491::-;;;;2309:2;2297:9;2288:7;2284:23;2280:32;2277:2;;;-1:-1;;2315:12;2277:2;-1:-1;;344:20;;;2467:2;2506:22;;344:20;;-1:-1;2575:2;2614:22;;;344:20;;2271:391;-1:-1;2271:391::o;9263:271::-;;3209:5;20054:12;3320:52;3365:6;3360:3;3353:4;3346:5;3342:16;3320:52;:::i;:::-;3384:16;;;;;9397:137;-1:-1;;9397:137::o;9541:222::-;-1:-1;;;;;20801:54;;;;2889:37;;9668:2;9653:18;;9639:124::o;9770:460::-;-1:-1;;;;;20801:54;;;;2748:58;;10133:2;10118:18;;9214:37;;;;10216:2;10201:18;;9214:37;9961:2;9946:18;;9932:298::o;10237:572::-;-1:-1;;;;;20801:54;;;;2748:58;;10629:2;10614:18;;9214:37;;;;10712:2;10697:18;;9214:37;10795:2;10780:18;;9214:37;10456:3;10441:19;;10427:382::o;10816:444::-;-1:-1;;;;;20801:54;;;2889:37;;20801:54;;;;11163:2;11148:18;;2889:37;11246:2;11231:18;;9214:37;;;;10999:2;10984:18;;10970:290::o;11267:333::-;-1:-1;;;;;20801:54;;;;2889:37;;11586:2;11571:18;;9214:37;11422:2;11407:18;;11393:207::o;11607:210::-;20713:13;;20706:21;3003:34;;11728:2;11713:18;;11699:118::o;12413:310::-;;12560:2;12581:17;12574:47;3716:5;20054:12;20493:6;12560:2;12549:9;12545:18;20481:19;3810:52;3855:6;20521:14;12549:9;20521:14;12560:2;3836:5;3832:16;3810:52;:::i;:::-;21968:7;21952:14;-1:-1;;21948:28;3874:39;;;;20521:14;3874:39;;12531:192;-1:-1;;12531:192::o;12730:416::-;12930:2;12944:47;;;4150:2;12915:18;;;20481:19;-1:-1;;;20521:14;;;4166:42;4227:12;;;12901:245::o;13153:416::-;13353:2;13367:47;;;4478:2;13338:18;;;20481:19;4514:34;20521:14;;;4494:55;-1:-1;;;4569:12;;;4562:30;4611:12;;;13324:245::o;13576:416::-;13776:2;13790:47;;;4862:2;13761:18;;;20481:19;4898:29;20521:14;;;4878:50;4947:12;;;13747:245::o;13999:416::-;14199:2;14213:47;;;5198:2;14184:18;;;20481:19;-1:-1;;;20521:14;;;5214:39;5272:12;;;14170:245::o;14422:416::-;14622:2;14636:47;;;5523:2;14607:18;;;20481:19;5559:32;20521:14;;;5539:53;5611:12;;;14593:245::o;14845:416::-;15045:2;15059:47;;;5862:2;15030:18;;;20481:19;5898:34;20521:14;;;5878:55;-1:-1;;;5953:12;;;5946:30;5995:12;;;15016:245::o;15268:416::-;15468:2;15482:47;;;6246:2;15453:18;;;20481:19;6282:30;20521:14;;;6262:51;6332:12;;;15439:245::o;15691:416::-;15891:2;15905:47;;;6583:2;15876:18;;;20481:19;-1:-1;;;20521:14;;;6599:43;6661:12;;;15862:245::o;16114:416::-;16314:2;16328:47;;;6912:2;16299:18;;;20481:19;6948:34;20521:14;;;6928:55;-1:-1;;;7003:12;;;6996:25;7040:12;;;16285:245::o;16537:416::-;16737:2;16751:47;;;7291:2;16722:18;;;20481:19;7327:28;20521:14;;;7307:49;7375:12;;;16708:245::o;16960:416::-;17160:2;17174:47;;;17145:18;;;20481:19;7662:34;20521:14;;;7642:55;7716:12;;;17131:245::o;17383:416::-;17583:2;17597:47;;;7967:2;17568:18;;;20481:19;8003:27;20521:14;;;7983:48;8050:12;;;17554:245::o;17806:416::-;18006:2;18020:47;;;8301:2;17991:18;;;20481:19;8337:31;20521:14;;;8317:52;8388:12;;;17977:245::o;18229:416::-;18429:2;18443:47;;;8639:2;18414:18;;;20481:19;8675:34;20521:14;;;8655:55;-1:-1;;;8730:12;;;8723:34;8776:12;;;18400:245::o;18652:416::-;18852:2;18866:47;;;18837:18;;;20481:19;9063:34;20521:14;;;9043:55;9117:12;;;18823:245::o;19075:222::-;9214:37;;;19202:2;19187:18;;19173:124::o;19304:656::-;9214:37;;;19702:2;19687:18;;9214:37;;;;19785:2;19770:18;;9214:37;;;;19868:2;19853:18;;9214:37;20713:13;20706:21;19945:3;19930:19;;3003:34;19537:3;19522:19;;19508:452::o;21608:268::-;21673:1;21680:101;21694:6;21691:1;21688:13;21680:101;;;21761:11;;;21755:18;21742:11;;;21735:39;21716:2;21709:10;21680:101;;;21796:6;21793:1;21790:13;21787:2;;;-1:-1;;21673:1;21843:16;;21836:27;21657:219::o

Swarm Source

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