Goerli Testnet

Contract

0x5F177d2eBAd5efD2fEcB41AcAB3FDCAA146FD55c
Source Code
Transaction Hash
Method
Block
From
To
Value
Airdrop85397982023-02-23 2:53:36363 days 5 hrs ago1677120816IN
0x5F177d...146FD55c
0 ETH0.03221475104.42214023
Airdrop84419222023-02-06 2:08:12380 days 5 hrs ago1675649292IN
0x5F177d...146FD55c
0 ETH0.00030851.00000001
Airdrop84243892023-02-03 2:08:12383 days 5 hrs ago1675390092IN
0x5F177d...146FD55c
0 ETH0.00030851.00000006
Airdrop84215572023-02-02 14:28:12383 days 17 hrs ago1675348092IN
0x5F177d...146FD55c
0 ETH0.2241521521.7400453
Airdrop84215562023-02-02 14:28:00383 days 17 hrs ago1675348080IN
0x5F177d...146FD55c
0 ETH0.5220969219.44513961
Airdrop84215552023-02-02 14:27:48383 days 17 hrs ago1675348068IN
0x5F177d...146FD55c
0 ETH0.473006117.39881523
Prepare Airdrops84215512023-02-02 14:26:36383 days 17 hrs ago1675347996IN
0x5F177d...146FD55c
0 ETH0.2488417415.57302239
Prepare Airdrops84215322023-02-02 14:22:00383 days 17 hrs ago1675347720IN
0x5F177d...146FD55c
0 ETH0.2488417415.57302239
Prepare Airdrops84215312023-02-02 14:21:48383 days 17 hrs ago1675347708IN
0x5F177d...146FD55c
0 ETH0.238119914.90202759
Prepare Airdrops84215252023-02-02 14:20:36383 days 17 hrs ago1675347636IN
0x5F177d...146FD55c
0 ETH0.2455898215.36951038
Prepare Airdrops84215202023-02-02 14:19:36383 days 17 hrs ago1675347576IN
0x5F177d...146FD55c
0 ETH0.248261215.53669125
Prepare Airdrops84209572023-02-02 11:56:48383 days 20 hrs ago1675339008IN
0x5F177d...146FD55c
0 ETH0.5977239837.40678215
Prepare Airdrops84208762023-02-02 11:36:36383 days 20 hrs ago1675337796IN
0x5F177d...146FD55c
0 ETH0.2488417415.57302239
Prepare Airdrops84208732023-02-02 11:35:48383 days 20 hrs ago1675337748IN
0x5F177d...146FD55c
0 ETH0.219516813.73780778
Prepare Airdrops84208722023-02-02 11:35:36383 days 20 hrs ago1675337736IN
0x5F177d...146FD55c
0 ETH0.1971489412.33798214
Prepare Airdrops84208702023-02-02 11:34:48383 days 20 hrs ago1675337688IN
0x5F177d...146FD55c
0 ETH0.1730835110.83191824
Airdrop84196132023-02-02 6:28:24384 days 1 hr ago1675319304IN
0x5F177d...146FD55c
0 ETH0.000340361.00000002
Airdrop84192812023-02-02 5:07:00384 days 3 hrs ago1675314420IN
0x5F177d...146FD55c
0 ETH0.000629711.00000001
Airdrop84189742023-02-02 3:52:24384 days 4 hrs ago1675309944IN
0x5F177d...146FD55c
0 ETH0.000029691.0002159
Airdrop84182382023-02-02 0:50:00384 days 7 hrs ago1675299000IN
0x5F177d...146FD55c
0 ETH0.000340361.00000007
Airdrop84124712023-02-01 1:35:12385 days 6 hrs ago1675215312IN
0x5F177d...146FD55c
0 ETH0.001397771.00000004
Airdrop84124702023-02-01 1:35:00385 days 6 hrs ago1675215300IN
0x5F177d...146FD55c
0 ETH0.027186131.00000004
Airdrop84124662023-02-01 1:33:48385 days 6 hrs ago1675215228IN
0x5F177d...146FD55c
0 ETH0.026986091.00000004
Airdrop84124632023-02-01 1:33:00385 days 6 hrs ago1675215180IN
0x5F177d...146FD55c
0 ETH0.027061131.00000003
Airdrop84124622023-02-01 1:32:48385 days 6 hrs ago1675215168IN
0x5F177d...146FD55c
0 ETH0.027111091.00000003
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
105631342024-02-19 15:40:481 day 16 hrs ago1708357248
0x5F177d...146FD55c
0 ETH
85857932023-03-02 20:57:48355 days 11 hrs ago1677790668
0x5F177d...146FD55c
0.000012 ETH
85857882023-03-02 20:56:36355 days 11 hrs ago1677790596
0x5F177d...146FD55c
0.000012 ETH
85711392023-02-28 8:57:36357 days 23 hrs ago1677574656
0x5F177d...146FD55c
0.000042 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
85397982023-02-23 2:53:36363 days 5 hrs ago1677120816
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
84419222023-02-06 2:08:12380 days 5 hrs ago1675649292
0x5F177d...146FD55c
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PackageAirdrop

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 150 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 29 : PackageAirdrop.sol
// SPDX-License-Identifier: GNU GPLv3

pragma solidity ^0.8.0;

import {ERC20PresetMinterPauser} from "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol";
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";
import {Counters} from "@openzeppelin/contracts/utils/Counters.sol";
import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";

/**
 * @notice This is the contract for COLT
 */
contract ERC20Mintable is ERC20PresetMinterPauser, Ownable {
    using SafeTransferLib for ERC20PresetMinterPauser;

    constructor(string memory _name, string memory _symbol) ERC20PresetMinterPauser(_name, _symbol) {}

    /**
     * Only the owner (PackageAirdrop) can call this.
     */
    function freeMint(address to, uint256 amount) external onlyOwner {
        _mint(to, amount);
    }

    function decimals() public view virtual override returns (uint8) {
        return 18;
    }
}

/**
 * @notice This is the contract for Zodiac NFT
 */
