ETH Price: $2,525.82 (-0.35%)

Contract

0x9581D664e90Fc278d2086E08A7D443FFD026897B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake195590012024-04-01 5:45:35150 days ago1711950335IN
0x9581D664...FD026897B
0 ETH0.0022465614.71717657
Unstake167182532023-02-27 8:10:11549 days ago1677485411IN
0x9581D664...FD026897B
0 ETH0.001965316.07071529
Claim167181982023-02-27 7:58:47549 days ago1677484727IN
0x9581D664...FD026897B
0 ETH0.0017251716.06217963
Claim165545532023-02-04 9:33:59572 days ago1675503239IN
0x9581D664...FD026897B
0 ETH0.0021319919.64533322
Claim160471332022-11-25 12:54:59643 days ago1669380899IN
0x9581D664...FD026897B
0 ETH0.0011552911.51196715
Unstake158676292022-10-31 11:05:23668 days ago1667214323IN
0x9581D664...FD026897B
0 ETH0.0147193162.24285064
Unstake157672552022-10-17 10:33:47682 days ago1666002827IN
0x9581D664...FD026897B
0 ETH0.0023022511.38139991
Unstake157666452022-10-17 8:29:35682 days ago1665995375IN
0x9581D664...FD026897B
0 ETH0.001379910.18009786
Unstake156427202022-09-30 0:57:35699 days ago1664499455IN
0x9581D664...FD026897B
0 ETH0.0019465310.97053316
Claim156301272022-09-28 6:45:11701 days ago1664347511IN
0x9581D664...FD026897B
0 ETH0.0014767211.48113542
Unstake156225102022-09-27 5:08:47702 days ago1664255327IN
0x9581D664...FD026897B
0 ETH0.001042798.80378639
Unstake156170202022-09-26 10:41:59703 days ago1664188919IN
0x9581D664...FD026897B
0 ETH0.000758565.52122063
Claim155913912022-09-22 20:52:47707 days ago1663879967IN
0x9581D664...FD026897B
0 ETH0.0014236114.18564277
Unstake155873002022-09-22 7:09:59707 days ago1663830599IN
0x9581D664...FD026897B
0 ETH0.000712575.25693827
Claim155766982022-09-20 19:13:11709 days ago1663701191IN
0x9581D664...FD026897B
0 ETH0.000918349.15087276
Stake155766792022-09-20 19:09:23709 days ago1663700963IN
0x9581D664...FD026897B
0 ETH0.0009451210.73512467
Unstake155654442022-09-19 5:20:47710 days ago1663564847IN
0x9581D664...FD026897B
0 ETH0.000782623.56758562
Unstake155610802022-09-18 14:39:11711 days ago1663511951IN
0x9581D664...FD026897B
0 ETH0.000885125.79842372
Unstake155607782022-09-18 13:37:47711 days ago1663508267IN
0x9581D664...FD026897B
0 ETH0.001094984.55627722
Unstake155424042022-09-15 23:39:23714 days ago1663285163IN
0x9581D664...FD026897B
0 ETH0.001169686.81669211
Claim155413192022-09-15 19:58:47714 days ago1663271927IN
0x9581D664...FD026897B
0 ETH0.0011908410.97308718
Claim155317382022-09-14 7:45:00715 days ago1663141500IN
0x9581D664...FD026897B
0 ETH0.000612839.26351267
Claim155269892022-09-13 12:40:36716 days ago1663072836IN
0x9581D664...FD026897B
0 ETH0.0030377745.91830401
Stake154951232022-09-08 6:47:36721 days ago1662619656IN
0x9581D664...FD026897B
0 ETH0.00104848.43869211
Claim154901582022-09-07 11:52:31722 days ago1662551551IN
0x9581D664...FD026897B
0 ETH0.000142765.76521755
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MagusStaking

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 Etherscan.io on 2022-07-17
*/

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


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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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


// 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/utils/introspection/IERC165.sol


// 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/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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


// 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/extensions/IERC721Enumerable.sol


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

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


// 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/token/ERC20/IERC20.sol


// 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/IERC20Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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


// 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/token/ERC721/ERC721.sol


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

pragma solidity ^0.8.0;








/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @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.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

// File: @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;



/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

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


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;




/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

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


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;



/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

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


// 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: magusstakingerc20.sol



pragma solidity 0.8.4;





contract MGSRewards is ERC20, ERC20Burnable, Ownable {

  mapping(address => bool) controllers;
  
  constructor() ERC20("MGSRewards", "MGS") { }

  function mint(address to, uint256 amount) external {
    require(controllers[msg.sender], "Only controllers can mint");
    _mint(to, amount);
  }

  function burnFrom(address account, uint256 amount) public override {
      if (controllers[msg.sender]) {
          _burn(account, amount);
      }
      else {
          super.burnFrom(account, amount);
      }
  }

  function addController(address controller) external onlyOwner {
    controllers[controller] = true;
  }

  function removeController(address controller) external onlyOwner {
    controllers[controller] = false;
  }
}
// File: magusstaking.sol



pragma solidity 0.8.4;







