ETH Price: $3,482.25 (+0.53%)

Token

Koripo by Rich Poole (KORIPO)
 

Overview

Max Total Supply

999 KORIPO

Holders

521

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
2 KORIPO
0x6611498ef2f4d8b916f6473e4c96b658fe587c04
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

'Kōripo' by Rich Poole is a 999-pieces NFT collection by gm. studio. It is a generative series exploring elemental abstract art.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
GmStudioKoripo

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license
File 1 of 26 : Koripo.sol
// SPDX-License-Identifier: UNLICENSED
// Copyright (c) 2022 gmDAO
pragma solidity >=0.8.0 <0.9.0;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@divergencetech/ethier/contracts/erc721/ERC721Common.sol";
import "@divergencetech/ethier/contracts/crypto/SignatureChecker.sol";
import "@divergencetech/ethier/contracts/factories/PaymentSplitterDeployer.sol";
import "../../utils/ERC2981SinglePercentual.sol";

//                                           __                    __ __
//                                          |  \                  |  \  \
//   ______  ______ ____           _______ _| ▓▓_   __    __  ____| ▓▓\▓▓ ______
//  /      \|      \    \         /       \   ▓▓ \ |  \  |  \/      ▓▓  \/      \
// |  ▓▓▓▓▓▓\ ▓▓▓▓▓▓\▓▓▓▓\       |  ▓▓▓▓▓▓▓\▓▓▓▓▓▓ | ▓▓  | ▓▓  ▓▓▓▓▓▓▓ ▓▓  ▓▓▓▓▓▓\
// | ▓▓  | ▓▓ ▓▓ | ▓▓ | ▓▓        \▓▓    \  | ▓▓ __| ▓▓  | ▓▓ ▓▓  | ▓▓ ▓▓ ▓▓  | ▓▓
// | ▓▓__| ▓▓ ▓▓ | ▓▓ | ▓▓__      _\▓▓▓▓▓▓\ | ▓▓|  \ ▓▓__/ ▓▓ ▓▓__| ▓▓ ▓▓ ▓▓__/ ▓▓
//  \▓▓    ▓▓ ▓▓ | ▓▓ | ▓▓  \    |       ▓▓  \▓▓  ▓▓\▓▓    ▓▓\▓▓    ▓▓ ▓▓\▓▓    ▓▓
//  _\▓▓▓▓▓▓▓\▓▓  \▓▓  \▓▓\▓▓     \▓▓▓▓▓▓▓    \▓▓▓▓  \▓▓▓▓▓▓  \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓
// |  \__| ▓▓
//  \▓▓    ▓▓
//   \▓▓▓▓▓▓
//
contract GmStudioKoripo is
    ERC721Common,
    ReentrancyGuard,
    ERC2981SinglePercentual
{
    using EnumerableSet for EnumerableSet.AddressSet;
    using SignatureChecker for EnumerableSet.AddressSet;
    using Address for address payable;

    /// @notice Price for minting
    uint256 public constant MINT_PRICE = 0.15 ether;

    /// @notice Splits payments between the Studio and the artist.
    address payable public immutable paymentSplitter;

    /// @notice Splits payments between the Studio and the artist.
    address payable public immutable paymentSplitterRoyalties;

    /// @notice Total maximum amount of tokens
    uint32 public constant MAX_NUM_TOKENS = 999;

    /// @notice Number of mints throught the early access minting interface.
    uint32 internal constant NUM_EARLY_ACCESS_MINTS = 600;

    /// @notice Number of mints for reserved the studio.
    uint32 internal constant NUM_RESERVED_MINTS = 6;

    /// @notice Currently minted supply of tokens
    uint32 public totalSupply;

    /// @notice Locks the mintReserve function
    bool internal reserveMinted;

    /// @notice Timestamps to enables/eisables minting interfaces
    /// @dev The following order is assumed
    /// signedMintOpeningTimestamp < publicMintOpeningTimestamp < mintClosingTimestamp
    struct MintConfig {
        uint64 signedMintOpeningTimestamp;
        uint64 publicMintOpeningTimestamp;
        uint64 mintClosingTimestamp;
    }

    /// @notice The minting configuration
    MintConfig public mintConfig;

    /// @notice Stores the number of tokens minted from a signature during the
    /// early access stage.
    /// @dev Used in `mintEarlyAccess`
    mapping(bytes32 => uint256) public numEarlyAccessMintsFrom;

    /// @notice Stores the number of tokens minted from a signature during the
    /// public minting stage.
    /// @dev Used in `mintPublic`
    mapping(bytes32 => uint256) private _numPublicMintsFrom;

    /// @notice Signature signers for the early access stage.
    /// @dev Removing signers invalidates the corresponding signatures.
    EnumerableSet.AddressSet private _signersEarlyAccess;

    /// @notice Signature signers for the early access stage.
    /// @dev Removing signers invalidates the corresponding signatures.
    EnumerableSet.AddressSet private _signersPublic;

    /// @notice tokenURI() base path.
    /// @dev Without trailing slash
    string internal _baseTokenURI;

    /// @notice Token seeds for the artwork generation code determined at mint.
    /// @dev Determined by `_computeSeed`.
    mapping(uint256 => bytes32) private _seeds;

    constructor(
        address newOwner,
        address signerEarlyAccess,
        address signerPublic,
        string memory baseTokenURI,
        MintConfig memory config,
        address[] memory payees,
        uint256[] memory shares,
        uint256[] memory sharesRoyalties
    ) ERC721Common("Koripo by Rich Poole", "KORIPO") {
        _signersEarlyAccess.add(signerEarlyAccess);
        _signersPublic.add(signerPublic);
        _baseTokenURI = baseTokenURI;
        mintConfig = config;

        paymentSplitter = payable(
            PaymentSplitterDeployer.instance().deploy(payees, shares)
        );

        paymentSplitterRoyalties = payable(
            PaymentSplitterDeployer.instance().deploy(payees, sharesRoyalties)
        );

        _setRoyaltyPercentage(750);
        _setRoyaltyReceiver(paymentSplitterRoyalties);

        transferOwnership(newOwner);
    }

    // -------------------------------------------------------------------------
    //
    //  Minting
    //
    // -------------------------------------------------------------------------

    /// @notice Toggle minting relevant flags.
    function setMintConfig(MintConfig calldata config) external onlyOwner {
        mintConfig = config;
    }

    /* solhint-disable not-rely-on-time */
    /// @dev Reverts if we are not in the early access minting window or the if
    /// `mintConfig` has not been set yet.
    modifier onlyDuringEarlyAccessMintingPeriod() {
        if (
            // solhint-disable-next-line not-rely-on-time
            block.timestamp < mintConfig.signedMintOpeningTimestamp ||
            block.timestamp > mintConfig.publicMintOpeningTimestamp
        ) revert MintDisabled();
        _;
    }

    /// @dev Reverts if we are not in the public minting window or the if
    /// `mintConfig` has not been set yet.
    modifier onlyDuringPublicMintingPeriod() {
        if (
            block.timestamp < mintConfig.publicMintOpeningTimestamp ||
            block.timestamp > mintConfig.mintClosingTimestamp
        ) revert MintDisabled();
        _;
    }
    /* solhint-enable not-rely-on-time */

    /// @dev Reverts if called by a contract.
    modifier onlyEOA() {
        /* solhint-disable-next-line avoid-tx-origin */
        if (tx.origin != msg.sender) {
            revert OnlyEOA();
        }
        _;
    }

    /// @notice Mints tokens to a given address using a signed message.
    /// @dev The minter might be different than the receiver.
    /// @param to Token receiver
    /// @param num Number of tokens to be minted.
    /// @param numMax Max number of tokens that can be minted to the receiver.
    /// @param nonce additional signature salt.
    /// @param signature to prove that the receiver is allowed to get mints.
    /// @dev The signed messages is generated by concatenating
    /// `address(this) || to || numMax || nonce`.
    function _mintSigned(
        address to,
        uint16 num,
        uint16 numMax,
        uint128 nonce,
        bytes calldata signature,
        EnumerableSet.AddressSet storage signers,
        mapping(bytes32 => uint256) storage numMintedFrom
    ) internal {
        // General checks
        if (num * MINT_PRICE != msg.value) revert InvalidPayment();

        // Signature related checks
        bytes32 message = ECDSA.toEthSignedMessageHash(
            abi.encodePacked(address(this), to, numMax, nonce)
        );

        if (num + numMintedFrom[message] > numMax)
            revert TooManyMintsRequested();

        signers.requireValidSignature(message, signature);
        numMintedFrom[message] += num;

        _processPayment();
        _processMint(to, num);
    }

    /// @notice Mints tokens to a given address using a signed message during
    /// the early access stage.
    /// @dev The minter might be different than the receiver.
    /// @param to Token receiver
    /// @param num Number of tokens to be minted.
    /// @param numMax Max number of tokens that can be minted to the receiver.
    /// @param nonce additional signature salt.
    /// @param signature to prove that the receiver is allowed to get mints.
    function mintEarlyAccess(
        address to,
        uint16 num,
        uint16 numMax,
        uint128 nonce,
        bytes calldata signature
    ) external payable onlyDuringEarlyAccessMintingPeriod nonReentrant {
        if (num > _numEarlyAccessMintsRemaining())
            revert InsufficientTokensRemanining();

        _mintSigned(
            to,
            num,
            numMax,
            nonce,
            signature,
            _signersEarlyAccess,
            numEarlyAccessMintsFrom
        );
    }

    /// @notice Computes the number of remaining early access mints.
    /// @dev This takes into account whether or not the reserve was alredy minted.
    function _numEarlyAccessMintsRemaining() internal view returns (uint256) {
        uint256 maxMints = reserveMinted
            ? NUM_EARLY_ACCESS_MINTS + NUM_RESERVED_MINTS
            : NUM_EARLY_ACCESS_MINTS;
        return maxMints - totalSupply;
    }

    /// @notice Mints tokens for the sender using a signed message during
    /// the public minting stage.
    /// @param num Number of tokens to be minted.
    /// @param numMax Max number of tokens that can be minted.
    /// @param nonce additional signature salt.
    /// @param signature to prove that the receiver is allowed to get mints.
    function mintPublic(
        uint16 num,
        uint16 numMax,
        uint128 nonce,
        bytes calldata signature
    ) external payable onlyDuringPublicMintingPeriod onlyEOA {
        _mintSigned(
            msg.sender,
            num,
            numMax,
            nonce,
            signature,
            _signersPublic,
            _numPublicMintsFrom
        );
    }

    /// @notice Receiver of reserve mints.
    /// @dev `to` corresponds to the address of the receiver and `num` to the
    /// number of tokens to be minted.
    struct ReserveReceiver {
        address to;
        uint32 num;
    }

    /// @notice Mints the initial token reserve.
    /// @param receivers Array of token receivers
    /// @dev The minter might be different than the receiver.
    /// @dev Reverts if the number of minted tokens does not equal
    /// NUM_RESERVED_MINTS
    function mintReserve(ReserveReceiver[] calldata receivers)
        external
        onlyOwner
    {
        if (reserveMinted) revert MintDisabled();
        reserveMinted = true;

        uint256 numReceivers = receivers.length;
        uint256 minted = 0;
        for (uint256 idx = 0; idx < numReceivers; ++idx) {
            minted += receivers[idx].num;
            _processMint(receivers[idx].to, receivers[idx].num);
        }
        if (minted != NUM_RESERVED_MINTS) revert WrongNumberOfReserveMints();
    }

    /// @notice Mints new tokens for the recipient.
    function _processMint(address to, uint32 num) internal {
        uint32 nextTokenId = totalSupply;

        if (nextTokenId + num > MAX_NUM_TOKENS)
            revert InsufficientTokensRemanining();

        for (uint256 i = 0; i < num; i++) {
            ERC721._safeMint(to, nextTokenId);
            _seeds[nextTokenId] = _computeSeed(to, nextTokenId);
            nextTokenId++;
        }
        totalSupply = nextTokenId;
    }

    /// @notice Computes a pseudorandom seed for a given token.
    /// @dev Even though this process can be gamed in principle, it is extremly
    /// difficult to do so in practise. Therefore we can still rely on this to
    /// derive fair seeds.
    function _computeSeed(address to, uint32 tokenId)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked(
                    address(this),
                    block.difficulty,
                    blockhash(block.number - 1),
                    to,
                    tokenId
                )
            );
    }

    // -------------------------------------------------------------------------
    //
    //  Signature validataion
    //
    // -------------------------------------------------------------------------

    /// @notice The different minting stages
    enum MintingStage {
        EarlyAccess,
        Public
    }

    /// @notice Helper function the retrieves the correct set of signers for
    /// a given minting stage.
    function _getSigners(MintingStage stage)
        internal
        view
        returns (EnumerableSet.AddressSet storage)
    {
        if (stage == MintingStage.EarlyAccess) return _signersEarlyAccess;
        if (stage == MintingStage.Public) return _signersPublic;
        revert WrongMintingStage();
    }

    /// @notice Removes and adds addresses to the set of allowed signers.
    /// @dev Removal is performed before addition.
    function changeSigners(
        MintingStage stage,
        address[] calldata delSigners,
        address[] calldata addSigners
    ) external onlyOwner {
        EnumerableSet.AddressSet storage _signers = _getSigners(stage);

        for (uint256 idx; idx < delSigners.length; ++idx) {
            _signers.remove(delSigners[idx]);
        }
        for (uint256 idx; idx < addSigners.length; ++idx) {
            _signers.add(addSigners[idx]);
        }
    }

    /// @notice Returns the addresses that are used for signature verification
    /// for a given minting stage.
    function getSigners(MintingStage stage)
        external
        view
        returns (address[] memory signers)
    {
        EnumerableSet.AddressSet storage _signers = _getSigners(stage);

        uint256 len = _signers.length();
        signers = new address[](len);
        for (uint256 idx = 0; idx < len; ++idx) {
            signers[idx] = _signers.at(idx);
        }
    }

    // -------------------------------------------------------------------------
    //
    //  Payment
    //
    // -------------------------------------------------------------------------

    /// @notice Processes an incoming payment and sends it to the payment
    /// splitter.
    function _processPayment() internal {
        paymentSplitter.sendValue(msg.value);
    }

    // -------------------------------------------------------------------------
    //
    //  Metadata
    //
    // -------------------------------------------------------------------------

    /// @notice Change tokenURI() base path.
    /// @param uri The new base path (must not contain trailing slash)
    function setBaseTokenURI(string calldata uri) external onlyOwner {
        _baseTokenURI = uri;
    }

    /// @notice Returns the URI for token metadata.
    function tokenURI(uint256 tokenId)
        public
        view
        override
        tokenExists(tokenId)
        returns (string memory)
    {
        return
            string(
                abi.encodePacked(
                    _baseTokenURI,
                    "/",
                    Strings.toString(tokenId),
                    ".json"
                )
            );
    }

    /// @notice Returns the seed of a token.
    function tokenSeed(uint256 tokenId)
        public
        view
        tokenExists(tokenId)
        returns (bytes32)
    {
        return _seeds[tokenId];
    }

    // -------------------------------------------------------------------------
    //
    //  Internals
    //
    // -------------------------------------------------------------------------

    /// @dev See {IERC165-supportsInterface}.
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Common, ERC2981)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    // -------------------------------------------------------------------------
    //
    //  Errors
    //
    // -------------------------------------------------------------------------

    error MintDisabled();
    error TooManyMintsRequested();
    error InsufficientTokensRemanining();
    error InvalidPayment();
    error OnlyEOA();
    error WrongNumberOfReserveMints();
    error SignatureAlreadyUsed();
    error WrongMintingStage();
}

