Contract 0xbb5518859ab064bd484fb632a475968e7592e2e3 6

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xfb5a8f6b2150bdb2109218143086b4436db098283ab530ae161d3cbd204137abWithdraw174758472022-07-12 11:11:1480 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000089206764 ETH
0x097010f95006eadc7f090840b1ec055aa4f0f01fc4f9fd38242ca581d2f60a7cMint Multiple174758052022-07-12 11:11:1480 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.08 ETH0.000108978767 ETH
0x05feb6dfa653d5e6dbd1d9b7cc1a3d64d5459f9f8a1625cd339fd6a49eca8029Mint Multiple174757932022-07-12 11:10:3280 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.04 ETH0.000098733464 ETH
0xd9a29d6477e0826368e760e46f619cb00147215cb3577d75cacd52e37ace2bf2Withdraw174757592022-07-12 11:10:3280 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.00008976561 ETH
0xfc83ea0594d151bcd05a2ca0d7166d5f6481cf0b35540f1b823e67af60f621fbMint Multiple174756992022-07-12 11:09:2580 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.04 ETH0.000099016734 ETH
0xc11ffe71a72dd5b8d84e2510045be63ad1df607f128238345eb16418f45261abMint Multiple174756802022-07-12 11:09:2580 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.08 ETH0.000108982614 ETH
0x09275269d33d6d718c6a2e157621de9bcadc4cb0e682b5301363e8df560a753aWithdraw174756542022-07-12 11:06:5580 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000090044021 ETH
0x1f19b6f6d8495c9c14382a760ebc841e96e37ad3be4fa652e2345c3945c2a043Withdraw174755972022-07-12 11:05:3380 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000089485175 ETH
0xf6de5cf9b2aa1d4337cb5c6f90336b676d162a02fadffa3a1c0bd57cc7f28c84Mint Multiple174755032022-07-12 11:05:0480 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.12 ETH0.000118941813 ETH
0x69bce06afc2a11831ad4f857a179b38a36017b441d9b6affb484841371482ca7Traverse Chains174329452022-07-11 16:34:1480 days 20 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.000327783952677 ETH0.00012968233 ETH
0xd4afb8ca1292f0792d3df86c4d0359ca8dbfe53e0b1324c64d8ae7186770a6f8Traverse Chains174045762022-07-11 4:29:0781 days 8 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.1 ETH0.000123937221 ETH
0x59ba14bea7659368edbba289b989d81b3caa052601ec7360ec7f677c87254faeSet Approval For...174015742022-07-11 2:58:5581 days 10 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000125407558 ETH
0x78b20392dc2eabb1ef823c7774a05c3f19cc9545a8ce9b15324589fe6cacfc5bSet Price174012362022-07-11 2:47:4981 days 10 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000104438623 ETH
0x43a88725781087fe35bfda8fe8d6f2b390ff463d93103626c93e0d76709a9022Set Price174011272022-07-11 2:43:4581 days 10 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000103129384 ETH
0x1153bf5267484c34a328ccd731e65f721eb5e060c06218febcb5125f4c88a78fSet Price174010902022-07-11 2:42:5981 days 10 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000104438623 ETH
0x942d07f6ba50503a854964560256e65787dbffe620c0d279e9355dd0b3429df7Mint Multiple174010792022-07-11 2:42:5981 days 10 hrs ago0xcbbe453453f92ac132b716bac1464c90bdf15b60 IN  0xbb5518859ab064bd484fb632a475968e7592e2e310 wei0.000223975951 ETH
0x14f1e908cb7572dca0326ce4d9f9be0331f7474f66ac39d1b0b446948a2ab414Mint Multiple174010692022-07-11 2:42:0781 days 10 hrs ago0xcbbe453453f92ac132b716bac1464c90bdf15b60 IN  0xbb5518859ab064bd484fb632a475968e7592e2e310 wei0.000223964567 ETH
0x87d634e4f5ec221c0287f4db90e2ae235a9f79055bdd0c08492af2794b5226b0Mint Multiple174010602022-07-11 2:42:0781 days 10 hrs ago0xcbbe453453f92ac132b716bac1464c90bdf15b60 IN  0xbb5518859ab064bd484fb632a475968e7592e2e35 wei0.000175514891 ETH
0x1a7bafdeb21ac5fccdaa1d9786a8b59cdb8ead63b66b9f1a362d9ccd524565b6Mint Multiple174009942022-07-11 2:40:0981 days 10 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e35 wei0.000163312877 ETH
0x2fae1e3d98b739ef19a2de8bada740824c7993f993bebb6653358df9bdd96baaSet Sale Active174009612022-07-11 2:40:0981 days 10 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000103459302 ETH
0x3dc972e300d7b227ce778143e077b076c06fc133dc91b19c9544629c4919d1fbSet Price174009562022-07-11 2:40:0981 days 10 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000103129384 ETH
0x1b4ebe3fb467d708aee31cebc5e93f60b4f930ba8707a3b07e0091a714736ec1Traverse Chains171821402022-07-07 10:26:0085 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.1 ETH0.000120464089 ETH
0xf4c797c920b2f5714608796c7fe8b211507f101de02ecb1921b592319b866326Withdraw171821262022-07-07 10:24:5285 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30 ETH0.000101228077 ETH
0x28ed618ec4b8cdee52ba12df5b3492e8e85923360b1f5ea6907b81428a164739Mint Multiple171820952022-07-07 10:24:5285 days 2 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.12 ETH0.000146786169 ETH
0xd65ee716650868ba590088626cebc95d8c74c4319fa2638f58a661fc7cbd9b6aTraverse Chains171818502022-07-07 10:20:0885 days 3 hrs ago0xbed021cf2c06c0a34389d84e725c7fd4f570ffda IN  0xbb5518859ab064bd484fb632a475968e7592e2e30.01 ETH0.000120475577 ETH
[ Download CSV Export 
Latest 16 internal transactions
Parent Txn Hash Block From To Value
0xfb5a8f6b2150bdb2109218143086b4436db098283ab530ae161d3cbd204137ab174758472022-07-12 11:11:1480 days 2 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e30xbed021cf2c06c0a34389d84e725c7fd4f570ffda0.12 ETH
0xd9a29d6477e0826368e760e46f619cb00147215cb3577d75cacd52e37ace2bf2174757592022-07-12 11:10:3280 days 2 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e30xbed021cf2c06c0a34389d84e725c7fd4f570ffda0.12 ETH
0x09275269d33d6d718c6a2e157621de9bcadc4cb0e682b5301363e8df560a753a174756542022-07-12 11:06:5580 days 2 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e30xbed021cf2c06c0a34389d84e725c7fd4f570ffda0.108000000000000027 ETH
0x1f19b6f6d8495c9c14382a760ebc841e96e37ad3be4fa652e2345c3945c2a043174755972022-07-12 11:05:3380 days 2 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e30xbed021cf2c06c0a34389d84e725c7fd4f570ffda0.012000000000000003 ETH
0x69bce06afc2a11831ad4f857a179b38a36017b441d9b6affb484841371482ca7174329452022-07-11 16:34:1480 days 20 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0.000327783952677268 ETH
0x69bce06afc2a11831ad4f857a179b38a36017b441d9b6affb484841371482ca7174329452022-07-11 16:34:1480 days 20 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0 ETH
0xd4afb8ca1292f0792d3df86c4d0359ca8dbfe53e0b1324c64d8ae7186770a6f8174045762022-07-11 4:29:0781 days 8 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0.1 ETH
0xd4afb8ca1292f0792d3df86c4d0359ca8dbfe53e0b1324c64d8ae7186770a6f8174045762022-07-11 4:29:0781 days 8 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0 ETH
0x1b4ebe3fb467d708aee31cebc5e93f60b4f930ba8707a3b07e0091a714736ec1171821402022-07-07 10:26:0085 days 2 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0.1 ETH
0x1b4ebe3fb467d708aee31cebc5e93f60b4f930ba8707a3b07e0091a714736ec1171821402022-07-07 10:26:0085 days 2 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0 ETH
0xf4c797c920b2f5714608796c7fe8b211507f101de02ecb1921b592319b866326171821262022-07-07 10:24:5285 days 2 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e30xbed021cf2c06c0a34389d84e725c7fd4f570ffda0.12 ETH
0xd65ee716650868ba590088626cebc95d8c74c4319fa2638f58a661fc7cbd9b6a171818502022-07-07 10:20:0885 days 3 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0.01 ETH
0xd65ee716650868ba590088626cebc95d8c74c4319fa2638f58a661fc7cbd9b6a171818502022-07-07 10:20:0885 days 3 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e3LayerZero: Arbitrum Endpoint0 ETH
0xbb9103a4c28fd6e79c78394b67461860a43474ff29419574480794d4a17299b3171818142022-07-07 10:19:2785 days 3 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e30xbed021cf2c06c0a34389d84e725c7fd4f570ffda0.04 ETH
0x1682bcfd15e31596db837d79759f0c5403b3e6e50dea53bba03cf879b5786cc6171817072022-07-07 10:16:2485 days 3 hrs ago 0xbb5518859ab064bd484fb632a475968e7592e2e30xbed021cf2c06c0a34389d84e725c7fd4f570ffda0.1 ETH
0x2d90854fa4bb02f4efb51d122937492cc3e91fda632680144b9cdd6803b315c6171789012022-07-07 9:19:2185 days 4 hrs ago xdeployer: Deployer  Contract Creation0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BunnyBats

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : BunnyBats.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "./interfaces/ILayerZeroEndpoint.sol";
import "./interfaces/ILayerZeroReceiver.sol";
import "./NonblockingReceiver.sol";

/***
 * 
 * This contract includes the following features
 * - Appendable AllowList
 * - MintPass exchange (from an ERC1155)
 * - Omnichain traversability via LZ
 * - Updatable LZ endpoint and gas estimate in case of omnichain protocol upgrades (e.g. solana support?)
 * - Starts at ID #1, ends at ID #11111. Maximum 11111.
 * - The possibility to mint different tokenID ranges on other chains. 
 * - Allows for different minting stages (mintPassOnly. allowListOnly. Setting a mintLimit.)
 * 
 * NOTE:
 * - When ready, call lock() to freeze the metadata forever.
***/


contract BunnyBats is Ownable, ERC721, NonblockingReceiver {

    bool public isMintChain = false; // If this chain supports minting (irrevertible)
    bool public saleActive = false; // minting can't work until this is true
    bool public allowListOnly = false; // when this is true, only the allowList can mint
    bool public mintPassOnly = false; // when this is true, only the MintPassers can mint

    // Store the list of all the allowlist addresses
    mapping(address => bool) public isAllowlistAddress;

    // mints that have minted on this contract 
    uint16 public counter = 0; 

    // These two set the range of IDs which are mintable on this chain.  
    uint16 public nextId = 1; // next tokenID to be minted on this chain 
    uint16 public mintLimit = 1111; // when it mints to this point, pause the sale

    uint16 public MAX = 11111; // the hard limit, maximum tokens to be ever be minted
    uint256 public price = 50 ether; // or whatever the network token is. 

    bool public locked = false; // lock the metadata forever  
    string public baseUri = ""; // IPFS baseURI

    // Mint pass on Polygon:
    // https://opensea.io/assets/matic/0x2953399124f0cbb46d2cbacd8a89cf0599974963/33701904559854869217502189747805145561178474490090410021462302409732804052055
    address public mintPassAddress;
    uint256 public mintPassTokenId;

    // LZ 
    uint256 public gasForDestinationLzReceive = 350000;
    address public endpointAddress;

    constructor(address _new_owner) ERC721("BunnyBats", "BUNNYBATS") {
        transferOwnership(_new_owner);
    }

    // Run this after deploy to initialize
    function setupContract(address _endpointAddress, bool _isMintChain, uint16 _firstId, uint16 _lastId) external onlyOwner {
        require(_lastId <= MAX, "Exceeds Maximum");
        require(_firstId <= MAX, "Exceeds Maximum");
        endpointAddress = _endpointAddress;
        endpoint = ILayerZeroEndpoint(_endpointAddress);
        isMintChain = _isMintChain;
        nextId = _firstId;
        mintLimit = _lastId;
    }

    // update the mintpass token 
    function setMintPass(address _mintpassAddress, uint256 _tokenId) external onlyOwner{
        require(isMintChain, "Not Mint Chain");
        mintPassAddress = _mintpassAddress;
        mintPassTokenId = _tokenId;
    }

    // set the ipfs link
    function setBaseUri(string memory newBaseUri) external onlyOwner {
        require(locked == false, "URI locked");
        baseUri = newBaseUri;
    }

    // lock the metadata forever
    function lock() external onlyOwner{
        locked = true;
    }

    // set the limit which is currently for sale
    function setMintLimit(uint16 _newLimit) external onlyOwner{
        require(isMintChain, "Not Mint Chain");
        require(_newLimit <= MAX, "Exceeds Maximum");
        require(_newLimit >= nextId, "Below nextId");
        mintLimit = _newLimit;
    }

    // set the price in wei 
    function setPrice(uint256 _newPrice) external onlyOwner{
        require(isMintChain, "Not Mint Chain");
        require(_newPrice > 0, "Price should be large than zero");
        price = _newPrice;
    }

    // turn minting on (or off)
    function setSaleActive(bool _active) external onlyOwner {
        require(isMintChain, "Not Mint Chain");
        saleActive = _active;
    } 

    // set minting mode for only allowlist members
    function setAllowListOnly(bool _allowListOnly) external onlyOwner {
        require(isMintChain, "Not Mint Chain");
        allowListOnly = _allowListOnly;
    } 

    // set minting mode for only mint pass exchange
    function setMintPassOnly(bool _mintPassOnly) external onlyOwner {
        require(isMintChain, "Not Mint Chain");
        mintPassOnly = _mintPassOnly;
    } 

    // populate the allowlist 
    function allowlistAddresses(address[] calldata wAddresses) public onlyOwner {
        require(isMintChain, "Not Mint Chain");
        for (uint i = 0; i < wAddresses.length; i++) {
            isAllowlistAddress[wAddresses[i]] = true;
        }
    }

    // Mint!
    function mintMultiple(uint16 quantity) external payable {
        require(isMintChain, "Not Mint Chain");
        require(nextId <= MAX, "Sold out");
        require(saleActive, "Sale is not active");
        require(!mintPassOnly, "We're only doing Mint Pass exchanges for now");
        require(allowListOnly ? isAllowlistAddress[msg.sender] : true, "Must be on Allow List to mint during Presale");
        require(nextId - 1 + quantity <= MAX, "Exceeds supply");
        require(nextId - 1 + quantity <= mintLimit, "Exceeds mint limit");
        require(quantity >= 1 && quantity <= 10, "Please mint between 1 and 10");
        require(msg.value == quantity * price, "Payment amount is incorrect");
        
        counter += quantity;
        for(uint16 i=0; i<quantity; i++){
            _safeMint(msg.sender, nextId);
            nextId += 1;
        }

        // halt the sale if MAX is reached
        if(nextId>MAX){
            saleActive=false;
        }
        if(nextId>mintLimit){
            saleActive=false;
        }
    }

    // exchange mint pass
    function exchangeMintPass(uint16 quantity) public {
        require(isMintChain, "Not Mint Chain");
        require(quantity > 0, "Please exchange 1 or more Mint Passes");
        require(nextId <= MAX, "Sold out");
        require(saleActive, "Sale is not active");
        require(allowListOnly ? isAllowlistAddress[msg.sender] : true, "Must be on Allow List to mint during Presale");
        require(nextId - 1 + quantity <= MAX, "Exceeds supply");
        require(nextId - 1 + quantity <= mintLimit, "Exceeds mint limit");

        // burn the mint pass
        ERC1155Burnable(mintPassAddress).burn(msg.sender, mintPassTokenId, quantity);
        
        counter += quantity;
        for(uint16 i=0; i<quantity; i++){
            _safeMint(msg.sender, nextId);
            nextId += 1;
        }

        // halt the sale if MAX is reached
        if(nextId>MAX){
            saleActive=false;
        }
        if(nextId>mintLimit){
            saleActive=false;
        }
    }


    // Misc
    function donate() external payable {
        // thank you
    }

    function withdraw(uint256 amt) external onlyOwner {
        (bool sent, ) = payable(owner()).call{value: amt}("");
        require(sent, "Failed to withdraw");
    }

    //////////////
    // LZ functions

    // just in case this fixed variable limits us from future integrations
    function setGasForDestinationLzReceive(uint256 newVal) external onlyOwner {
        gasForDestinationLzReceive = newVal;
    }

    // just this limits us from future integrations
    function setLzEndpointAddress(address _endpointAddress) external onlyOwner {
        endpointAddress = _endpointAddress;
        endpoint = ILayerZeroEndpoint(_endpointAddress);
    }

    // This function transfers the nft from your address on the
    // source chain to the same address on the destination chain
    function traverseChains(uint16 _chainId, uint256 tokenId) public payable {
        require(msg.sender == ownerOf(tokenId), "You must own the token to traverse");
        require(trustedRemoteLookup[_chainId].length > 0, "This chain is currently unavailable for travel");

        // burn NFT, eliminating it from circulation on src chain
        _burn(tokenId);

        // abi.encode() the payload with the values to send
        bytes memory payload = abi.encode(msg.sender, tokenId);

        // encode adapterParams to specify more gas for the destination
        uint16 version = 1;
        bytes memory adapterParams = abi.encodePacked(
            version,
            gasForDestinationLzReceive
        );

        // get the fees we need to pay to LayerZero + Relayer to cover message delivery
        // you will be refunded for extra gas paid
        (uint256 messageFee, ) = endpoint.estimateFees(
            _chainId,
            address(this),
            payload,
            false,
            adapterParams
        );

        require(
            msg.value >= messageFee,
            "msg.value not enough to cover messageFee. Send gas for message fees"
        );

        endpoint.send{value: msg.value}(
            _chainId, // destination chainId
            trustedRemoteLookup[_chainId], // destination address of nft contract
            payload, // abi.encoded()'ed bytes
            payable(msg.sender), // refund address
            address(0x0), // 'zroPaymentAddress' unused for this
            adapterParams // txParameters
        );
    }


    // ------------------
    // Internal Functions
    // ------------------

    function _LzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) override internal {
        // decode
        (address toAddr, uint tokenId) = abi.decode(_payload, (address, uint));

        // mint the tokens back into existence on destination chain
        _safeMint(toAddr, tokenId);
    }  

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


}