contract ERC721Mintable is ERC721, Ownable, ERC721Burnable, ERC2981 {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdCounter;
    string standardURI;

    constructor(string memory _name, string memory _symbol, string memory _standardURI) ERC721(_name, _symbol) {
        // 1%
        _setDefaultRoyalty(msg.sender, 100);
        standardURI = _standardURI;
    }

    function setBaseURI(string memory _uri) external onlyOwner {
        standardURI = _uri;
    }

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

    /**
     * Only the owner (PackageAirdrop) can call this.
     */
    function freeMint(address to, uint256 amount) external onlyOwner {
        uint256[] memory idsMinted = new uint256[](amount);
        uint256 tokenId = _tokenIdCounter.current();
        for (uint256 i; i < amount; ++i) {
            _safeMint(to, tokenId);
            idsMinted[i] = tokenId;
            tokenId++;
            _tokenIdCounter.increment();
        }
    }

    // The following functions are overrides required by Solidity.

    function _burn(uint256 tokenId) internal override (ERC721) {
        super._burn(tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view override (ERC721, ERC2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
}

/**
 * @notice This contract does a one off minting of the total ERC20 and ERC721
 * supplies. The deployer can then airdrop at most 1 package to every wallet they
 * so desire.
 */
contract PackageAirdrop is Ownable, IERC721Receiver {
    using Counters for Counters.Counter;
    using SafeTransferLib for address payable;

    ERC20Mintable public immutable erc20Faucet;
    ERC721Mintable public immutable erc721Faucet;
    uint256 public immutable MAX_AIRDROPS;
    uint256 public immutable ERC20_SUPPLY;
    uint256 public immutable ERC721_SUPPLY;

    uint256 public constant ERC20_AIRDROP_AMOUNT = 100e18;
    uint256 public constant ERC721_AIRDROP_AMOUNT = 12;
    uint256 public constant ETH_AIRDROP_AMOUNT = 0.005 ether;

    Counters.Counter private nextTokenId;

    uint256 public remainingAirdrops;

    bool public airdropsPrepared;

    mapping(address => bool) public hasBeenAirdropped;

    /**
     * Events
     */
    event toBeMinted(uint256 amount);
    event receivedETH(uint256 amount);
    event insufficientETH(address to);
    event dispensedETH(address to);
    event dispensedERC20(address to);
    event dispensedERC721(uint256[] nftIds, address to);

    constructor(
        string memory erc20Name,
        string memory erc20Symbol,
        string memory erc721Name,
        string memory erc721Symbol,
        string memory erc721StandardURI,
        uint256 maxAirdrops
    ) payable {
        erc20Faucet = new ERC20Mintable(erc20Name, erc20Symbol);
        erc721Faucet = new ERC721Mintable(erc721Name, erc721Symbol, erc721StandardURI);
        
        MAX_AIRDROPS = maxAirdrops;
        remainingAirdrops = maxAirdrops;

        ERC20_SUPPLY = ERC20_AIRDROP_AMOUNT * MAX_AIRDROPS;
        ERC721_SUPPLY = ERC721_AIRDROP_AMOUNT * MAX_AIRDROPS;

        /// @dev NFTs must be minted separately due to gas costs
        erc20Faucet.freeMint(address(this), ERC20_SUPPLY);
        emit toBeMinted(MAX_AIRDROPS);
    }

    /**
     * @dev Call this function repeatedly to mint the total supply. 240k 
     * uint256's is too much to mint in 1 external call sadly.
     */
    function prepareAirdrops(uint256 numPackages) external {
        require(!airdropsPrepared, "Already ready to airdrop");

        /// @dev Don't mint more than total supply
        uint256 amount = ERC721_AIRDROP_AMOUNT * numPackages;
        uint256 remainderToMint = ERC721_SUPPLY - erc721Faucet.balanceOf(address(this));
        if (amount >= remainderToMint) {
            amount = remainderToMint;
            airdropsPrepared = true;
            emit toBeMinted(0);
        }

        erc721Faucet.freeMint(address(this), amount);
        emit toBeMinted(remainderToMint - amount);
    }

    /**
     * @notice Dispense ETH, ERC20 tokens, and ERC721 tokens to the specified
     * address
     */
    function airdrop(address[] calldata recipients) external onlyOwner {
        uint256 length = recipients.length;
        require(remainingAirdrops >= length, "Too many recipients");
        uint256 numFailedAirdrops = 0;
        uint256[] memory idsAirdropped = new uint256[](ERC721_AIRDROP_AMOUNT);
        for (uint256 i = 0; i < length;) {
            address payable recipient = payable(recipients[i]);
            if (!hasBeenAirdropped[recipient]) {
                hasBeenAirdropped[recipient] = true;

                /// @dev airdrop ETH if there is ETH
                bool ethDispensed = address(this).balance >= ETH_AIRDROP_AMOUNT;

                /// @dev airdrop ERC20
                erc20Faucet.transfer(recipient, ERC20_AIRDROP_AMOUNT);

                /// @dev airdrop NFTs
                uint256 tokenId = nextTokenId.current();
                for (uint256 j; j < ERC721_AIRDROP_AMOUNT; ++j) {
                    erc721Faucet.safeTransferFrom(address(this), recipient, tokenId);
                    idsAirdropped[j] = tokenId;
                    tokenId++;
                    nextTokenId.increment();
                }

                /// @dev emit events
                if (ethDispensed) {
                    emit dispensedETH(recipient);
                    recipient.safeTransferETH(ETH_AIRDROP_AMOUNT);
                } else {
                    emit insufficientETH(recipient);
                }
                emit dispensedERC20(recipient);
                emit dispensedERC721(idsAirdropped, recipient);
            } else {
                ++numFailedAirdrops;
            }

            unchecked {
                ++i;
            }
        }

        remainingAirdrops -= length - numFailedAirdrops;
    }

    /**
     * @notice Set the base token URI for the NFT collection this faucet dispenses
     */
    function setBaseURI(string memory _uri) external onlyOwner {
        erc721Faucet.setBaseURI(_uri);
    }

    /**
     * @notice Returns the tokenURI for the tokenId given of the NFT collection
     * this faucet dispenses
     */
    function tokenURI(uint256 tokenId) external view returns (string memory) {
        return erc721Faucet.tokenURI(tokenId);
    }

    /**
     * Proxy for calling the same function on the NFT collection this faucet
     * dispenses
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool) {
        return erc721Faucet.supportsInterface(interfaceId);
    }

    /**
     * @notice Recharge the pool's ETH balance. Refunds ETH that this contract
     * will not be able to airdrop
     */
    function rechargeETH() external payable {
        uint256 maxRechargeAmount = remainingAirdrops * ETH_AIRDROP_AMOUNT;
        uint256 balance = address(this).balance;
        uint256 refundAmount = balance > maxRechargeAmount ? balance - maxRechargeAmount : 0;
        if (refundAmount > 0) {
            payable(msg.sender).safeTransferETH(refundAmount);

            emit receivedETH(msg.value - refundAmount);
        } else {
            emit receivedETH(msg.value);
        }
    }

    /**
     * @dev All ETH transfers into the faucet are accepted. This is functionally
     * equivalent to recharging the pool.
     */
    receive() external payable {
        emit receivedETH(msg.value);
    }

    /**
     * @dev All ETH transfers into the faucet are accepted. This is functionally
     * equivalent to recharging the pool.
     */
    fallback() external payable {
        emit receivedETH(msg.value);
    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure override returns (bytes4) {
        return IERC721Receiver.onERC721Received.selector;
    }
}

File 2 of 29 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 29 : SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument.
            mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

File 4 of 29 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 = _owners[tokenId];
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

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

File 5 of 29 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 6 of 29 : ERC20PresetMinterPauser.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol)

pragma solidity ^0.8.0;

import "../ERC20.sol";
import "../extensions/ERC20Burnable.sol";
import "../extensions/ERC20Pausable.sol";
import "../../../access/AccessControlEnumerable.sol";
import "../../../utils/Context.sol";

/**
 * @dev {ERC20} token, including:
 *
 *  - ability for holders to burn (destroy) their tokens
 *  - a minter role that allows for token minting (creation)
 *  - a pauser role that allows to stop all token transfers
 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the minter and pauser
 * roles, as well as the default admin role, which will let it grant both minter
 * and pauser roles to other accounts.
 *
 * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._
 */
contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable {
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");

    /**
     * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
     * account that deploys the contract.
     *
     * See {ERC20-constructor}.
     */
    constructor(string memory name, string memory symbol) ERC20(name, symbol) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());

        _setupRole(MINTER_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());
    }

    /**
     * @dev Creates `amount` new tokens for `to`.
     *
     * See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the `MINTER_ROLE`.
     */
    function mint(address to, uint256 amount) public virtual {
        require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint");
        _mint(to, amount);
    }

    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause");
        _pause();
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() public virtual {
        require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause");
        _unpause();
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override(ERC20, ERC20Pausable) {
        super._beforeTokenTransfer(from, to, amount);
    }
}

File 7 of 29 : 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 8 of 29 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "../../../utils/Context.sol";

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        _burn(tokenId);
    }
}

File 9 of 29 : 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 10 of 29 : 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 11 of 29 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 12 of 29 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 29 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 15 of 29 : 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 16 of 29 : 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 17 of 29 : 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 18 of 29 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 19 of 29 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

File 20 of 29 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

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

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 21 of 29 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC20.sol";
import "../../../utils/Context.sol";

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

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

File 22 of 29 : ERC20Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)

pragma solidity ^0.8.0;

import "../ERC20.sol";
import "../../../security/Pausable.sol";

