Contract 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 13

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd32bc5261b9b1977a0c10ae258d482d99306aa3c973d9a03f6f7f7fa4cf06db1Set Approval For...2040758022024-04-23 18:04:119 hrs 15 mins ago0xe783cc1e5501dab747af77cab4ff75d0d0a0569b IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000097 0.01
0x5a0a921e849288885bd6174b996680f001230c50e3db52c31db357240716aaffSet Approval For...2040149452024-04-23 13:44:3013 hrs 35 mins ago0xdc1e9a21b7ed8dfb87c997e7d0405e2cfcfa8938 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000000930.012251
0x078222941333d303f53eb80f592c8c2fbe643a2bd72d163daad5c53fd440c9c7Set Approval For...2039998122024-04-23 12:40:1114 hrs 39 mins ago0x92ee18538c392361f1923794aa62bd3a6550c8b1 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000000580.01
0x52020f7c87053aca8f4a1c6b82aa9b17108be6c206425f609af0bceeaffc075bSet Approval For...2039962712024-04-23 12:25:0014 hrs 55 mins ago0x92ee18538c392361f1923794aa62bd3a6550c8b1 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000000650.010859
0x92998cbcfd1e0ba073f5d0971c33a81d47b9d30a0b9e669430582bcb602c25cbSet Approval For...2036990802024-04-22 15:30:411 day 11 hrs ago0xde7cdafddf0421e41046af731f69115011e8d457 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000001380.01
0xe0b94b37643ef41922f26b1d38cd3ce179c3540c1793922a3016f99ab0bee11cSafe Transfer Fr...2036967592024-04-22 15:20:461 day 11 hrs ago0x7d2605df75f98cf7c1d3ac40d03845fcd342c6a1 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000001850.01
0xdd55b485d47a08fb034da9072477ae01a51535b437da4fb9787221559b1d3305Set Approval For...2036757762024-04-22 13:51:231 day 13 hrs ago0x08f8f2e7d15b821cf2a3bb6824279d473dd7508b IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000111 0.01
0x95628726d66b88f908e4c5e6b5d66aa73ea0ea801acb4f5e101100d2b4b84cc3Set Approval For...2034023882024-04-21 18:39:422 days 8 hrs ago0xb9c8379463c5a19f5565ff10941a484759db8189 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.0000008 0.01
0x76e523d23a274d542c5d0032af2e7991b338e332a9a54046164e5e4b0eeb7c4cSet Approval For...2033903732024-04-21 17:49:222 days 9 hrs ago0x9bf2df3e97a2a181221424ddc14b18400e94f776 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000079 0.01
0x6a60b3bf772cd03ded7140d0c74877ccfef0659dba0d49c5a0dfac4aaeed57fdSet Approval For...2033069202024-04-21 11:58:242 days 15 hrs ago0x3db66df148787810cd9a14d0d891337e86f8f7c4 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000078 0.01
0xe420d4957cc6e1131672a80ed9b4bc06fb111c9481d8897ae6ff6959eb538fedSet Approval For...2030046312024-04-20 14:48:113 days 12 hrs ago0x7798ba9512b5a684c12e31518923ea4221a41fb9 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.0000009 0.01
0xe1a6b27891eb8d6d13836b0ebea6de8b2cc388749410f6c5afd8220e17410628Set Approval For...2029378242024-04-20 10:07:133 days 17 hrs ago0x4faac6e764fc268974142e818066912ad7475b2a IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000057 0.01
0xed62ee21ed242a00a41a59110e8580a7f533ea8393b08333672a49e3547b513eSafe Transfer Fr...2028450472024-04-20 3:38:553 days 23 hrs ago0xfc6a1b55450c81c73a449e2c734bf6139e65da24 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000000490.01
0x06be74e9e2ff8c82f873b4357250fc68bd53d7ba7b88c1409f2a4ff12d367d85Safe Transfer Fr...2028448222024-04-20 3:37:593 days 23 hrs ago0xfc6a1b55450c81c73a449e2c734bf6139e65da24 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000001060.01
0x36a127053cdd4bbf396a1218b6b59f7231adb75e7a7764198eaf1f501a210576Set Approval For...2027148522024-04-19 18:26:404 days 8 hrs ago0x0101eaee8d0013234c32936963ff504a9954220b IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000085 0.01
0x5362e92456dd6aba60884f55f8e52cdac19f6f99ca9a25d0e10b7675fed0e7d4Set Approval For...2026692292024-04-19 15:11:554 days 12 hrs ago0x403aaf19c255f33048cf596bafc4d3151b40a958 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.0000010.01
0x792d6230502359ccd2abdef291c503d9aee5decf17a27d92a10d774b9a5ebc40Safe Transfer Fr...2024215252024-04-18 21:34:305 days 5 hrs ago0x69295e9634627efb65c214f91241d482b9860a54 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.0000013 0.01
0x77636549c2b57c126b536aefefcf634c76c4cc2d42ff94812144c188866f38c3Safe Transfer Fr...2023799422024-04-18 18:36:525 days 8 hrs ago0x588ccd15537d7f51865022f5b7c385d4d0340127 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000132 0.010208
0x743e146444ecc4acb8e78c7eb03441e86c435d6de722836f79bafb3cd18f5e5fSet Approval For...2022986692024-04-18 12:47:535 days 14 hrs ago0xc4c1477a0c9ddb816971a447f3df61cab110ba96 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000137 0.02263
0x84866eef377ab99ac9de63e8c106e0e4c5b115f4710b72512f5c0effa8374e25Set Approval For...2020791962024-04-17 21:18:356 days 6 hrs ago0x2602788c9223ad4be6dc4232b5b988251fe12c81 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000000870.01
0x63401a3c2ecaf38f8565b64f8b61d86485515bf6092d6e5fc96d86134fee3cd4Safe Transfer Fr...2016644952024-04-16 16:01:477 days 11 hrs ago0x6490077d2da557a239384b685437940adf77c7c4 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000001630.011318
0xde9df1a1b75302bbed6caf1b0151d98a060f6bab444bed602b28ebd6ae828b3aSet Approval For...2015641262024-04-16 8:55:157 days 18 hrs ago0xda80610062f9bce2c5c7cf59d4868436a4a56b5b IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000000950.01
0x32115bb2ea5d001374eaa043d53069570c6bbc4a4bfb9190f48f432a3a39a290Set Approval For...2010860572024-04-14 23:20:349 days 3 hrs ago0x6490077d2da557a239384b685437940adf77c7c4 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.000000880.01
0x3bf754013f970d44cf88de0cedbfca0b30aefab38889c42690da698e3c547308Set Approval For...2003091202024-04-12 16:46:0111 days 10 hrs ago0x0101eaee8d0013234c32936963ff504a9954220b IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000157 0.01
0x6e96b7c094c61def560af6254e7f36f83d51dfafae1995617b4b1109a59aa14dSet Approval For...2003019662024-04-12 16:15:5511 days 11 hrs ago0x2bd864155eed27a60c5b634959281a30292022b7 IN  0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH0.00000132 0.010302
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x65c6c22900996d1fab84282201acc85a42f5aeab1f4c7b5381d1d14d53a2bb8e720757582023-03-21 9:33:45399 days 17 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90x000000000000aaeb6d7670e522a718067333cd4e0 ETH
0x65c6c22900996d1fab84282201acc85a42f5aeab1f4c7b5381d1d14d53a2bb8e720757582023-03-21 9:33:45399 days 17 hrs ago 0x1e0049783f008a0085193e00003d00cd54003c71 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x8fec3e3fc0669ebe802fd4ad1f182e4bc1c4e9baec1b17c050827fea8ab7564f720457442023-03-21 7:30:51399 days 19 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90x000000000000aaeb6d7670e522a718067333cd4e0 ETH
0xce4cbc2b49a73b8519d9192086fe32da8b02f5b6f5bc5937fb9ad3d9ad5ae2f2720457052023-03-21 7:30:41399 days 19 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90x000000000000aaeb6d7670e522a718067333cd4e0 ETH
0xfe9d4b978abb901196284dbba0b8cd895facd9db7129865c84844f3df3470183720332192023-03-21 6:39:26399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90x000000000000aaeb6d7670e522a718067333cd4e0 ETH
0xfe9d4b978abb901196284dbba0b8cd895facd9db7129865c84844f3df3470183720332192023-03-21 6:39:26399 days 20 hrs ago 0xd402e48d1ce4a3d0fcd3d76aa7fb62f30c2fbbc6 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x2bcfa5a05ef4099a50b8b997284c52bc7442158c66ddaad2b5b8a31509ef22eb720330182023-03-21 6:38:36399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x2bcfa5a05ef4099a50b8b997284c52bc7442158c66ddaad2b5b8a31509ef22eb720330182023-03-21 6:38:36399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x2bcfa5a05ef4099a50b8b997284c52bc7442158c66ddaad2b5b8a31509ef22eb720330182023-03-21 6:38:36399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x2bcfa5a05ef4099a50b8b997284c52bc7442158c66ddaad2b5b8a31509ef22eb720330182023-03-21 6:38:36399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x2bcfa5a05ef4099a50b8b997284c52bc7442158c66ddaad2b5b8a31509ef22eb720330182023-03-21 6:38:36399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x71579fdcdd8815b0b1c4a4ac2ea5442c6974bf2518ffb8e1f1ce614b675524c4720328912023-03-21 6:38:04399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x71579fdcdd8815b0b1c4a4ac2ea5442c6974bf2518ffb8e1f1ce614b675524c4720328912023-03-21 6:38:04399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x71579fdcdd8815b0b1c4a4ac2ea5442c6974bf2518ffb8e1f1ce614b675524c4720328912023-03-21 6:38:04399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x71579fdcdd8815b0b1c4a4ac2ea5442c6974bf2518ffb8e1f1ce614b675524c4720328912023-03-21 6:38:04399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90x000000000000aaeb6d7670e522a718067333cd4e0 ETH
0x71579fdcdd8815b0b1c4a4ac2ea5442c6974bf2518ffb8e1f1ce614b675524c4720328912023-03-21 6:38:04399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x71579fdcdd8815b0b1c4a4ac2ea5442c6974bf2518ffb8e1f1ce614b675524c4720328912023-03-21 6:38:04399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x71579fdcdd8815b0b1c4a4ac2ea5442c6974bf2518ffb8e1f1ce614b675524c4720328912023-03-21 6:38:04399 days 20 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x351c49f20f92958fe2beb7777a8359a1a308949b0943661e6160a119cbaa067a719967722023-03-21 4:08:48399 days 23 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x351c49f20f92958fe2beb7777a8359a1a308949b0943661e6160a119cbaa067a719967722023-03-21 4:08:48399 days 23 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x351c49f20f92958fe2beb7777a8359a1a308949b0943661e6160a119cbaa067a719967722023-03-21 4:08:48399 days 23 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x794075aef95d9bd7e5cfd0ea8a1e68493b7e0e230 ETH
0x351c49f20f92958fe2beb7777a8359a1a308949b0943661e6160a119cbaa067a719967722023-03-21 4:08:48399 days 23 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90x000000000000aaeb6d7670e522a718067333cd4e0 ETH
0x351c49f20f92958fe2beb7777a8359a1a308949b0943661e6160a119cbaa067a719967722023-03-21 4:08:48399 days 23 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
0x351c49f20f92958fe2beb7777a8359a1a308949b0943661e6160a119cbaa067a719967722023-03-21 4:08:48399 days 23 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90x000000000000aaeb6d7670e522a718067333cd4e0 ETH
0x351c49f20f92958fe2beb7777a8359a1a308949b0943661e6160a119cbaa067a719967722023-03-21 4:08:48399 days 23 hrs ago 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b9 0x17798ba794ad94dad0b7d3f4b9bc2e9f6486d4b90 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xBFf415B75e7716B4d1Cd68bcfc327750412fD4Bd
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
GNFT

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 2 of 21 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 3 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 4 of 21 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