File 2 of 20 : 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 3 of 20 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

File 4 of 20 : 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 5 of 20 : ERC1155Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 6 of 20 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;

    // @notice get the inboundNonce of a receiver from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 7 of 20 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}

File 8 of 20 : NonblockingReceiver.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/ILayerZeroEndpoint.sol";
import "./interfaces/ILayerZeroReceiver.sol";



abstract contract NonblockingReceiver is Ownable, ILayerZeroReceiver {

    ILayerZeroEndpoint internal endpoint;

    struct FailedMessages {
        uint payloadLength;
        bytes32 payloadHash;
    }

    mapping(uint16 => mapping(bytes => mapping(uint => FailedMessages))) public failedMessages;
    mapping(uint16 => bytes) public trustedRemoteLookup;

    event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload);

    function lzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) external override {
        require(msg.sender == address(endpoint)); // boilerplate! lzReceive must be called by the endpoint for security
        require(_srcAddress.length == trustedRemoteLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(trustedRemoteLookup[_srcChainId]), 
            "NonblockingReceiver: invalid source sending contract");

        // try-catch all errors/exceptions
        // having failed messages does not block messages passing
        try this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload) {
            // do nothing
        } catch {
            // error / exception
            failedMessages[_srcChainId][_srcAddress][_nonce] = FailedMessages(_payload.length, keccak256(_payload));
            emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
        }
    }

    function onLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public {
        // only internal transaction
        require(msg.sender == address(this), "NonblockingReceiver: caller must be Bridge.");

        // handle incoming message
        _LzReceive( _srcChainId, _srcAddress, _nonce, _payload);
    }

    // abstract function
    function _LzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) virtual internal;

    function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _txParam) internal {
        endpoint.send{value: msg.value}(_dstChainId, trustedRemoteLookup[_dstChainId], _payload, _refundAddress, _zroPaymentAddress, _txParam);
    }

    function retryMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes calldata _payload) external payable {
        // assert there is message to retry
        FailedMessages storage failedMsg = failedMessages[_srcChainId][_srcAddress][_nonce];
        require(failedMsg.payloadHash != bytes32(0), "NonblockingReceiver: no stored message");
        require(_payload.length == failedMsg.payloadLength && keccak256(_payload) == failedMsg.payloadHash, "LayerZero: invalid payload");
        // clear the stored message
        failedMsg.payloadLength = 0;
        failedMsg.payloadHash = bytes32(0);
        // execute the message. revert if it fails again
        this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    function setTrustedRemote(uint16 _chainId, bytes calldata _trustedRemote) external onlyOwner {
        trustedRemoteLookup[_chainId] = _trustedRemote;
    }

    function removeTrustedRemote(uint16 _chainId) external onlyOwner {
        delete trustedRemoteLookup[_chainId];
    }

}