contract MagusStaking is Ownable, IERC721Receiver {

  uint256 public totalStaked;
  
  // struct to store a stake's token, owner, and earning values
  struct Stake {
    uint24 tokenId;
    uint48 timestamp;
    address owner;
  }

  event NFTStaked(address owner, uint256 tokenId, uint256 value);
  event NFTUnstaked(address owner, uint256 tokenId, uint256 value);
  event Claimed(address owner, uint256 amount);

  // reference to the Block NFT contract
  ERC721Enumerable nft;
  MGSRewards token;

  // maps tokenId to stake
  mapping(uint256 => Stake) public vault; 

   constructor(ERC721Enumerable _nft, MGSRewards _token) { 
    nft = _nft;
    token = _token;
  }

  function stake(uint256[] calldata tokenIds) external {
    uint256 tokenId;
    totalStaked += tokenIds.length;
    for (uint i = 0; i < tokenIds.length; i++) {
      tokenId = tokenIds[i];
      require(nft.ownerOf(tokenId) == msg.sender, "not your token");
      require(vault[tokenId].tokenId == 0, 'already staked');

      nft.transferFrom(msg.sender, address(this), tokenId);
      emit NFTStaked(msg.sender, tokenId, block.timestamp);

      vault[tokenId] = Stake({
        owner: msg.sender,
        tokenId: uint24(tokenId),
        timestamp: uint48(block.timestamp)
      });
    }
  }

  function _unstakeMany(address account, uint256[] calldata tokenIds) internal {
    uint256 tokenId;
    totalStaked -= tokenIds.length;
    for (uint i = 0; i < tokenIds.length; i++) {
      tokenId = tokenIds[i];
      Stake memory staked = vault[tokenId];
      require(staked.owner == msg.sender, "not an owner");

      delete vault[tokenId];
      emit NFTUnstaked(account, tokenId, block.timestamp);
      nft.transferFrom(address(this), account, tokenId);
    }
  }

  function claim(uint256[] calldata tokenIds) external {
      _claim(msg.sender, tokenIds, false);
  }

  function claimForAddress(address account, uint256[] calldata tokenIds) external onlyOwner {
      _claim(account, tokenIds, false);
  }

  function unstake(uint256[] calldata tokenIds) external {
      _claim(msg.sender, tokenIds, true);
  }

  function _claim(address account, uint256[] calldata tokenIds, bool _unstake) internal {
    uint256 tokenId;
    uint256 earned = 0;
    uint256 rewardmath = 0;
    uint256 bonus = 0;
    uint256 totalEarned = 0;

    for (uint i = 0; i < tokenIds.length; i++) {
      tokenId = tokenIds[i];
      Stake memory staked = vault[tokenId];
      require(staked.owner == account, "not an owner");
      uint256 stakedAt = staked.timestamp;
      rewardmath = 1000 ether * (block.timestamp - stakedAt) / 86400 ;
      earned = rewardmath / 100;
      vault[tokenId] = Stake({
        owner: account,
        tokenId: uint24(tokenId),
        timestamp: uint48(block.timestamp)
      });
      totalEarned += earned;
    }
    if (tokenIds.length > 4 && tokenIds.length < 10 ) {
        bonus = totalEarned * 15 / 100; 
    } else if (tokenIds.length > 9 && tokenIds.length < 20 ) {
        bonus = totalEarned * 25 / 100; 

    } else if (tokenIds.length > 19 && tokenIds.length < 50 ) {
        bonus = totalEarned * 35 / 100; 

    } else if (tokenIds.length > 49 ) {
        bonus = totalEarned * 50 / 100; 
    }

    totalEarned = totalEarned + bonus;
    if (totalEarned > 0) {
      token.mint(account, totalEarned);
    }
    if (_unstake) {
      _unstakeMany(account, tokenIds);
    }
    emit Claimed(account, totalEarned);
  }

  function earningInfo(address account, uint256[] calldata tokenIds) external view returns (uint256[1] memory info) {
     uint256 tokenId;
     uint256 earned = 0;
     uint256 rewardmath = 0;
     uint256 totalEarned = 0;
     uint256 bonus = 0;

    for (uint i = 0; i < tokenIds.length; i++) {
      tokenId = tokenIds[i];
      Stake memory staked = vault[tokenId];
      require(staked.owner == account, "not an owner");
      uint256 stakedAt = staked.timestamp;
      rewardmath = 1000 ether * (block.timestamp - stakedAt) / 86400;
      earned = rewardmath / 100;
      totalEarned += earned;
    }
    if (tokenIds.length > 4 && tokenIds.length < 10 ) {
        bonus = totalEarned * 15 / 100; 
    } else if (tokenIds.length > 9 && tokenIds.length < 20 ) {
        bonus = totalEarned * 25 / 100; 

    } else if (tokenIds.length > 19 && tokenIds.length < 50 ) {
        bonus = totalEarned * 35 / 100; 

    } else if (tokenIds.length > 49 ) {
        bonus = totalEarned * 50 / 100; 
    }
        totalEarned = totalEarned + bonus;

    if (totalEarned > 0) {
      return [totalEarned];
    }
}

  // should never be used inside of transaction because of gas fee
  function balanceOf(address account) public view returns (uint256) {
    uint256 balance = 0;
    uint256 supply = nft.totalSupply();
    for(uint i = 1; i <= supply; i++) {
      if (vault[i].owner == account) {
        balance += 1;
      }
    }
    return balance;
  }

  // should never be used inside of transaction because of gas fee
  function tokensOfOwner(address account) public view returns (uint256[] memory ownerTokens) {

    uint256 supply = nft.totalSupply();
    uint256[] memory tmp = new uint256[](supply);

    uint256 index = 0;
    for(uint tokenId = 1; tokenId <= supply; tokenId++) {
      if (vault[tokenId].owner == account) {
        tmp[index] = vault[tokenId].tokenId;
        index +=1;
      }
    }

    uint256[] memory tokens = new uint256[](index);
    for(uint i = 0; i < index; i++) {
      tokens[i] = tmp[i];
    }

    return tokens;
  }

  function onERC721Received(
        address,
        address from,
        uint256,
        bytes calldata
    ) external pure override returns (bytes4) {
      require(from == address(0x0), "Cannot send nfts to Vault directly");
      return IERC721Receiver.onERC721Received.selector;
    }
  
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ERC721Enumerable","name":"_nft","type":"address"},{"internalType":"contract MGSRewards","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"NFTStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"NFTUnstaked","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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"earningInfo","outputs":[{"internalType":"uint256[1]","name":"info","type":"uint256[1]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"ownerTokens","type":"uint256[]"}],"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":"tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vault","outputs":[{"internalType":"uint24","name":"tokenId","type":"uint24"},{"internalType":"uint48","name":"timestamp","type":"uint48"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620015f3380380620015f38339810160408190526200003491620000c1565b6200003f3362000071565b600280546001600160a01b039384166001600160a01b0319918216179091556003805492909316911617905562000118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060408385031215620000d4578182fd5b8251620000e181620000ff565b6020840151909250620000f481620000ff565b809150509250929050565b6001600160a01b03811681146200011557600080fd5b50565b6114cb80620001286000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063817b1cd21161008c5780638da5cb5b116100665780638da5cb5b14610217578063c36be35714610232578063e449f34114610245578063f2fde38b1461025857600080fd5b8063817b1cd21461017657806381a36fb61461017f5780638462151c146101f757600080fd5b80630fbf0a93146100d4578063150b7a02146100e95780636ba4c1381461011a57806370a082311461012d578063715018a61461014e5780637e75dd6014610156575b600080fd5b6100e76100e23660046112d5565b61026b565b005b6100fc6100f73660046111e8565b61053a565b6040516001600160e01b031990911681526020015b60405180910390f35b6100e76101283660046112d5565b6105b0565b61014061013b3660046111b0565b6105c1565b604051908152602001610111565b6100e76106ae565b610169610164366004611282565b6106c2565b6040516101119190611345565b61014060015481565b6101c661018d366004611315565b60046020526000908152604090205462ffffff8116906301000000810465ffffffffffff1690600160481b90046001600160a01b031683565b6040805162ffffff909416845265ffffffffffff90921660208401526001600160a01b031690820152606001610111565b61020a6102053660046111b0565b6108b6565b6040516101119190611377565b6000546040516001600160a01b039091168152602001610111565b6100e7610240366004611282565b610b00565b6100e76102533660046112d5565b610b1a565b6100e76102663660046111b0565b610b27565b6000828290506001600082825461028291906113e1565b90915550600090505b82811015610534578383828181106102b357634e487b7160e01b600052603260045260246000fd5b6002546040516331a9108f60e11b8152602092909202939093013560048201819052945033926001600160a01b03169150636352211e9060240160206040518083038186803b15801561030557600080fd5b505afa158015610319573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033d91906111cc565b6001600160a01b0316146103895760405162461bcd60e51b815260206004820152600e60248201526d3737ba103cb7bab9103a37b5b2b760911b60448201526064015b60405180910390fd5b60008281526004602052604090205462ffffff16156103db5760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481cdd185ad95960921b6044820152606401610380565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561042d57600080fd5b505af1158015610441573d6000803e3d6000fd5b50506040805133815260208101869052428183015290517f36b3725f1783bad4ff05b7f4c077c3aa68eeb23a4d054ba189db4d01ac278d399350908190036060019150a16040805160608101825262ffffff808516825265ffffffffffff4281166020808501918252338587019081526000898152600490925295902093518454915195516001600160a01b0316600160481b027fffffff0000000000000000000000000000000000000000ffffffffffffffffff9690931663010000000268ffffffffffffffffff1990921693169290921791909117929092169190911790558061052c8161144f565b91505061028b565b50505050565b60006001600160a01b0385161561059e5760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f742073656e64206e66747320746f205661756c74206469726563746044820152616c7960f01b6064820152608401610380565b50630a85bd0160e11b95945050505050565b6105bd3383836000610ba0565b5050565b600080600090506000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561061857600080fd5b505afa15801561062c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610650919061132d565b905060015b8181116106a5576000818152600460205260409020546001600160a01b03868116600160481b909204161415610693576106906001846113e1565b92505b8061069d8161144f565b915050610655565b50909392505050565b6106b6610eef565b6106c06000610f49565b565b6106ca611148565b600080808080805b878110156107e1578888828181106106fa57634e487b7160e01b600052603260045260246000fd5b602090810292909201356000818152600484526040908190208151606081018352905462ffffff8116825265ffffffffffff6301000000820416958201959095526001600160a01b03600160481b909504851691810182905291995090928d161490506107795760405162461bcd60e51b8152600401610380906113bb565b602081015165ffffffffffff16620151806107948242611438565b6107a790683635c9adc5dea00000611419565b6107b191906113f9565b95506107be6064876113f9565b96506107ca87866113e1565b9450505080806107d99061144f565b9150506106d2565b506004871180156107f25750600a87105b1561081557606461080483600f611419565b61080e91906113f9565b905061087c565b6009871180156108255750601487105b15610837576064610804836019611419565b6013871180156108475750603287105b15610859576064610804836023611419565b603187111561087c57606461086f836032611419565b61087991906113f9565b90505b61088681836113e1565b915081156108a957604051806020016040528083815250955050505050506108af565b50505050505b9392505050565b60606000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090857600080fd5b505afa15801561091c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610940919061132d565b905060008167ffffffffffffffff81111561096b57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610994578160200160208202803683370190505b509050600060015b838111610a30576000818152600460205260409020546001600160a01b03878116600160481b909204161415610a1e57600081815260046020526040902054835162ffffff90911690849084908110610a0557634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610a1b6001836113e1565b91505b80610a288161144f565b91505061099c565b5060008167ffffffffffffffff811115610a5a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610a83578160200160208202803683370190505b50905060005b82811015610af657838181518110610ab157634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110610ad957634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610aee8161144f565b915050610a89565b5095945050505050565b610b08610eef565b610b158383836000610ba0565b505050565b6105bd3383836001610ba0565b610b2f610eef565b6001600160a01b038116610b945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610380565b610b9d81610f49565b50565b600080808080805b87811015610d7d57888882818110610bd057634e487b7160e01b600052603260045260246000fd5b602090810292909201356000818152600484526040908190208151606081018352905462ffffff8116825265ffffffffffff6301000000820416958201959095526001600160a01b03600160481b909504851691810182905291995090928d16149050610c4f5760405162461bcd60e51b8152600401610380906113bb565b602081015165ffffffffffff1662015180610c6a8242611438565b610c7d90683635c9adc5dea00000611419565b610c8791906113f9565b9550610c946064876113f9565b965060405180606001604052808962ffffff1681526020014265ffffffffffff1681526020018d6001600160a01b0316815250600460008a815260200190815260200160002060008201518160000160006101000a81548162ffffff021916908362ffffff16021790555060208201518160000160036101000a81548165ffffffffffff021916908365ffffffffffff16021790555060408201518160000160096101000a8154816001600160a01b0302191690836001600160a01b031602179055509050508684610d6691906113e1565b935050508080610d759061144f565b915050610ba8565b50600487118015610d8e5750600a87105b15610db1576064610da082600f611419565b610daa91906113f9565b9150610e18565b600987118015610dc15750601487105b15610dd3576064610da0826019611419565b601387118015610de35750603287105b15610df5576064610da0826023611419565b6031871115610e18576064610e0b826032611419565b610e1591906113f9565b91505b610e2282826113e1565b90508015610e91576003546040516340c10f1960e01b81526001600160a01b038b8116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b158015610e7857600080fd5b505af1158015610e8c573d6000803e3d6000fd5b505050505b8515610ea257610ea2898989610f99565b604080516001600160a01b038b168152602081018390527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a910160405180910390a1505050505050505050565b6000546001600160a01b031633146106c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610380565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008282905060016000828254610fb09190611438565b90915550600090505b8281101561114157838382818110610fe157634e487b7160e01b600052603260045260246000fd5b602090810292909201356000818152600484526040908190208151606081018352905462ffffff811682526301000000810465ffffffffffff1695820195909552600160481b9094046001600160a01b03169084018190529094503314905061105c5760405162461bcd60e51b8152600401610380906113bb565b60008381526004602090815260409182902080546001600160e81b031916905581516001600160a01b0389168152908101859052428183015290517fc486b9458a8637650d84d262414833a5a457bc91ae86b7da110386c8c3fa255b9181900360600190a16002546040516323b872dd60e01b81523060048201526001600160a01b03888116602483015260448201869052909116906323b872dd90606401600060405180830381600087803b15801561111557600080fd5b505af1158015611129573d6000803e3d6000fd5b505050505080806111399061144f565b915050610fb9565b5050505050565b60405180602001604052806001906020820280368337509192915050565b60008083601f840112611177578182fd5b50813567ffffffffffffffff81111561118e578182fd5b6020830191508360208260051b85010111156111a957600080fd5b9250929050565b6000602082840312156111c1578081fd5b81356108af81611480565b6000602082840312156111dd578081fd5b81516108af81611480565b6000806000806000608086880312156111ff578081fd5b853561120a81611480565b9450602086013561121a81611480565b935060408601359250606086013567ffffffffffffffff8082111561123d578283fd5b818801915088601f830112611250578283fd5b81358181111561125e578384fd5b89602082850101111561126f578384fd5b9699959850939650602001949392505050565b600080600060408486031215611296578283fd5b83356112a181611480565b9250602084013567ffffffffffffffff8111156112bc578283fd5b6112c886828701611166565b9497909650939450505050565b600080602083850312156112e7578182fd5b823567ffffffffffffffff8111156112fd578283fd5b61130985828601611166565b90969095509350505050565b600060208284031215611326578081fd5b5035919050565b60006020828403121561133e578081fd5b5051919050565b602081810190828460005b600181101561136d57815183529183019190830190600101611350565b5050505092915050565b6020808252825182820181905260009190848201906040850190845b818110156113af57835183529284019291840191600101611393565b50909695505050505050565b6020808252600c908201526b3737ba1030b71037bbb732b960a11b604082015260600190565b600082198211156113f4576113f461146a565b500190565b60008261141457634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156114335761143361146a565b500290565b60008282101561144a5761144a61146a565b500390565b60006000198214156114635761146361146a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610b9d57600080fdfea264697066735822122023380ea05da4cd0ebd01d37f309625cef512650d997f5446099ba945fb27d5f464736f6c63430008040033000000000000000000000000c2bbcf69b37844c4dd1e0eedb5e9f5c6e7314b2c00000000000000000000000042791fb50c5734a596cde291ec35b0beb2d12421

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063817b1cd21161008c5780638da5cb5b116100665780638da5cb5b14610217578063c36be35714610232578063e449f34114610245578063f2fde38b1461025857600080fd5b8063817b1cd21461017657806381a36fb61461017f5780638462151c146101f757600080fd5b80630fbf0a93146100d4578063150b7a02146100e95780636ba4c1381461011a57806370a082311461012d578063715018a61461014e5780637e75dd6014610156575b600080fd5b6100e76100e23660046112d5565b61026b565b005b6100fc6100f73660046111e8565b61053a565b6040516001600160e01b031990911681526020015b60405180910390f35b6100e76101283660046112d5565b6105b0565b61014061013b3660046111b0565b6105c1565b604051908152602001610111565b6100e76106ae565b610169610164366004611282565b6106c2565b6040516101119190611345565b61014060015481565b6101c661018d366004611315565b60046020526000908152604090205462ffffff8116906301000000810465ffffffffffff1690600160481b90046001600160a01b031683565b6040805162ffffff909416845265ffffffffffff90921660208401526001600160a01b031690820152606001610111565b61020a6102053660046111b0565b6108b6565b6040516101119190611377565b6000546040516001600160a01b039091168152602001610111565b6100e7610240366004611282565b610b00565b6100e76102533660046112d5565b610b1a565b6100e76102663660046111b0565b610b27565b6000828290506001600082825461028291906113e1565b90915550600090505b82811015610534578383828181106102b357634e487b7160e01b600052603260045260246000fd5b6002546040516331a9108f60e11b8152602092909202939093013560048201819052945033926001600160a01b03169150636352211e9060240160206040518083038186803b15801561030557600080fd5b505afa158015610319573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033d91906111cc565b6001600160a01b0316146103895760405162461bcd60e51b815260206004820152600e60248201526d3737ba103cb7bab9103a37b5b2b760911b60448201526064015b60405180910390fd5b60008281526004602052604090205462ffffff16156103db5760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481cdd185ad95960921b6044820152606401610380565b6002546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561042d57600080fd5b505af1158015610441573d6000803e3d6000fd5b50506040805133815260208101869052428183015290517f36b3725f1783bad4ff05b7f4c077c3aa68eeb23a4d054ba189db4d01ac278d399350908190036060019150a16040805160608101825262ffffff808516825265ffffffffffff4281166020808501918252338587019081526000898152600490925295902093518454915195516001600160a01b0316600160481b027fffffff0000000000000000000000000000000000000000ffffffffffffffffff9690931663010000000268ffffffffffffffffff1990921693169290921791909117929092169190911790558061052c8161144f565b91505061028b565b50505050565b60006001600160a01b0385161561059e5760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f742073656e64206e66747320746f205661756c74206469726563746044820152616c7960f01b6064820152608401610380565b50630a85bd0160e11b95945050505050565b6105bd3383836000610ba0565b5050565b600080600090506000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561061857600080fd5b505afa15801561062c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610650919061132d565b905060015b8181116106a5576000818152600460205260409020546001600160a01b03868116600160481b909204161415610693576106906001846113e1565b92505b8061069d8161144f565b915050610655565b50909392505050565b6106b6610eef565b6106c06000610f49565b565b6106ca611148565b600080808080805b878110156107e1578888828181106106fa57634e487b7160e01b600052603260045260246000fd5b602090810292909201356000818152600484526040908190208151606081018352905462ffffff8116825265ffffffffffff6301000000820416958201959095526001600160a01b03600160481b909504851691810182905291995090928d161490506107795760405162461bcd60e51b8152600401610380906113bb565b602081015165ffffffffffff16620151806107948242611438565b6107a790683635c9adc5dea00000611419565b6107b191906113f9565b95506107be6064876113f9565b96506107ca87866113e1565b9450505080806107d99061144f565b9150506106d2565b506004871180156107f25750600a87105b1561081557606461080483600f611419565b61080e91906113f9565b905061087c565b6009871180156108255750601487105b15610837576064610804836019611419565b6013871180156108475750603287105b15610859576064610804836023611419565b603187111561087c57606461086f836032611419565b61087991906113f9565b90505b61088681836113e1565b915081156108a957604051806020016040528083815250955050505050506108af565b50505050505b9392505050565b60606000600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561090857600080fd5b505afa15801561091c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610940919061132d565b905060008167ffffffffffffffff81111561096b57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610994578160200160208202803683370190505b509050600060015b838111610a30576000818152600460205260409020546001600160a01b03878116600160481b909204161415610a1e57600081815260046020526040902054835162ffffff90911690849084908110610a0557634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610a1b6001836113e1565b91505b80610a288161144f565b91505061099c565b5060008167ffffffffffffffff811115610a5a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610a83578160200160208202803683370190505b50905060005b82811015610af657838181518110610ab157634e487b7160e01b600052603260045260246000fd5b6020026020010151828281518110610ad957634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610aee8161144f565b915050610a89565b5095945050505050565b610b08610eef565b610b158383836000610ba0565b505050565b6105bd3383836001610ba0565b610b2f610eef565b6001600160a01b038116610b945760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610380565b610b9d81610f49565b50565b600080808080805b87811015610d7d57888882818110610bd057634e487b7160e01b600052603260045260246000fd5b602090810292909201356000818152600484526040908190208151606081018352905462ffffff8116825265ffffffffffff6301000000820416958201959095526001600160a01b03600160481b909504851691810182905291995090928d16149050610c4f5760405162461bcd60e51b8152600401610380906113bb565b602081015165ffffffffffff1662015180610c6a8242611438565b610c7d90683635c9adc5dea00000611419565b610c8791906113f9565b9550610c946064876113f9565b965060405180606001604052808962ffffff1681526020014265ffffffffffff1681526020018d6001600160a01b0316815250600460008a815260200190815260200160002060008201518160000160006101000a81548162ffffff021916908362ffffff16021790555060208201518160000160036101000a81548165ffffffffffff021916908365ffffffffffff16021790555060408201518160000160096101000a8154816001600160a01b0302191690836001600160a01b031602179055509050508684610d6691906113e1565b935050508080610d759061144f565b915050610ba8565b50600487118015610d8e5750600a87105b15610db1576064610da082600f611419565b610daa91906113f9565b9150610e18565b600987118015610dc15750601487105b15610dd3576064610da0826019611419565b601387118015610de35750603287105b15610df5576064610da0826023611419565b6031871115610e18576064610e0b826032611419565b610e1591906113f9565b91505b610e2282826113e1565b90508015610e91576003546040516340c10f1960e01b81526001600160a01b038b8116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b158015610e7857600080fd5b505af1158015610e8c573d6000803e3d6000fd5b505050505b8515610ea257610ea2898989610f99565b604080516001600160a01b038b168152602081018390527fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a910160405180910390a1505050505050505050565b6000546001600160a01b031633146106c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610380565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008282905060016000828254610fb09190611438565b90915550600090505b8281101561114157838382818110610fe157634e487b7160e01b600052603260045260246000fd5b602090810292909201356000818152600484526040908190208151606081018352905462ffffff811682526301000000810465ffffffffffff1695820195909552600160481b9094046001600160a01b03169084018190529094503314905061105c5760405162461bcd60e51b8152600401610380906113bb565b60008381526004602090815260409182902080546001600160e81b031916905581516001600160a01b0389168152908101859052428183015290517fc486b9458a8637650d84d262414833a5a457bc91ae86b7da110386c8c3fa255b9181900360600190a16002546040516323b872dd60e01b81523060048201526001600160a01b03888116602483015260448201869052909116906323b872dd90606401600060405180830381600087803b15801561111557600080fd5b505af1158015611129573d6000803e3d6000fd5b505050505080806111399061144f565b915050610fb9565b5050505050565b60405180602001604052806001906020820280368337509192915050565b60008083601f840112611177578182fd5b50813567ffffffffffffffff81111561118e578182fd5b6020830191508360208260051b85010111156111a957600080fd5b9250929050565b6000602082840312156111c1578081fd5b81356108af81611480565b6000602082840312156111dd578081fd5b81516108af81611480565b6000806000806000608086880312156111ff578081fd5b853561120a81611480565b9450602086013561121a81611480565b935060408601359250606086013567ffffffffffffffff8082111561123d578283fd5b818801915088601f830112611250578283fd5b81358181111561125e578384fd5b89602082850101111561126f578384fd5b9699959850939650602001949392505050565b600080600060408486031215611296578283fd5b83356112a181611480565b9250602084013567ffffffffffffffff8111156112bc578283fd5b6112c886828701611166565b9497909650939450505050565b600080602083850312156112e7578182fd5b823567ffffffffffffffff8111156112fd578283fd5b61130985828601611166565b90969095509350505050565b600060208284031215611326578081fd5b5035919050565b60006020828403121561133e578081fd5b5051919050565b602081810190828460005b600181101561136d57815183529183019190830190600101611350565b5050505092915050565b6020808252825182820181905260009190848201906040850190845b818110156113af57835183529284019291840191600101611393565b50909695505050505050565b6020808252600c908201526b3737ba1030b71037bbb732b960a11b604082015260600190565b600082198211156113f4576113f461146a565b500190565b60008261141457634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156114335761143361146a565b500290565b60008282101561144a5761144a61146a565b500390565b60006000198214156114635761146361146a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610b9d57600080fdfea264697066735822122023380ea05da4cd0ebd01d37f309625cef512650d997f5446099ba945fb27d5f464736f6c63430008040033

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

000000000000000000000000c2bbcf69b37844c4dd1e0eedb5e9f5c6e7314b2c00000000000000000000000042791fb50c5734a596cde291ec35b0beb2d12421

-----Decoded View---------------
Arg [0] : _nft (address): 0xC2BbcF69B37844c4Dd1e0eEdb5E9f5C6E7314b2c
Arg [1] : _token (address): 0x42791fB50C5734A596CDE291Ec35B0beB2d12421

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c2bbcf69b37844c4dd1e0eedb5e9f5c6e7314b2c
Arg [1] : 00000000000000000000000042791fb50c5734a596cde291ec35b0beb2d12421


Deployed Bytecode Sourcemap

64774:5986:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65477:614;;;;;;:::i;:::-;;:::i;:::-;;70455:298;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;;5901:33:1;;;5883:52;;5871:2;5856:18;70455:298:0;;;;;;;;66587:103;;;;;;:::i;:::-;;:::i;69541:280::-;;;;;;:::i;:::-;;:::i;:::-;;;8672:25:1;;;8660:2;8645:18;69541:280:0;8627:76:1;63051:103:0;;;:::i;68328:1139::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;64831:26::-;;;;;;65325:38;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;65325:38:0;;-1:-1:-1;;;;;65325:38:0;;;;;;;8372:8:1;8360:21;;;8342:40;;8430:14;8418:27;;;8413:2;8398:18;;8391:55;-1:-1:-1;;;;;8482:32:1;8462:18;;;8455:60;8330:2;8315:18;65325:38:0;8297:224:1;69895:554:0;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;62403:87::-;62449:7;62476:6;62403:87;;-1:-1:-1;;;;;62476:6:0;;;3532:51:1;;3520:2;3505:18;62403:87:0;3487:102:1;66696:137:0;;;;;;:::i;:::-;;:::i;66839:104::-;;;;;;:::i;:::-;;:::i;63309:201::-;;;;;;:::i;:::-;;:::i;65477:614::-;65537:15;65574:8;;:15;;65559:11;;:30;;;;;;;:::i;:::-;;;;-1:-1:-1;65601:6:0;;-1:-1:-1;65596:490:0;65613:19;;;65596:490;;;65658:8;;65667:1;65658:11;;;;;-1:-1:-1;;;65658:11:0;;;;;;;;;65686:3;;:20;;-1:-1:-1;;;65686:20:0;;65658:11;;;;;;;;;;65686:20;;;8672:25:1;;;65658:11:0;-1:-1:-1;65710:10:0;;-1:-1:-1;;;;;65686:3:0;;-1:-1:-1;65686:11:0;;8645:18:1;;65686:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;65686:34:0;;65678:61;;;;-1:-1:-1;;;65678:61:0;;6555:2:1;65678:61:0;;;6537:21:1;6594:2;6574:18;;;6567:30;-1:-1:-1;;;6613:18:1;;;6606:44;6667:18;;65678:61:0;;;;;;;;;65756:14;;;;:5;:14;;;;;:22;;;:27;65748:54;;;;-1:-1:-1;;;65748:54:0;;8003:2:1;65748:54:0;;;7985:21:1;8042:2;8022:18;;;8015:30;-1:-1:-1;;;8061:18:1;;;8054:44;8115:18;;65748:54:0;7975:164:1;65748:54:0;65813:3;;:52;;-1:-1:-1;;;65813:52:0;;65830:10;65813:52;;;3834:34:1;65850:4:0;3884:18:1;;;3877:43;3936:18;;;3929:34;;;-1:-1:-1;;;;;65813:3:0;;;;:16;;3769:18:1;;65813:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;65879:47:0;;;65889:10;4455:51:1;;4537:2;4522:18;;4515:34;;;65910:15:0;4565:18:1;;;4558:34;65879:47:0;;;;-1:-1:-1;65879:47:0;;;;4443:2:1;65879:47:0;;-1:-1:-1;65879:47:0;65954:124;;;;;;;;;;;;;;;66052:15;65954:124;;;;;;;;;65978:10;65954:124;;;;;;-1:-1:-1;65937:14:0;;;:5;:14;;;;;;:141;;;;;;;;-1:-1:-1;;;;;65937:141:0;-1:-1:-1;;;65937:141:0;;;;;;;;-1:-1:-1;;65937:141:0;;;;;;;;;;;;;;;;;;;;;;;65634:3;;;;:::i;:::-;;;;65596:490;;;;65477:614;;;:::o;70455:298::-;70604:6;-1:-1:-1;;;;;70629:20:0;;;70621:67;;;;-1:-1:-1;;;70621:67:0;;7600:2:1;70621:67:0;;;7582:21:1;7639:2;7619:18;;;7612:30;7678:34;7658:18;;;7651:62;-1:-1:-1;;;7729:18:1;;;7722:32;7771:19;;70621:67:0;7572:224:1;70621:67:0;-1:-1:-1;;;;70455:298:0;;;;;;;:::o;66587:103::-;66649:35;66656:10;66668:8;;66678:5;66649:6;:35::i;:::-;66587:103;;:::o;69541:280::-;69598:7;69614:15;69632:1;69614:19;;69640:14;69657:3;;;;;;;;;-1:-1:-1;;;;;69657:3:0;-1:-1:-1;;;;;69657:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;69640:34;-1:-1:-1;69694:1:0;69681:114;69702:6;69697:1;:11;69681:114;;69728:8;;;;:5;:8;;;;;:14;-1:-1:-1;;;;;69728:25:0;;;-1:-1:-1;;;69728:14:0;;;;:25;69724:64;;;69766:12;69777:1;69766:12;;:::i;:::-;;;69724:64;69710:3;;;;:::i;:::-;;;;69681:114;;;-1:-1:-1;69808:7:0;;69541:280;-1:-1:-1;;;69541:280:0:o;63051:103::-;62289:13;:11;:13::i;:::-;63116:30:::1;63143:1;63116:18;:30::i;:::-;63051:103::o:0;68328:1139::-;68418:22;;:::i;:::-;68450:15;;;;;;68586:362;68603:19;;;68586:362;;;68648:8;;68657:1;68648:11;;;;;-1:-1:-1;;;68648:11:0;;;;;;;;;;;;;;;;;;68668:19;68690:14;;;:5;:14;;;;;;;68668:36;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;68668:36:0;;;;;;;;;;;68648:11;;-1:-1:-1;68668:36:0;;68721:23;;;;-1:-1:-1;68713:48:0;;;;-1:-1:-1;;;68713:48:0;;;;;;;:::i;:::-;68789:16;;;;68770:35;;68871:5;68841:26;68770:35;68841:15;:26;:::i;:::-;68827:41;;:10;:41;:::i;:::-;:49;;;;:::i;:::-;68814:62;-1:-1:-1;68894:16:0;68907:3;68814:62;68894:16;:::i;:::-;68885:25;-1:-1:-1;68919:21:0;68885:25;68919:21;;:::i;:::-;;;68586:362;;68624:3;;;;;:::i;:::-;;;;68586:362;;;-1:-1:-1;68976:1:0;68958:19;;:43;;;;-1:-1:-1;68999:2:0;68981:20;;68958:43;68954:400;;;69042:3;69023:16;:11;69037:2;69023:16;:::i;:::-;:22;;;;:::i;:::-;69015:30;;68954:400;;;69082:1;69064:19;;:43;;;;-1:-1:-1;69105:2:0;69087:20;;69064:43;69060:294;;;69148:3;69129:16;:11;69143:2;69129:16;:::i;69060:294::-;69190:2;69172:20;;:44;;;;-1:-1:-1;69214:2:0;69196:20;;69172:44;69168:186;;;69257:3;69238:16;:11;69252:2;69238:16;:::i;69168:186::-;69299:2;69281:20;;69277:77;;;69342:3;69323:16;:11;69337:2;69323:16;:::i;:::-;:22;;;;:::i;:::-;69315:30;;69277:77;69378:19;69392:5;69378:11;:19;:::i;:::-;69364:33;-1:-1:-1;69410:15:0;;69406:58;;69436:20;;;;;;;;69444:11;69436:20;;;;;;;;;;;;69406:58;68328:1139;;;;;;;;;;;:::o;69895:554::-;69956:28;69995:14;70012:3;;;;;;;;;-1:-1:-1;;;;;70012:3:0;-1:-1:-1;;;;;70012:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;69995:34;;70036:20;70073:6;70059:21;;;;;;-1:-1:-1;;;70059:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;70059:21:0;-1:-1:-1;70036:44:0;-1:-1:-1;70089:13:0;70132:1;70113:181;70146:6;70135:7;:17;70113:181;;70178:14;;;;:5;:14;;;;;:20;-1:-1:-1;;;;;70178:31:0;;;-1:-1:-1;;;70178:20:0;;;;:31;70174:113;;;70235:14;;;;:5;:14;;;;;:22;70222:10;;70235:22;;;;;70222:3;;70226:5;;70222:10;;;;-1:-1:-1;;;70222:10:0;;;;;;;;;;;;;;;;;;:35;70268:9;70276:1;70268:9;;:::i;:::-;;;70174:113;70154:9;;;;:::i;:::-;;;;70113:181;;;;70302:23;70342:5;70328:20;;;;;;-1:-1:-1;;;70328:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;70328:20:0;;70302:46;;70359:6;70355:67;70375:5;70371:1;:9;70355:67;;;70408:3;70412:1;70408:6;;;;;;-1:-1:-1;;;70408:6:0;;;;;;;;;;;;;;;70396;70403:1;70396:9;;;;;;-1:-1:-1;;;70396:9:0;;;;;;;;;;;;;;;;;;:18;70382:3;;;;:::i;:::-;;;;70355:67;;;-1:-1:-1;70437:6:0;69895:554;-1:-1:-1;;;;;69895:554:0:o;66696:137::-;62289:13;:11;:13::i;:::-;66795:32:::1;66802:7;66811:8;;66821:5;66795:6;:32::i;:::-;66696:137:::0;;;:::o;66839:104::-;66903:34;66910:10;66922:8;;66932:4;66903:6;:34::i;63309:201::-;62289:13;:11;:13::i;:::-;-1:-1:-1;;;;;63398:22:0;::::1;63390:73;;;::::0;-1:-1:-1;;;63390:73:0;;6148:2:1;63390:73:0::1;::::0;::::1;6130:21:1::0;6187:2;6167:18;;;6160:30;6226:34;6206:18;;;6199:62;-1:-1:-1;;;6277:18:1;;;6270:36;6323:19;;63390:73:0::1;6120:228:1::0;63390:73:0::1;63474:28;63493:8;63474:18;:28::i;:::-;63309:201:::0;:::o;66949:1373::-;67042:15;;;;;;67174:510;67191:19;;;67174:510;;;67236:8;;67245:1;67236:11;;;;;-1:-1:-1;;;67236:11:0;;;;;;;;;;;;;;;;;;67256:19;67278:14;;;:5;:14;;;;;;;67256:36;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;67256:36:0;;;;;;;;;;;67236:11;;-1:-1:-1;67256:36:0;;67309:23;;;;-1:-1:-1;67301:48:0;;;;-1:-1:-1;;;67301:48:0;;;;;;;:::i;:::-;67377:16;;;;67358:35;;67459:5;67429:26;67358:35;67429:15;:26;:::i;:::-;67415:41;;:10;:41;:::i;:::-;:49;;;;:::i;:::-;67402:62;-1:-1:-1;67483:16:0;67496:3;67402:62;67483:16;:::i;:::-;67474:25;;67525:121;;;;;;;;67583:7;67525:121;;;;;;67620:15;67525:121;;;;;;67549:7;-1:-1:-1;;;;;67525:121:0;;;;67508:5;:14;67514:7;67508:14;;;;;;;;;;;:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;67508:138:0;;;;;-1:-1:-1;;;;;67508:138:0;;;;;;;;;67670:6;67655:21;;;;;:::i;:::-;;;67174:510;;67212:3;;;;;:::i;:::-;;;;67174:510;;;-1:-1:-1;67712:1:0;67694:19;;:43;;;;-1:-1:-1;67735:2:0;67717:20;;67694:43;67690:400;;;67778:3;67759:16;:11;67773:2;67759:16;:::i;:::-;:22;;;;:::i;:::-;67751:30;;67690:400;;;67818:1;67800:19;;:43;;;;-1:-1:-1;67841:2:0;67823:20;;67800:43;67796:294;;;67884:3;67865:16;:11;67879:2;67865:16;:::i;67796:294::-;67926:2;67908:20;;:44;;;;-1:-1:-1;67950:2:0;67932:20;;67908:44;67904:186;;;67993:3;67974:16;:11;67988:2;67974:16;:::i;67904:186::-;68035:2;68017:20;;68013:77;;;68078:3;68059:16;:11;68073:2;68059:16;:::i;:::-;:22;;;;:::i;:::-;68051:30;;68013:77;68112:19;68126:5;68112:11;:19;:::i;:::-;68098:33;-1:-1:-1;68142:15:0;;68138:70;;68168:5;;:32;;-1:-1:-1;;;68168:32:0;;-1:-1:-1;;;;;4166:32:1;;;68168::0;;;4148:51:1;4215:18;;;4208:34;;;68168:5:0;;;;:10;;4121:18:1;;68168:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68138:70;68218:8;68214:62;;;68237:31;68250:7;68259:8;;68237:12;:31::i;:::-;68287:29;;;-1:-1:-1;;;;;4166:32:1;;4148:51;;4230:2;4215:18;;4208:34;;;68287:29:0;;4121:18:1;68287:29:0;;;;;;;66949:1373;;;;;;;;;:::o;62568:132::-;62449:7;62476:6;-1:-1:-1;;;;;62476:6:0;25190:10;62632:23;62624:68;;;;-1:-1:-1;;;62624:68:0;;6898:2:1;62624:68:0;;;6880:21:1;;;6917:18;;;6910:30;6976:34;6956:18;;;6949:62;7028:18;;62624:68:0;6870:182:1;63670:191:0;63744:16;63763:6;;-1:-1:-1;;;;;63780:17:0;;;-1:-1:-1;;;;;;63780:17:0;;;;;;63813:40;;63763:6;;;;;;;63813:40;;63744:16;63813:40;63670:191;;:::o;66097:484::-;66181:15;66218:8;;:15;;66203:11;;:30;;;;;;;:::i;:::-;;;;-1:-1:-1;66245:6:0;;-1:-1:-1;66240:336:0;66257:19;;;66240:336;;;66302:8;;66311:1;66302:11;;;;;-1:-1:-1;;;66302:11:0;;;;;;;;;;;;;;;;;;66322:19;66344:14;;;:5;:14;;;;;;;66322:36;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;66322:36:0;;;-1:-1:-1;;;;;66322:36:0;;;;;;;66302:11;;-1:-1:-1;66391:10:0;66375:26;;-1:-1:-1;66367:51:0;;;;-1:-1:-1;;;66367:51:0;;;;;;;:::i;:::-;66436:14;;;;:5;:14;;;;;;;;;66429:21;;-1:-1:-1;;;;;;66429:21:0;;;66464:46;;-1:-1:-1;;;;;4473:32:1;;4455:51;;4522:18;;;4515:34;;;66494:15:0;4565:18:1;;;4558:34;66464:46:0;;;;;;;4443:2:1;66464:46:0;;;66519:3;;:49;;-1:-1:-1;;;66519:49:0;;66544:4;66519:49;;;3834:34:1;-1:-1:-1;;;;;3904:15:1;;;3884:18;;;3877:43;3936:18;;;3929:34;;;66519:3:0;;;;:16;;3769:18:1;;66519:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66240:336;66278:3;;;;;:::i;:::-;;;;66240:336;;;;66097:484;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:395:1:-;77:8;87:6;141:3;134:4;126:6;122:17;118:27;108:2;;166:8;156;149:26;108:2;-1:-1:-1;196:20:1;;239:18;228:30;;225:2;;;278:8;268;261:26;225:2;322:4;314:6;310:17;298:29;;382:3;375:4;365:6;362:1;358:14;350:6;346:27;342:38;339:47;336:2;;;399:1;396;389:12;336:2;98:311;;;;;:::o;414:257::-;473:6;526:2;514:9;505:7;501:23;497:32;494:2;;;547:6;539;532:22;494:2;591:9;578:23;610:31;635:5;610:31;:::i;676:261::-;746:6;799:2;787:9;778:7;774:23;770:32;767:2;;;820:6;812;805:22;767:2;857:9;851:16;876:31;901:5;876:31;:::i;942:986::-;1039:6;1047;1055;1063;1071;1124:3;1112:9;1103:7;1099:23;1095:33;1092:2;;;1146:6;1138;1131:22;1092:2;1190:9;1177:23;1209:31;1234:5;1209:31;:::i;:::-;1259:5;-1:-1:-1;1316:2:1;1301:18;;1288:32;1329:33;1288:32;1329:33;:::i;:::-;1381:7;-1:-1:-1;1435:2:1;1420:18;;1407:32;;-1:-1:-1;1490:2:1;1475:18;;1462:32;1513:18;1543:14;;;1540:2;;;1575:6;1567;1560:22;1540:2;1618:6;1607:9;1603:22;1593:32;;1663:7;1656:4;1652:2;1648:13;1644:27;1634:2;;1690:6;1682;1675:22;1634:2;1735;1722:16;1761:2;1753:6;1750:14;1747:2;;;1782:6;1774;1767:22;1747:2;1832:7;1827:2;1818:6;1814:2;1810:15;1806:24;1803:37;1800:2;;;1858:6;1850;1843:22;1800:2;1082:846;;;;-1:-1:-1;1082:846:1;;-1:-1:-1;1894:2:1;1886:11;;1916:6;1082:846;-1:-1:-1;;;1082:846:1:o;1933:592::-;2028:6;2036;2044;2097:2;2085:9;2076:7;2072:23;2068:32;2065:2;;;2118:6;2110;2103:22;2065:2;2162:9;2149:23;2181:31;2206:5;2181:31;:::i;:::-;2231:5;-1:-1:-1;2287:2:1;2272:18;;2259:32;2314:18;2303:30;;2300:2;;;2351:6;2343;2336:22;2300:2;2395:70;2457:7;2448:6;2437:9;2433:22;2395:70;:::i;:::-;2055:470;;2484:8;;-1:-1:-1;2369:96:1;;-1:-1:-1;;;;2055:470:1:o;2530:457::-;2616:6;2624;2677:2;2665:9;2656:7;2652:23;2648:32;2645:2;;;2698:6;2690;2683:22;2645:2;2743:9;2730:23;2776:18;2768:6;2765:30;2762:2;;;2813:6;2805;2798:22;2762:2;2857:70;2919:7;2910:6;2899:9;2895:22;2857:70;:::i;:::-;2946:8;;2831:96;;-1:-1:-1;2635:352:1;-1:-1:-1;;;;2635:352:1:o;2992:190::-;3051:6;3104:2;3092:9;3083:7;3079:23;3075:32;3072:2;;;3125:6;3117;3110:22;3072:2;-1:-1:-1;3153:23:1;;3062:120;-1:-1:-1;3062:120:1:o;3187:194::-;3257:6;3310:2;3298:9;3289:7;3285:23;3281:32;3278:2;;;3331:6;3323;3316:22;3278:2;-1:-1:-1;3359:16:1;;3268:113;-1:-1:-1;3268:113:1:o;4603:491::-;4770:2;4789:18;;;;4793:9;4884:6;4741:4;4918:170;4932:4;4929:1;4926:11;4918:170;;;4994:13;;4982:26;;5028:12;;;;5063:15;;;;4952:4;4945:12;4918:170;;;4922:3;;;;4750:344;;;;:::o;5099:635::-;5270:2;5322:21;;;5392:13;;5295:18;;;5414:22;;;5241:4;;5270:2;5493:15;;;;5467:2;5452:18;;;5241:4;5539:169;5553:6;5550:1;5547:13;5539:169;;;5614:13;;5602:26;;5683:15;;;;5648:12;;;;5575:1;5568:9;5539:169;;;-1:-1:-1;5725:3:1;;5250:484;-1:-1:-1;;;;;;5250:484:1:o;7057:336::-;7259:2;7241:21;;;7298:2;7278:18;;;7271:30;-1:-1:-1;;;7332:2:1;7317:18;;7310:42;7384:2;7369:18;;7231:162::o;8708:128::-;8748:3;8779:1;8775:6;8772:1;8769:13;8766:2;;;8785:18;;:::i;:::-;-1:-1:-1;8821:9:1;;8756:80::o;8841:217::-;8881:1;8907;8897:2;;-1:-1:-1;;;8932:31:1;;8986:4;8983:1;8976:15;9014:4;8939:1;9004:15;8897:2;-1:-1:-1;9043:9:1;;8887:171::o;9063:168::-;9103:7;9169:1;9165;9161:6;9157:14;9154:1;9151:21;9146:1;9139:9;9132:17;9128:45;9125:2;;;9176:18;;:::i;:::-;-1:-1:-1;9216:9:1;;9115:116::o;9236:125::-;9276:4;9304:1;9301;9298:8;9295:2;;;9309:18;;:::i;:::-;-1:-1:-1;9346:9:1;;9285:76::o;9366:135::-;9405:3;-1:-1:-1;;9426:17:1;;9423:2;;;9446:18;;:::i;:::-;-1:-1:-1;9493:1:1;9482:13;;9413:88::o;9506:127::-;9567:10;9562:3;9558:20;9555:1;9548:31;9598:4;9595:1;9588:15;9622:4;9619:1;9612:15;9638:131;-1:-1:-1;;;;;9713:31:1;;9703:42;;9693:2;;9759:1;9756;9749:12

Swarm Source

ipfs://23380ea05da4cd0ebd01d37f309625cef512650d997f5446099ba945fb27d5f4

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.