File 5 of 21 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @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 = _ownerOf(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 or 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 or 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 or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 _ownerOf(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, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

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

    /**
     * @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, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @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. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

File 6 of 21 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @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 See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        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 7 of 21 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @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 8 of 21 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @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 9 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

File 10 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 11 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 13 of 21 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 14 of 21 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @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 15 of 21 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 16 of 21 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 17 of 21 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _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) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _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 18 of 21 : GNFTFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";

interface IGBT {
    function currentPrice() external view returns (uint256);
    function getProtocol() external view returns (address);
    function initSupply() external view returns (uint256);
    function artist() external view returns (address);
}

contract GNFT is ERC721Enumerable, DefaultOperatorFilterer, ReentrancyGuard {
    using Counters for Counters.Counter;
    using SafeERC20 for IERC20;

    Counters.Counter private _tokenIdCounter;

    // Fee
    uint256 public immutable bFee; // redemption fee
    uint256 public constant DIVISOR = 1000;

    // Token
    string public baseTokenURI;
    
    // Protocol
    address public immutable GBT;
    string public _contractURI;
    uint256 public immutable maxSupply;

    mapping (uint256 => int256) public gumballIndex;
    uint256[] public gumballs;

    event Swap(address indexed user, uint256 amount);
    event ExactSwap(address indexed user, uint256[] id);
    event Redeem(address indexed user, uint256[] id);
    event SetBaseURI(string uri);
    event SetContractURI(string uri);

    constructor(
        string memory name,
        string memory symbol,
        string[] memory _URIs,
        address _GBT,
        uint256 _bFee
        ) ERC721(name, symbol) {
        require(_bFee <= 100, "Redemption fee too high");
        baseTokenURI = _URIs[0];
        _contractURI = _URIs[1];
        GBT = _GBT;
        bFee = _bFee;
        maxSupply = IGBT(GBT).initSupply() / 1e18;
    }

    ////////////////////
    ////// Public //////
    ////////////////////

    function gumballsLength() external view returns (uint256) {
        return gumballs.length;
    }

    function owner() external view returns (address) {	
        return IGBT(GBT).artist();	
    }

    /** Returns bal of {GBT} */
    function tokenBal() external view returns (uint256) {
        return IERC20(GBT).balanceOf(address(this));
    }

    /** Returns bal of {Gumball} */
    function nftBal() external view returns (uint256) {
        return balanceOf(address(this));
    }

    function contractURI() external view returns (string memory) {
        return _contractURI;
    }

    function currentPrice() external view returns (uint256) {
        return IGBT(GBT).currentPrice();
    }

    //////////////////////
    ////// External //////
    //////////////////////

    /** @dev Allows user to swap {GBT} for an exact {Gumball} that has already been minted
      * @param id is an array of {Gumball}s the user is swapping for 
    */
    function swapForExact(uint256[] calldata id) external nonReentrant {
        require(IERC20(GBT).balanceOf(msg.sender) >= enWei(id.length), "Insuffient funds");
        require(id.length != 0, "Parameter length cannot be zero");

        uint256 before = IERC20(GBT).balanceOf(address(this));

        for(uint256 i = 0; i < id.length; i ++) {
            require(gumballIndex[id[i]] != -1, "NFT removed from mapping, sentinel number (-1)");
            _pop(uint256(gumballIndex[id[i]]));
            gumballIndex[id[i]] = -1;
            IERC721(address(this)).transferFrom(address(this), msg.sender, id[i]);
        }
        
        IERC20(GBT).safeTransferFrom(msg.sender, address(this), enWei(id.length));
        require(IERC20(GBT).balanceOf(address(this)) >= before + enWei(id.length), "Contract balance underflow");

        emit ExactSwap(msg.sender, id);
    }

    /** @dev Allows the user to swap a quantity of {token} > 1 
      * @param _amount is the number of tokens to mint 
    */
    function swap(uint256 _amount) external nonReentrant {
        require(enETH(_amount) * 1e18 == _amount, "Whole GBTs only");
        require(IERC20(GBT).balanceOf(msg.sender) >= enWei(1), "Insuffient funds");
        require(_amount > 0, "Amount cannot be zero");

        uint256 before = IERC20(GBT).balanceOf(address(this));

        IERC20(GBT).safeTransferFrom(msg.sender, address(this), _amount);

        for(uint256 i = 0; i < enETH(_amount); i++) {
            mint(msg.sender);
        }
        require(IERC20(GBT).balanceOf(address(this)) >= before + _amount, "Contract balance underflow");

        emit Swap(msg.sender, _amount);
    }

    /** @dev Allows user to swap their gumball(s) to the contract for a payout of {GBT} 
      * @param _id is an array of ids of the gumball token(s) swapped in
    */
    function redeem(uint256[] calldata _id) external nonReentrant {
        require(IERC721(address(this)).balanceOf(msg.sender) >= _id.length, "Insuffient Balance");
        require(_id.length != 0, "Parameter length cannot be zero");

        uint256 before = IERC721(address(this)).balanceOf(address(this));
        uint256 burnAmount = enWei(_id.length) * bFee / DIVISOR;
    
        for (uint256 i = 0; i < _id.length; i++) {
            gumballs.push(_id[i]);
            gumballIndex[_id[i]] = int256(gumballs.length - 1);
            IERC721(address(this)).transferFrom(msg.sender, address(this), _id[i]);
        }

        IERC20(GBT).safeTransfer(GBT, burnAmount);
        IERC20(GBT).safeTransfer(msg.sender, enWei(_id.length) - burnAmount);

        require(IERC721(address(this)).balanceOf(address(this)) >= before + _id.length, "Bad Swap");

        emit Redeem(msg.sender, _id);
    }

    //////////////////////
    ////// Internal //////
    //////////////////////

    function enWei(uint256 _num) internal pure returns(uint256) {
        return _num * 10**18;
    }

    function enETH(uint256 _num) internal pure returns(uint256) {
        return _num / 10**18;
    }

    /** @dev Internal function to remove an unwanted index from an array */
    function _pop(uint256 _index) internal {
        uint256 tempID;
        uint256 swapID;

        if (gumballs.length > 1 && _index != gumballs.length - 1) {
            tempID = gumballs[_index];
            swapID = gumballs[gumballs.length - 1];
            gumballs[_index] = swapID;
            gumballs[gumballs.length - 1] = tempID;
            gumballIndex[swapID] = int256(_index);

            gumballs.pop();
        } else {
            gumballs.pop();
        }
    }

    /** @dev {_tokenIdTracker} counter tracks the id of next NFT
      * @param to mints to address */
    function mint(address to) internal {
        require(_tokenIdCounter.current() < maxSupply, "Max Supply Minted");
        _mint(to, _tokenIdCounter.current());
        _tokenIdCounter.increment();
    }

    /////////////////////
    ///// Overrides /////
    /////////////////////

    // The following functions are overrides required by Solidity.

    function _baseURI() internal view virtual override returns (string memory) {
        return baseTokenURI;
    }

    function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function approve(address operator, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }

    function transferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
        public
        override(ERC721, IERC721)
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }

    ////////////////////
    //// Restricted ////
    ////////////////////

    /** @dev Allows the protocol to set {baseURI}
      * @param uri is the updated URI
    */
    function setBaseURI(string calldata uri) external OnlyArtist {
        baseTokenURI = uri;

        emit SetBaseURI(uri);
    }

    /** @dev Allows the protocol to set {contractURI} 
      * @param uri is the updated URI
    */
    function setContractURI(string calldata uri) external OnlyArtist {
        _contractURI = uri;

        emit SetContractURI(uri);
    }

    modifier OnlyArtist() {
        require(msg.sender == IGBT(GBT).artist(), "!AUTH");
        _;
    }
}