File 9 of 20 : 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 10 of 20 : 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 11 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 12 of 20 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 13 of 20 : 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 14 of 20 : 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);
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 16 of 20 : 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 17 of 20 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `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 memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

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

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - 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[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

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

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 18 of 20 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 19 of 20 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 20 of 20 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_new_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"MessageFailed","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowListOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"wAddresses","type":"address[]"}],"name":"allowlistAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"counter","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"donate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"endpointAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"quantity","type":"uint16"}],"name":"exchangeMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"failedMessages","outputs":[{"internalType":"uint256","name":"payloadLength","type":"uint256"},{"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasForDestinationLzReceive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAllowlistAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintChain","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintLimit","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"quantity","type":"uint16"}],"name":"mintMultiple","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPassAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPassOnly","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPassTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextId","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"onLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"}],"name":"removeTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowListOnly","type":"bool"}],"name":"setAllowListOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVal","type":"uint256"}],"name":"setGasForDestinationLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_endpointAddress","type":"address"}],"name":"setLzEndpointAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_newLimit","type":"uint16"}],"name":"setMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mintpassAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"setMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_mintPassOnly","type":"bool"}],"name":"setMintPassOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_active","type":"bool"}],"name":"setSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"bytes","name":"_trustedRemote","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_endpointAddress","type":"address"},{"internalType":"bool","name":"_isMintChain","type":"bool"},{"internalType":"uint16","name":"_firstId","type":"uint16"},{"internalType":"uint16","name":"_lastId","type":"uint16"}],"name":"setupContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"traverseChains","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

600a805463ffffffff19169055600c80546001600160401b031916672b670457000100001790556802b5e3af16b1880000600d55600e805460ff1916905560a06040819052600060808190526200005991600f916200025e565b50620557306012553480156200006e57600080fd5b506040516200418038038062004180833981016040819052620000919162000304565b6040518060400160405280600981526020016842756e6e794261747360b81b8152506040518060400160405280600981526020016842554e4e594241545360b81b815250620000ef620000e96200013560201b60201c565b62000139565b8151620001049060019060208501906200025e565b5080516200011a9060029060208401906200025e565b5050506200012e816200018960201b60201c565b5062000373565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620001e95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038116620002505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620001e0565b6200025b8162000139565b50565b8280546200026c9062000336565b90600052602060002090601f016020900481019282620002905760008555620002db565b82601f10620002ab57805160ff1916838001178555620002db565b82800160010185558215620002db579182015b82811115620002db578251825591602001919060010190620002be565b50620002e9929150620002ed565b5090565b5b80821115620002e95760008155600101620002ee565b6000602082840312156200031757600080fd5b81516001600160a01b03811681146200032f57600080fd5b9392505050565b600181811c908216806200034b57607f821691505b602082108114156200036d57634e487b7160e01b600052602260045260246000fd5b50919050565b613dfd80620003836000396000f3fe60806040526004361061036a5760003560e01c80638da5cb5b116101c6578063ce001b30116100f7578063dee9143811610095578063ed88c68e1161006f578063ed88c68e1461038f578063f2fde38b14610a5c578063f3234f4014610a7c578063f83d08ba14610a9257600080fd5b8063dee91438146109d3578063e985e9c5146109f3578063eb8d72b714610a3c57600080fd5b8063d1deba1f116100d1578063d1deba1f1461095e578063d49d518114610971578063d5fe011414610993578063d938de67146109b357600080fd5b8063ce001b301461091b578063cf30901214610931578063cf89fa031461094b57600080fd5b8063a035b1fe11610164578063accff6b91161013e578063accff6b91461088a578063b88d4fde146108ab578063c87b56dd146108cb578063cc76fd92146108eb57600080fd5b8063a035b1fe14610834578063a0bcfc7f1461084a578063a22cb4651461086a57600080fd5b8063943fb872116101a0578063943fb872146107c757806395d89b41146107e7578063996517cf146107fc5780639abc83201461081f57600080fd5b80638da5cb5b1461071e5780638ee749121461073c57806391b7f5ed146107a757600080fd5b8063570152d3116102a05780636e6347bf1161023e5780637533d788116102185780637533d788146106ab57806380fe9ef9146106cb578063841718a6146106de5780638cd370ed146106fe57600080fd5b80636e6347bf1461064857806370a0823114610668578063715018a61461069657600080fd5b806361e202fe1161027a57806361e202fe146105c95780636352211e146105e95780636763b13a1461060957806368428a1b1461062957600080fd5b8063570152d31461055a57806361b8ce8c1461057a57806361bc221a146105ae57600080fd5b806323b872dd1161030d5780632e1a7d4d116102e75780632e1a7d4d146104da5780633e5f6077146104fa57806342842e0e1461051a578063484664021461053a57600080fd5b806323b872dd146104805780632608ab61146104a05780632dbbec08146104ba57600080fd5b806306fdde031161034957806306fdde03146103e6578063081812fc14610408578063095ea7b3146104405780631c37a8221461046057600080fd5b80621d35671461036f57806301bd81d41461039157806301ffc9a7146103b1575b600080fd5b34801561037b57600080fd5b5061038f61038a3660046131f5565b610aa7565b005b34801561039d57600080fd5b5061038f6103ac366004613279565b610ca1565b3480156103bd57600080fd5b506103d16103cc3660046132aa565b611068565b60405190151581526020015b60405180910390f35b3480156103f257600080fd5b506103fb6110ba565b6040516103dd919061331f565b34801561041457600080fd5b50610428610423366004613332565b61114c565b6040516001600160a01b0390911681526020016103dd565b34801561044c57600080fd5b5061038f61045b366004613360565b6111e1565b34801561046c57600080fd5b5061038f61047b3660046131f5565b6112f7565b34801561048c57600080fd5b5061038f61049b36600461338c565b611366565b3480156104ac57600080fd5b50600a546103d19060ff1681565b3480156104c657600080fd5b5061038f6104d5366004613279565b611397565b3480156104e657600080fd5b5061038f6104f5366004613332565b6113dd565b34801561050657600080fd5b50600a546103d19062010000900460ff1681565b34801561052657600080fd5b5061038f61053536600461338c565b6114a3565b34801561054657600080fd5b5061038f610555366004613360565b6114be565b34801561056657600080fd5b50601054610428906001600160a01b031681565b34801561058657600080fd5b50600c5461059b9062010000900461ffff1681565b60405161ffff90911681526020016103dd565b3480156105ba57600080fd5b50600c5461059b9061ffff1681565b3480156105d557600080fd5b5061038f6105e43660046133dd565b611530565b3480156105f557600080fd5b50610428610604366004613332565b61159a565b34801561061557600080fd5b5061038f6106243660046133f8565b611611565b34801561063557600080fd5b50600a546103d190610100900460ff1681565b34801561065457600080fd5b50601354610428906001600160a01b031681565b34801561067457600080fd5b506106886106833660046133f8565b611667565b6040519081526020016103dd565b3480156106a257600080fd5b5061038f6116ee565b3480156106b757600080fd5b506103fb6106c6366004613279565b611724565b61038f6106d9366004613279565b6117be565b3480156106ea57600080fd5b5061038f6106f93660046133dd565b611b8d565b34801561070a57600080fd5b5061038f6107193660046133dd565b611bf3565b34801561072a57600080fd5b506000546001600160a01b0316610428565b34801561074857600080fd5b50610792610757366004613415565b600860209081526000938452604080852084518086018401805192815290840195840195909520945292905282529020805460019091015482565b604080519283526020830191909152016103dd565b3480156107b357600080fd5b5061038f6107c2366004613332565b611c5b565b3480156107d357600080fd5b5061038f6107e2366004613332565b611cfc565b3480156107f357600080fd5b506103fb611d2b565b34801561080857600080fd5b50600c5461059b90640100000000900461ffff1681565b34801561082b57600080fd5b506103fb611d3a565b34801561084057600080fd5b50610688600d5481565b34801561085657600080fd5b5061038f61086536600461346b565b611d47565b34801561087657600080fd5b5061038f6108853660046134b3565b611dc4565b34801561089657600080fd5b50600a546103d1906301000000900460ff1681565b3480156108b757600080fd5b5061038f6108c63660046134e8565b611dcf565b3480156108d757600080fd5b506103fb6108e6366004613332565b611e01565b3480156108f757600080fd5b506103d16109063660046133f8565b600b6020526000908152604090205460ff1681565b34801561092757600080fd5b5061068860115481565b34801561093d57600080fd5b50600e546103d19060ff1681565b61038f610959366004613547565b611edc565b61038f61096c3660046135ab565b6121b9565b34801561097d57600080fd5b50600c5461059b90600160301b900461ffff1681565b34801561099f57600080fd5b5061038f6109ae366004613279565b612346565b3480156109bf57600080fd5b5061038f6109ce366004613636565b612436565b3480156109df57600080fd5b5061038f6109ee36600461368c565b61253b565b3480156109ff57600080fd5b506103d1610a0e366004613700565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610a4857600080fd5b5061038f610a57366004613739565b6125f9565b348015610a6857600080fd5b5061038f610a773660046133f8565b612641565b348015610a8857600080fd5b5061068860125481565b348015610a9e57600080fd5b5061038f6126d9565b6007546001600160a01b03163314610abe57600080fd5b61ffff841660009081526009602052604090208054610adc9061378b565b90508351148015610b1b575061ffff8416600090815260096020526040908190209051610b0991906137c6565b60405180910390208380519060200120145b610b895760405162461bcd60e51b815260206004820152603460248201527f4e6f6e626c6f636b696e6752656365697665723a20696e76616c696420736f756044820152731c98d9481cd95b991a5b99c818dbdb9d1c9858dd60621b60648201526084015b60405180910390fd5b604051630e1bd41160e11b81523090631c37a82290610bb2908790879087908790600401613838565b600060405180830381600087803b158015610bcc57600080fd5b505af1925050508015610bdd575060015b610c9b576040518060400160405280825181526020018280519060200120815250600860008661ffff1661ffff16815260200190815260200160002084604051610c279190613881565b9081526040805191829003602090810183206001600160401b038716600090815290825291909120835181559201516001909201919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90610c92908690869086908690613838565b60405180910390a15b50505050565b600a5460ff16610cc35760405162461bcd60e51b8152600401610b809061389d565b60008161ffff1611610d255760405162461bcd60e51b815260206004820152602560248201527f506c656173652065786368616e67652031206f72206d6f7265204d696e742050604482015264617373657360d81b6064820152608401610b80565b600c5461ffff600160301b8204811662010000909204161115610d755760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610b80565b600a54610100900460ff16610dc15760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610b80565b600a5462010000900460ff16610dd8576001610dec565b336000908152600b602052604090205460ff165b610e085760405162461bcd60e51b8152600401610b80906138c5565b600c5461ffff600160301b82048116918391610e2e916001916201000090910416613927565b610e38919061394a565b61ffff161115610e7b5760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610b80565b600c5461ffff64010000000082048116918391610ea2916001916201000090910416613927565b610eac919061394a565b61ffff161115610ef35760405162461bcd60e51b8152602060048201526012602482015271115e18d959591cc81b5a5b9d081b1a5b5a5d60721b6044820152606401610b80565b601054601154604051637a94c56560e11b8152336004820152602481019190915261ffff831660448201526001600160a01b039091169063f5298aca90606401600060405180830381600087803b158015610f4d57600080fd5b505af1158015610f61573d6000803e3d6000fd5b5050600c8054849350909150600090610f7f90849061ffff1661394a565b92506101000a81548161ffff021916908361ffff16021790555060005b8161ffff168161ffff16101561101157600c54610fc490339062010000900461ffff16612712565b6001600c60028282829054906101000a900461ffff16610fe4919061394a565b92506101000a81548161ffff021916908361ffff160217905550808061100990613970565b915050610f9c565b50600c5461ffff600160301b820481166201000090920416111561103b57600a805461ff00191690555b600c5461ffff640100000000820481166201000090920416111561106557600a805461ff00191690555b50565b60006001600160e01b031982166380ac58cd60e01b148061109957506001600160e01b03198216635b5e139f60e01b145b806110b457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600180546110c99061378b565b80601f01602080910402602001604051908101604052809291908181526020018280546110f59061378b565b80156111425780601f1061111757610100808354040283529160200191611142565b820191906000526020600020905b81548152906001019060200180831161112557829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b03166111c55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b80565b506000908152600560205260409020546001600160a01b031690565b60006111ec8261159a565b9050806001600160a01b0316836001600160a01b0316141561125a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b80565b336001600160a01b038216148061127657506112768133610a0e565b6112e85760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b80565b6112f2838361272c565b505050565b33301461135a5760405162461bcd60e51b815260206004820152602b60248201527f4e6f6e626c6f636b696e6752656365697665723a2063616c6c6572206d75737460448201526a10313290213934b233b29760a91b6064820152608401610b80565b610c9b8484848461279a565b61137033826127c7565b61138c5760405162461bcd60e51b8152600401610b8090613992565b6112f28383836128be565b6000546001600160a01b031633146113c15760405162461bcd60e51b8152600401610b80906139e3565b61ffff8116600090815260096020526040812061106591612fd5565b6000546001600160a01b031633146114075760405162461bcd60e51b8152600401610b80906139e3565b600080546040516001600160a01b039091169083908381818185875af1925050503d8060008114611454576040519150601f19603f3d011682016040523d82523d6000602084013e611459565b606091505b505090508061149f5760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20776974686472617760701b6044820152606401610b80565b5050565b6112f283838360405180602001604052806000815250611dcf565b6000546001600160a01b031633146114e85760405162461bcd60e51b8152600401610b80906139e3565b600a5460ff1661150a5760405162461bcd60e51b8152600401610b809061389d565b601080546001600160a01b0319166001600160a01b039390931692909217909155601155565b6000546001600160a01b0316331461155a5760405162461bcd60e51b8152600401610b80906139e3565b600a5460ff1661157c5760405162461bcd60e51b8152600401610b809061389d565b600a805491151563010000000263ff00000019909216919091179055565b6000818152600360205260408120546001600160a01b0316806110b45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b80565b6000546001600160a01b0316331461163b5760405162461bcd60e51b8152600401610b80906139e3565b601380546001600160a01b039092166001600160a01b0319928316811790915560078054909216179055565b60006001600160a01b0382166116d25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b80565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b031633146117185760405162461bcd60e51b8152600401610b80906139e3565b6117226000612a5a565b565b6009602052600090815260409020805461173d9061378b565b80601f01602080910402602001604051908101604052809291908181526020018280546117699061378b565b80156117b65780601f1061178b576101008083540402835291602001916117b6565b820191906000526020600020905b81548152906001019060200180831161179957829003601f168201915b505050505081565b600a5460ff166117e05760405162461bcd60e51b8152600401610b809061389d565b600c5461ffff600160301b82048116620100009092041611156118305760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610b80565b600a54610100900460ff1661187c5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610b80565b600a546301000000900460ff16156118eb5760405162461bcd60e51b815260206004820152602c60248201527f5765277265206f6e6c7920646f696e67204d696e74205061737320657863686160448201526b6e67657320666f72206e6f7760a01b6064820152608401610b80565b600a5462010000900460ff16611902576001611916565b336000908152600b602052604090205460ff165b6119325760405162461bcd60e51b8152600401610b80906138c5565b600c5461ffff600160301b82048116918391611958916001916201000090910416613927565b611962919061394a565b61ffff1611156119a55760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610b80565b600c5461ffff640100000000820481169183916119cc916001916201000090910416613927565b6119d6919061394a565b61ffff161115611a1d5760405162461bcd60e51b8152602060048201526012602482015271115e18d959591cc81b5a5b9d081b1a5b5a5d60721b6044820152606401610b80565b60018161ffff1610158015611a375750600a8161ffff1611155b611a835760405162461bcd60e51b815260206004820152601c60248201527f506c65617365206d696e74206265747765656e203120616e64203130000000006044820152606401610b80565b600d54611a949061ffff8316613a18565b3414611ae25760405162461bcd60e51b815260206004820152601b60248201527f5061796d656e7420616d6f756e7420697320696e636f727265637400000000006044820152606401610b80565b600c8054829190600090611afb90849061ffff1661394a565b92506101000a81548161ffff021916908361ffff16021790555060005b8161ffff168161ffff16101561101157600c54611b4090339062010000900461ffff16612712565b6001600c60028282829054906101000a900461ffff16611b60919061394a565b92506101000a81548161ffff021916908361ffff1602179055508080611b8590613970565b915050611b18565b6000546001600160a01b03163314611bb75760405162461bcd60e51b8152600401610b80906139e3565b600a5460ff16611bd95760405162461bcd60e51b8152600401610b809061389d565b600a80549115156101000261ff0019909216919091179055565b6000546001600160a01b03163314611c1d5760405162461bcd60e51b8152600401610b80906139e3565b600a5460ff16611c3f5760405162461bcd60e51b8152600401610b809061389d565b600a8054911515620100000262ff000019909216919091179055565b6000546001600160a01b03163314611c855760405162461bcd60e51b8152600401610b80906139e3565b600a5460ff16611ca75760405162461bcd60e51b8152600401610b809061389d565b60008111611cf75760405162461bcd60e51b815260206004820152601f60248201527f50726963652073686f756c64206265206c61726765207468616e207a65726f006044820152606401610b80565b600d55565b6000546001600160a01b03163314611d265760405162461bcd60e51b8152600401610b80906139e3565b601255565b6060600280546110c99061378b565b600f805461173d9061378b565b6000546001600160a01b03163314611d715760405162461bcd60e51b8152600401610b80906139e3565b600e5460ff1615611db15760405162461bcd60e51b815260206004820152600a602482015269155492481b1bd8dad95960b21b6044820152606401610b80565b805161149f90600f90602084019061300f565b61149f338383612aaa565b611dd933836127c7565b611df55760405162461bcd60e51b8152600401610b8090613992565b610c9b84848484612b79565b6000818152600360205260409020546060906001600160a01b0316611e805760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b80565b6000611e8a612bac565b90506000815111611eaa5760405180602001604052806000815250611ed5565b80611eb484612bbb565b604051602001611ec5929190613a37565b6040516020818303038152906040525b9392505050565b611ee58161159a565b6001600160a01b0316336001600160a01b031614611f505760405162461bcd60e51b815260206004820152602260248201527f596f75206d757374206f776e2074686520746f6b656e20746f20747261766572604482015261736560f01b6064820152608401610b80565b61ffff821660009081526009602052604081208054611f6e9061378b565b905011611fd45760405162461bcd60e51b815260206004820152602e60248201527f5468697320636861696e2069732063757272656e746c7920756e617661696c6160448201526d189b1948199bdc881d1c985d995b60921b6064820152608401610b80565b611fdd81612cb8565b60408051336020820152808201839052815180820383018152606082018352601254600160f01b60808401526082808401919091528351808403909101815260a283019384905260075463040a7bb160e41b90945290926001926000916001600160a01b0316906340a7bb1090612060908990309089908790899060a601613a5d565b604080518083038186803b15801561207757600080fd5b505afa15801561208b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120af9190613ab1565b509050803410156121345760405162461bcd60e51b815260206004820152604360248201527f6d73672e76616c7565206e6f7420656e6f75676820746f20636f766572206d6560448201527f73736167654665652e2053656e642067617320666f72206d657373616765206660648201526265657360e81b608482015260a401610b80565b60075461ffff8716600090815260096020526040808220905162c5803160e81b81526001600160a01b039093169263c580310092349261217f928c928b913391908b90600401613ad5565b6000604051808303818588803b15801561219857600080fd5b505af11580156121ac573d6000803e3d6000fd5b5050505050505050505050565b61ffff851660009081526008602052604080822090516121da908790613881565b90815260408051602092819003830190206001600160401b03871660009081529252902060018101549091506122615760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e6752656365697665723a206e6f2073746f726564206d60448201526565737361676560d01b6064820152608401610b80565b80548214801561228b575080600101548383604051612281929190613bb5565b6040518091039020145b6122d75760405162461bcd60e51b815260206004820152601a60248201527f4c617965725a65726f3a20696e76616c6964207061796c6f61640000000000006044820152606401610b80565b60008082556001820155604051630e1bd41160e11b81523090631c37a8229061230c9089908990899089908990600401613bc5565b600060405180830381600087803b15801561232657600080fd5b505af115801561233a573d6000803e3d6000fd5b50505050505050505050565b6000546001600160a01b031633146123705760405162461bcd60e51b8152600401610b80906139e3565b600a5460ff166123925760405162461bcd60e51b8152600401610b809061389d565b600c5461ffff600160301b909104811690821611156123c35760405162461bcd60e51b8152600401610b8090613c26565b600c5461ffff62010000909104811690821610156124125760405162461bcd60e51b815260206004820152600c60248201526b10995b1bddc81b995e1d125960a21b6044820152606401610b80565b600c805461ffff9092166401000000000265ffff0000000019909216919091179055565b6000546001600160a01b031633146124605760405162461bcd60e51b8152600401610b80906139e3565b600c5461ffff600160301b909104811690821611156124915760405162461bcd60e51b8152600401610b8090613c26565b600c5461ffff600160301b909104811690831611156124c25760405162461bcd60e51b8152600401610b8090613c26565b601380546001600160a01b039095166001600160a01b031995861681179091556007805490951617909355600a805492151560ff1990931692909217909155600c805461ffff9384166401000000000265ffff00000000199490931662010000029390931665ffffffff00001990931692909217179055565b6000546001600160a01b031633146125655760405162461bcd60e51b8152600401610b80906139e3565b600a5460ff166125875760405162461bcd60e51b8152600401610b809061389d565b60005b818110156112f2576001600b60008585858181106125aa576125aa613c4f565b90506020020160208101906125bf91906133f8565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806125f181613c65565b91505061258a565b6000546001600160a01b031633146126235760405162461bcd60e51b8152600401610b80906139e3565b61ffff83166000908152600960205260409020610c9b908383613093565b6000546001600160a01b0316331461266b5760405162461bcd60e51b8152600401610b80906139e3565b6001600160a01b0381166126d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b80565b61106581612a5a565b6000546001600160a01b031633146127035760405162461bcd60e51b8152600401610b80906139e3565b600e805460ff19166001179055565b61149f828260405180602001604052806000815250612d53565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906127618261159a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080828060200190518101906127b19190613c80565b915091506127bf8282612712565b505050505050565b6000818152600360205260408120546001600160a01b03166128405760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b80565b600061284b8361159a565b9050806001600160a01b0316846001600160a01b0316148061289257506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b806128b65750836001600160a01b03166128ab8461114c565b6001600160a01b0316145b949350505050565b826001600160a01b03166128d18261159a565b6001600160a01b0316146129355760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b80565b6001600160a01b0382166129975760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b80565b6129a260008261272c565b6001600160a01b03831660009081526004602052604081208054600192906129cb908490613cae565b90915550506001600160a01b03821660009081526004602052604081208054600192906129f9908490613cc5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b03161415612b0c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b80565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612b848484846128be565b612b9084848484612d86565b610c9b5760405162461bcd60e51b8152600401610b8090613cdd565b6060600f80546110c99061378b565b606081612bdf5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612c095780612bf381613c65565b9150612c029050600a83613d45565b9150612be3565b6000816001600160401b03811115612c2357612c23613133565b6040519080825280601f01601f191660200182016040528015612c4d576020820181803683370190505b5090505b84156128b657612c62600183613cae565b9150612c6f600a86613d59565b612c7a906030613cc5565b60f81b818381518110612c8f57612c8f613c4f565b60200101906001600160f81b031916908160001a905350612cb1600a86613d45565b9450612c51565b6000612cc38261159a565b9050612cd060008361272c565b6001600160a01b0381166000908152600460205260408120805460019290612cf9908490613cae565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612d5d8383612e93565b612d6a6000848484612d86565b6112f25760405162461bcd60e51b8152600401610b8090613cdd565b60006001600160a01b0384163b15612e8857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612dca903390899088908890600401613d6d565b602060405180830381600087803b158015612de457600080fd5b505af1925050508015612e14575060408051601f3d908101601f19168201909252612e1191810190613daa565b60015b612e6e573d808015612e42576040519150601f19603f3d011682016040523d82523d6000602084013e612e47565b606091505b508051612e665760405162461bcd60e51b8152600401610b8090613cdd565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128b6565b506001949350505050565b6001600160a01b038216612ee95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b80565b6000818152600360205260409020546001600160a01b031615612f4e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b80565b6001600160a01b0382166000908152600460205260408120805460019290612f77908490613cc5565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b508054612fe19061378b565b6000825580601f10612ff1575050565b601f0160209004906000526020600020908101906110659190613107565b82805461301b9061378b565b90600052602060002090601f01602090048101928261303d5760008555613083565b82601f1061305657805160ff1916838001178555613083565b82800160010185558215613083579182015b82811115613083578251825591602001919060010190613068565b5061308f929150613107565b5090565b82805461309f9061378b565b90600052602060002090601f0160209004810192826130c15760008555613083565b82601f106130da5782800160ff19823516178555613083565b82800160010185558215613083579182015b828111156130835782358255916020019190600101906130ec565b5b8082111561308f5760008155600101613108565b803561ffff8116811461312e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561316357613163613133565b604051601f8501601f19908116603f0116810190828211818310171561318b5761318b613133565b816040528093508581528686860111156131a457600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126131cf57600080fd5b611ed583833560208501613149565b80356001600160401b038116811461312e57600080fd5b6000806000806080858703121561320b57600080fd5b6132148561311c565b935060208501356001600160401b038082111561323057600080fd5b61323c888389016131be565b945061324a604088016131de565b9350606087013591508082111561326057600080fd5b5061326d878288016131be565b91505092959194509250565b60006020828403121561328b57600080fd5b611ed58261311c565b6001600160e01b03198116811461106557600080fd5b6000602082840312156132bc57600080fd5b8135611ed581613294565b60005b838110156132e25781810151838201526020016132ca565b83811115610c9b5750506000910152565b6000815180845261330b8160208601602086016132c7565b601f01601f19169290920160200192915050565b602081526000611ed560208301846132f3565b60006020828403121561334457600080fd5b5035919050565b6001600160a01b038116811461106557600080fd5b6000806040838503121561337357600080fd5b823561337e8161334b565b946020939093013593505050565b6000806000606084860312156133a157600080fd5b83356133ac8161334b565b925060208401356133bc8161334b565b929592945050506040919091013590565b8035801515811461312e57600080fd5b6000602082840312156133ef57600080fd5b611ed5826133cd565b60006020828403121561340a57600080fd5b8135611ed58161334b565b60008060006060848603121561342a57600080fd5b6134338461311c565b925060208401356001600160401b0381111561344e57600080fd5b61345a868287016131be565b925050604084013590509250925092565b60006020828403121561347d57600080fd5b81356001600160401b0381111561349357600080fd5b8201601f810184136134a457600080fd5b6128b684823560208401613149565b600080604083850312156134c657600080fd5b82356134d18161334b565b91506134df602084016133cd565b90509250929050565b600080600080608085870312156134fe57600080fd5b84356135098161334b565b935060208501356135198161334b565b92506040850135915060608501356001600160401b0381111561353b57600080fd5b61326d878288016131be565b6000806040838503121561355a57600080fd5b61337e8361311c565b60008083601f84011261357557600080fd5b5081356001600160401b0381111561358c57600080fd5b6020830191508360208285010111156135a457600080fd5b9250929050565b6000806000806000608086880312156135c357600080fd5b6135cc8661311c565b945060208601356001600160401b03808211156135e857600080fd5b6135f489838a016131be565b9550613602604089016131de565b9450606088013591508082111561361857600080fd5b5061362588828901613563565b969995985093965092949392505050565b6000806000806080858703121561364c57600080fd5b84356136578161334b565b9350613665602086016133cd565b92506136736040860161311c565b91506136816060860161311c565b905092959194509250565b6000806020838503121561369f57600080fd5b82356001600160401b03808211156136b657600080fd5b818501915085601f8301126136ca57600080fd5b8135818111156136d957600080fd5b8660208260051b85010111156136ee57600080fd5b60209290920196919550909350505050565b6000806040838503121561371357600080fd5b823561371e8161334b565b9150602083013561372e8161334b565b809150509250929050565b60008060006040848603121561374e57600080fd5b6137578461311c565b925060208401356001600160401b0381111561377257600080fd5b61377e86828701613563565b9497909650939450505050565b600181811c9082168061379f57607f821691505b602082108114156137c057634e487b7160e01b600052602260045260246000fd5b50919050565b60008083546137d48161378b565b600182811680156137ec57600181146137fd5761382c565b60ff1984168752828701945061382c565b8760005260208060002060005b858110156138235781548a82015290840190820161380a565b50505082870194505b50929695505050505050565b61ffff8516815260806020820152600061385560808301866132f3565b6001600160401b0385166040840152828103606084015261387681856132f3565b979650505050505050565b600082516138938184602087016132c7565b9190910192915050565b6020808252600e908201526d2737ba1026b4b73a1021b430b4b760911b604082015260600190565b6020808252602c908201527f4d757374206265206f6e20416c6c6f77204c69737420746f206d696e7420647560408201526b72696e672050726573616c6560a01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600061ffff8381169083168181101561394257613942613911565b039392505050565b600061ffff80831681851680830382111561396757613967613911565b01949350505050565b600061ffff8083168181141561398857613988613911565b6001019392505050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000816000190483118215151615613a3257613a32613911565b500290565b60008351613a498184602088016132c7565b8351908301906139678183602088016132c7565b61ffff861681526001600160a01b038516602082015260a060408201819052600090613a8b908301866132f3565b84151560608401528281036080840152613aa581856132f3565b98975050505050505050565b60008060408385031215613ac457600080fd5b505080516020909101519092909150565b61ffff871681526000602060c08184015260008854613af38161378b565b8060c087015260e0600180841660008114613b155760018114613b2a57613b58565b60ff1985168984015261010089019550613b58565b8d6000528660002060005b85811015613b505781548b8201860152908301908801613b35565b8a0184019650505b50505050508381036040850152613b6f81896132f3565b915050613b8760608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a0840152613ba881856132f3565b9998505050505050505050565b8183823760009101908152919050565b61ffff86168152608060208201526000613be260808301876132f3565b6001600160401b03861660408401528281036060840152838152838560208301376000602085830101526020601f19601f8601168201019150509695505050505050565b6020808252600f908201526e45786365656473204d6178696d756d60881b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415613c7957613c79613911565b5060010190565b60008060408385031215613c9357600080fd5b8251613c9e8161334b565b6020939093015192949293505050565b600082821015613cc057613cc0613911565b500390565b60008219821115613cd857613cd8613911565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082613d5457613d54613d2f565b500490565b600082613d6857613d68613d2f565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613da0908301846132f3565b9695505050505050565b600060208284031215613dbc57600080fd5b8151611ed58161329456fea2646970667358221220cf942430822fc0004f29038fe43ff7d35a56ebfe6fd680365549ef699cedae6964736f6c63430008090033000000000000000000000000bed021cf2c06c0a34389d84e725c7fd4f570ffda

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

000000000000000000000000bed021cf2c06c0a34389d84e725c7fd4f570ffda

-----Decoded View---------------
Arg [0] : _new_owner (address): 0xbed021cf2c06c0a34389d84e725c7fd4f570ffda

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bed021cf2c06c0a34389d84e725c7fd4f570ffda


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