Contract 0xd7eeD48355fb61900953c433da99dA0611c0371c 1

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x56f560c2b73f9978b7fa791cc81c9cb64f19d8b91ea1e06c44ae0a66dc261d33Fill Order335712342022-09-26 1:39:2111 hrs 37 mins ago0xf5fec3fc0fec3933bddceebe635e6f97f6001f9e IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.00749465 50
0xa2e47d4618793b43a9004f076d8848a7f76bc64ed5ee945981c92c3da11a24f9Cancel Listing334982282022-09-24 7:14:222 days 6 hrs ago0x472abe6af807a6bf8831b24ea30cdb9b804a1e33 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034115 50
0xb8399ddab5defc59d6e2730aacea10cf9a247ff7dbedd2397c6164f5c97c3ed4Cancel Listing334404412022-09-22 21:38:093 days 15 hrs ago0x232954b955a65e4392eb753110417e59bb5c9fcf IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034105 50
0xc1afe92e9f33176cbd71e368e98823b6751c3dc45ad96aaa88ae4fb121cbb0bfCancel Listing334378122022-09-22 20:07:473 days 17 hrs ago0x32c601a2ba37db9c6a9716f951c893a0ec9002d8 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034105 50
0x578003341f44566712633cc146774ce37a3064f0a78d3dd3c1b5e5533ca221d9Cancel Listing334315952022-09-22 16:31:373 days 20 hrs ago0xf5fec3fc0fec3933bddceebe635e6f97f6001f9e IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034121 50
0x73ae30cbfa0999f0d0482ed10ae17a6ffcaa131c6e489cdf76d30216b91c4711Cancel Listing334315812022-09-22 16:31:093 days 20 hrs ago0xf5fec3fc0fec3933bddceebe635e6f97f6001f9e IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034111 50
0x6a6f8925980c8acff06bc6371a712ce83f2a84237a9ffef07a5e75de51a1164bCancel Listing334315142022-09-22 16:28:513 days 20 hrs ago0xf5fec3fc0fec3933bddceebe635e6f97f6001f9e IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034115 50
0xa536fd7a96a96559686cc14e490e8ba92b069b18d57628468254c76a9fc1f0eeCancel Listing333478432022-09-20 15:17:465 days 21 hrs ago0x4f8a479ec167bc11777a62383bc51f256904fc58 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034121 50
0x343e56deffc36cc88d5e08f158c0c2a82178763b1eea3587e8105c07e3fb89b0Cancel Listing333478092022-09-20 15:16:345 days 21 hrs ago0x4f8a479ec167bc11777a62383bc51f256904fc58 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034121 50
0xa8c42cac9f0f242bcc1e5d94e90d9d0fd7060ef3bfafebd402e3403c3fe2ad7dCancel Listing333477742022-09-20 15:15:205 days 22 hrs ago0x4f8a479ec167bc11777a62383bc51f256904fc58 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034099 50
0x0bc5b74dc4b262309932c36a40e34025bc6523276def350b8fc53f138c230079Cancel Listing333473632022-09-20 14:59:065 days 22 hrs ago0x4f8a479ec167bc11777a62383bc51f256904fc58 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034121 50
0x2c4e6f3cee586b3009cb9ccfe32e5dc771d3349c058b1b93a46a8c3942b47e32Cancel Listing333472892022-09-20 14:56:345 days 22 hrs ago0x4f8a479ec167bc11777a62383bc51f256904fc58 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034111 50
0x98b04156671c7a083f2b816c36794f5020243049484709cdbddeed7a252d603fCancel Listing333472502022-09-20 14:55:125 days 22 hrs ago0x0a3c37697fe8e3e4bd601c2f0bab7eb7335b7cbf IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034121 50
0xa25d70ebeff9ed809ed84673b296f6bbcef01291792e52d4587a0f481454125fCancel Listing333472192022-09-20 14:54:105 days 22 hrs ago0x0a3c37697fe8e3e4bd601c2f0bab7eb7335b7cbf IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034111 50
0xf471ec99963a50ed71ee39385494b85bea670186a52424afc7d3e2f39ebd14d3Fill Order333140472022-09-19 19:25:316 days 17 hrs ago0x824e5f875c3a23d99b3f7eb5a43995ee28983e15 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.00810965 50
0x8e72f2e90e2467268ca16741c452371b04f4c6206728346b4cfd08c608cfa297Cancel Listing333108872022-09-19 17:35:356 days 19 hrs ago0x32c601a2ba37db9c6a9716f951c893a0ec9002d8 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034121 50
0x0f2e3221fe3b369b9c127b195d6455b57d48e28b09fb8358d1f1777cbdd8bc03Cancel Listing332973062022-09-19 9:47:507 days 3 hrs ago0xfd7b0e0cd28517cc346499adc4188c76bef412a5 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034115 50
0x12457a9c4e1fc9ef9706c91528efaf77ec6e3d586b0e03655cc4bbabca1a04ebCancel Listing332971432022-09-19 9:42:127 days 3 hrs ago0xfd7b0e0cd28517cc346499adc4188c76bef412a5 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034111 50
0x3e8cb8c36074e5cb12ae1722dc719a05ded9f6d6a9818792c99a36b7adf46e6aCancel Listing332822612022-09-19 1:08:127 days 12 hrs ago0x32c601a2ba37db9c6a9716f951c893a0ec9002d8 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034111 50
0xb9a18299b14e3ab0cbf701d65a850975eae0811ebc2caac6535a8efaa99415f1Cancel Listing332577782022-09-18 10:55:098 days 2 hrs ago0x232954b955a65e4392eb753110417e59bb5c9fcf IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034105 50
0xf969190490449d7b9604a029e9d7d0e2f355c14a9b6d49eee5b39ba71447f25fFill Order332122282022-09-17 8:38:299 days 4 hrs ago0x3da0dc44d6669e9085d7c7aee291d7dbae1c1507 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.00834905 50
0x5e59cffb7d5230e43cd1f7ed0de14a6f265800534e5e0a3b24d77b0a5a5a5fd5Cancel Listing332107122022-09-17 7:44:139 days 5 hrs ago0x85a44840f69d495fc95eaf9639219fad9d3ce95e IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034115 50
0xbde34b70647541276e59b479811eef2fb8a79360f19431e50e4dd7b9e4843f8fCancel Listing332106842022-09-17 7:43:139 days 5 hrs ago0x85a44840f69d495fc95eaf9639219fad9d3ce95e IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034115 50
0x09664b9a03775bd4502fb27122aa2f0abf47cf3d4d8b78dd5a0bca786b5da105Cancel Listing332106662022-09-17 7:42:379 days 5 hrs ago0x85a44840f69d495fc95eaf9639219fad9d3ce95e IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034115 50
0x61d239e3d88eab82fd459daf15a0b260dd0ea815c4be9127a78a23ea3c107366Cancel Listing332042592022-09-17 3:57:589 days 9 hrs ago0x32c601a2ba37db9c6a9716f951c893a0ec9002d8 IN  0xd7eed48355fb61900953c433da99da0611c0371c0 MATIC0.0034111 50
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BullieverseMarketPlace

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : MarketPlace.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.4;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import "./interfaces/IPaymentERC20Registry.sol";
import "./interfaces/ICancellationRegistry.sol";