File 2 of 26 : SignatureChecker.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

/**
@title SignatureChecker
@notice Additional functions for EnumerableSet.Addresset that require a valid
ECDSA signature of a standardized message, signed by any member of the set.
 */
library SignatureChecker {
    using EnumerableSet for EnumerableSet.AddressSet;

    /**
    @notice Requires that the message has not been used previously and that the
    recovered signer is contained in the signers AddressSet.
    @dev Convenience wrapper for message generation + signature verification
    + marking message as used
    @param signers Set of addresses from which signatures are accepted.
    @param usedMessages Set of already-used messages.
    @param signature ECDSA signature of message.
     */
    function requireValidSignature(
        EnumerableSet.AddressSet storage signers,
        bytes memory data,
        bytes calldata signature,
        mapping(bytes32 => bool) storage usedMessages
    ) internal {
        bytes32 message = generateMessage(data);
        require(
            !usedMessages[message],
            "SignatureChecker: Message already used"
        );
        usedMessages[message] = true;
        requireValidSignature(signers, message, signature);
    }

    /**
    @notice Requires that the message has not been used previously and that the
    recovered signer is contained in the signers AddressSet.
    @dev Convenience wrapper for message generation + signature verification.
     */
    function requireValidSignature(
        EnumerableSet.AddressSet storage signers,
        bytes memory data,
        bytes calldata signature
    ) internal view {
        bytes32 message = generateMessage(data);
        requireValidSignature(signers, message, signature);
    }

    /**
    @notice Requires that the message has not been used previously and that the
    recovered signer is contained in the signers AddressSet.
    @dev Convenience wrapper for message generation from address +
    signature verification.
     */
    function requireValidSignature(
        EnumerableSet.AddressSet storage signers,
        address a,
        bytes calldata signature
    ) internal view {
        bytes32 message = generateMessage(abi.encodePacked(a));
        requireValidSignature(signers, message, signature);
    }

    /**
    @notice Common validator logic, checking if the recovered signer is
    contained in the signers AddressSet.
    */
    function validSignature(
        EnumerableSet.AddressSet storage signers,
        bytes32 message,
        bytes calldata signature
    ) internal view returns (bool) {
        return signers.contains(ECDSA.recover(message, signature));
    }

    /**
    @notice Requires that the recovered signer is contained in the signers
    AddressSet.
    @dev Convenience wrapper that reverts if the signature validation fails.
    */
    function requireValidSignature(
        EnumerableSet.AddressSet storage signers,
        bytes32 message,
        bytes calldata signature
    ) internal view {
        require(
            validSignature(signers, message, signature),
            "SignatureChecker: Invalid signature"
        );
    }

    /**
    @notice Generates a message for a given data input that will be signed
    off-chain using ECDSA.
    @dev For multiple data fields, a standard concatenation using 
    `abi.encodePacked` is commonly used to build data.
     */
    function generateMessage(bytes memory data)
        internal
        pure
        returns (bytes32)
    {
        return ECDSA.toEthSignedMessageHash(data);
    }
}

File 3 of 26 : ERC721Common.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;

import "../thirdparty/opensea/OpenSeaGasFreeListing.sol";
import "../utils/OwnerPausable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/Context.sol";

/**
@notice An ERC721 contract with common functionality:
 - OpenSea gas-free listings
 - OpenZeppelin Pausable
 - OpenZeppelin Pausable with functions exposed to Owner only
 */
contract ERC721Common is Context, ERC721Pausable, OwnerPausable {
    constructor(string memory name, string memory symbol)
        ERC721(name, symbol)
    {}

    /// @notice Requires that the token exists.
    modifier tokenExists(uint256 tokenId) {
        require(ERC721._exists(tokenId), "ERC721Common: Token doesn't exist");
        _;
    }

    /// @notice Requires that msg.sender owns or is approved for the token.
    modifier onlyApprovedOrOwner(uint256 tokenId) {
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721Common: Not approved nor owner"
        );
        _;
    }

    /// @notice Overrides _beforeTokenTransfer as required by inheritance.
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override(ERC721Pausable) {
        super._beforeTokenTransfer(from, to, tokenId);
    }

    /// @notice Overrides supportsInterface as required by inheritance.
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /**
    @notice Returns true if either standard isApprovedForAll() returns true or
    the operator is the OpenSea proxy for the owner.
     */
    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            super.isApprovedForAll(owner, operator) ||
            OpenSeaGasFreeListing.isApprovedForAll(owner, operator);
    }
}

File 4 of 26 : IPaymentSplitterFactory.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;

interface IPaymentSplitterFactory {
    /// @notice Deploys a minimal contract proxy to a PaymentSplitter.
    function deploy(address[] memory payees, uint256[] memory shares)
        external
        returns (address);

    /**
    @notice Deploys a minimal contract proxy to a PaymentSplitter, at a
    deterministic address.
    @dev Use predictDeploymentAddress() with the same salt to predit the address
    before calling deployDeterministic(). See OpenZeppelin's proxy/Clones.sol
    for details and caveats, primarily that this will revert if a salt is
    reused.
     */
    function deployDeterministic(
        bytes32 salt,
        address[] memory payees,
        uint256[] memory shares
    ) external returns (address);