/**
 * @dev ERC20 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC20Pausable is ERC20, Pausable {
    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }
}

File 23 of 29 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 24 of 29 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 25 of 29 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 26 of 29 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 27 of 29 : 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 28 of 29 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

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

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

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

File 29 of 29 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"erc20Name","type":"string"},{"internalType":"string","name":"erc20Symbol","type":"string"},{"internalType":"string","name":"erc721Name","type":"string"},{"internalType":"string","name":"erc721Symbol","type":"string"},{"internalType":"string","name":"erc721StandardURI","type":"string"},{"internalType":"uint256","name":"maxAirdrops","type":"uint256"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"dispensedERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"nftIds","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"dispensedERC721","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"dispensedETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"insufficientETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"receivedETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"toBeMinted","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ERC20_AIRDROP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC20_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC721_AIRDROP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC721_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETH_AIRDROP_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_AIRDROPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"airdropsPrepared","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20Faucet","outputs":[{"internalType":"contract ERC20Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721Faucet","outputs":[{"internalType":"contract ERC721Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasBeenAirdropped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numPackages","type":"uint256"}],"name":"prepareAirdrops","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rechargeETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"remainingAirdrops","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

61012060408181526200549080380380916200001c828662000363565b8439820160c0838203126200035e5782516001600160401b03908181116200035e57826200004c918601620003c2565b60208501518281116200035e578362000067918701620003c2565b92848601518381116200035e578162000082918801620003c2565b60608701518481116200035e57826200009d918901620003c2565b9160808801518581116200035e5760a091620000bb918a01620003c2565b97015160008054336001600160a01b03198216811783558951939a92986001600160a01b03979394939290919088167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08b80a361202c91828401928484108a8511176200034a57916200014285949262000151946200174387398d84528d8401906200041d565b9160208184039101526200041d565b039087f080156200034057608052865192611d219283850193858510888611176200032c578594926200019d620001ba9593620001ac936200376f89396060865260608601906200041d565b9084820360208601526200041d565b91898184039101526200041d565b039084f08015620003225760a0528460c0528460025568056bc75e2d631000009085820291820486036200030e578160e05285600c0295600c8704036200030e576101009586526080511690813b156200030a578392916044849287519687938492634c41ab3760e11b845230600485015260248401525af180156200030057620002d9575b5050507f2898e32a5bc0b2e0486c988a13a54653c8b4f6ea9b6c3341a4fb90c2a6258df7602060c0518351908152a1516112fe918262000445833960805182818161073d0152610cc2015260a0518281816102110152818161077501528181610adf01528181610c7c01528181610d7101526111bd015260c051826103e9015260e051826104670152518181816103ad0152610b200152f35b8211620002ec5750815238808062000240565b634e487b7160e01b81526041600452602490fd5b84513d84823e3d90fd5b8380fd5b634e487b7160e01b84526011600452602484fd5b84513d85823e3d90fd5b634e487b7160e01b89526041600452602489fd5b87513d88823e3d90fd5b634e487b7160e01b8b52604160045260248bfd5b600080fd5b601f909101601f19168101906001600160401b038211908210176200038757604052565b634e487b7160e01b600052604160045260246000fd5b60005b838110620003b15750506000910152565b8181015183820152602001620003a0565b81601f820112156200035e5780516001600160401b038111620003875760405192620003f9601f8301601f19166020018562000363565b818452602082840101116200035e576200041a91602080850191016200039d565b90565b9060209162000438815180928185528580860191016200039d565b601f01601f191601019056fe60806040526004361015610026575b361561001e5761001c61123a565b005b61001c61123a565b60003560e01c806301ffc9a7146101ca5780631473926e146101c1578063150b7a02146101b85780631b1a8411146101af57806326636592146101a65780632e3fd8d91461019d5780633d478c98146101945780634c156e901461018b5780634cd984ec1461018257806355f804b314610179578063715018a614610170578063729ad39e146101675780638da5cb5b1461015e578063a475fe3e14610155578063a4cf90f71461014c578063a81e928214610143578063abfb78831461013a578063c87b56dd14610131578063d85e7c4114610128578063dacd23ec1461011f5763f2fde38b0361000e5761011a610e8e565b61000e565b5061011a610e6b565b5061011a610e4c565b5061011a610d40565b5061011a610cab565b5061011a610c65565b5061011a610a8e565b5061011a6109b4565b5061011a61098a565b5061011a6105e2565b5061011a610583565b5061011a61050f565b5061011a61044e565b5061011a610429565b5061011a61040c565b5061011a6103d0565b5061011a610394565b5061011a610351565b5061011a6102e2565b5061011a6102ad565b503461029d57602036600319011261029d5760043563ffffffff60e01b811680910361029d576040516301ffc9a760e01b8152600481019190915261025e906020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610290575b600091610262575b5060405190151581529081906020820190565b0390f35b610283915060203d8111610289575b61027b81836104c2565b81019061112c565b3861024b565b503d610271565b610298611036565b610243565b600080fd5b600091031261029d57565b503461029d57600036600319011261029d57602060ff600354166040519015158152f35b6001600160a01b0381160361029d57565b503461029d57608036600319011261029d576102ff6004356102d1565b61030a6024356102d1565b60643567ffffffffffffffff80821161029d573660238301121561029d57816004013590811161029d573691016024011161029d57604051630a85bd0160e11b8152602090f35b503461029d57602036600319011261029d5760043561036f816102d1565b60018060a01b03166000526004602052602060ff604060002054166040519015158152f35b503461029d57600036600319011261029d5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461029d57600036600319011261029d5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b503461029d57600036600319011261029d576020604051600c8152f35b503461029d57600036600319011261029d57602060405168056bc75e2d631000008152f35b503461029d57600036600319011261029d5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b50634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff81116104b557604052565b6104bd61048a565b604052565b90601f8019910116810190811067ffffffffffffffff8211176104b557604052565b60209067ffffffffffffffff8111610502575b601f01601f19160190565b61050a61048a565b6104f7565b503461029d57602036600319011261029d5760043567ffffffffffffffff811161029d573660238201121561029d57806004013561054c816104e4565b9061055a60405192836104c2565b808252366024828501011161029d57602081600092602461001c960183860137830101526111b3565b503461029d576000806003193601126105df5761059e610f56565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b503461029d5760208060031936011261029d57600480359167ffffffffffffffff9283811161029d573660238201121561029d578083013593841161029d576024810190602436918660051b01011161029d5761063d610f56565b61064b846002541015611050565b600092610656611092565b92845b86811061067d5761001c610678610670888a611043565b600254611043565b600255565b61069f61069361068e838a886110e5565b611103565b6001600160a01b031690565b6001600160a01b03811660009081526004602052604090205460ff16156106c5565b1590565b15610977576001600160a01b03811660009081526004602052604090206106f390805460ff19166001179055565b6040805163a9059cbb60e01b81526001600160a01b0383811687830190815268056bc75e2d63100000602082015290916611c37937e08000471015918790829081900386018160007f000000000000000000000000000000000000000000000000000000000000000088165af1801561096a575b61094d575b506001546000837f000000000000000000000000000000000000000000000000000000000000000016915b600c821061089757505050927fd5135edece16bae3d18fd51d56f9da595fae4f444659d4020cabc1195bd2cb4592610853926001969560001461085d5781516001600160a01b038416815261081491907f115ee403a707f82bb7bcf8e412b01cb6b5348f78596c03b484e60ecc8a6b53d190602090a18316611266565b80516001600160a01b03831681527f82a489e5a594e1d45d1e7c23766bea7881daaad1a70ddcbc65919523baf69ad790602090a1519182918a83611166565b0390a15b01610659565b5080516001600160a01b03831681527febecef5533d32c235a811555878783347be5377dbbc9a347dadf197b1db9218a90602090a1610814565b823b1561029d5761090e81806109088f86908f6000610921988f8f90836108f2958f935196879586948593632142170760e11b85523090850160409194939294606082019560018060a01b0380921683521660208201520152565b03925af18015610940575b610927575b50611144565b52611110565b9161091c6001805401600155565b611110565b90610797565b8061093461093a926104a1565b806102a2565b38610902565b610948611036565b6108fd565b61096390873d89116102895761027b81836104c2565b503861076c565b610972611036565b610767565b5094610984600191611110565b95610857565b503461029d57600036600319011261029d576000546040516001600160a01b039091168152602090f35b506000806003193601126105df576002546611c37937e0800090818102918183041490151715610a81575b479080821115610a79576109f291611043565b8015610a4657610a40610a3082610a2a7f265dda1c3f86126bf9c507394a66d2396f6cb0e0af1f35a2c41f63b9479e0fae94336112b8565b34611043565b6040519081529081906020820190565b0390a180f35b506040513481527f265dda1c3f86126bf9c507394a66d2396f6cb0e0af1f35a2c41f63b9479e0fae908060208101610a40565b5050806109f2565b610a89610ff5565b6109df565b503461029d57602036600319011261029d57610ab7610ab26106c160035460ff1690565b610fae565b610ac260043561100c565b6040516370a0823160e01b81523060048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690610b4490602081602481865afa908115610c58575b600091610c2a575b507f0000000000000000000000000000000000000000000000000000000000000000611043565b9081831015610be2575b803b1561029d57604051634c41ab3760e11b8152306004820152602481018490527f2898e32a5bc0b2e0486c988a13a54653c8b4f6ea9b6c3341a4fb90c2a6258df793610bbd93610a3093919290916000908290604490829084905af18015610bd5575b610bc2575b50611043565b0390a1005b80610934610bcf926104a1565b38610bb7565b610bdd611036565b610bb2565b91508091610bf8600160ff196003541617600355565b604051600081527f2898e32a5bc0b2e0486c988a13a54653c8b4f6ea9b6c3341a4fb90c2a6258df790602090a1610b4e565b610c4b915060203d8111610c51575b610c4381836104c2565b810190611027565b38610b1d565b503d610c39565b610c60611036565b610b15565b503461029d57600036600319011261029d576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b503461029d57600036600319011261029d576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b60005b838110610d045750506000910152565b8181015183820152602001610cf4565b60409160208252610d348151809281602086015260208686019101610cf1565b601f01601f1916010190565b503461029d57602036600319011261029d5760405163c87b56dd60e01b8152600480359082015260009081816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610e3f575b8291610db8575b6040518061025e8482610d14565b90503d8083833e610dc981836104c2565b810190602081830312610e375780519067ffffffffffffffff8211610e3b570181601f82011215610e3757805192610e00846104e4565b92610e0e60405194856104c2565b848452602085840101116105df575061025e92610e319160208085019101610cf1565b38610daa565b8280fd5b8380fd5b610e47611036565b610da3565b503461029d57600036600319011261029d576020600254604051908152f35b503461029d57600036600319011261029d5760206040516611c37937e080008152f35b503461029d57602036600319011261029d57600435610eac816102d1565b610eb4610f56565b6001600160a01b039081168015610f0257600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6000546001600160a01b03163303610f6a57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b15610fb557565b60405162461bcd60e51b81526020600482015260186024820152770416c726561647920726561647920746f2061697264726f760441b6044820152606490fd5b50634e487b7160e01b600052601160045260246000fd5b9081600c0291600c83040361101d57565b611025610ff5565b565b9081602091031261029d575190565b506040513d6000823e3d90fd5b9190820391821161101d57565b1561105757565b60405162461bcd60e51b8152602060048201526013602482015272546f6f206d616e7920726563697069656e747360681b6044820152606490fd5b604051906101a0820182811067ffffffffffffffff8211176110c1575b604052600c8252610180366020840137565b6110c961048a565b6110af565b50634e487b7160e01b600052603260045260246000fd5b91908110156110f6575b60051b0190565b6110fe6110ce565b6110ef565b3561110d816102d1565b90565b6001906000198114611120570190565b611128610ff5565b0190565b9081602091031261029d5751801515810361029d5790565b6020918151811015611159575b60051b010190565b6111616110ce565b611151565b9092919260408201604083528151809152606083019060208093019060005b8482821061119f57505050509360018060a01b0316910152565b835185529384019390920191600101611185565b6111bb610f56565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316803b1561029d576040516355f804b360e01b81529160009183918290849082906112129060048301610d14565b03925af1801561122d575b6112245750565b611025906104a1565b611235611036565b61121d565b7f265dda1c3f86126bf9c507394a66d2396f6cb0e0af1f35a2c41f63b9479e0fae6020604051348152a1565b600080806611c37937e0800081945af11561127d57565b60405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606490fd5b600080809381935af11561127d5756fea264697066735822122020b7482cb06bdf42e4f4a030892ec3eda21ceefad7ff477e73ea6b810c60b3ee64736f6c634300081100336040608081523462000505576200202c90813803806200001f816200050a565b9384398201918181840312620005055780516001600160401b0393908481116200050557816200005191840162000530565b916020918282015186811162000505576200006d920162000530565b938251948186116200041c5760058054966001958689811c99168015620004fa575b868a1014620003fb578190601f998a8111620004a6575b5086908a83116001146200043e5760009262000432575b5050600019600383901b1c191690861b1781555b81519283116200041c57600654908582811c9216801562000411575b85831014620003fb57878211620003b1575b50508295821160011462000348579481929394956000926200033c575b5050600019600383901b1c191690831b176006555b60ff19806007541660075560008052600082528360002033600052825260ff8460002054161562000301575b60008052828252620001733385600020620005a2565b507f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a680600052600083528460002033600052835260ff85600020541615620002c6575b600052828252620001cb3385600020620005a2565b507f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9081600052600083528460002033600052835260ff856000205416156200028a575b5060005252620002233382600020620005a2565b5060078054610100600160a81b0319811633600881811b610100600160a81b0316929092179093559251921c6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36119dc9081620006308239f35b8160005260008352846000203360005283528385600020918254161790553333826000805160206200200c833981519152600080a4386200020f565b8060005260008352846000203360005283528460002084838254161790553333826000805160206200200c833981519152600080a4620001b6565b600080526000825283600020336000528252836000208382825416179055333360006000805160206200200c8339815191528180a46200015d565b0151905038806200011c565b601f198216956006600052836000209160005b8881106200039b5750838697989695961062000381575b505050811b0160065562000131565b015160001960f88460031b161c1916905538808062000372565b818301518455928601929185019185016200035b565b6006600052846000209088808601821c830193878710620003f1575b01901c019085905b828110620003e45750620000ff565b60008155018590620003d5565b93508293620003cd565b634e487b7160e01b600052602260045260246000fd5b91607f1691620000ed565b634e487b7160e01b600052604160045260246000fd5b015190503880620000bd565b90889350601f1983169185600052886000209260005b8a8282106200048f575050841162000475575b505050811b018155620000d1565b015160001960f88460031b161c1916905538808062000467565b8385015186558c9790950194938401930162000454565b90915083600052866000208a808501861c820192898610620004f0575b918a918695949301871c01915b828110620004e0575050620000a6565b600081558594508a9101620004d0565b92508192620004c3565b98607f16986200008f565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200041c57604052565b919080601f84011215620005055782516001600160401b0381116200041c5760209062000566601f8201601f191683016200050a565b92818452828287010111620005055760005b8181106200058e57508260009394955001015290565b858101830151848201840152820162000578565b919060018301600090828252806020526040822054156000146200062957845494680100000000000000008610156200061557600186018082558610156200060157836040949596828552602085200155549382526020522055600190565b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b83526041600452602483fd5b5092505056fe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610d635750806306fdde0314610cc3578063095ea7b314610c9957806318160ddd14610c7c57806323b872dd14610c3f578063248a9ca314610c165780632f2ff15d14610b63578063313ce56714610b4757806336568abe14610ab55780633950935114610a655780633f4ba83a1461093457806340c10f191461086f57806342966c68146108515780635c975abb1461082d57806370a08231146107f5578063715018a61461079457806379cc6790146107645780638456cb591461063b5780638da5cb5b1461060e5780639010d07c146105ce57806391d148541461058957806395d89b41146104a55780639883566e14610478578063a217fddf1461045d578063a457c2d7146103b6578063a9059cbb14610385578063ca15c8731461035e578063d539139314610323578063d547741f146102e6578063dd62ed3e1461029d578063e63ab1e91461025e5763f2fde38b1461018357600080fd5b3461025a57602036600319011261025a5761019c610e20565b6101a4611238565b6001600160a01b0381811693909290841561020857505060078054610100600160a81b03198116600893841b610100600160a81b031617909155901c167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b505034610299578160031936011261029957602090517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b5080fd5b505034610299578060031936011261029957806020926102bb610e20565b6102c3610e3b565b6001600160a01b0391821683526003865283832091168252845220549051908152f35b50903461025a578060031936011261025a57610320913561031b600161030a610e3b565b938387528660205286200154610e51565b6111b1565b80f35b505034610299578160031936011261029957602090517f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68152f35b503461025a57602036600319011261025a5760209282913581526001845220549051908152f35b5050346102995780600319360112610299576020906103af6103a5610e20565b60243590336112b6565b5160018152f35b50823461045a578260031936011261045a576103d0610e20565b918360243592338152600360205281812060018060a01b0386168252602052205490828210610409576020856103af858503873361148f565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b80fd5b50503461029957816003193601126102995751908152602090f35b5050346102995736600319011261045a57610320610494610e20565b61049c611238565b6024359061175a565b50903461025a578260031936011261025a57805191836006549060019082821c92828116801561057f575b602095868610821461056c575084885290811561054a575060011461050f575b61050b8686610501828b0383611179565b5191829182610df4565b0390f35b929550600683528583205b828410610537575050508261050b946105019282010194386104f0565b805486850188015292860192810161051a565b60ff191687860152505050151560051b83010192506105018261050b386104f0565b634e487b7160e01b845260229052602483fd5b93607f16936104d0565b503461025a578160031936011261025a578160209360ff926105a9610e3b565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b503461025a578160031936011261025a576020926105f8913581526001845282602435912061182b565b905491519160018060a01b039160031b1c168152f35b505034610299578160031936011261029957600754905160089190911c6001600160a01b03168152602090f35b503461025a578260031936011261025a577f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a83528260205281832033845260205260ff828420541615610702576007549060ff82166106cc575060ff1916600117600755513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a180f35b606490602084519162461bcd60e51b8352820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152fd5b6020608492519162461bcd60e51b8352820152603760248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527676652070617573657220726f6c6520746f20706175736560481b6064820152fd5b5050346102995736600319011261045a57610320610780610e20565b6024359061078f823383611591565b611629565b833461045a578060031936011261045a576107ad611238565b60078054610100600160a81b03198116909155819060081c6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5050346102995760203660031901126102995760209181906001600160a01b0361081d610e20565b1681526002845220549051908152f35b50503461029957816003193601126102995760209060ff6007541690519015158152f35b83823461029957602036600319011261029957610320903533611629565b503461025a578160031936011261025a57610888610e20565b917f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a684528360205280842033855260205260ff8185205416156108d257836103206024358561175a565b906020608492519162461bcd60e51b8352820152603660248201527f45524332305072657365744d696e7465725061757365723a206d7573742068616044820152751d99481b5a5b9d195c881c9bdb19481d1bc81b5a5b9d60521b6064820152fd5b503461025a578260031936011261025a577f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a83528260205281832033845260205260ff8284205416156109fd576007549060ff8216156109c3575060ff1916600755513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a180f35b606490602084519162461bcd60e51b8352820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152fd5b6020608492519162461bcd60e51b8352820152603960248201527f45524332305072657365744d696e7465725061757365723a206d75737420686160448201527f76652070617573657220726f6c6520746f20756e7061757365000000000000006064820152fd5b5050346102995780600319360112610299576103af602092610aae610a88610e20565b338352600386528483206001600160a01b03821684528652918490205460243590611293565b903361148f565b50829034610299578260031936011261029957610ad0610e3b565b90336001600160a01b03831603610aec579061032091356111b1565b608490602085519162461bcd60e51b8352820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152fd5b5050346102995781600319360112610299576020905160128152f35b50903461025a578060031936011261025a57610bcb9135906001610b85610e3b565b92808652602090868252610b9d838589200154610e51565b80875286825283872094838060a01b031694858852825260ff848820541615610bcf575b8652528320611843565b5080f35b8087528682528387208588528252838720805460ff1916841790553385827f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8a80a4610bc1565b503461025a57602036600319011261025a57816020936001923581528085522001549051908152f35b505034610299576060366003190112610299576020906103af610c60610e20565b610c68610e3b565b60443591610c77833383611591565b6112b6565b503461025a578260031936011261025a5760209250549051908152f35b5050346102995780600319360112610299576020906103af610cb9610e20565b602435903361148f565b50903461025a578260031936011261025a57805191836005549060019082821c928281168015610d59575b602095868610821461056c575084885290811561054a5750600114610d1e5761050b8686610501828b0383611179565b929550600583528583205b828410610d46575050508261050b946105019282010194386104f0565b8054868501880152928601928101610d29565b93607f1693610cee565b9250503461025a57602036600319011261025a573563ffffffff60e01b811680910361025a5760209250635a05180f60e01b8114908115610da6575b5015158152f35b637965db0b60e01b811491508115610dc0575b5038610d9f565b6301ffc9a760e01b14905038610db9565b60005b838110610de45750506000910152565b8181015183820152602001610dd4565b60409160208252610e148151809281602086015260208686019101610dd1565b601f01601f1916010190565b600435906001600160a01b0382168203610e3657565b600080fd5b602435906001600160a01b0382168203610e3657565b6000818152602090808252604092838220338352835260ff848320541615610e795750505050565b835167ffffffffffffffff9190336060820184811183821017611165578752602a82528582019287368537825115611151576030845382519160019283101561113d576078602185015360295b8381116110d35750611091579087519460808601908682109082111761107d57885260428552868501956060368837855115611069576030875385518210156110695790607860218701536041915b818311610ffb57505050610fb957938593610f9f93610f90604894610f6776020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b99610fb59b519a8b978801525180926037880190610dd1565b8401917001034b99036b4b9b9b4b733903937b6329607d1b603784015251809386840190610dd1565b01036028810185520183611179565b5162461bcd60e51b815291829160048301610df4565b0390fd5b60648587519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611055576f181899199a1a9b1b9c1cb0b131b232b360811b901a61102b8589611804565b5360041c92801561104157600019019190610f15565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b634e487b7160e01b87526041600452602487fd5b60648789519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b90600f81166010811015611129576f181899199a1a9b1b9c1cb0b131b232b360811b901a6111018387611804565b5360041c9080156111155760001901610ec6565b634e487b7160e01b88526011600452602488fd5b634e487b7160e01b89526032600452602489fd5b634e487b7160e01b87526032600452602487fd5b634e487b7160e01b86526032600452602486fd5b634e487b7160e01b86526041600452602486fd5b90601f8019910116810190811067ffffffffffffffff82111761119b57604052565b634e487b7160e01b600052604160045260246000fd5b9060406111ee92600090808252816020528282209360018060a01b03169384835260205260ff83832054166111f1575b81526001602052206118ca565b50565b8082528160205282822084835260205282822060ff1981541690553384827ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8580a46111e1565b60075460081c6001600160a01b0316330361124f57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b919082018092116112a057565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0390811691821561143c57169182156113eb5760ff60075416611393576000828152600260205260408120549180831061133f57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95876020965260028652038282205586815220611334828254611293565b9055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602a60248201527f45524332305061757361626c653a20746f6b656e207472616e736665722077686044820152691a5b19481c185d5cd95960b21b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b0390811691821561154057169182156114f05760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260038252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b9060018060a01b03808316600052600360205260406000209082166000526020526040600020549260001984036115c9575b50505050565b8084106115e4576115db93039161148f565b388080806115c3565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b6001600160a01b0316801561170b5760ff6007541661139357600091818352600260205260408320548181106116bb57819083855260026020520360408420556004548181039081116116a7577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91602091600455604051908152a3565b634e487b7160e01b84526011600452602484fd5b60405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b6001600160a01b03169081156117bf5760ff60075416611393577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020826117a6600094600454611293565b6004558484526002825260408420611334828254611293565b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b908151811015611815570160200190565b634e487b7160e01b600052603260045260246000fd5b80548210156118155760005260206000200190600090565b919060018301600090828252806020526040822054156000146118c457845494600160401b8610156118b057836118a0611887886001604098999a0185558461182b565b819391549060031b600019811b9283911b169119161790565b9055549382526020522055600190565b634e487b7160e01b83526041600452602483fd5b50925050565b9060018201906000928184528260205260408420549081151560001461199f576000199180830181811161198b5782549084820191821161111557808203611956575b5050508054801561194257820191611925838361182b565b909182549160031b1b191690555582526020526040812055600190565b634e487b7160e01b86526031600452602486fd5b611976611966611887938661182b565b90549060031b1c9283928661182b565b9055865284602052604086205538808061190d565b634e487b7160e01b87526011600452602487fd5b505050509056fea2646970667358221220fc7a02d7d6fa28944643c8e4a4a701067ebce207feeff1cdb89756b0a2b583f564736f6c634300081100332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d604060808152346200052c5762001d21803803806200001e8162000531565b92833981016060828203126200052c5781516001600160401b0391908281116200052c57816200005091850162000557565b90602093848101518481116200052c57826200006e91830162000557565b91868201518581116200052c5762000087920162000557565b82519184831162000516576000908154936001958686811c961680156200050b575b8987101462000429578190601f96878111620004b8575b5089908783116001146200045457859262000448575b5050600019600383901b1c191690861b1782555b8051908682116200030e5785548681811c911680156200043d575b898210146200042957908186849311620003d6575b5088908683116001146200037257849262000366575b5050600019600383901b1c191690851b1784555b60068054336001600160a01b0319821681179092556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a3331562000322578651878101818110878211176200030e5760649188918a523381520152601960a21b33176007558151948511620002fa57600a548481811c91168015620002ef575b87821014620002db5783811162000292575b5085928511600114620002295793945084929190836200021d575b50501b916000199060031b1c191617600a555b516117579081620005ca8239f35b015192503880620001fc565b600a815285812093958591601f198316915b888383106200027757505050106200025d575b505050811b01600a556200020f565b015160001960f88460031b161c191690553880806200024e565b8587015188559096019594850194879350908101906200023b565b600a82528682208480880160051c820192898910620002d1575b0160051c019085905b828110620002c5575050620001e1565b838155018590620002b5565b92508192620002ac565b634e487b7160e01b82526022600452602482fd5b90607f1690620001cf565b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b83526041600452602483fd5b865162461bcd60e51b815260048101879052601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b01519050388062000130565b8785528985208894509190601f198416865b8c828210620003bf5750508411620003a5575b505050811b01845562000144565b015160001960f88460031b161c1916905538808062000397565b8385015186558b9790950194938401930162000384565b9091508684528884208680850160051c8201928b86106200041f575b918991869594930160051c01915b828110620004105750506200011a565b86815585945089910162000400565b92508192620003f2565b634e487b7160e01b84526022600452602484fd5b90607f169062000105565b015190503880620000d6565b8580528a86208994509190601f198416875b8d828210620004a1575050841162000487575b505050811b018255620000ea565b015160001960f88460031b161c1916905538808062000479565b8385015186558c9790950194938401930162000466565b9091508480528985208780850160051c8201928c861062000501575b918a91869594930160051c01915b828110620004f2575050620000c0565b8781558594508a9101620004e2565b92508192620004d4565b95607f1695620000a9565b634e487b7160e01b600052604160045260246000fd5b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200051657604052565b919080601f840112156200052c5782516001600160401b03811162000516576020906200058d601f8201601f1916830162000531565b928184528282870101116200052c5760005b818110620005b557508260009394955001015290565b85810183015184820184015282016200059f56fe6080604081815260048036101561001557600080fd5b600092833560e01c90816301ffc9a714610e2f5750806306fdde0314610da8578063081812fc14610d88578063095ea7b314610c1b57806323b872dd14610bf65780632a55205a14610b3557806342842e0e14610ad857806342966c6814610a2757806355f804b3146108c25780636352211e1461089157806370a08231146107fb578063715018a61461079e5780638da5cb5b1461077557806395d89b41146106b35780639883566e146104c8578063a22cb465146103f9578063b88d4fde1461036b578063c87b56dd14610219578063e985e9c5146101c75763f2fde38b146100ff57600080fd5b346101c35760203660031901126101c357610118610efd565b90610121611026565b6001600160a01b03918216928315610171575050600680546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152fd5b8280fd5b50503461021557806003193601126102155760ff816020936101e7610efd565b6101ef610f18565b6001600160a01b0391821683526005875283832091168252855220549151911615158152f35b5080fd5b5082346103685760209182600319360112610215573560008181526002602052604090205490918391610256906001600160a01b0316151561107e565b8451908093600a5491610268836110eb565b8085528585019360019081811690811561034c5750600114610310575b5050610296846102f3970385610fb1565b8351156102f75750916102c293916102b06102e29461162e565b90885195869351809286860190610eb5565b82016102d682518093868085019101610eb5565b01038084520182610fb1565b925b51928284938452830190610ed8565b0390f35b935050505083519061030882610f95565b8152926102e4565b600a835286832097508291905b81831061033557505084018501955061029684610285565b88548784018901529788019789979092019161031d565b60ff191686525050151560051b84018501955061029684610285565b80fd5b83823461021557608036600319011261021557610386610efd565b9061038f610f18565b916044356064359367ffffffffffffffff85116103f557366023860112156103f5576103ca6103ed948660246103f298369301359101610fef565b926103dd6103d8843361123d565b611163565b6103e88383836112ab565b61157e565b611219565b80f35b8580fd5b5090346101c357806003193601126101c357610413610efd565b90602435918215158093036104c4576001600160a01b0316923384146104825750338452600560205280842083855260205280842060ff1981541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b6020606492519162461bcd60e51b8352820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b8480fd5b5090346101c357806003193601126101c357906104e3610efd565b6024918235926104f1611026565b6104fa84611709565b9061050786519283610fb1565b848252601f1961051686611709565b01926020933685850137600994855490899860018060a01b038216908115935b8a8c10610541578c80f35b8151858e61054e83610f95565b8252610673576000828152600260205260409020546001600160a01b031661063157828e85815260038c52208054906001820180921161061e57918f86859160028f6103ed966105da9855848352528781208260018060a01b03198254161790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a48387611462565b87518c101561060c576105f981610606928b8f60051b8c010152611609565b9b60018b54018b55611609565b9a610536565b634e487b7160e01b8d5260328652868dfd5b50634e487b7160e01b8f5260118852888ffd5b825162461bcd60e51b81528088018b9052601c818a01527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fd5b6064878b8a8187519362461bcd60e51b85528401528201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b5050346102155781600319360112610215578051908260018054906106d7826110eb565b8086529181811690811561074d5750600114610712575b505050610700826102f3940383610fb1565b51918291602083526020830190610ed8565b80955082526020948583205b82841061073a57505050826102f39461070092820101946106ee565b805486850188015292860192810161071e565b6102f397506107009450602092508693915060ff191682840152151560051b820101946106ee565b50503461021557816003193601126102155760065490516001600160a01b039091168152602090f35b83346103685780600319360112610368576107b7611026565b600680546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50829034610215576020366003190112610215576001600160a01b0361081f610efd565b1690811561083c5760208480858581526003845220549051908152f35b608490602085519162461bcd60e51b8352820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152fd5b50913461036857602036600319011261036857506108b1602092356110c5565b90516001600160a01b039091168152f35b508234610368576020806003193601126102155767ffffffffffffffff908335828111610a235736602382011215610a23576109079036906024818801359101610fef565b93610910611026565b8451928311610a105750610925600a546110eb565b601f81116109cc575b5080601f83116001146109695750829382939261095e575b50508160011b916000199060031b1c191617600a5580f35b015190508380610946565b90601f19831694600a85528285209285905b8782106109b457505083600195961061099b575b505050811b01600a5580f35b015160001960f88460031b161c1916905583808061098f565b8060018596829496860151815501950193019061097b565b600a8452818420601f840160051c810191838510610a06575b601f0160051c01905b8181106109fb575061092e565b8481556001016109ee565b90915081906109e5565b634e487b7160e01b845260419052602483fd5b8380fd5b5091903461021557602036600319011261021557823590610a4b6103d8833361123d565b610a54826110c5565b610a5d8361140e565b6001600160a01b031680845260036020528184208054919291600019810191908211610ac557558284526002602052832080546001600160a01b031916905582907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a480f35b634e487b7160e01b865260118752602486fd5b5091903461021557610ae936610f2e565b91835193602085019085821067ffffffffffffffff831117610b2257916103f29593916103ed9593528684526103dd6103d8843361123d565b634e487b7160e01b875260418852602487fd5b5091346103685781600319360112610368576024359083358152600860205282812090835191610b6483610f63565b546001600160a01b0380821680855260a09290921c602085015292919015610bd3575b6bffffffffffffffffffffffff60208301511693848102948186041490151715610bc05750518351911681526127109091046020820152f35b634e487b7160e01b815260118652602490fd5b90508351610be081610f63565b600754838116825260a01c602082015290610b87565b8334610368576103f2610c0836610f2e565b91610c166103d8843361123d565b6112ab565b50346101c357816003193601126101c357610c34610efd565b6024359290916001600160a01b0391908280610c4f876110c5565b16941693808514610d3b57803314908115610d1c575b5015610cb457848652602052842080546001600160a01b03191683179055610c8c836110c5565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6020608492519162461bcd60e51b8352820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152fd5b90508652600560205281862033875260205260ff828720541638610c65565b506020608492519162461bcd60e51b8352820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152fd5b50913461036857602036600319011261036857506108b160209235611125565b505034610215578160031936011261021557805190828054610dc9816110eb565b8085529060019081811690811561074d5750600114610df457505050610700826102f3940383610fb1565b94508180526020948583205b828410610e1c57505050826102f39461070092820101946106ee565b8054868501880152928601928101610e00565b925050346101c35760203660031901126101c3573563ffffffff60e01b81168091036101c3576020925063152a902d60e11b8114908115610e72575b5015158152f35b6380ac58cd60e01b811491508115610ea4575b8115610e93575b5038610e6b565b6301ffc9a760e01b14905038610e8c565b635b5e139f60e01b81149150610e85565b60005b838110610ec85750506000910152565b8181015183820152602001610eb8565b90602091610ef181518092818552858086019101610eb5565b601f01601f1916010190565b600435906001600160a01b0382168203610f1357565b600080fd5b602435906001600160a01b0382168203610f1357565b6060906003190112610f13576001600160a01b03906004358281168103610f1357916024359081168103610f13579060443590565b6040810190811067ffffffffffffffff821117610f7f57604052565b634e487b7160e01b600052604160045260246000fd5b6020810190811067ffffffffffffffff821117610f7f57604052565b90601f8019910116810190811067ffffffffffffffff821117610f7f57604052565b67ffffffffffffffff8111610f7f57601f01601f191660200190565b929192610ffb82610fd3565b916110096040519384610fb1565b829481845281830111610f13578281602093846000960137010152565b6006546001600160a01b0316330361103a57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b1561108557565b60405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606490fd5b6000908152600260205260409020546001600160a01b03166110e881151561107e565b90565b90600182811c9216801561111b575b602083101461110557565b634e487b7160e01b600052602260045260246000fd5b91607f16916110fa565b600081815260026020526040902054611148906001600160a01b0316151561107e565b6000908152600460205260409020546001600160a01b031690565b1561116a57565b60405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608490fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b1561122057565b60405162461bcd60e51b815280611239600482016111c6565b0390fd5b906001600160a01b038080611251846110c5565b16931691838314938415611284575b50831561126e575b50505090565b61127a91929350611125565b1614388080611268565b909350600052600560205260406000208260005260205260ff604060002054169238611260565b6112b4836110c5565b6001600160a01b03918216929082168390036113bb571690811561136a576112db8361140e565b60008181526003602052604081208054600019810191908211611356575582815260036020526040812080549060018201809211611356575583815260026020526040812080546001600160a01b031916841790557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9080a4565b634e487b7160e01b83526011600452602483fd5b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b600081815260046020526040812080546001600160a01b03191690556001600160a01b0361143b836110c5565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258280a4565b9192600092909190803b15611574576114b0946040518092630a85bd0160e11b9485835233600484015287602484015260448301526080606483015281878160209a8b966084830190610ed8565b03926001600160a01b03165af1849181611534575b50611523575050503d60001461151b573d6114df81610fd3565b906114ed6040519283610fb1565b81528091833d92013e5b805191826115185760405162461bcd60e51b815280611239600482016111c6565b01fd5b5060606114f7565b6001600160e01b0319161492509050565b9091508581813d831161156d575b61154c8183610fb1565b810103126104c457516001600160e01b0319811681036104c45790386114c5565b503d611542565b5050915050600190565b9293600093909291803b156115fe579484916115d89660405180948193630a85bd0160e11b9788845233600485015260018060a01b0380921660248501526044840152608060648401528260209b8c976084830190610ed8565b0393165af18491816115345750611523575050503d60001461151b573d6114df81610fd3565b505050915050600190565b60001981146116185760010190565b634e487b7160e01b600052601160045260246000fd5b80156116eb57600081805b6116d7575061164781610fd3565b906116556040519283610fb1565b808252601f1961166482610fd3565b013660208401375b809280156116d0576000198201918211611618578193600a92603090848406820180921161161857855111156116ba5760f81b6001600160f81b03191660001a908401601f0153049161166c565b634e487b7160e01b600052603260045260246000fd5b5050905090565b906116e3600a91611609565b910480611639565b506040516116f881610f63565b60018152600360fc1b602082015290565b67ffffffffffffffff8111610f7f5760051b6020019056fea2646970667358221220a8e5cf839b041dbd23407ea4a1a9528c3d2e16539cab346d7a80e1498fdb7ca864736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000004e200000000000000000000000000000000000000000000000000000000000000015436f6c6c656374696f6e205465737420546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000524434f4c54000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a5a6f64696163204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065a4f444941430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007168747470733a2f2f6170692e636f6c6c656374696f6e2e78797a2f726573742f6e6674732f6d657461646174613f636f6e7472616374416464726573733d30783931636536336631636432346166336431626437356237663134663238633130363761376165313426746f6b656e49643d000000000000000000000000000000

Deployed Bytecode

0x60806040526004361015610026575b361561001e5761001c61123a565b005b61001c61123a565b60003560e01c806301ffc9a7146101ca5780631473926e146101c1578063150b7a02146101b85780631b1a8411146101af57806326636592146101a65780632e3fd8d91461019d5780633d478c98146101945780634c156e901461018b5780634cd984ec1461018257806355f804b314610179578063715018a614610170578063729ad39e146101675780638da5cb5b1461015e578063a475fe3e14610155578063a4cf90f71461014c578063a81e928214610143578063abfb78831461013a578063c87b56dd14610131578063d85e7c4114610128578063dacd23ec1461011f5763f2fde38b0361000e5761011a610e8e565b61000e565b5061011a610e6b565b5061011a610e4c565b5061011a610d40565b5061011a610cab565b5061011a610c65565b5061011a610a8e565b5061011a6109b4565b5061011a61098a565b5061011a6105e2565b5061011a610583565b5061011a61050f565b5061011a61044e565b5061011a610429565b5061011a61040c565b5061011a6103d0565b5061011a610394565b5061011a610351565b5061011a6102e2565b5061011a6102ad565b503461029d57602036600319011261029d5760043563ffffffff60e01b811680910361029d576040516301ffc9a760e01b8152600481019190915261025e906020816024817f000000000000000000000000bbb5547fdc329f9cbd65b9eceaa21c9170d5ec616001600160a01b03165afa908115610290575b600091610262575b5060405190151581529081906020820190565b0390f35b610283915060203d8111610289575b61027b81836104c2565b81019061112c565b3861024b565b503d610271565b610298611036565b610243565b600080fd5b600091031261029d57565b503461029d57600036600319011261029d57602060ff600354166040519015158152f35b6001600160a01b0381160361029d57565b503461029d57608036600319011261029d576102ff6004356102d1565b61030a6024356102d1565b60643567ffffffffffffffff80821161029d573660238301121561029d57816004013590811161029d573691016024011161029d57604051630a85bd0160e11b8152602090f35b503461029d57602036600319011261029d5760043561036f816102d1565b60018060a01b03166000526004602052602060ff604060002054166040519015158152f35b503461029d57600036600319011261029d5760206040517f000000000000000000000000000000000000000000000000000000000003a9808152f35b503461029d57600036600319011261029d5760206040517f0000000000000000000000000000000000000000000000000000000000004e208152f35b503461029d57600036600319011261029d576020604051600c8152f35b503461029d57600036600319011261029d57602060405168056bc75e2d631000008152f35b503461029d57600036600319011261029d5760206040517f00000000000000000000000000000000000000000001a784379d99db420000008152f35b50634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff81116104b557604052565b6104bd61048a565b604052565b90601f8019910116810190811067ffffffffffffffff8211176104b557604052565b60209067ffffffffffffffff8111610502575b601f01601f19160190565b61050a61048a565b6104f7565b503461029d57602036600319011261029d5760043567ffffffffffffffff811161029d573660238201121561029d57806004013561054c816104e4565b9061055a60405192836104c2565b808252366024828501011161029d57602081600092602461001c960183860137830101526111b3565b503461029d576000806003193601126105df5761059e610f56565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b503461029d5760208060031936011261029d57600480359167ffffffffffffffff9283811161029d573660238201121561029d578083013593841161029d576024810190602436918660051b01011161029d5761063d610f56565b61064b846002541015611050565b600092610656611092565b92845b86811061067d5761001c610678610670888a611043565b600254611043565b600255565b61069f61069361068e838a886110e5565b611103565b6001600160a01b031690565b6001600160a01b03811660009081526004602052604090205460ff16156106c5565b1590565b15610977576001600160a01b03811660009081526004602052604090206106f390805460ff19166001179055565b6040805163a9059cbb60e01b81526001600160a01b0383811687830190815268056bc75e2d63100000602082015290916611c37937e08000471015918790829081900386018160007f000000000000000000000000ed2d462316b1bb66278a5740026869b23e3ac87c88165af1801561096a575b61094d575b506001546000837f000000000000000000000000bbb5547fdc329f9cbd65b9eceaa21c9170d5ec6116915b600c821061089757505050927fd5135edece16bae3d18fd51d56f9da595fae4f444659d4020cabc1195bd2cb4592610853926001969560001461085d5781516001600160a01b038416815261081491907f115ee403a707f82bb7bcf8e412b01cb6b5348f78596c03b484e60ecc8a6b53d190602090a18316611266565b80516001600160a01b03831681527f82a489e5a594e1d45d1e7c23766bea7881daaad1a70ddcbc65919523baf69ad790602090a1519182918a83611166565b0390a15b01610659565b5080516001600160a01b03831681527febecef5533d32c235a811555878783347be5377dbbc9a347dadf197b1db9218a90602090a1610814565b823b1561029d5761090e81806109088f86908f6000610921988f8f90836108f2958f935196879586948593632142170760e11b85523090850160409194939294606082019560018060a01b0380921683521660208201520152565b03925af18015610940575b610927575b50611144565b52611110565b9161091c6001805401600155565b611110565b90610797565b8061093461093a926104a1565b806102a2565b38610902565b610948611036565b6108fd565b61096390873d89116102895761027b81836104c2565b503861076c565b610972611036565b610767565b5094610984600191611110565b95610857565b503461029d57600036600319011261029d576000546040516001600160a01b039091168152602090f35b506000806003193601126105df576002546611c37937e0800090818102918183041490151715610a81575b479080821115610a79576109f291611043565b8015610a4657610a40610a3082610a2a7f265dda1c3f86126bf9c507394a66d2396f6cb0e0af1f35a2c41f63b9479e0fae94336112b8565b34611043565b6040519081529081906020820190565b0390a180f35b506040513481527f265dda1c3f86126bf9c507394a66d2396f6cb0e0af1f35a2c41f63b9479e0fae908060208101610a40565b5050806109f2565b610a89610ff5565b6109df565b503461029d57602036600319011261029d57610ab7610ab26106c160035460ff1690565b610fae565b610ac260043561100c565b6040516370a0823160e01b81523060048201526001600160a01b037f000000000000000000000000bbb5547fdc329f9cbd65b9eceaa21c9170d5ec611690610b4490602081602481865afa908115610c58575b600091610c2a575b507f000000000000000000000000000000000000000000000000000000000003a980611043565b9081831015610be2575b803b1561029d57604051634c41ab3760e11b8152306004820152602481018490527f2898e32a5bc0b2e0486c988a13a54653c8b4f6ea9b6c3341a4fb90c2a6258df793610bbd93610a3093919290916000908290604490829084905af18015610bd5575b610bc2575b50611043565b0390a1005b80610934610bcf926104a1565b38610bb7565b610bdd611036565b610bb2565b91508091610bf8600160ff196003541617600355565b604051600081527f2898e32a5bc0b2e0486c988a13a54653c8b4f6ea9b6c3341a4fb90c2a6258df790602090a1610b4e565b610c4b915060203d8111610c51575b610c4381836104c2565b810190611027565b38610b1d565b503d610c39565b610c60611036565b610b15565b503461029d57600036600319011261029d576040517f000000000000000000000000bbb5547fdc329f9cbd65b9eceaa21c9170d5ec616001600160a01b03168152602090f35b503461029d57600036600319011261029d576040517f000000000000000000000000ed2d462316b1bb66278a5740026869b23e3ac87c6001600160a01b03168152602090f35b60005b838110610d045750506000910152565b8181015183820152602001610cf4565b60409160208252610d348151809281602086015260208686019101610cf1565b601f01601f1916010190565b503461029d57602036600319011261029d5760405163c87b56dd60e01b8152600480359082015260009081816024817f000000000000000000000000bbb5547fdc329f9cbd65b9eceaa21c9170d5ec616001600160a01b03165afa908115610e3f575b8291610db8575b6040518061025e8482610d14565b90503d8083833e610dc981836104c2565b810190602081830312610e375780519067ffffffffffffffff8211610e3b570181601f82011215610e3757805192610e00846104e4565b92610e0e60405194856104c2565b848452602085840101116105df575061025e92610e319160208085019101610cf1565b38610daa565b8280fd5b8380fd5b610e47611036565b610da3565b503461029d57600036600319011261029d576020600254604051908152f35b503461029d57600036600319011261029d5760206040516611c37937e080008152f35b503461029d57602036600319011261029d57600435610eac816102d1565b610eb4610f56565b6001600160a01b039081168015610f0257600080546001600160a01b03198116831782559092167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b6000546001600160a01b03163303610f6a57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b15610fb557565b60405162461bcd60e51b81526020600482015260186024820152770416c726561647920726561647920746f2061697264726f760441b6044820152606490fd5b50634e487b7160e01b600052601160045260246000fd5b9081600c0291600c83040361101d57565b611025610ff5565b565b9081602091031261029d575190565b506040513d6000823e3d90fd5b9190820391821161101d57565b1561105757565b60405162461bcd60e51b8152602060048201526013602482015272546f6f206d616e7920726563697069656e747360681b6044820152606490fd5b604051906101a0820182811067ffffffffffffffff8211176110c1575b604052600c8252610180366020840137565b6110c961048a565b6110af565b50634e487b7160e01b600052603260045260246000fd5b91908110156110f6575b60051b0190565b6110fe6110ce565b6110ef565b3561110d816102d1565b90565b6001906000198114611120570190565b611128610ff5565b0190565b9081602091031261029d5751801515810361029d5790565b6020918151811015611159575b60051b010190565b6111616110ce565b611151565b9092919260408201604083528151809152606083019060208093019060005b8482821061119f57505050509360018060a01b0316910152565b835185529384019390920191600101611185565b6111bb610f56565b7f000000000000000000000000bbb5547fdc329f9cbd65b9eceaa21c9170d5ec616001600160a01b0316803b1561029d576040516355f804b360e01b81529160009183918290849082906112129060048301610d14565b03925af1801561122d575b6112245750565b611025906104a1565b611235611036565b61121d565b7f265dda1c3f86126bf9c507394a66d2396f6cb0e0af1f35a2c41f63b9479e0fae6020604051348152a1565b600080806611c37937e0800081945af11561127d57565b60405162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b6044820152606490fd5b600080809381935af11561127d5756fea264697066735822122020b7482cb06bdf42e4f4a030892ec3eda21ceefad7ff477e73ea6b810c60b3ee64736f6c63430008110033

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

00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000004e200000000000000000000000000000000000000000000000000000000000000015436f6c6c656374696f6e205465737420546f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000524434f4c54000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a5a6f64696163204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065a4f444941430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007168747470733a2f2f6170692e636f6c6c656374696f6e2e78797a2f726573742f6e6674732f6d657461646174613f636f6e7472616374416464726573733d30783931636536336631636432346166336431626437356237663134663238633130363761376165313426746f6b656e49643d000000000000000000000000000000

-----Decoded View---------------
Arg [0] : erc20Name (string): Collection Test Token
Arg [1] : erc20Symbol (string): $COLT
Arg [2] : erc721Name (string): Zodiac NFT
Arg [3] : erc721Symbol (string): ZODIAC
Arg [4] : erc721StandardURI (string): https://api.collection.xyz/rest/nfts/metadata?contractAddress=0x91ce63f1cd24af3d1bd75b7f14f28c1067a7ae14&tokenId=
Arg [5] : maxAirdrops (uint256): 20000

-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000004e20
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [7] : 436f6c6c656374696f6e205465737420546f6b656e0000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [9] : 24434f4c54000000000000000000000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [11] : 5a6f64696163204e465400000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [13] : 5a4f444941430000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000071
Arg [15] : 68747470733a2f2f6170692e636f6c6c656374696f6e2e78797a2f726573742f
Arg [16] : 6e6674732f6d657461646174613f636f6e7472616374416464726573733d3078
Arg [17] : 3931636536336631636432346166336431626437356237663134663238633130
Arg [18] : 363761376165313426746f6b656e49643d000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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