/* This contains all data of the BuyOrder */
struct BuyOrder {
    /* Seller of the NFT */
    address payable seller;
    /* Contract address of NFT */
    address contractAddress;
    /* Token id of NFT to sell */
    uint256 tokenId;
    /* Start time in unix timestamp */
    uint256 startTime;
    /* Expiration in unix timestamp */
    uint256 expiration;
    /* Price in wei */
    uint256 price;
    /* Number of tokens to transfer; should be 1 for ERC721 */
    uint256 quantity;
    /* BlockNumber where message is signed */
    uint256 createdAtBlockNumber;
    /* Address of the ERC20 token for the payment. Will be the zero-address for payments in native ETH. */
    address paymentERC20;
}

contract BullieverseMarketPlace is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using ERC165Checker for address;

    bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd; // The ERC-165 identifier for 721
    bytes4 private constant InterfaceId_ERC1155 = 0xd9b67a26; // The ERC-165 identifier for 1155

    IPaymentERC20Registry paymentERC20Registry;
    ICancellationRegistry cancellationRegistry;

    address payable _makerWallet;

    address payable _platformWallet;

    uint256 public platformPercentageFee;

    uint256 public createrPercentageFee;

    bytes32 private constant EIP712_DOMAIN_TYPE_HASH =
        keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
    bytes32 private DOMAIN_SEPARATOR =
        keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPE_HASH,
                keccak256(bytes("Bullieverse")),
                keccak256(bytes("1")),
                block.chainid,
                address(this)
            )
        );

    event BuyOrderFilled(
        address indexed seller,
        address buyer,
        address indexed contractAddress,
        uint256 indexed tokenId,
        uint256 price,
        uint256 createdAtBlockNumber,
        uint256 startTime,
        uint256 expiration
    );

    event CancelListing(
        address indexed owner,
        address contractAddress,
        uint256 tokenId,
        uint256 quantity,
        uint256 createdAtBlockNumber,
        uint256 startTime,
        uint256 expiration
    );

    event CancelAllPreviousListing(
        address indexed owner,
        address indexed contractAddress,
        uint256 tokenId
    );

    function pauseContract() external onlyOwner {
        super._pause();
    }

    function unPauseContract() external onlyOwner {
        super._unpause();
    }

    // Check if order is already expired
    modifier _isOrderAvailable(uint256 startTime, uint256 expiration) {
        require(block.timestamp < expiration, "Order is Expired");
        require(block.timestamp > startTime, "Order is Yet To Start");
        _;
    }

    /*
     * @dev Sets the registry contracts for the exchange.
     */
    function setRegistryContracts(
        address _cancellationRegistry,
        address _paymentERC20Registry
    ) external onlyOwner {
        cancellationRegistry = ICancellationRegistry(_cancellationRegistry);
        paymentERC20Registry = IPaymentERC20Registry(_paymentERC20Registry);
    }

    /********************
     * Public Functions *
     ********************/

    /*
     * @dev External trade function. This accepts the details of the sell order and signed sell
     * order (the signature) as a meta-transaction.
     *
     * Emits a {BuyOrderFilled} event via `_fillBuyOrder`.
     */
    function fillOrder(
        address payable seller,
        address contractAddress,
        uint256 tokenId,
        uint256 startTime,
        uint256 expiration,
        uint256 price,
        uint256 quantity,
        uint256 createdAtBlockNumber,
        address paymentERC20,
        bytes memory signature
    )
        external
        payable
        whenNotPaused
        nonReentrant
        _isOrderAvailable(startTime, expiration)
    {
        // If the payment ERC20 is the zero address, we check that enough native ETH has been sent
        // with the transaction. Otherwise, we use the supplied ERC20 payment token.
        if (paymentERC20 == address(0)) {
            require(
                msg.value >= price,
                "Transaction doesn't have the required ETH amount."
            );
        } else {
            _checkValidERC20Payment(msg.sender, price, paymentERC20);
        }

        BuyOrder memory buyOrder = BuyOrder(
            seller,
            contractAddress,
            tokenId,
            startTime,
            expiration,
            price,
            quantity,
            createdAtBlockNumber,
            paymentERC20
        );

        /* Check signature */
        require(
            _validateSellerSignature(buyOrder, signature),
            "Signature is not valid for BuyOrder."
        );
        require(
            cancellationRegistry.getSellOrderCancellationBlockNumber(
                seller,
                contractAddress,
                tokenId
            ) < createdAtBlockNumber,
            "This order has been cancelled."
        );

        _fillBuyOrder(buyOrder, signature);
    }

    /*
     * @dev Validate the sell order against the signature of the meta-transaction.
     */
    function _validateSellerSignature(
        BuyOrder memory buyOrder,
        bytes memory signature
    ) public view returns (bool) {
        bytes32 BUYORDER_TYPEHASH = keccak256(
            "BuyOrder(address seller,address contractAddress,uint256 tokenId,uint256 startTime,uint256 expiration,uint256 price,uint256 quantity,uint256 createdAtBlockNumber,address paymentERC20)"
        );

        bytes32 structHash = keccak256(
            abi.encode(
                BUYORDER_TYPEHASH,
                buyOrder.seller,
                buyOrder.contractAddress,
                buyOrder.tokenId,
                buyOrder.startTime,
                buyOrder.expiration,
                buyOrder.price,
                buyOrder.quantity,
                buyOrder.createdAtBlockNumber,
                buyOrder.paymentERC20
            )
        );

        bytes32 digest = ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, structHash);

        address recoveredAddress = ECDSA.recover(digest, signature);
        return recoveredAddress == buyOrder.seller;
    }

    /*
     * @dev Sets the wallet for the exchange.
     */
    function setMakerWallet(address payable _newMakerWallet)
        external
        onlyOwner
    {
        _makerWallet = _newMakerWallet;
    }

    /*
     * @dev Sets the wallet for the platform.
     */
    function setPlatFormWallet(address payable _newPlatformWallet)
        external
        onlyOwner
    {
        _platformWallet = _newPlatformWallet;
    }

    /*
     * @dev Sets the percentage for the platform.
     */
    function setPlatFormPercentage(uint256 _newPlatformPercentage)
        external
        onlyOwner
    {
        platformPercentageFee = _newPlatformPercentage;
    }

    /*
     * @dev Sets the percentage for the creater.
     */
    function setCreaterPercentage(uint256 _newCreaterPercentage)
        external
        onlyOwner
    {
        createrPercentageFee = _newCreaterPercentage;
    }

    function _fillBuyOrder(BuyOrder memory buyOrder, bytes memory signature)
        internal
    {
        /////////////////
        ///  Finalize ///
        /////////////////

        emit BuyOrderFilled(
            buyOrder.seller,
            msg.sender,
            buyOrder.contractAddress,
            buyOrder.tokenId,
            buyOrder.price,
            buyOrder.createdAtBlockNumber,
            buyOrder.startTime,
            buyOrder.expiration
        );

        /////////////////
        ///  Transfer ///
        /////////////////
        _transferNFT(
            buyOrder.contractAddress,
            buyOrder.tokenId,
            buyOrder.seller,
            msg.sender,
            buyOrder.quantity,
            signature
        );

        //////////////////////
        ///  Send Payment ///
        /////////////////////
        if (buyOrder.price > 0) {
            _paySellerAndRoyalties(
                buyOrder.seller,
                msg.sender,
                buyOrder.price,
                buyOrder.paymentERC20
            );
        }
    }

    function _paySellerAndRoyalties(
        address seller,
        address buyer,
        uint256 price,
        address paymentERC20
    ) internal {
        uint256 createrFee = (price * createrPercentageFee) / 10000;
        uint256 platformFee = (price * platformPercentageFee) / 10000;

        if (paymentERC20 == address(0)) {
            if (platformFee > 0) {
                (bool platformFeePaid, ) = _platformWallet.call{
                    value: platformFee
                }("");
                require(platformFeePaid, "Payment Failed For Platform Wallet");
            }
            if (createrFee > 0) {
                (bool isMakerPaid, ) = _makerWallet.call{value: createrFee}("");

                require(isMakerPaid, "Payment Failed for Maker Wallet");
            }

            (bool isSellerPaid, ) = seller.call{
                value: price - platformFee - createrFee
            }("");
            require(isSellerPaid, "Payment Failed for Seller");
        } else {
            if (platformFee > 0) {
                IERC20(paymentERC20).safeTransferFrom(
                    buyer,
                    _platformWallet,
                    platformFee
                );
            }

            if (createrFee > 0) {
                IERC20(paymentERC20).safeTransferFrom(
                    buyer,
                    _makerWallet,
                    createrFee
                );
            }

            IERC20(paymentERC20).safeTransferFrom(
                buyer,
                seller,
                price - createrFee - platformFee
            );
        }
    }

    function _transferNFT(
        address contractAddress,
        uint256 tokenId,
        address seller,
        address buyer,
        uint256 quantity,
        bytes memory signature
    ) internal {
        if (contractAddress.supportsInterface(InterfaceId_ERC721)) {
            /* Make sure the order is not cancelled */

            cancellationRegistry.cancelPreviousSellOrders(
                seller,
                contractAddress,
                tokenId
            );

            IERC721 erc721 = IERC721(contractAddress);

            /* require is approved for all */
            require(
                erc721.isApprovedForAll(seller, address(this)),
                "The Exchange is not approved to operate this NFT"
            );

            /////////////////
            ///  Transfer ///
            /////////////////
            erc721.safeTransferFrom(seller, buyer, tokenId);
        } else if (contractAddress.supportsInterface(InterfaceId_ERC1155)) {
            IERC1155 erc1155 = IERC1155(contractAddress);

            require(
                !cancellationRegistry.isOrderCancelled(signature),
                "This order has been cancelled"
            );

            cancellationRegistry.cancelOrder(signature);

            /////////////////
            ///  Transfer ///
            /////////////////
            erc1155.safeTransferFrom(seller, buyer, tokenId, quantity, "");
        } else {
            revert(
                "We don't recognize the NFT as either an ERC721 or ERC1155."
            );
        }
    }

    /* Checks that the payment is being made with an approved ERC20, and that we are allowed to operate
     * a sufficient amount of it. */
    function _checkValidERC20Payment(
        address buyer,
        uint256 price,
        address paymentERC20
    ) internal view {
        // Checks that the ERC20 payment token is approved in the registry.
        require(
            paymentERC20Registry.isApprovedERC20(paymentERC20),
            "Payment ERC20 is not approved."
        );

        // Checks that the buyer has sufficient funds.
        require(
            IERC20(paymentERC20).balanceOf(buyer) >= price,
            "Buyer has an insufficient balance of the ERC20."
        );

        // Checks that the Exchange contract has a sufficient allowance of the token.
        require(
            IERC20(paymentERC20).allowance(buyer, address(this)) >= price,
            "Exchange is not approved to handle a sufficient amount of the ERC20."
        );
    }

    // Cancel All Previous Listing
    function cancelAllPreviousListing(address contractAddress, uint256 tokenId)
        external
    {
        cancellationRegistry.cancelPreviousSellOrders(
            msg.sender,
            contractAddress,
            tokenId
        );

        emit CancelAllPreviousListing(msg.sender, contractAddress, tokenId);
    }

    /* cancel individual signature of listing for erc1155*/
    function cancelListing(
        address contractAddress,
        uint256 tokenId,
        uint256 startTime,
        uint256 expiration,
        uint256 price,
        uint256 quantity,
        uint256 createdAtBlockNumber,
        address paymentERC20,
        bytes memory signature
    ) public {
        BuyOrder memory buyOrder = BuyOrder(
            payable(msg.sender),
            contractAddress,
            tokenId,
            startTime,
            expiration,
            price,
            quantity,
            createdAtBlockNumber,
            paymentERC20
        );

        /* Check signature */
        require(
            _validateSellerSignature(buyOrder, signature),
            "Signature is not valid for BuyOrder."
        );

        require(
            !cancellationRegistry.isOrderCancelled(signature),
            "This order has been cancelled already"
        );

        cancellationRegistry.cancelOrder(signature);

        emit CancelListing(
            msg.sender,
            contractAddress,
            tokenId,
            quantity,
            createdAtBlockNumber,
            startTime,
            expiration
        );
    }
}