    /**
    @notice Returns the address at which a new PaymentSplitter will be deployed
    if using the same salt as passed to this function.
     */
    function predictDeploymentAddress(bytes32 salt)
        external
        view
        returns (address);
}

File 5 of 26 : PaymentSplitterDeployer.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;

import "./IPaymentSplitterFactory.sol";

/**
@notice Convenience library for using ethier's PaymentSplitterFactory for cheap
deployment of OpenZeppelin PaymentSplitters via minimal proxy contracts. A
single factory contract is deployed on supported chains, the respective
addresses of which are determined via the chainid() and returned by this
library's instance() function.
 */
library PaymentSplitterDeployer {
    /***
    @notice Returns the ethier PaymentSplitterFactory instance for the current
    chain.
     */
    function instance() internal view returns (IPaymentSplitterFactory) {
        address factory;

        assembly {
            switch chainid()
            case 1 {
                // mainnet
                factory := 0xf034d6a4b1a64f0e6038632d87746ca24b79d325
            }
            case 4 {
                // Rinkeby
                factory := 0x633dc916D9f59cf4aA117dE2Bb8edF7752270EC0
            }
            case 1337 {
                // The geth SimulatedBackend iff used with the ethier
                // factorytest package.
                factory := 0xa516d2c64ED7Fe2004A93Bc123854B229F3Bb738
            }
        }

        require(
            factory != address(0),
            "PaymentSplitterFactory: not deployed on current chain"
        );
        return IPaymentSplitterFactory(factory);
    }
}

File 6 of 26 : OpenSeaGasFreeListing.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;

// Inspired by BaseOpenSea by Simon Fremaux (@dievardump) but without the need
// to pass specific addresses depending on deployment network.
// https://gist.github.com/dievardump/483eb43bc6ed30b14f01e01842e3339b/

import "./ProxyRegistry.sol";

/// @notice Library to achieve gas-free listings on OpenSea.
library OpenSeaGasFreeListing {
    /**
    @notice Returns whether the operator is an OpenSea proxy for the owner, thus
    allowing it to list without the token owner paying gas.
    @dev ERC{721,1155}.isApprovedForAll should be overriden to also check if
    this function returns true.
     */
    function isApprovedForAll(address owner, address operator)
        internal
        view
        returns (bool)
    {
        address proxy = proxyFor(owner);
        return proxy != address(0) && proxy == operator;
    }

    /**
    @notice Returns the OpenSea proxy address for the owner.
     */
    function proxyFor(address owner) internal view returns (address) {
        address registry;
        uint256 chainId;

        assembly {
            chainId := chainid()
            switch chainId
            // Production networks are placed higher to minimise the number of
            // checks performed and therefore reduce gas. By the same rationale,
            // mainnet comes before Polygon as it's more expensive.
            case 1 {
                // mainnet
                registry := 0xa5409ec958c83c3f309868babaca7c86dcb077c1
            }
            case 137 {
                // polygon
                registry := 0x58807baD0B376efc12F5AD86aAc70E78ed67deaE
            }
            case 4 {
                // rinkeby
                registry := 0xf57b2c51ded3a29e6891aba85459d600256cf317
            }
            case 80001 {
                // mumbai
                registry := 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c
            }
            case 1337 {
                // The geth SimulatedBackend iff used with the ethier
                // openseatest package. This is mocked as a Wyvern proxy as it's
                // more complex than the 0x ones.
                registry := 0xE1a2bbc877b29ADBC56D2659DBcb0ae14ee62071
            }
        }

        // Unlike Wyvern, the registry itself is the proxy for all owners on 0x
        // chains.
        if (registry == address(0) || chainId == 137 || chainId == 80001) {
            return registry;
        }

        return address(ProxyRegistry(registry).proxies(owner));
    }
}

File 7 of 26 : ProxyRegistry.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;

/// @notice A minimal interface describing OpenSea's Wyvern proxy registry.
contract ProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

/**
@dev This pattern of using an empty contract is cargo-culted directly from
OpenSea's example code. TODO: it's likely that the above mapping can be changed
to address => address without affecting anything, but further investigation is
needed (i.e. is there a subtle reason that OpenSea released it like this?).
 */
contract OwnableDelegateProxy {

}

File 8 of 26 : OwnerPausable.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier)
pragma solidity >=0.8.0 <0.9.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

/// @notice A Pausable contract that can only be toggled by the Owner.
contract OwnerPausable is Ownable, Pausable {
    /// @notice Pauses the contract.
    function pause() public onlyOwner {
        Pausable._pause();
    }

    /// @notice Unpauses the contract.
    function unpause() public onlyOwner {
        Pausable._unpause();
    }
}

File 9 of 26 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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 10 of 26 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

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

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        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());
    }
}

File 11 of 26 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 12 of 26 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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: balance query for the zero address");
        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: owner query for nonexistent token");
        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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 overriden 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 owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        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: transfer caller is not 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: transfer caller is not 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) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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);
    }

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

    /**
     * @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 of token that is not own");
        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);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {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 a {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 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 {
                    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 {}
}

File 13 of 26 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

File 14 of 26 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 15 of 26 : ERC721Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev ERC721 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 ERC721Pausable is ERC721, Pausable {
    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

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

File 16 of 26 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 26 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 18 of 26 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 19 of 26 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

File 20 of 26 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 21 of 26 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 22 of 26 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 23 of 26 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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.
 */
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;

        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;

        assembly {
            result := store
        }

        return result;
    }
}

File 24 of 26 : ERC2981.sol
// SPDX-License-Identifier: MIT
// Copyright 2021 David Huber (@cxkoda)

pragma solidity >=0.8.0 <0.9.0;

import "./IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

/**
 * @notice ERC2981 royalty info base contract
 * @dev Implements `supportsInterface`
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC165, IERC165)
        returns (bool)
    {
        return
            interfaceId == type(IERC2981).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 25 of 26 : ERC2981SinglePercentual.sol
// SPDX-License-Identifier: MIT
// Copyright 2021 David Huber (@cxkoda)

pragma solidity >=0.8.0 <0.9.0;

import "./ERC2981.sol";

/**
 * @notice ERC2981 royalty info implementation for a single beneficiary
 * receving a percentage of sales prices.
 * @author David Huber (@cxkoda)
 */
contract ERC2981SinglePercentual is ERC2981 {
    /**
     * @dev The royalty percentage (in units of 0.01%)
     */
    uint96 private _percentage;

    /**
     * @dev The address to receive the royalties
     */
    address private _receiver;

    /**
     * @dev See {IERC2981-royaltyInfo}.
     */
    function royaltyInfo(uint256, uint256 salePrice)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        royaltyAmount = (salePrice / 10000) * _percentage;
        receiver = _receiver;
    }

    /**
     * @dev Sets the royalty percentage (in units of 0.01%)
     */
    function _setRoyaltyPercentage(uint96 percentage_) internal {
        _percentage = percentage_;
    }

    /**
     * @dev Sets the address to receive the royalties
     */
    function _setRoyaltyReceiver(address receiver_) internal {
        _receiver = receiver_;
    }
}

File 26 of 26 : IERC2981.sol
// SPDX-License-Identifier: None

pragma solidity >=0.8.0 <0.9.0;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard
 * @author Taken from https://eips.ethereum.org/EIPS/eip-2981
 */