contract GNFTFactory {
    address public factory;
    address public lastGNFT;

    event FactorySet(address indexed _factory);

    constructor() {
        factory = msg.sender;
    }

    function setFactory(address _factory) external OnlyFactory {
        factory = _factory;
        emit FactorySet(_factory);
    }

    function createGNFT(
        string memory _name,
        string memory _symbol,
        string[] memory _URIs,
        address _GBT, 
        uint256 _bFee
    ) external OnlyFactory returns (address) {
        GNFT newGNFT = new GNFT(_name, _symbol, _URIs, _GBT, _bFee);
        lastGNFT = address(newGNFT);
        return lastGNFT;
    }

    modifier OnlyFactory() {
        require(msg.sender == factory, "!AUTH");
        _;
    }
}

File 19 of 21 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";

/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 */
abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

File 20 of 21 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

File 21 of 21 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";

/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string[]","name":"_URIs","type":"string[]"},{"internalType":"address","name":"_GBT","type":"address"},{"internalType":"uint256","name":"_bFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"id","type":"uint256[]"}],"name":"ExactSwap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"id","type":"uint256[]"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetContractURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DIVISOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GBT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gumballIndex","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gumballs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gumballsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftBal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_id","type":"uint256[]"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"id","type":"uint256[]"}],"name":"swapForExact","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenBal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80637f0a655d11610125578063a9369cc7116100ad578063d547cfb71161007c578063d547cfb714610482578063d5abeb011461048a578063e8a3d485146104b1578063e985e9c5146104b9578063f9afb26a146104f557600080fd5b8063a9369cc714610434578063b88d4fde14610454578063c0e7274014610467578063c87b56dd1461046f57600080fd5b8063938e3d7b116100f4578063938e3d7b146103eb57806394b918de146103fe57806395d89b41146104115780639d1b464a14610419578063a22cb4651461042157600080fd5b80637f0a655d146103825780638b3827c3146103955780638da5cb5b146103bc57806392ec16ed146103c457600080fd5b80632f745c59116101a857806342842e0e1161017757806342842e0e146103235780634f6ccce71461033657806355f804b3146103495780636352211e1461035c57806370a082311461036f57600080fd5b80632f745c59146102ea5780633410fe6e146102fd57806341f43434146103065780634218803c1461031b57600080fd5b806313f4e129116101ef57806313f4e1291461029e57806318160ddd146102b45780631a0b0f69146102bc5780631e5e3fe2146102cf57806323b872dd146102d757600080fd5b806301ffc9a71461022157806306fdde0314610249578063081812fc1461025e578063095ea7b314610289575b600080fd5b61023461022f366004612dc1565b610508565b60405190151581526020015b60405180910390f35b610251610533565b6040516102409190612e36565b61027161026c366004612e49565b6105c5565b6040516001600160a01b039091168152602001610240565b61029c610297366004612e77565b6105ec565b005b6102a6610605565b604051908152602001610240565b6008546102a6565b61029c6102ca366004612ea3565b610615565b6102a6610af7565b61029c6102e5366004612f18565b610b82565b6102a66102f8366004612e77565b610bad565b6102a66103e881565b6102716daaeb6d7670e522a718067333cd4e81565b600f546102a6565b61029c610331366004612f18565b610c43565b6102a6610344366004612e49565b610c68565b61029c610357366004612f59565b610cfb565b61027161036a366004612e49565b610e0f565b6102a661037d366004612fb9565b610e6f565b6102a6610390366004612e49565b610ef5565b6102717f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e2381565b610271610f16565b6102a67f000000000000000000000000000000000000000000000000000000000000006481565b61029c6103f9366004612f59565b610f9a565b61029c61040c366004612e49565b6110a2565b610251611434565b6102a6611443565b61029c61042f366004612fe4565b6114a3565b6102a6610442366004612e49565b600e6020526000908152604090205481565b61029c610462366004613033565b6114b7565b6102516114e4565b61025161047d366004612e49565b611572565b6102516115d9565b6102a67f0000000000000000000000000000000000000000000000000000000000001af481565b6102516115e6565b6102346104c7366004613113565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61029c610503366004612ea3565b6115f5565b60006001600160e01b0319821663780e9d6360e01b148061052d575061052d82611a30565b92915050565b60606000805461054290613141565b80601f016020809104026020016040519081016040528092919081815260200182805461056e90613141565b80156105bb5780601f10610590576101008083540402835291602001916105bb565b820191906000526020600020905b81548152906001019060200180831161059e57829003601f168201915b5050505050905090565b60006105d082611a80565b506000908152600460205260409020546001600160a01b031690565b816105f681611adf565b6106008383611b98565b505050565b600061061030610e6f565b905090565b61061d611ca8565b61062681611d01565b6040516370a0823160e01b81523360048201527f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316906370a0823190602401602060405180830381865afa15801561068a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ae919061317b565b10156106f45760405162461bcd60e51b815260206004820152601060248201526f496e7375666669656e742066756e647360801b60448201526064015b60405180910390fd5b60008190036107455760405162461bcd60e51b815260206004820152601f60248201527f506172616d65746572206c656e6774682063616e6e6f74206265207a65726f0060448201526064016106eb565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316906370a0823190602401602060405180830381865afa1580156107ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d0919061317b565b905060005b8281101561097b57600e60008585848181106107f3576107f3613194565b90506020020135815260200190815260200160002054600019036108705760405162461bcd60e51b815260206004820152602e60248201527f4e46542072656d6f7665642066726f6d206d617070696e672c2073656e74696e60448201526d656c206e756d62657220282d312960901b60648201526084016106eb565b6108a4600e600086868581811061088957610889613194565b90506020020135815260200190815260200160002054611d15565b600019600e60008686858181106108bd576108bd613194565b90506020020135815260200190815260200160002081905550306001600160a01b03166323b872dd30338787868181106108f9576108f9613194565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561095057600080fd5b505af1158015610964573d6000803e3d6000fd5b505050508080610973906131c0565b9150506107d5565b506109bc333061098a85611d01565b6001600160a01b037f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e2316929190611e31565b6109c582611d01565b6109cf90826131d9565b6040516370a0823160e01b81523060048201527f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316906370a0823190602401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a57919061317b565b1015610aa55760405162461bcd60e51b815260206004820152601a60248201527f436f6e74726163742062616c616e636520756e646572666c6f7700000000000060448201526064016106eb565b336001600160a01b03167fba6b5103a706294ecf2442116930a8aac6fa28e62c4ce7b9bad6e2b019a9bb378484604051610ae09291906131f1565b60405180910390a250610af36001600a55565b5050565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316906370a0823190602401602060405180830381865afa158015610b5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610610919061317b565b826001600160a01b0381163314610b9c57610b9c33611adf565b610ba7848484611e9c565b50505050565b6000610bb883610e6f565b8210610c1a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016106eb565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b826001600160a01b0381163314610c5d57610c5d33611adf565b610ba7848484611ecd565b6000610c7360085490565b8210610cd65760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016106eb565b60088281548110610ce957610ce9613194565b90600052602060002001549050919050565b7f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b03166343bc16126040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7d919061322d565b6001600160a01b0316336001600160a01b031614610dc55760405162461bcd60e51b815260206004820152600560248201526404282aaa8960db1b60448201526064016106eb565b610dd1600c8383612d12565b507f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa8282604051610e0392919061324a565b60405180910390a15050565b6000818152600260205260408120546001600160a01b03168061052d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106eb565b60006001600160a01b038216610ed95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016106eb565b506001600160a01b031660009081526003602052604090205490565b600f8181548110610f0557600080fd5b600091825260209091200154905081565b60007f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b03166343bc16126040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610610919061322d565b7f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b03166343bc16126040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ff8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101c919061322d565b6001600160a01b0316336001600160a01b0316146110645760405162461bcd60e51b815260206004820152600560248201526404282aaa8960db1b60448201526064016106eb565b611070600d8383612d12565b507f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea528282604051610e0392919061324a565b6110aa611ca8565b806110b482611ee8565b6110c690670de0b6b3a7640000613279565b146111055760405162461bcd60e51b815260206004820152600f60248201526e57686f6c652047425473206f6e6c7960881b60448201526064016106eb565b61110f6001611d01565b6040516370a0823160e01b81523360048201527f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316906370a0823190602401602060405180830381865afa158015611173573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611197919061317b565b10156111d85760405162461bcd60e51b815260206004820152601060248201526f496e7375666669656e742066756e647360801b60448201526064016106eb565b600081116112205760405162461bcd60e51b8152602060048201526015602482015274416d6f756e742063616e6e6f74206265207a65726f60581b60448201526064016106eb565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316906370a0823190602401602060405180830381865afa158015611287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ab919061317b565b90506112e26001600160a01b037f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e2316333085611e31565b60005b6112ee83611ee8565b811015611310576112fe33611efc565b80611308816131c0565b9150506112e5565b5061131b82826131d9565b6040516370a0823160e01b81523060048201527f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316906370a0823190602401602060405180830381865afa15801561137f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a3919061317b565b10156113f15760405162461bcd60e51b815260206004820152601a60248201527f436f6e74726163742062616c616e636520756e646572666c6f7700000000000060448201526064016106eb565b60405182815233907f562c219552544ec4c9d7a8eb850f80ea152973e315372bf4999fe7c953ea004f9060200160405180910390a2506114316001600a55565b50565b60606001805461054290613141565b60007f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0316639d1b464a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b5e573d6000803e3d6000fd5b816114ad81611adf565b6106008383611f87565b836001600160a01b03811633146114d1576114d133611adf565b6114dd85858585611f92565b5050505050565b600d80546114f190613141565b80601f016020809104026020016040519081016040528092919081815260200182805461151d90613141565b801561156a5780601f1061153f5761010080835404028352916020019161156a565b820191906000526020600020905b81548152906001019060200180831161154d57829003601f168201915b505050505081565b606061157d82611a80565b6000611587611fc4565b905060008151116115a757604051806020016040528060008152506115d2565b806115b184611fd3565b6040516020016115c2929190613298565b6040516020818303038152906040525b9392505050565b600c80546114f190613141565b6060600d805461054290613141565b6115fd611ca8565b6040516370a0823160e01b8152336004820152819030906370a0823190602401602060405180830381865afa15801561163a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061165e919061317b565b10156116a15760405162461bcd60e51b8152602060048201526012602482015271496e7375666669656e742042616c616e636560701b60448201526064016106eb565b60008190036116f25760405162461bcd60e51b815260206004820152601f60248201527f506172616d65746572206c656e6774682063616e6e6f74206265207a65726f0060448201526064016106eb565b6040516370a0823160e01b815230600482018190526000916370a0823190602401602060405180830381865afa158015611730573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611754919061317b565b905060006103e87f000000000000000000000000000000000000000000000000000000000000006461178585611d01565b61178f9190613279565b61179991906132c7565b905060005b838110156118bf57600f8585838181106117ba576117ba613194565b835460018082018655600095865260209586902092909502939093013592019190915550600f546117eb91906132e9565b600e600087878581811061180157611801613194565b90506020020135815260200190815260200160002081905550306001600160a01b03166323b872dd333088888681811061183d5761183d613194565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561189457600080fd5b505af11580156118a8573d6000803e3d6000fd5b5050505080806118b7906131c0565b91505061179e565b506118f57f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e236001600160a01b0381169083612066565b61193e338261190386611d01565b61190d91906132e9565b6001600160a01b037f000000000000000000000000794075aef95d9bd7e5cfd0ea8a1e68493b7e0e23169190612066565b61194883836131d9565b6040516370a0823160e01b81523060048201819052906370a0823190602401602060405180830381865afa158015611984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a8919061317b565b10156119e15760405162461bcd60e51b8152602060048201526008602482015267042616420537761760c41b60448201526064016106eb565b336001600160a01b03167f95a8789c26436cc55b5951f117195be05dfa3022c619a84c1449f83f9cf870688585604051611a1c9291906131f1565b60405180910390a25050610af36001600a55565b60006001600160e01b031982166380ac58cd60e01b1480611a6157506001600160e01b03198216635b5e139f60e01b145b8061052d57506301ffc9a760e01b6001600160e01b031983161461052d565b6000818152600260205260409020546001600160a01b03166114315760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b60448201526064016106eb565b6daaeb6d7670e522a718067333cd4e3b1561143157604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b709190613300565b61143157604051633b79c77360e21b81526001600160a01b03821660048201526024016106eb565b6000611ba382610e0f565b9050806001600160a01b0316836001600160a01b031603611c105760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016106eb565b336001600160a01b0382161480611c2c5750611c2c81336104c7565b611c9e5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016106eb565b6106008383612096565b6002600a5403611cfa5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106eb565b6002600a55565b600061052d82670de0b6b3a7640000613279565b6000806001600f80549050118015611d3b5750600f54611d37906001906132e9565b8314155b15611e2057600f8381548110611d5357611d53613194565b90600052602060002001549150600f6001600f80549050611d7491906132e9565b81548110611d8457611d84613194565b9060005260206000200154905080600f8481548110611da557611da5613194565b600091825260209091200155600f8054839190611dc4906001906132e9565b81548110611dd457611dd4613194565b6000918252602080832090910192909255828152600e90915260409020839055600f805480611e0557611e0561331d565b60019003818190600052602060002001600090559055505050565b600f805480611e0557611e0561331d565b6040516001600160a01b0380851660248301528316604482015260648101829052610ba79085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612104565b611ea633826121d6565b611ec25760405162461bcd60e51b81526004016106eb90613333565b610600838383612255565b610600838383604051806020016040528060008152506114b7565b600061052d670de0b6b3a7640000836132c7565b7f0000000000000000000000000000000000000000000000000000000000001af4611f26600b5490565b10611f675760405162461bcd60e51b815260206004820152601160248201527013585e0814dd5c1c1b1e48135a5b9d1959607a1b60448201526064016106eb565b611f7981611f74600b5490565b6123c6565b611431600b80546001019055565b610af333838361255f565b611f9c33836121d6565b611fb85760405162461bcd60e51b81526004016106eb90613333565b610ba78484848461262d565b6060600c805461054290613141565b60606000611fe083612660565b600101905060008167ffffffffffffffff8111156120005761200061301d565b6040519080825280601f01601f19166020018201604052801561202a576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461203457509392505050565b6040516001600160a01b03831660248201526044810182905261060090849063a9059cbb60e01b90606401611e65565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120cb82610e0f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000612159826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127389092919063ffffffff16565b80519091501561060057808060200190518101906121779190613300565b6106005760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106eb565b6000806121e283610e0f565b9050806001600160a01b0316846001600160a01b0316148061222957506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061224d5750836001600160a01b0316612242846105c5565b6001600160a01b0316145b949350505050565b826001600160a01b031661226882610e0f565b6001600160a01b03161461228e5760405162461bcd60e51b81526004016106eb90613380565b6001600160a01b0382166122f05760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016106eb565b6122fd8383836001612747565b826001600160a01b031661231082610e0f565b6001600160a01b0316146123365760405162461bcd60e51b81526004016106eb90613380565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b03821661241c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106eb565b6000818152600260205260409020546001600160a01b0316156124815760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106eb565b61248f600083836001612747565b6000818152600260205260409020546001600160a01b0316156124f45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106eb565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b816001600160a01b0316836001600160a01b0316036125c05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106eb565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612638848484612255565b61264484848484612880565b610ba75760405162461bcd60e51b81526004016106eb906133c5565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061269f5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106126cb576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106126e957662386f26fc10000830492506010015b6305f5e1008310612701576305f5e100830492506008015b612710831061271557612710830492506004015b60648310612727576064830492506002015b600a831061052d5760010192915050565b606061224d8484600085612981565b61275384848484612a5c565b60018111156127c25760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b60648201526084016106eb565b816001600160a01b03851661281e5761281981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612841565b836001600160a01b0316856001600160a01b031614612841576128418582612ae4565b6001600160a01b03841661285d5761285881612b81565b6114dd565b846001600160a01b0316846001600160a01b0316146114dd576114dd8482612c30565b60006001600160a01b0384163b1561297657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906128c4903390899088908890600401613417565b6020604051808303816000875af19250505080156128ff575060408051601f3d908101601f191682019092526128fc91810190613454565b60015b61295c573d80801561292d576040519150601f19603f3d011682016040523d82523d6000602084013e612932565b606091505b5080516000036129545760405162461bcd60e51b81526004016106eb906133c5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061224d565b506001949350505050565b6060824710156129e25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106eb565b600080866001600160a01b031685876040516129fe9190613471565b60006040518083038185875af1925050503d8060008114612a3b576040519150601f19603f3d011682016040523d82523d6000602084013e612a40565b606091505b5091509150612a5187838387612c74565b979650505050505050565b6001811115610ba7576001600160a01b03841615612aa2576001600160a01b03841660009081526003602052604081208054839290612a9c9084906132e9565b90915550505b6001600160a01b03831615610ba7576001600160a01b03831660009081526003602052604081208054839290612ad99084906131d9565b909155505050505050565b60006001612af184610e6f565b612afb91906132e9565b600083815260076020526040902054909150808214612b4e576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612b93906001906132e9565b60008381526009602052604081205460088054939450909284908110612bbb57612bbb613194565b906000526020600020015490508060088381548110612bdc57612bdc613194565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612c1457612c1461331d565b6001900381819060005260206000200160009055905550505050565b6000612c3b83610e6f565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60608315612ce3578251600003612cdc576001600160a01b0385163b612cdc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106eb565b508161224d565b61224d8383815115612cf85781518083602001fd5b8060405162461bcd60e51b81526004016106eb9190612e36565b828054612d1e90613141565b90600052602060002090601f016020900481019282612d405760008555612d86565b82601f10612d595782800160ff19823516178555612d86565b82800160010185558215612d86579182015b82811115612d86578235825591602001919060010190612d6b565b50612d92929150612d96565b5090565b5b80821115612d925760008155600101612d97565b6001600160e01b03198116811461143157600080fd5b600060208284031215612dd357600080fd5b81356115d281612dab565b60005b83811015612df9578181015183820152602001612de1565b83811115610ba75750506000910152565b60008151808452612e22816020860160208601612dde565b601f01601f19169290920160200192915050565b6020815260006115d26020830184612e0a565b600060208284031215612e5b57600080fd5b5035919050565b6001600160a01b038116811461143157600080fd5b60008060408385031215612e8a57600080fd5b8235612e9581612e62565b946020939093013593505050565b60008060208385031215612eb657600080fd5b823567ffffffffffffffff80821115612ece57600080fd5b818501915085601f830112612ee257600080fd5b813581811115612ef157600080fd5b8660208260051b8501011115612f0657600080fd5b60209290920196919550909350505050565b600080600060608486031215612f2d57600080fd5b8335612f3881612e62565b92506020840135612f4881612e62565b929592945050506040919091013590565b60008060208385031215612f6c57600080fd5b823567ffffffffffffffff80821115612f8457600080fd5b818501915085601f830112612f9857600080fd5b813581811115612fa757600080fd5b866020828501011115612f0657600080fd5b600060208284031215612fcb57600080fd5b81356115d281612e62565b801515811461143157600080fd5b60008060408385031215612ff757600080fd5b823561300281612e62565b9150602083013561301281612fd6565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561304957600080fd5b843561305481612e62565b9350602085013561306481612e62565b925060408501359150606085013567ffffffffffffffff8082111561308857600080fd5b818701915087601f83011261309c57600080fd5b8135818111156130ae576130ae61301d565b604051601f8201601f19908116603f011681019083821181831017156130d6576130d661301d565b816040528281528a60208487010111156130ef57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561312657600080fd5b823561313181612e62565b9150602083013561301281612e62565b600181811c9082168061315557607f821691505b60208210810361317557634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561318d57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016131d2576131d26131aa565b5060010190565b600082198211156131ec576131ec6131aa565b500190565b6020808252810182905260006001600160fb1b0383111561321157600080fd5b8260051b80856040850137600092016040019182525092915050565b60006020828403121561323f57600080fd5b81516115d281612e62565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6000816000190483118215151615613293576132936131aa565b500290565b600083516132aa818460208801612dde565b8351908301906132be818360208801612dde565b01949350505050565b6000826132e457634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156132fb576132fb6131aa565b500390565b60006020828403121561331257600080fd5b81516115d281612fd6565b634e487b7160e01b600052603160045260246000fd5b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061344a90830184612e0a565b9695505050505050565b60006020828403121561346657600080fd5b81516115d281612dab565b60008251613483818460208701612dde565b919091019291505056fea2646970667358221220d4d82aa46c6f1585ac30d881ff4b77c25a3a6bbc9b55b14546599897c7e25da264736f6c634300080d0033

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