File 2 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 3 of 16 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 4 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 5 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

File 6 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 7 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must 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 Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

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

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

File 8 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 9 of 16 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 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 10 of 16 : ERC165Checker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165Checker {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface,
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            _supportsERC165Interface(account, type(IERC165).interfaceId) &&
            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)
        internal
        view
        returns (bool[] memory)
    {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in _interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!_supportsERC165Interface(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     * Interface identification is specified in ERC-165.
     */
    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);
        (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
        if (result.length < 32) return false;
        return success && abi.decode(result, (bool));
    }
}

File 11 of 16 : IPaymentERC20Registry.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.4;

interface IPaymentERC20Registry {  
  function isApprovedERC20(address _token) external view returns (bool);

  function addApprovedERC20(address _token) external;

  function removeApprovedERC20(address _token) external;
}

File 12 of 16 : ICancellationRegistry.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.4;

interface ICancellationRegistry {
    function addRegistrant(address registrant) external;

    function removeRegistrant(address registrant) external;

    function cancelOrder(bytes memory signature) external;

    function isOrderCancelled(bytes memory signature) external view returns (bool);

    function cancelPreviousSellOrders(address seller, address tokenAddr, uint256 tokenId) external;

    function getSellOrderCancellationBlockNumber(address addr, address tokenAddr, uint256 tokenId) external view returns (uint256);
}

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