interface IERC2981 is IERC165 {
    /**
     * @notice Called with the sale price to determine how much royalty
     * is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by _tokenId
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for _salePrice
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"address","name":"signerEarlyAccess","type":"address"},{"internalType":"address","name":"signerPublic","type":"address"},{"internalType":"string","name":"baseTokenURI","type":"string"},{"components":[{"internalType":"uint64","name":"signedMintOpeningTimestamp","type":"uint64"},{"internalType":"uint64","name":"publicMintOpeningTimestamp","type":"uint64"},{"internalType":"uint64","name":"mintClosingTimestamp","type":"uint64"}],"internalType":"struct GmStudioKoripo.MintConfig","name":"config","type":"tuple"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"},{"internalType":"uint256[]","name":"sharesRoyalties","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InsufficientTokensRemanining","type":"error"},{"inputs":[],"name":"InvalidPayment","type":"error"},{"inputs":[],"name":"MintDisabled","type":"error"},{"inputs":[],"name":"OnlyEOA","type":"error"},{"inputs":[],"name":"SignatureAlreadyUsed","type":"error"},{"inputs":[],"name":"TooManyMintsRequested","type":"error"},{"inputs":[],"name":"WrongMintingStage","type":"error"},{"inputs":[],"name":"WrongNumberOfReserveMints","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_NUM_TOKENS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum GmStudioKoripo.MintingStage","name":"stage","type":"uint8"},{"internalType":"address[]","name":"delSigners","type":"address[]"},{"internalType":"address[]","name":"addSigners","type":"address[]"}],"name":"changeSigners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum GmStudioKoripo.MintingStage","name":"stage","type":"uint8"}],"name":"getSigners","outputs":[{"internalType":"address[]","name":"signers","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintConfig","outputs":[{"internalType":"uint64","name":"signedMintOpeningTimestamp","type":"uint64"},{"internalType":"uint64","name":"publicMintOpeningTimestamp","type":"uint64"},{"internalType":"uint64","name":"mintClosingTimestamp","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"num","type":"uint16"},{"internalType":"uint16","name":"numMax","type":"uint16"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintEarlyAccess","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"num","type":"uint16"},{"internalType":"uint16","name":"numMax","type":"uint16"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint32","name":"num","type":"uint32"}],"internalType":"struct GmStudioKoripo.ReserveReceiver[]","name":"receivers","type":"tuple[]"}],"name":"mintReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"numEarlyAccessMintsFrom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentSplitter","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentSplitterRoyalties","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"signedMintOpeningTimestamp","type":"uint64"},{"internalType":"uint64","name":"publicMintOpeningTimestamp","type":"uint64"},{"internalType":"uint64","name":"mintClosingTimestamp","type":"uint64"}],"internalType":"struct GmStudioKoripo.MintConfig","name":"config","type":"tuple"}],"name":"setMintConfig","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenSeed","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b5060405162004016380380620040168339810160408190526200003491620008af565b604080518082018252601481527f4b6f7269706f206279205269636820506f6f6c650000000000000000000000006020808301918252835180850190945260068452654b4f5249504f60d01b908401528151919291839183916200009b916000916200057f565b508051620000b19060019060208401906200057f565b505050620000ce620000c8620002e660201b60201c565b620002ea565b50506006805460ff60a01b191690556001600755620000fb600d886200033c602090811b6200122a17901c565b506200011786600f6200033c60201b6200122a1790919060201c565b5084516200012d9060119060208801906200057f565b508351600a805460208088015160408901516001600160401b03908116600160801b02600160801b600160c01b031992821668010000000000000000026001600160801b0319909516919096161792909217919091169290921790556200019d906200123f6200035c821b17901c565b6001600160a01b0316634f62f4d184846040518363ffffffff1660e01b8152600401620001cc929190620009b7565b6020604051808303816000875af1158015620001ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000212919062000a3f565b6001600160a01b0316608052620002346200035c602090811b6200123f17901c565b6001600160a01b0316634f62f4d184836040518363ffffffff1660e01b815260040162000263929190620009b7565b6020604051808303816000875af115801562000283573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002a9919062000a3f565b6001600160a01b031660a08190526c01000000000000000000000000026102ee17600855620002d8886200045c565b505050505050505062000a9a565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600062000353836001600160a01b0384166200052d565b90505b92915050565b60008046600181146200038257600481146200039f576105398114620003bc57620003d4565b73f034d6a4b1a64f0e6038632d87746ca24b79d3259150620003d4565b73633dc916d9f59cf4aa117de2bb8edf7752270ec09150620003d4565b73a516d2c64ed7fe2004a93bc123854b229f3bb73891505b506001600160a01b038116620004575760405162461bcd60e51b815260206004820152603560248201527f5061796d656e7453706c6974746572466163746f72793a206e6f74206465706c60448201527f6f796564206f6e2063757272656e7420636861696e000000000000000000000060648201526084015b60405180910390fd5b919050565b6006546001600160a01b03163314620004b85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016200044e565b6001600160a01b0381166200051f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016200044e565b6200052a81620002ea565b50565b6000818152600183016020526040812054620005765750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000356565b50600062000356565b8280546200058d9062000a5d565b90600052602060002090601f016020900481019282620005b15760008555620005fc565b82601f10620005cc57805160ff1916838001178555620005fc565b82800160010185558215620005fc579182015b82811115620005fc578251825591602001919060010190620005df565b506200060a9291506200060e565b5090565b5b808211156200060a57600081556001016200060f565b80516001600160a01b03811681146200045757600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200067e576200067e6200063d565b604052919050565b600082601f8301126200069857600080fd5b81516001600160401b03811115620006b457620006b46200063d565b6020620006ca601f8301601f1916820162000653565b8281528582848701011115620006df57600080fd5b60005b83811015620006ff578581018301518282018401528201620006e2565b83811115620007115760008385840101525b5095945050505050565b80516001600160401b03811681146200045757600080fd5b6000606082840312156200074657600080fd5b604051606081016001600160401b03811182821017156200076b576200076b6200063d565b6040529050806200077c836200071b565b81526200078c602084016200071b565b60208201526200079f604084016200071b565b60408201525092915050565b60006001600160401b03821115620007c757620007c76200063d565b5060051b60200190565b600082601f830112620007e357600080fd5b81516020620007fc620007f683620007ab565b62000653565b82815260059290921b840181019181810190868411156200081c57600080fd5b8286015b848110156200084257620008348162000625565b835291830191830162000820565b509695505050505050565b600082601f8301126200085f57600080fd5b8151602062000872620007f683620007ab565b82815260059290921b840181019181810190868411156200089257600080fd5b8286015b8481101562000842578051835291830191830162000896565b600080600080600080600080610140898b031215620008cd57600080fd5b620008d88962000625565b9750620008e860208a0162000625565b9650620008f860408a0162000625565b60608a01519096506001600160401b03808211156200091657600080fd5b620009248c838d0162000686565b9650620009358c60808d0162000733565b955060e08b01519150808211156200094c57600080fd5b6200095a8c838d01620007d1565b94506101008b01519150808211156200097257600080fd5b620009808c838d016200084d565b93506101208b01519150808211156200099857600080fd5b50620009a78b828c016200084d565b9150509295985092959890939650565b604080825283519082018190526000906020906060840190828701845b82811015620009fb5781516001600160a01b031684529284019290840190600101620009d4565b5050508381038285015284518082528583019183019060005b8181101562000a325783518352928401929184019160010162000a14565b5090979650505050505050565b60006020828403121562000a5257600080fd5b620003538262000625565b600181811c9082168062000a7257607f821691505b6020821081141562000a9457634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05161354f62000ac7600039600061059f0152600081816106a20152611f93015261354f6000f3fe6080604052600436106102045760003560e01c806370a0823111610118578063bf964b4e116100a0578063e7cc72441161006f578063e7cc724414610610578063e985e9c514610670578063ed4a6b0c14610690578063ed92d4f7146106c4578063f2fde38b146106e457600080fd5b8063bf964b4e1461058d578063c002d23d146105c1578063c615a7b2146105dd578063c87b56dd146105f057600080fd5b80638da5cb5b116100e75780638da5cb5b1461050757806395d89b4114610525578063a22cb4651461053a578063b88d4fde1461055a578063bd2e4abd1461057a57600080fd5b806370a08231146104a7578063715018a6146104c7578063718e6adb146104dc5780638456cb59146104f257600080fd5b806328c5846f1161019b57806342842e0e1161016a57806342842e0e146104085780635c975abb146104285780635f516836146104475780636352211e146104675780636b7813ee1461048757600080fd5b806328c5846f146103595780632a55205a1461039457806330176e13146103d35780633f4ba83a146103f357600080fd5b80630ae9f4ae116101d75780630ae9f4ae146102ba57806318160ddd146102da57806323b872dd1461030c578063249c4b481461032c57600080fd5b806301ffc9a71461020957806306fdde031461023e578063081812fc14610260578063095ea7b314610298575b600080fd5b34801561021557600080fd5b506102296102243660046129ec565b610704565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b50610253610715565b6040516102359190612a61565b34801561026c57600080fd5b5061028061027b366004612a74565b6107a7565b6040516001600160a01b039091168152602001610235565b3480156102a457600080fd5b506102b86102b3366004612aa2565b610841565b005b3480156102c657600080fd5b506102b86102d5366004612ace565b610957565b3480156102e657600080fd5b506009546102f79063ffffffff1681565b60405163ffffffff9091168152602001610235565b34801561031857600080fd5b506102b8610327366004612b42565b610a9d565b34801561033857600080fd5b5061034c610347366004612b92565b610ace565b6040516102359190612bad565b34801561036557600080fd5b50610386610374366004612a74565b600b6020526000908152604090205481565b604051908152602001610235565b3480156103a057600080fd5b506103b46103af366004612bfa565b610b85565b604080516001600160a01b039093168352602083019190915201610235565b3480156103df57600080fd5b506102b86103ee366004612c5d565b610bce565b3480156103ff57600080fd5b506102b8610c04565b34801561041457600080fd5b506102b8610423366004612b42565b610c38565b34801561043457600080fd5b50600654600160a01b900460ff16610229565b34801561045357600080fd5b50610386610462366004612a74565b610c53565b34801561047357600080fd5b50610280610482366004612a74565b610ca1565b34801561049357600080fd5b506102b86104a2366004612c9e565b610d18565b3480156104b357600080fd5b506103866104c2366004612cb0565b610d4f565b3480156104d357600080fd5b506102b8610dd6565b3480156104e857600080fd5b506102f76103e781565b3480156104fe57600080fd5b506102b8610e0a565b34801561051357600080fd5b506006546001600160a01b0316610280565b34801561053157600080fd5b50610253610e3c565b34801561054657600080fd5b506102b8610555366004612ccd565b610e4b565b34801561056657600080fd5b506102b8610575366004612d21565b610e5a565b6102b8610588366004612e29565b610e8c565b34801561059957600080fd5b506102807f000000000000000000000000000000000000000000000000000000000000000081565b3480156105cd57600080fd5b50610386670214e8348c4f000081565b6102b86105eb366004612eb0565b610f77565b3480156105fc57600080fd5b5061025361060b366004612a74565b610fff565b34801561061c57600080fd5b50600a54610646906001600160401b0380821691600160401b8104821691600160801b9091041683565b604080516001600160401b0394851681529284166020840152921691810191909152606001610235565b34801561067c57600080fd5b5061022961068b366004612f25565b611072565b34801561069c57600080fd5b506102807f000000000000000000000000000000000000000000000000000000000000000081565b3480156106d057600080fd5b506102b86106df366004612f97565b6110b4565b3480156106f057600080fd5b506102b86106ff366004612cb0565b61118f565b600061070f8261132b565b92915050565b60606000805461072490613006565b80601f016020809104026020016040519081016040528092919081815260200182805461075090613006565b801561079d5780601f106107725761010080835404028352916020019161079d565b820191906000526020600020905b81548152906001019060200180831161078057829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108255760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061084c82610ca1565b9050806001600160a01b0316836001600160a01b031614156108ba5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161081c565b336001600160a01b03821614806108d657506108d68133611072565b6109485760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161081c565b6109528383611350565b505050565b6006546001600160a01b031633146109815760405162461bcd60e51b815260040161081c9061303b565b600954640100000000900460ff16156109ad576040516317efbd6b60e01b815260040160405180910390fd5b6009805464ff000000001916640100000000179055806000805b82811015610a75578484828181106109e1576109e1613070565b90506040020160200160208101906109f99190613086565b610a099063ffffffff16836130c2565b9150610a65858583818110610a2057610a20613070565b610a369260206040909202019081019150612cb0565b868684818110610a4857610a48613070565b9050604002016020016020810190610a609190613086565b6113be565b610a6e816130da565b90506109c7565b5060068114610a97576040516378e2ffa360e01b815260040160405180910390fd5b50505050565b610aa73382611479565b610ac35760405162461bcd60e51b815260040161081c906130f5565b610952838383611550565b60606000610adb836116fb565b90506000610ae882611759565b9050806001600160401b03811115610b0257610b02612d0b565b604051908082528060200260200182016040528015610b2b578160200160208202803683370190505b50925060005b81811015610b7d57610b438382611763565b848281518110610b5557610b55613070565b6001600160a01b0390921660209283029190910190910152610b76816130da565b9050610b31565b505050919050565b60085460009081906bffffffffffffffffffffffff16610ba76127108561315c565b610bb19190613170565b600854600160601b90046001600160a01b03169590945092505050565b6006546001600160a01b03163314610bf85760405162461bcd60e51b815260040161081c9061303b565b6109526011838361293d565b6006546001600160a01b03163314610c2e5760405162461bcd60e51b815260040161081c9061303b565b610c3661176f565b565b61095283838360405180602001604052806000815250610e5a565b60008181526002602052604081205482906001600160a01b0316610c895760405162461bcd60e51b815260040161081c9061318f565b60008381526012602052604090205491505b50919050565b6000818152600260205260408120546001600160a01b03168061070f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161081c565b6006546001600160a01b03163314610d425760405162461bcd60e51b815260040161081c9061303b565b80600a61095282826131e9565b60006001600160a01b038216610dba5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161081c565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610e005760405162461bcd60e51b815260040161081c9061303b565b610c36600061180c565b6006546001600160a01b03163314610e345760405162461bcd60e51b815260040161081c9061303b565b610c3661185e565b60606001805461072490613006565b610e563383836118e6565b5050565b610e643383611479565b610e805760405162461bcd60e51b815260040161081c906130f5565b610a97848484846119b5565b600a546001600160401b0316421080610eb65750600a54600160401b90046001600160401b031642115b15610ed4576040516317efbd6b60e01b815260040160405180910390fd5b60026007541415610f275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161081c565b6002600755610f346119e8565b8561ffff161115610f5857604051630f196e0f60e21b815260040160405180910390fd5b610f6a868686868686600d600b611a32565b5050600160075550505050565b600a54600160401b90046001600160401b0316421080610fa85750600a54600160801b90046001600160401b031642115b15610fc6576040516317efbd6b60e01b815260040160405180910390fd5b323314610fe657604051639f8129d160e01b815260040160405180910390fd5b610ff8338686868686600f600c611a32565b5050505050565b606081611023816000908152600260205260409020546001600160a01b0316151590565b61103f5760405162461bcd60e51b815260040161081c9061318f565b601161104a84611b75565b60405160200161105b929190613290565b604051602081830303815290604052915050919050565b6001600160a01b03808316600090815260056020908152604080832093851683529290529081205460ff16806110ad57506110ad8383611c72565b9392505050565b6006546001600160a01b031633146110de5760405162461bcd60e51b815260040161081c9061303b565b60006110e9866116fb565b905060005b848110156111385761112786868381811061110b5761110b613070565b90506020020160208101906111209190612cb0565b8390611cb1565b50611131816130da565b90506110ee565b5060005b828110156111865761117584848381811061115957611159613070565b905060200201602081019061116e9190612cb0565b839061122a565b5061117f816130da565b905061113c565b50505050505050565b6006546001600160a01b031633146111b95760405162461bcd60e51b815260040161081c9061303b565b6001600160a01b03811661121e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081c565b6112278161180c565b50565b60006110ad836001600160a01b038416611cc6565b6000804660018114611261576004811461127d576105398114611299576112b1565b73f034d6a4b1a64f0e6038632d87746ca24b79d32591506112b1565b73633dc916d9f59cf4aa117de2bb8edf7752270ec091506112b1565b73a516d2c64ed7fe2004a93bc123854b229f3bb73891505b506001600160a01b0381166113265760405162461bcd60e51b815260206004820152603560248201527f5061796d656e7453706c6974746572466163746f72793a206e6f74206465706c60448201527437bcb2b21037b71031bab93932b73a1031b430b4b760591b606482015260840161081c565b919050565b60006001600160e01b0319821663152a902d60e11b148061070f575061070f82611d15565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061138582610ca1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60095463ffffffff166103e76113d48383613352565b63ffffffff1611156113f957604051630f196e0f60e21b815260040160405180910390fd5b60005b8263ffffffff1681101561145a5761141a848363ffffffff16611d20565b6114248483611d3a565b63ffffffff8316600090815260126020526040902055816114448161337a565b9250508080611452906130da565b9150506113fc565b506009805463ffffffff191663ffffffff929092169190911790555050565b6000818152600260205260408120546001600160a01b03166114f25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161081c565b60006114fd83610ca1565b9050806001600160a01b0316846001600160a01b031614806115385750836001600160a01b031661152d846107a7565b6001600160a01b0316145b8061154857506115488185611072565b949350505050565b826001600160a01b031661156382610ca1565b6001600160a01b0316146115cb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161081c565b6001600160a01b03821661162d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161081c565b611638838383611db4565b611643600082611350565b6001600160a01b038316600090815260036020526040812080546001929061166c90849061339e565b90915550506001600160a01b038216600090815260036020526040812080546001929061169a9084906130c2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080826001811115611710576117106133b5565b141561171e5750600d919050565b6001826001811115611732576117326133b5565b14156117405750600f919050565b6040516327d0b10d60e01b815260040160405180910390fd5b600061070f825490565b60006110ad8383611dbf565b600654600160a01b900460ff166117bf5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161081c565b6006805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600654600160a01b900460ff16156118ab5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161081c565b6006805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117ef3390565b816001600160a01b0316836001600160a01b031614156119485760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161081c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6119c0848484611550565b6119cc84848484611de9565b610a975760405162461bcd60e51b815260040161081c906133cb565b6009546000908190640100000000900460ff16611a0757610258611a14565b611a146006610258613352565b60095463ffffffff9182169250611a2c91168261339e565b91505090565b34611a49670214e8348c4f000061ffff8a16613170565b14611a675760405163078d696560e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff1930606090811b821660208401528a901b1660348201526001600160f01b031960f088901b1660488201526fffffffffffffffffffffffffffffffff19608087901b16604a820152600090611add90605a01604051602081830303815290604052611ee7565b60008181526020849052604090205490915061ffff80891691611b01918b166130c2565b1115611b205760405163342e754760e21b815260040160405180910390fd5b611b2c83828787611f22565b6000818152602083905260408120805461ffff8b169290611b4e9084906130c2565b90915550611b5c9050611f86565b611b6a898961ffff166113be565b505050505050505050565b606081611b995750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611bc35780611bad816130da565b9150611bbc9050600a8361315c565b9150611b9d565b6000816001600160401b03811115611bdd57611bdd612d0b565b6040519080825280601f01601f191660200182016040528015611c07576020820181803683370190505b5090505b841561154857611c1c60018361339e565b9150611c29600a8661341d565b611c349060306130c2565b60f81b818381518110611c4957611c49613070565b60200101906001600160f81b031916908160001a905350611c6b600a8661315c565b9450611c0b565b600080611c7e84611fb9565b90506001600160a01b038116158015906115485750826001600160a01b0316816001600160a01b03161491505092915050565b60006110ad836001600160a01b038416612110565b6000818152600183016020526040812054611d0d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561070f565b50600061070f565b600061070f82612203565b610e56828260405180602001604052806000815250612253565b60003044611d4960014361339e565b6040516bffffffffffffffffffffffff19606094851b811660208301526034820193909352904060548201529185901b1660748201526001600160e01b031960e084901b166088820152608c0160405160208183030381529060405280519060200120905092915050565b610952838383612286565b6000826000018281548110611dd657611dd6613070565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611edc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e2d903390899088908890600401613431565b6020604051808303816000875af1925050508015611e68575060408051601f3d908101601f19168201909252611e659181019061346e565b60015b611ec2573d808015611e96576040519150601f19603f3d011682016040523d82523d6000602084013e611e9b565b606091505b508051611eba5760405162461bcd60e51b815260040161081c906133cb565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611548565b506001949350505050565b6000611ef38251611b75565b82604051602001611f0592919061348b565b604051602081830303815290604052805190602001209050919050565b611f2e848484846122f4565b610a975760405162461bcd60e51b815260206004820152602360248201527f5369676e6174757265436865636b65723a20496e76616c6964207369676e617460448201526275726560e81b606482015260840161081c565b610c366001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001634612349565b600080468060018114611fee576089811461200a57600481146120265762013881811461204257610539811461205e57612076565b73a5409ec958c83c3f309868babaca7c86dcb077c19250612076565b7358807bad0b376efc12f5ad86aac70e78ed67deae9250612076565b73f57b2c51ded3a29e6891aba85459d600256cf3179250612076565b73ff7ca10af37178bdd056628ef42fd7f799fac77c9250612076565b73e1a2bbc877b29adbc56d2659dbcb0ae14ee6207192505b506001600160a01b038216158061208d5750806089145b8061209a57508062013881145b156120a6575092915050565b60405163c455279160e01b81526001600160a01b03858116600483015283169063c455279190602401602060405180830381865afa1580156120ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154891906134e6565b600081815260018301602052604081205480156121f957600061213460018361339e565b85549091506000906121489060019061339e565b90508181146121ad57600086600001828154811061216857612168613070565b906000526020600020015490508087600001848154811061218b5761218b613070565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806121be576121be613503565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061070f565b600091505061070f565b60006001600160e01b031982166380ac58cd60e01b148061223457506001600160e01b03198216635b5e139f60e01b145b8061070f57506301ffc9a760e01b6001600160e01b031983161461070f565b61225d8383612462565b61226a6000848484611de9565b6109525760405162461bcd60e51b815260040161081c906133cb565b600654600160a01b900460ff16156109525760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b606482015260840161081c565b60006123406123398585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125b092505050565b86906125d4565b95945050505050565b804710156123995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161081c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146123e6576040519150601f19603f3d011682016040523d82523d6000602084013e6123eb565b606091505b50509050806109525760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161081c565b6001600160a01b0382166124b85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161081c565b6000818152600260205260409020546001600160a01b03161561251d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081c565b61252960008383611db4565b6001600160a01b03821660009081526003602052604081208054600192906125529084906130c2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008060006125bf85856125f6565b915091506125cc81612666565b509392505050565b6001600160a01b038116600090815260018301602052604081205415156110ad565b60008082516041141561262d5760208301516040840151606085015160001a61262187828585612821565b9450945050505061265f565b825160401415612657576020830151604084015161264c86838361290e565b93509350505061265f565b506000905060025b9250929050565b600081600481111561267a5761267a6133b5565b14156126835750565b6001816004811115612697576126976133b5565b14156126e55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161081c565b60028160048111156126f9576126f96133b5565b14156127475760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161081c565b600381600481111561275b5761275b6133b5565b14156127b45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161081c565b60048160048111156127c8576127c86133b5565b14156112275760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161081c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128585750600090506003612905565b8460ff16601b1415801561287057508460ff16601c14155b156128815750600090506004612905565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156128d5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166128fe57600060019250925050612905565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161292f87828885612821565b935093505050935093915050565b82805461294990613006565b90600052602060002090601f01602090048101928261296b57600085556129b1565b82601f106129845782800160ff198235161785556129b1565b828001600101855582156129b1579182015b828111156129b1578235825591602001919060010190612996565b506129bd9291506129c1565b5090565b5b808211156129bd57600081556001016129c2565b6001600160e01b03198116811461122757600080fd5b6000602082840312156129fe57600080fd5b81356110ad816129d6565b60005b83811015612a24578181015183820152602001612a0c565b83811115610a975750506000910152565b60008151808452612a4d816020860160208601612a09565b601f01601f19169290920160200192915050565b6020815260006110ad6020830184612a35565b600060208284031215612a8657600080fd5b5035919050565b6001600160a01b038116811461122757600080fd5b60008060408385031215612ab557600080fd5b8235612ac081612a8d565b946020939093013593505050565b60008060208385031215612ae157600080fd5b82356001600160401b0380821115612af857600080fd5b818501915085601f830112612b0c57600080fd5b813581811115612b1b57600080fd5b8660208260061b8501011115612b3057600080fd5b60209290920196919550909350505050565b600080600060608486031215612b5757600080fd5b8335612b6281612a8d565b92506020840135612b7281612a8d565b929592945050506040919091013590565b80356002811061132657600080fd5b600060208284031215612ba457600080fd5b6110ad82612b83565b6020808252825182820181905260009190848201906040850190845b81811015612bee5783516001600160a01b031683529284019291840191600101612bc9565b50909695505050505050565b60008060408385031215612c0d57600080fd5b50508035926020909101359150565b60008083601f840112612c2e57600080fd5b5081356001600160401b03811115612c4557600080fd5b60208301915083602082850101111561265f57600080fd5b60008060208385031215612c7057600080fd5b82356001600160401b03811115612c8657600080fd5b612c9285828601612c1c565b90969095509350505050565b600060608284031215610c9b57600080fd5b600060208284031215612cc257600080fd5b81356110ad81612a8d565b60008060408385031215612ce057600080fd5b8235612ceb81612a8d565b915060208301358015158114612d0057600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612d3757600080fd5b8435612d4281612a8d565b93506020850135612d5281612a8d565b92506040850135915060608501356001600160401b0380821115612d7557600080fd5b818701915087601f830112612d8957600080fd5b813581811115612d9b57612d9b612d0b565b604051601f8201601f19908116603f01168101908382118183101715612dc357612dc3612d0b565b816040528281528a6020848701011115612ddc57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b803561ffff8116811461132657600080fd5b80356001600160801b038116811461132657600080fd5b60008060008060008060a08789031215612e4257600080fd5b8635612e4d81612a8d565b9550612e5b60208801612e00565b9450612e6960408801612e00565b9350612e7760608801612e12565b925060808701356001600160401b03811115612e9257600080fd5b612e9e89828a01612c1c565b979a9699509497509295939492505050565b600080600080600060808688031215612ec857600080fd5b612ed186612e00565b9450612edf60208701612e00565b9350612eed60408701612e12565b925060608601356001600160401b03811115612f0857600080fd5b612f1488828901612c1c565b969995985093965092949392505050565b60008060408385031215612f3857600080fd5b8235612f4381612a8d565b91506020830135612d0081612a8d565b60008083601f840112612f6557600080fd5b5081356001600160401b03811115612f7c57600080fd5b6020830191508360208260051b850101111561265f57600080fd5b600080600080600060608688031215612faf57600080fd5b612fb886612b83565b945060208601356001600160401b0380821115612fd457600080fd5b612fe089838a01612f53565b90965094506040880135915080821115612ff957600080fd5b50612f1488828901612f53565b600181811c9082168061301a57607f821691505b60208210811415610c9b57634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561309857600080fd5b813563ffffffff811681146110ad57600080fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156130d5576130d56130ac565b500190565b60006000198214156130ee576130ee6130ac565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261316b5761316b613146565b500490565b600081600019048311821515161561318a5761318a6130ac565b500290565b60208082526021908201527f455243373231436f6d6d6f6e3a20546f6b656e20646f65736e277420657869736040820152601d60fa1b606082015260800190565b600081356001600160401b038116811461070f57600080fd5b6001600160401b036131fa836131d0565b168154816001600160401b031982161783556fffffffffffffffff0000000000000000613229602086016131d0565b60401b1680836001600160801b03198416171784556001600160401b0360801b613255604087016131d0565b60801b16836001600160401b0360c01b84161782171784555050505050565b60008151613286818560208601612a09565b9290920192915050565b600080845481600182811c9150808316806132ac57607f831692505b60208084108214156132cc57634e487b7160e01b86526022600452602486fd5b8180156132e057600181146132f15761331e565b60ff1986168952848901965061331e565b60008b81526020902060005b868110156133165781548b8201529085019083016132fd565b505084890196505b50505050505061234061334161333b83602f60f81b815260010190565b86613274565b64173539b7b760d91b815260050190565b600063ffffffff808316818516808303821115613371576133716130ac565b01949350505050565b600063ffffffff80831681811415613394576133946130ac565b6001019392505050565b6000828210156133b0576133b06130ac565b500390565b634e487b7160e01b600052602160045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261342c5761342c613146565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061346490830184612a35565b9695505050505050565b60006020828403121561348057600080fd5b81516110ad816129d6565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516134c381601a850160208801612a09565b8351908301906134da81601a840160208801612a09565b01601a01949350505050565b6000602082840312156134f857600080fd5b81516110ad81612a8d565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206582dbe6ae4ab2905566bca825e202cbca0b3dcfc675006246314b75f5ef29a664736f6c634300080b0033000000000000000000000000edb7c032fef116163214fcdb6ca481e94794b187000000000000000000000000279629bfb709143aa2ef38d04353feeaaa1dbbe700000000000000000000000018da35512b436e3d63f5600bc39e87d2098e4dc40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000006272247000000000000000000000000000000000000000000000000000000000627294f000000000000000000000000000000000000000000000000000000000627bcf7000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f6170692e676d73747564696f2e6172742f636f6c6c656374696f6e732f6b6f7269706f2f746f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e1a4cb40a1d672bb7901b646bb18eb7b70bd59520000000000000000000000007c228e74d601ee9414277a674abf9b58950e87cc000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002

Deployed Bytecode

0x6080604052600436106102045760003560e01c806370a0823111610118578063bf964b4e116100a0578063e7cc72441161006f578063e7cc724414610610578063e985e9c514610670578063ed4a6b0c14610690578063ed92d4f7146106c4578063f2fde38b146106e457600080fd5b8063bf964b4e1461058d578063c002d23d146105c1578063c615a7b2146105dd578063c87b56dd146105f057600080fd5b80638da5cb5b116100e75780638da5cb5b1461050757806395d89b4114610525578063a22cb4651461053a578063b88d4fde1461055a578063bd2e4abd1461057a57600080fd5b806370a08231146104a7578063715018a6146104c7578063718e6adb146104dc5780638456cb59146104f257600080fd5b806328c5846f1161019b57806342842e0e1161016a57806342842e0e146104085780635c975abb146104285780635f516836146104475780636352211e146104675780636b7813ee1461048757600080fd5b806328c5846f146103595780632a55205a1461039457806330176e13146103d35780633f4ba83a146103f357600080fd5b80630ae9f4ae116101d75780630ae9f4ae146102ba57806318160ddd146102da57806323b872dd1461030c578063249c4b481461032c57600080fd5b806301ffc9a71461020957806306fdde031461023e578063081812fc14610260578063095ea7b314610298575b600080fd5b34801561021557600080fd5b506102296102243660046129ec565b610704565b60405190151581526020015b60405180910390f35b34801561024a57600080fd5b50610253610715565b6040516102359190612a61565b34801561026c57600080fd5b5061028061027b366004612a74565b6107a7565b6040516001600160a01b039091168152602001610235565b3480156102a457600080fd5b506102b86102b3366004612aa2565b610841565b005b3480156102c657600080fd5b506102b86102d5366004612ace565b610957565b3480156102e657600080fd5b506009546102f79063ffffffff1681565b60405163ffffffff9091168152602001610235565b34801561031857600080fd5b506102b8610327366004612b42565b610a9d565b34801561033857600080fd5b5061034c610347366004612b92565b610ace565b6040516102359190612bad565b34801561036557600080fd5b50610386610374366004612a74565b600b6020526000908152604090205481565b604051908152602001610235565b3480156103a057600080fd5b506103b46103af366004612bfa565b610b85565b604080516001600160a01b039093168352602083019190915201610235565b3480156103df57600080fd5b506102b86103ee366004612c5d565b610bce565b3480156103ff57600080fd5b506102b8610c04565b34801561041457600080fd5b506102b8610423366004612b42565b610c38565b34801561043457600080fd5b50600654600160a01b900460ff16610229565b34801561045357600080fd5b50610386610462366004612a74565b610c53565b34801561047357600080fd5b50610280610482366004612a74565b610ca1565b34801561049357600080fd5b506102b86104a2366004612c9e565b610d18565b3480156104b357600080fd5b506103866104c2366004612cb0565b610d4f565b3480156104d357600080fd5b506102b8610dd6565b3480156104e857600080fd5b506102f76103e781565b3480156104fe57600080fd5b506102b8610e0a565b34801561051357600080fd5b506006546001600160a01b0316610280565b34801561053157600080fd5b50610253610e3c565b34801561054657600080fd5b506102b8610555366004612ccd565b610e4b565b34801561056657600080fd5b506102b8610575366004612d21565b610e5a565b6102b8610588366004612e29565b610e8c565b34801561059957600080fd5b506102807f0000000000000000000000008e3a4955404ce20a5a4d980811546403aca4f51f81565b3480156105cd57600080fd5b50610386670214e8348c4f000081565b6102b86105eb366004612eb0565b610f77565b3480156105fc57600080fd5b5061025361060b366004612a74565b610fff565b34801561061c57600080fd5b50600a54610646906001600160401b0380821691600160401b8104821691600160801b9091041683565b604080516001600160401b0394851681529284166020840152921691810191909152606001610235565b34801561067c57600080fd5b5061022961068b366004612f25565b611072565b34801561069c57600080fd5b506102807f00000000000000000000000024b72ad70f635b56e33b87a414e645abdb9f1aae81565b3480156106d057600080fd5b506102b86106df366004612f97565b6110b4565b3480156106f057600080fd5b506102b86106ff366004612cb0565b61118f565b600061070f8261132b565b92915050565b60606000805461072490613006565b80601f016020809104026020016040519081016040528092919081815260200182805461075090613006565b801561079d5780601f106107725761010080835404028352916020019161079d565b820191906000526020600020905b81548152906001019060200180831161078057829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166108255760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061084c82610ca1565b9050806001600160a01b0316836001600160a01b031614156108ba5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161081c565b336001600160a01b03821614806108d657506108d68133611072565b6109485760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161081c565b6109528383611350565b505050565b6006546001600160a01b031633146109815760405162461bcd60e51b815260040161081c9061303b565b600954640100000000900460ff16156109ad576040516317efbd6b60e01b815260040160405180910390fd5b6009805464ff000000001916640100000000179055806000805b82811015610a75578484828181106109e1576109e1613070565b90506040020160200160208101906109f99190613086565b610a099063ffffffff16836130c2565b9150610a65858583818110610a2057610a20613070565b610a369260206040909202019081019150612cb0565b868684818110610a4857610a48613070565b9050604002016020016020810190610a609190613086565b6113be565b610a6e816130da565b90506109c7565b5060068114610a97576040516378e2ffa360e01b815260040160405180910390fd5b50505050565b610aa73382611479565b610ac35760405162461bcd60e51b815260040161081c906130f5565b610952838383611550565b60606000610adb836116fb565b90506000610ae882611759565b9050806001600160401b03811115610b0257610b02612d0b565b604051908082528060200260200182016040528015610b2b578160200160208202803683370190505b50925060005b81811015610b7d57610b438382611763565b848281518110610b5557610b55613070565b6001600160a01b0390921660209283029190910190910152610b76816130da565b9050610b31565b505050919050565b60085460009081906bffffffffffffffffffffffff16610ba76127108561315c565b610bb19190613170565b600854600160601b90046001600160a01b03169590945092505050565b6006546001600160a01b03163314610bf85760405162461bcd60e51b815260040161081c9061303b565b6109526011838361293d565b6006546001600160a01b03163314610c2e5760405162461bcd60e51b815260040161081c9061303b565b610c3661176f565b565b61095283838360405180602001604052806000815250610e5a565b60008181526002602052604081205482906001600160a01b0316610c895760405162461bcd60e51b815260040161081c9061318f565b60008381526012602052604090205491505b50919050565b6000818152600260205260408120546001600160a01b03168061070f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161081c565b6006546001600160a01b03163314610d425760405162461bcd60e51b815260040161081c9061303b565b80600a61095282826131e9565b60006001600160a01b038216610dba5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161081c565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610e005760405162461bcd60e51b815260040161081c9061303b565b610c36600061180c565b6006546001600160a01b03163314610e345760405162461bcd60e51b815260040161081c9061303b565b610c3661185e565b60606001805461072490613006565b610e563383836118e6565b5050565b610e643383611479565b610e805760405162461bcd60e51b815260040161081c906130f5565b610a97848484846119b5565b600a546001600160401b0316421080610eb65750600a54600160401b90046001600160401b031642115b15610ed4576040516317efbd6b60e01b815260040160405180910390fd5b60026007541415610f275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161081c565b6002600755610f346119e8565b8561ffff161115610f5857604051630f196e0f60e21b815260040160405180910390fd5b610f6a868686868686600d600b611a32565b5050600160075550505050565b600a54600160401b90046001600160401b0316421080610fa85750600a54600160801b90046001600160401b031642115b15610fc6576040516317efbd6b60e01b815260040160405180910390fd5b323314610fe657604051639f8129d160e01b815260040160405180910390fd5b610ff8338686868686600f600c611a32565b5050505050565b606081611023816000908152600260205260409020546001600160a01b0316151590565b61103f5760405162461bcd60e51b815260040161081c9061318f565b601161104a84611b75565b60405160200161105b929190613290565b604051602081830303815290604052915050919050565b6001600160a01b03808316600090815260056020908152604080832093851683529290529081205460ff16806110ad57506110ad8383611c72565b9392505050565b6006546001600160a01b031633146110de5760405162461bcd60e51b815260040161081c9061303b565b60006110e9866116fb565b905060005b848110156111385761112786868381811061110b5761110b613070565b90506020020160208101906111209190612cb0565b8390611cb1565b50611131816130da565b90506110ee565b5060005b828110156111865761117584848381811061115957611159613070565b905060200201602081019061116e9190612cb0565b839061122a565b5061117f816130da565b905061113c565b50505050505050565b6006546001600160a01b031633146111b95760405162461bcd60e51b815260040161081c9061303b565b6001600160a01b03811661121e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161081c565b6112278161180c565b50565b60006110ad836001600160a01b038416611cc6565b6000804660018114611261576004811461127d576105398114611299576112b1565b73f034d6a4b1a64f0e6038632d87746ca24b79d32591506112b1565b73633dc916d9f59cf4aa117de2bb8edf7752270ec091506112b1565b73a516d2c64ed7fe2004a93bc123854b229f3bb73891505b506001600160a01b0381166113265760405162461bcd60e51b815260206004820152603560248201527f5061796d656e7453706c6974746572466163746f72793a206e6f74206465706c60448201527437bcb2b21037b71031bab93932b73a1031b430b4b760591b606482015260840161081c565b919050565b60006001600160e01b0319821663152a902d60e11b148061070f575061070f82611d15565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061138582610ca1565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60095463ffffffff166103e76113d48383613352565b63ffffffff1611156113f957604051630f196e0f60e21b815260040160405180910390fd5b60005b8263ffffffff1681101561145a5761141a848363ffffffff16611d20565b6114248483611d3a565b63ffffffff8316600090815260126020526040902055816114448161337a565b9250508080611452906130da565b9150506113fc565b506009805463ffffffff191663ffffffff929092169190911790555050565b6000818152600260205260408120546001600160a01b03166114f25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161081c565b60006114fd83610ca1565b9050806001600160a01b0316846001600160a01b031614806115385750836001600160a01b031661152d846107a7565b6001600160a01b0316145b8061154857506115488185611072565b949350505050565b826001600160a01b031661156382610ca1565b6001600160a01b0316146115cb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161081c565b6001600160a01b03821661162d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161081c565b611638838383611db4565b611643600082611350565b6001600160a01b038316600090815260036020526040812080546001929061166c90849061339e565b90915550506001600160a01b038216600090815260036020526040812080546001929061169a9084906130c2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080826001811115611710576117106133b5565b141561171e5750600d919050565b6001826001811115611732576117326133b5565b14156117405750600f919050565b6040516327d0b10d60e01b815260040160405180910390fd5b600061070f825490565b60006110ad8383611dbf565b600654600160a01b900460ff166117bf5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161081c565b6006805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600654600160a01b900460ff16156118ab5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161081c565b6006805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117ef3390565b816001600160a01b0316836001600160a01b031614156119485760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161081c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6119c0848484611550565b6119cc84848484611de9565b610a975760405162461bcd60e51b815260040161081c906133cb565b6009546000908190640100000000900460ff16611a0757610258611a14565b611a146006610258613352565b60095463ffffffff9182169250611a2c91168261339e565b91505090565b34611a49670214e8348c4f000061ffff8a16613170565b14611a675760405163078d696560e31b815260040160405180910390fd5b6040516bffffffffffffffffffffffff1930606090811b821660208401528a901b1660348201526001600160f01b031960f088901b1660488201526fffffffffffffffffffffffffffffffff19608087901b16604a820152600090611add90605a01604051602081830303815290604052611ee7565b60008181526020849052604090205490915061ffff80891691611b01918b166130c2565b1115611b205760405163342e754760e21b815260040160405180910390fd5b611b2c83828787611f22565b6000818152602083905260408120805461ffff8b169290611b4e9084906130c2565b90915550611b5c9050611f86565b611b6a898961ffff166113be565b505050505050505050565b606081611b995750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611bc35780611bad816130da565b9150611bbc9050600a8361315c565b9150611b9d565b6000816001600160401b03811115611bdd57611bdd612d0b565b6040519080825280601f01601f191660200182016040528015611c07576020820181803683370190505b5090505b841561154857611c1c60018361339e565b9150611c29600a8661341d565b611c349060306130c2565b60f81b818381518110611c4957611c49613070565b60200101906001600160f81b031916908160001a905350611c6b600a8661315c565b9450611c0b565b600080611c7e84611fb9565b90506001600160a01b038116158015906115485750826001600160a01b0316816001600160a01b03161491505092915050565b60006110ad836001600160a01b038416612110565b6000818152600183016020526040812054611d0d5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561070f565b50600061070f565b600061070f82612203565b610e56828260405180602001604052806000815250612253565b60003044611d4960014361339e565b6040516bffffffffffffffffffffffff19606094851b811660208301526034820193909352904060548201529185901b1660748201526001600160e01b031960e084901b166088820152608c0160405160208183030381529060405280519060200120905092915050565b610952838383612286565b6000826000018281548110611dd657611dd6613070565b9060005260206000200154905092915050565b60006001600160a01b0384163b15611edc57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e2d903390899088908890600401613431565b6020604051808303816000875af1925050508015611e68575060408051601f3d908101601f19168201909252611e659181019061346e565b60015b611ec2573d808015611e96576040519150601f19603f3d011682016040523d82523d6000602084013e611e9b565b606091505b508051611eba5760405162461bcd60e51b815260040161081c906133cb565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611548565b506001949350505050565b6000611ef38251611b75565b82604051602001611f0592919061348b565b604051602081830303815290604052805190602001209050919050565b611f2e848484846122f4565b610a975760405162461bcd60e51b815260206004820152602360248201527f5369676e6174757265436865636b65723a20496e76616c6964207369676e617460448201526275726560e81b606482015260840161081c565b610c366001600160a01b037f00000000000000000000000024b72ad70f635b56e33b87a414e645abdb9f1aae1634612349565b600080468060018114611fee576089811461200a57600481146120265762013881811461204257610539811461205e57612076565b73a5409ec958c83c3f309868babaca7c86dcb077c19250612076565b7358807bad0b376efc12f5ad86aac70e78ed67deae9250612076565b73f57b2c51ded3a29e6891aba85459d600256cf3179250612076565b73ff7ca10af37178bdd056628ef42fd7f799fac77c9250612076565b73e1a2bbc877b29adbc56d2659dbcb0ae14ee6207192505b506001600160a01b038216158061208d5750806089145b8061209a57508062013881145b156120a6575092915050565b60405163c455279160e01b81526001600160a01b03858116600483015283169063c455279190602401602060405180830381865afa1580156120ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154891906134e6565b600081815260018301602052604081205480156121f957600061213460018361339e565b85549091506000906121489060019061339e565b90508181146121ad57600086600001828154811061216857612168613070565b906000526020600020015490508087600001848154811061218b5761218b613070565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806121be576121be613503565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061070f565b600091505061070f565b60006001600160e01b031982166380ac58cd60e01b148061223457506001600160e01b03198216635b5e139f60e01b145b8061070f57506301ffc9a760e01b6001600160e01b031983161461070f565b61225d8383612462565b61226a6000848484611de9565b6109525760405162461bcd60e51b815260040161081c906133cb565b600654600160a01b900460ff16156109525760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b606482015260840161081c565b60006123406123398585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506125b092505050565b86906125d4565b95945050505050565b804710156123995760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161081c565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146123e6576040519150601f19603f3d011682016040523d82523d6000602084013e6123eb565b606091505b50509050806109525760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161081c565b6001600160a01b0382166124b85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161081c565b6000818152600260205260409020546001600160a01b03161561251d5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161081c565b61252960008383611db4565b6001600160a01b03821660009081526003602052604081208054600192906125529084906130c2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008060006125bf85856125f6565b915091506125cc81612666565b509392505050565b6001600160a01b038116600090815260018301602052604081205415156110ad565b60008082516041141561262d5760208301516040840151606085015160001a61262187828585612821565b9450945050505061265f565b825160401415612657576020830151604084015161264c86838361290e565b93509350505061265f565b506000905060025b9250929050565b600081600481111561267a5761267a6133b5565b14156126835750565b6001816004811115612697576126976133b5565b14156126e55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161081c565b60028160048111156126f9576126f96133b5565b14156127475760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161081c565b600381600481111561275b5761275b6133b5565b14156127b45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161081c565b60048160048111156127c8576127c86133b5565b14156112275760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161081c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156128585750600090506003612905565b8460ff16601b1415801561287057508460ff16601c14155b156128815750600090506004612905565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156128d5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166128fe57600060019250925050612905565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161292f87828885612821565b935093505050935093915050565b82805461294990613006565b90600052602060002090601f01602090048101928261296b57600085556129b1565b82601f106129845782800160ff198235161785556129b1565b828001600101855582156129b1579182015b828111156129b1578235825591602001919060010190612996565b506129bd9291506129c1565b5090565b5b808211156129bd57600081556001016129c2565b6001600160e01b03198116811461122757600080fd5b6000602082840312156129fe57600080fd5b81356110ad816129d6565b60005b83811015612a24578181015183820152602001612a0c565b83811115610a975750506000910152565b60008151808452612a4d816020860160208601612a09565b601f01601f19169290920160200192915050565b6020815260006110ad6020830184612a35565b600060208284031215612a8657600080fd5b5035919050565b6001600160a01b038116811461122757600080fd5b60008060408385031215612ab557600080fd5b8235612ac081612a8d565b946020939093013593505050565b60008060208385031215612ae157600080fd5b82356001600160401b0380821115612af857600080fd5b818501915085601f830112612b0c57600080fd5b813581811115612b1b57600080fd5b8660208260061b8501011115612b3057600080fd5b60209290920196919550909350505050565b600080600060608486031215612b5757600080fd5b8335612b6281612a8d565b92506020840135612b7281612a8d565b929592945050506040919091013590565b80356002811061132657600080fd5b600060208284031215612ba457600080fd5b6110ad82612b83565b6020808252825182820181905260009190848201906040850190845b81811015612bee5783516001600160a01b031683529284019291840191600101612bc9565b50909695505050505050565b60008060408385031215612c0d57600080fd5b50508035926020909101359150565b60008083601f840112612c2e57600080fd5b5081356001600160401b03811115612c4557600080fd5b60208301915083602082850101111561265f57600080fd5b60008060208385031215612c7057600080fd5b82356001600160401b03811115612c8657600080fd5b612c9285828601612c1c565b90969095509350505050565b600060608284031215610c9b57600080fd5b600060208284031215612cc257600080fd5b81356110ad81612a8d565b60008060408385031215612ce057600080fd5b8235612ceb81612a8d565b915060208301358015158114612d0057600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612d3757600080fd5b8435612d4281612a8d565b93506020850135612d5281612a8d565b92506040850135915060608501356001600160401b0380821115612d7557600080fd5b818701915087601f830112612d8957600080fd5b813581811115612d9b57612d9b612d0b565b604051601f8201601f19908116603f01168101908382118183101715612dc357612dc3612d0b565b816040528281528a6020848701011115612ddc57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b803561ffff8116811461132657600080fd5b80356001600160801b038116811461132657600080fd5b60008060008060008060a08789031215612e4257600080fd5b8635612e4d81612a8d565b9550612e5b60208801612e00565b9450612e6960408801612e00565b9350612e7760608801612e12565b925060808701356001600160401b03811115612e9257600080fd5b612e9e89828a01612c1c565b979a9699509497509295939492505050565b600080600080600060808688031215612ec857600080fd5b612ed186612e00565b9450612edf60208701612e00565b9350612eed60408701612e12565b925060608601356001600160401b03811115612f0857600080fd5b612f1488828901612c1c565b969995985093965092949392505050565b60008060408385031215612f3857600080fd5b8235612f4381612a8d565b91506020830135612d0081612a8d565b60008083601f840112612f6557600080fd5b5081356001600160401b03811115612f7c57600080fd5b6020830191508360208260051b850101111561265f57600080fd5b600080600080600060608688031215612faf57600080fd5b612fb886612b83565b945060208601356001600160401b0380821115612fd457600080fd5b612fe089838a01612f53565b90965094506040880135915080821115612ff957600080fd5b50612f1488828901612f53565b600181811c9082168061301a57607f821691505b60208210811415610c9b57634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561309857600080fd5b813563ffffffff811681146110ad57600080fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156130d5576130d56130ac565b500190565b60006000198214156130ee576130ee6130ac565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261316b5761316b613146565b500490565b600081600019048311821515161561318a5761318a6130ac565b500290565b60208082526021908201527f455243373231436f6d6d6f6e3a20546f6b656e20646f65736e277420657869736040820152601d60fa1b606082015260800190565b600081356001600160401b038116811461070f57600080fd5b6001600160401b036131fa836131d0565b168154816001600160401b031982161783556fffffffffffffffff0000000000000000613229602086016131d0565b60401b1680836001600160801b03198416171784556001600160401b0360801b613255604087016131d0565b60801b16836001600160401b0360c01b84161782171784555050505050565b60008151613286818560208601612a09565b9290920192915050565b600080845481600182811c9150808316806132ac57607f831692505b60208084108214156132cc57634e487b7160e01b86526022600452602486fd5b8180156132e057600181146132f15761331e565b60ff1986168952848901965061331e565b60008b81526020902060005b868110156133165781548b8201529085019083016132fd565b505084890196505b50505050505061234061334161333b83602f60f81b815260010190565b86613274565b64173539b7b760d91b815260050190565b600063ffffffff808316818516808303821115613371576133716130ac565b01949350505050565b600063ffffffff80831681811415613394576133946130ac565b6001019392505050565b6000828210156133b0576133b06130ac565b500390565b634e487b7160e01b600052602160045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261342c5761342c613146565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061346490830184612a35565b9695505050505050565b60006020828403121561348057600080fd5b81516110ad816129d6565b7f19457468657265756d205369676e6564204d6573736167653a0a0000000000008152600083516134c381601a850160208801612a09565b8351908301906134da81601a840160208801612a09565b01601a01949350505050565b6000602082840312156134f857600080fd5b81516110ad81612a8d565b634e487b7160e01b600052603160045260246000fdfea26469706673582212206582dbe6ae4ab2905566bca825e202cbca0b3dcfc675006246314b75f5ef29a664736f6c634300080b0033

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

000000000000000000000000edb7c032fef116163214fcdb6ca481e94794b187000000000000000000000000279629bfb709143aa2ef38d04353feeaaa1dbbe700000000000000000000000018da35512b436e3d63f5600bc39e87d2098e4dc40000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000006272247000000000000000000000000000000000000000000000000000000000627294f000000000000000000000000000000000000000000000000000000000627bcf7000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000003168747470733a2f2f6170692e676d73747564696f2e6172742f636f6c6c656374696f6e732f6b6f7269706f2f746f6b656e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e1a4cb40a1d672bb7901b646bb18eb7b70bd59520000000000000000000000007c228e74d601ee9414277a674abf9b58950e87cc000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002

-----Decoded View---------------
Arg [0] : newOwner (address): 0xeDb7c032feF116163214FCDb6ca481E94794b187
Arg [1] : signerEarlyAccess (address): 0x279629bfb709143aa2Ef38d04353fEeaaa1DBbe7
Arg [2] : signerPublic (address): 0x18da35512b436E3d63f5600BC39e87D2098E4Dc4
Arg [3] : baseTokenURI (string): https://api.gmstudio.art/collections/koripo/token
Arg [4] : config (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [5] : payees (address[]): 0xe1a4cb40A1D672Bb7901b646Bb18Eb7B70BD5952,0x7c228e74D601Ee9414277a674ABf9b58950E87CC
Arg [6] : shares (uint256[]): 1,9
Arg [7] : sharesRoyalties (uint256[]): 1,2

-----Encoded View---------------
22 Constructor Arguments found :
Arg [0] : 000000000000000000000000edb7c032fef116163214fcdb6ca481e94794b187
Arg [1] : 000000000000000000000000279629bfb709143aa2ef38d04353feeaaa1dbbe7
Arg [2] : 00000000000000000000000018da35512b436e3d63f5600bc39e87d2098e4dc4
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [4] : 0000000000000000000000000000000000000000000000000000000062722470
Arg [5] : 00000000000000000000000000000000000000000000000000000000627294f0
Arg [6] : 00000000000000000000000000000000000000000000000000000000627bcf70
Arg [7] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000031
Arg [11] : 68747470733a2f2f6170692e676d73747564696f2e6172742f636f6c6c656374
Arg [12] : 696f6e732f6b6f7269706f2f746f6b656e000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [14] : 000000000000000000000000e1a4cb40a1d672bb7901b646bb18eb7b70bd5952
Arg [15] : 0000000000000000000000007c228e74d601ee9414277a674abf9b58950e87cc
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000002


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.