pragma solidity ^0.8.0;

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

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

File 14 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 15 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 16 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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);
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"createdAtBlockNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expiration","type":"uint256"}],"name":"BuyOrderFilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"CancelAllPreviousListing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"createdAtBlockNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expiration","type":"uint256"}],"name":"CancelListing","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"components":[{"internalType":"address payable","name":"seller","type":"address"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"createdAtBlockNumber","type":"uint256"},{"internalType":"address","name":"paymentERC20","type":"address"}],"internalType":"struct BuyOrder","name":"buyOrder","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"_validateSellerSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"cancelAllPreviousListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"createdAtBlockNumber","type":"uint256"},{"internalType":"address","name":"paymentERC20","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"cancelListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"createrPercentageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"seller","type":"address"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"createdAtBlockNumber","type":"uint256"},{"internalType":"address","name":"paymentERC20","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"fillOrder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformPercentageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCreaterPercentage","type":"uint256"}],"name":"setCreaterPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newMakerWallet","type":"address"}],"name":"setMakerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPlatformPercentage","type":"uint256"}],"name":"setPlatFormPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newPlatformWallet","type":"address"}],"name":"setPlatFormWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_cancellationRegistry","type":"address"},{"internalType":"address","name":"_paymentERC20Registry","type":"address"}],"name":"setRegistryContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unPauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"}]

600b6080526a42756c6c6965766572736560a81b60a0908152600160c052603160f81b60e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6101209081527f04e1a141bd284a6be4d4cd3427d70220b8d58f3a2b00e586534bbde39c592b8d610140527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6610160524661018052306101a0526101008290526101c0604052206008553480156100bc57600080fd5b506100c6336100dc565b6000805460ff60a01b191690556001805561012c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6125fe8061013b6000396000f3fe6080604052600436106100fe5760003560e01c80638319e59b11610095578063b1216b7911610064578063b1216b7914610282578063bac15203146102a2578063c1564d48146102b7578063c37ed010146102d7578063f2fde38b146102ed57600080fd5b80638319e59b146101fa57806386a734511461021a5780638da5cb5b1461023a578063a4ace9c11461026257600080fd5b80632b812a34116100d15780632b812a3414610191578063439766ce146101b15780635c975abb146101c6578063715018a6146101e557600080fd5b8063071e5b6d146101035780630819e548146101385780631248499a1461014d5780631416737c14610171575b600080fd5b34801561010f57600080fd5b5061012361011e3660046122d4565b61030d565b60405190151581526020015b60405180910390f35b61014b610146366004612107565b610441565b005b34801561015957600080fd5b5061016360065481565b60405190815260200161012f565b34801561017d57600080fd5b5061014b61018c36600461239b565b610783565b34801561019d57600080fd5b5061014b6101ac3660046120eb565b6107b2565b3480156101bd57600080fd5b5061014b6107fe565b3480156101d257600080fd5b50600054600160a01b900460ff16610123565b3480156101f157600080fd5b5061014b610832565b34801561020657600080fd5b5061014b61021536600461239b565b610866565b34801561022657600080fd5b5061014b610235366004612219565b610895565b34801561024657600080fd5b506000546040516001600160a01b03909116815260200161012f565b34801561026e57600080fd5b5061014b61027d3660046121ee565b610ac4565b34801561028e57600080fd5b5061014b61029d3660046121b6565b610b6e565b3480156102ae57600080fd5b5061014b610bc6565b3480156102c357600080fd5b5061014b6102d23660046120eb565b610bf8565b3480156102e357600080fd5b5061016360075481565b3480156102f957600080fd5b5061014b6103083660046120eb565b610c44565b6000807fe03026baaa53a30d98f1697b5b399789d0b563b7a6342509ce851fd6d9fb5eb39050600081856000015186602001518760400151886060015189608001518a60a001518b60c001518c60e001518d61010001516040516020016103c99a99989796959493929190998a526001600160a01b0398891660208b015296881660408a01526060890195909552608088019390935260a087019190915260c086015260e0850152610100840152166101208201526101400190565b60408051601f19818403018152828252805160209182012060085461190160f01b8584015260228501526042808501829052835180860390910181526062909401909252825192019190912090915060006104248287610cdf565b87516001600160a01b039182169116149450505050505b92915050565b600054600160a01b900460ff16156104935760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b600260015414156104e65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161048a565b6002600155868642811161052f5760405162461bcd60e51b815260206004820152601060248201526f13dc99195c881a5cc8115e1c1a5c995960821b604482015260640161048a565b8142116105765760405162461bcd60e51b815260206004820152601560248201527413dc99195c881a5cc816595d08151bc814dd185c9d605a1b604482015260640161048a565b6001600160a01b0384166105f357863410156105ee5760405162461bcd60e51b815260206004820152603160248201527f5472616e73616374696f6e20646f65736e2774206861766520746865207265716044820152703ab4b932b21022aa241030b6b7bab73a1760791b606482015260840161048a565b6105fe565b6105fe338886610d03565b60006040518061012001604052808e6001600160a01b031681526020018d6001600160a01b031681526020018c81526020018b81526020018a8152602001898152602001888152602001878152602001866001600160a01b03168152509050610667818561030d565b6106835760405162461bcd60e51b815260040161048a9061247f565b85600360009054906101000a90046001600160a01b03166001600160a01b031663bc1389c88f8f8f6040518463ffffffff1660e01b81526004016106c993929190612413565b60206040518083038186803b1580156106e157600080fd5b505afa1580156106f5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071991906123b3565b106107665760405162461bcd60e51b815260206004820152601e60248201527f54686973206f7264657220686173206265656e2063616e63656c6c65642e0000604482015260640161048a565b6107708185610fb7565b5050600180555050505050505050505050565b6000546001600160a01b031633146107ad5760405162461bcd60e51b815260040161048a9061244a565b600655565b6000546001600160a01b031633146107dc5760405162461bcd60e51b815260040161048a9061244a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108285760405162461bcd60e51b815260040161048a9061244a565b610830611095565b565b6000546001600160a01b0316331461085c5760405162461bcd60e51b815260040161048a9061244a565b610830600061113a565b6000546001600160a01b031633146108905760405162461bcd60e51b815260040161048a9061244a565b600755565b6000604051806101200160405280336001600160a01b031681526020018b6001600160a01b031681526020018a8152602001898152602001888152602001878152602001868152602001858152602001846001600160a01b031681525090506108fe818361030d565b61091a5760405162461bcd60e51b815260040161048a9061247f565b60035460405163563166a960e01b81526001600160a01b039091169063563166a99061094a908590600401612437565b60206040518083038186803b15801561096257600080fd5b505afa158015610976573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099a91906122b4565b156109f55760405162461bcd60e51b815260206004820152602560248201527f54686973206f7264657220686173206265656e2063616e63656c6c656420616c604482015264726561647960d81b606482015260840161048a565b600354604051632e442d9960e21b81526001600160a01b039091169063b910b66490610a25908590600401612437565b600060405180830381600087803b158015610a3f57600080fd5b505af1158015610a53573d6000803e3d6000fd5b5050604080516001600160a01b038e168152602081018d905290810188905260608101879052608081018b905260a081018a90523392507fe7ad56012683773e77b27c30aa3c4c28393ff4eb70485e543856932a1892ebd0915060c00160405180910390a250505050505050505050565b60035460405163083d089d60e01b81526001600160a01b039091169063083d089d90610af890339086908690600401612413565b600060405180830381600087803b158015610b1257600080fd5b505af1158015610b26573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f4434f005d61de8a0cd26025bc6e1e88ad6b104c1d5354a51cc068711390db1199060200160405180910390a35050565b6000546001600160a01b03163314610b985760405162461bcd60e51b815260040161048a9061244a565b600380546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6000546001600160a01b03163314610bf05760405162461bcd60e51b815260040161048a9061244a565b61083061118a565b6000546001600160a01b03163314610c225760405162461bcd60e51b815260040161048a9061244a565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610c6e5760405162461bcd60e51b815260040161048a9061244a565b6001600160a01b038116610cd35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161048a565b610cdc8161113a565b50565b6000806000610cee858561120e565b91509150610cfb8161127e565b509392505050565b6002546040516307ae6ef560e21b81526001600160a01b03838116600483015290911690631eb9bbd49060240160206040518083038186803b158015610d4857600080fd5b505afa158015610d5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8091906122b4565b610dcc5760405162461bcd60e51b815260206004820152601e60248201527f5061796d656e74204552433230206973206e6f7420617070726f7665642e0000604482015260640161048a565b6040516370a0823160e01b81526001600160a01b0384811660048301528391908316906370a082319060240160206040518083038186803b158015610e1057600080fd5b505afa158015610e24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4891906123b3565b1015610eae5760405162461bcd60e51b815260206004820152602f60248201527f42757965722068617320616e20696e73756666696369656e742062616c616e6360448201526e329037b3103a34329022a92199181760891b606482015260840161048a565b604051636eb1769f60e11b81526001600160a01b03848116600483015230602483015283919083169063dd62ed3e9060440160206040518083038186803b158015610ef857600080fd5b505afa158015610f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3091906123b3565b1015610fb25760405162461bcd60e51b8152602060048201526044602482018190527f45786368616e6765206973206e6f7420617070726f76656420746f2068616e64908201527f6c6520612073756666696369656e7420616d6f756e74206f66207468652045526064820152632199181760e11b608482015260a40161048a565b505050565b816040015182602001516001600160a01b031683600001516001600160a01b03167f955e14da069f8a8de3817a55dd359c58bb5e1b1a5e9519c79e8a06190682e1f4338660a001518760e00151886060015189608001516040516110489594939291906001600160a01b03959095168552602085019390935260408401919091526060830152608082015260a00190565b60405180910390a461106e826020015183604001518460000151338660c001518661147f565b60a082015115611091576110918260000151338460a00151856101000151611868565b5050565b600054600160a01b900460ff16156110e25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161048a565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861111d3390565b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff166111da5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161048a565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361111d565b6000808251604114156112455760208301516040840151606085015160001a61123987828585611b3e565b94509450505050611277565b82516040141561126f5760208301516040840151611264868383611c2b565b935093505050611277565b506000905060025b9250929050565b60008160048111156112a057634e487b7160e01b600052602160045260246000fd5b14156112a95750565b60018160048111156112cb57634e487b7160e01b600052602160045260246000fd5b14156113195760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161048a565b600281600481111561133b57634e487b7160e01b600052602160045260246000fd5b14156113895760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161048a565b60038160048111156113ab57634e487b7160e01b600052602160045260246000fd5b14156114045760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161048a565b600481600481111561142657634e487b7160e01b600052602160045260246000fd5b1415610cdc5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161048a565b6114996001600160a01b0387166380ac58cd60e01b611c64565b156116525760035460405163083d089d60e01b81526001600160a01b039091169063083d089d906114d29087908a908a90600401612413565b600060405180830381600087803b1580156114ec57600080fd5b505af1158015611500573d6000803e3d6000fd5b505060405163e985e9c560e01b81526001600160a01b0387811660048301523060248301528993508316915063e985e9c59060440160206040518083038186803b15801561154d57600080fd5b505afa158015611561573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158591906122b4565b6115ea5760405162461bcd60e51b815260206004820152603060248201527f5468652045786368616e6765206973206e6f7420617070726f76656420746f2060448201526f1bdc195c985d19481d1a1a5cc813919560821b606482015260840161048a565b604051632142170760e11b81526001600160a01b038216906342842e0e9061161a90889088908b90600401612413565b600060405180830381600087803b15801561163457600080fd5b505af1158015611648573d6000803e3d6000fd5b5050505050611860565b61166c6001600160a01b038716636cdb3d1360e11b611c64565b156117f25760035460405163563166a960e01b815287916001600160a01b03169063563166a9906116a1908590600401612437565b60206040518083038186803b1580156116b957600080fd5b505afa1580156116cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f191906122b4565b1561173e5760405162461bcd60e51b815260206004820152601d60248201527f54686973206f7264657220686173206265656e2063616e63656c6c6564000000604482015260640161048a565b600354604051632e442d9960e21b81526001600160a01b039091169063b910b6649061176e908590600401612437565b600060405180830381600087803b15801561178857600080fd5b505af115801561179c573d6000803e3d6000fd5b5050604051637921219560e11b81526001600160a01b0388811660048301528781166024830152604482018a90526064820187905260a06084830152600060a48301528416925063f242432a915060c40161161a565b60405162461bcd60e51b815260206004820152603a60248201527f576520646f6e2774207265636f676e697a6520746865204e465420617320656960448201527f7468657220616e20455243373231206f7220455243313135352e000000000000606482015260840161048a565b505050505050565b60006127106007548461187b9190612525565b6118859190612505565b905060006127106006548561189a9190612525565b6118a49190612505565b90506001600160a01b038316611ace57801561196a576005546040516000916001600160a01b03169083908381818185875af1925050503d8060008114611907576040519150601f19603f3d011682016040523d82523d6000602084013e61190c565b606091505b50509050806119685760405162461bcd60e51b815260206004820152602260248201527f5061796d656e74204661696c656420466f7220506c6174666f726d2057616c6c604482015261195d60f21b606482015260840161048a565b505b8115611a15576004546040516000916001600160a01b03169084908381818185875af1925050503d80600081146119bd576040519150601f19603f3d011682016040523d82523d6000602084013e6119c2565b606091505b5050905080611a135760405162461bcd60e51b815260206004820152601f60248201527f5061796d656e74204661696c656420666f72204d616b65722057616c6c657400604482015260640161048a565b505b60006001600160a01b03871683611a2c8488612544565b611a369190612544565b604051600081818185875af1925050503d8060008114611a72576040519150601f19603f3d011682016040523d82523d6000602084013e611a77565b606091505b5050905080611ac85760405162461bcd60e51b815260206004820152601960248201527f5061796d656e74204661696c656420666f722053656c6c657200000000000000604482015260640161048a565b50611860565b8015611af057600554611af0906001600160a01b038581169188911684611c87565b8115611b1257600454611b12906001600160a01b038581169188911685611c87565b611860858783611b228689612544565b611b2c9190612544565b6001600160a01b038716929190611c87565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b755750600090506003611c22565b8460ff16601b14158015611b8d57508460ff16601c14155b15611b9e5750600090506004611c22565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611bf2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611c1b57600060019250925050611c22565b9150600090505b94509492505050565b6000806001600160ff1b03831681611c4860ff86901c601b6124ed565b9050611c5687828885611b3e565b935093505050935093915050565b6000611c6f83611ce5565b8015611c805750611c808383611d18565b9392505050565b611cdf846323b872dd60e01b858585604051602401611ca893929190612413565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611e01565b50505050565b6000611cf8826301ffc9a760e01b611d18565b801561043b5750611d11826001600160e01b0319611d18565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090611d7f9086906123f7565b6000604051808303818686fa925050503d8060008114611dbb576040519150601f19603f3d011682016040523d82523d6000602084013e611dc0565b606091505b5091509150602081511015611ddb576000935050505061043b565b818015611df7575080806020019051810190611df791906122b4565b9695505050505050565b6000611e56826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ed39092919063ffffffff16565b805190915015610fb25780806020019051810190611e7491906122b4565b610fb25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161048a565b6060611ee28484600085611eea565b949350505050565b606082471015611f4b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161048a565b6001600160a01b0385163b611fa25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161048a565b600080866001600160a01b03168587604051611fbe91906123f7565b60006040518083038185875af1925050503d8060008114611ffb576040519150601f19603f3d011682016040523d82523d6000602084013e612000565b606091505b509150915061201082828661201b565b979650505050505050565b6060831561202a575081611c80565b82511561203a5782518084602001fd5b8160405162461bcd60e51b815260040161048a9190612437565b803561205f816125b3565b919050565b600082601f830112612074578081fd5b813567ffffffffffffffff8082111561208f5761208f61259d565b604051601f8301601f19908116603f011681019082821181831017156120b7576120b761259d565b816040528381528660208588010111156120cf578485fd5b8360208701602083013792830160200193909352509392505050565b6000602082840312156120fc578081fd5b8135611c80816125b3565b6000806000806000806000806000806101408b8d031215612126578586fd5b8a35612131816125b3565b995060208b0135612141816125b3565b985060408b0135975060608b0135965060808b0135955060a08b0135945060c08b0135935060e08b013592506101008b013561217c816125b3565b91506101208b013567ffffffffffffffff811115612198578182fd5b6121a48d828e01612064565b9150509295989b9194979a5092959850565b600080604083850312156121c8578182fd5b82356121d3816125b3565b915060208301356121e3816125b3565b809150509250929050565b60008060408385031215612200578182fd5b823561220b816125b3565b946020939093013593505050565b60008060008060008060008060006101208a8c031215612237578485fd5b8935612242816125b3565b985060208a0135975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a0135925060e08a013561227c816125b3565b91506101008a013567ffffffffffffffff811115612298578182fd5b6122a48c828d01612064565b9150509295985092959850929598565b6000602082840312156122c5578081fd5b81518015158114611c80578182fd5b6000808284036101408112156122e8578283fd5b610120808212156122f7578384fd5b6122ff6124c3565b915061230a85612054565b825261231860208601612054565b602083015260408501356040830152606085013560608301526080850135608083015260a085013560a083015260c085013560c083015260e085013560e0830152610100612367818701612054565b9083015290925083013567ffffffffffffffff811115612385578182fd5b61239185828601612064565b9150509250929050565b6000602082840312156123ac578081fd5b5035919050565b6000602082840312156123c4578081fd5b5051919050565b600081518084526123e381602086016020860161255b565b601f01601f19169290920160200192915050565b6000825161240981846020870161255b565b9190910192915050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602081526000611c8060208301846123cb565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526024908201527f5369676e6174757265206973206e6f742076616c696420666f72204275794f726040820152633232b91760e11b606082015260800190565b604051610120810167ffffffffffffffff811182821017156124e7576124e761259d565b60405290565b6000821982111561250057612500612587565b500190565b60008261252057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561253f5761253f612587565b500290565b60008282101561255657612556612587565b500390565b60005b8381101561257657818101518382015260200161255e565b83811115611cdf5750506000910152565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610cdc57600080fdfea2646970667358221220defaf8663e0c9bc0da4f13ca4210c05fb80dfc3aef952659a28e5a70c75e604f64736f6c63430008040033

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