Contract 0xB20b4D45640FE8a71cA2329f6c7EC415a2a26b51 7

 

Contract Overview

Balance:
0.00000100000035 ETH

ETH Value:
Less Than $0.01 (@ $1,352.30/ETH)
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xba439ad9272258b90d51f29e4cda4b62253cd5f97a8a05ef4d9fdf252297946cSet Approval For...271439172022-09-28 6:47:092 days 9 hrs ago0x05d5f01b74ed14c15a60d34219eb0cecb70ec337 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00001404
0x1bdd35e585d16a8d699c6b4da45eb3c9153aa4d79013f87d26f4722ffa5da6c5Set Approval For...268884242022-09-27 0:11:153 days 15 hrs ago0x09177eb35b36e835e723f08815b6a6e8dee97a9b IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00002035
0x55a7b10f366edf968b0d2d9a07ed6ce989d3b11b7c9a90114582eb29f121c2b4Set Approval For...259396702022-09-22 10:38:418 days 5 hrs ago0x5a6e9f6230e120df06114cb363d56c55a9d25023 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00000805
0x6c7375ebd0636701b7705366b0f4ee0725c7248b110a3362e41f0225ca813711Set Approval For...259395262022-09-22 10:37:338 days 5 hrs ago0x5a6e9f6230e120df06114cb363d56c55a9d25023 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00000781
0x6204788d5fbd32ee3eb40e4942d777c43aa4f78341a668fd4b448eea12a782fbSet Approval For...257395402022-09-21 17:30:338 days 22 hrs ago0x23c449daa23ebd4b0bddf50cebd1859b666ee9ce IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00004388
0x6ae60fc84204a0fbbb0f5cd695896314c2eed4729c618cbc9754ddc69f2ddab6Set Approval For...250018812022-09-17 11:26:2613 days 4 hrs ago0xd112071a5837ac1f69e40fac7a25caaa9baafbcd IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00000934
0x986e9db4a533ae53e43aa6b78a72143f47ad64df31b3f7465524b1990d1f0ea8Set Approval For...246545202022-09-14 21:21:1515 days 18 hrs ago0x8f5f337f5729dbc7dcd1142f02cebfd8fc1d28db IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00005149
0xf53efc290cc3ef6a64fc2296d35e5e173c7fde93ad1bae843fe559fc6f5002d8Set Approval For...243865062022-09-13 9:19:3117 days 6 hrs ago0x817b74653a57719c4532c4bbdeadada08a97fbf3 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.0000126
0x8610c879e1ccdd2672a72efbaafed300f2da1610dfd4e340192e727c6882f3d0Set Approval For...227100122022-09-03 22:50:0026 days 17 hrs ago0x23446b8a6143bc7a4abf47196c71c0faa940c876 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00017772
0xdf10a11589dc516bcd673ac40719cb53e9ea1c3684e035b4a3aeeb4c42a32b7bSet Approval For...226085512022-09-03 7:48:0027 days 8 hrs ago0x5a9c0571c7f91eba6e4203f89c4df48712761561 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00017662
0x33dd05426cba19d4770e81e8509fc25d23b28bcd3163dcf65e9a7bbe541a335bSet Approval For...223115502022-09-01 9:14:1329 days 6 hrs ago0x21a584ab5d9e44b5b90fab28a77faaadb5a2e9b8 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00001703
0xde9f53a7879664dea174aa4da0dd1f7d59516c47b4f9476776242609e8d7c12dSet Approval For...221572752022-08-31 9:32:0630 days 6 hrs ago0xa4b2c652b4052729ab35f6a6ffc0c22bad7bdba8 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000085252872 ETH
0x7c868a325e20527643011690a44895f08aa1ee5c07e101fa5ef4477a31168afcMint219638942022-08-30 10:00:0431 days 5 hrs ago0x6ef00c5a9fadd9a7fcf4a0f4373e6194520b3f80 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000091980125 ETH
0x1702fbc09db13f7a65d0eac44864352eacd827a5dee114c8d830eab2ebda9536Set Approval For...212782772022-08-25 18:39:1735 days 21 hrs ago0x433bcbe320b5dd20f657b4292a7bc1192d2cda53 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00009126717 ETH
0x8e3ea6381994f9999da05abf77f0e9c3bb1bb011eddfcf569554d8fef9272435Set Approval For...209845942022-08-22 17:34:5538 days 22 hrs ago0x72d80941ee2dcda658302477a80d8aee97d1cdb7 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000062610125 ETH
0x5370971a610aae6fcac51595a93c8aab762f9e57b7c6f7550c4d65bf61bd8fd2Set Approval For...203463902022-08-15 21:14:5045 days 18 hrs ago0x8f5f337f5729dbc7dcd1142f02cebfd8fc1d28db IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00011065077 ETH
0xf2f8a701fcff42c453eddf741ad17fec67b7ac03386c4735ad2de0afa067eb07Set Approval For...203461012022-08-15 21:08:1045 days 18 hrs ago0x9041dfddb2389084fdac8c56116f168019d4b46c IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000110074866 ETH
0x2654c836f1be2b3af2fbd448fc34db24b10ee5b3c54ad3f8a12e6e78c14d3deeSet Approval For...202370152022-08-14 13:55:2347 days 2 hrs ago0x72d80941ee2dcda658302477a80d8aee97d1cdb7 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000050719632 ETH
0x207f72d2c2f796829693c729e4d6d943552582aaa038aa799286cd3a6629299cSet Approval For...199376802022-08-10 19:16:5150 days 20 hrs ago0x8652269df419da224c8c71a35f94e857122df4d7 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000185459881 ETH
0x4fba6e35e2e39bcb315b873a8b8f898e0ef844b355ae4235c36a9111672e58ceSet Approval For...198975262022-08-10 10:12:2951 days 5 hrs ago0xe375ba7867800506cf3bca0694212f9ce673711e IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000063997647 ETH
0x9503d9f0151f43a93d70f80b6a9e30bf046ac36218edfa5942bb3cc3b78a8ec2Set Approval For...198974182022-08-10 10:11:1851 days 5 hrs ago0xe375ba7867800506cf3bca0694212f9ce673711e IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000070503293 ETH
0xc58f19c6c58746b04fd80a2da612ae7dd510b961b59a631ad028fe10809f8ccdSet Approval For...197990212022-08-09 11:57:1552 days 3 hrs ago0x52b5ad31cadb34f29fdebfda994c0033e8eb1938 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.00008504374 ETH
0xa9eb02718aa57890d429af8f69c77f557523c9941caf04d74328f9bd2a7d4668Set Approval For...197971442022-08-09 11:30:4952 days 4 hrs ago0x52b5ad31cadb34f29fdebfda994c0033e8eb1938 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000085042302 ETH
0xfca6b1ccaf6446f09eb6673a651a3aec859c39812f25aac0b3f5e9cb3bef04e2Set Approval For...196993252022-08-08 9:24:0053 days 6 hrs ago0x05d5f01b74ed14c15a60d34219eb0cecb70ec337 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000047632308 ETH
0x9162a84d993efbfa7b181c5582639d68aff736df84ea84ef7440d9fc5e704963Set Approval For...196836692022-08-08 6:05:3553 days 9 hrs ago0xa1f331a6f70f9769ee3795e949daf1ec3d6eab91 IN 0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH0.000049657226 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x400b51e1433b88adb3f89c977dab6423815d41154f76b7242a483332fbb79f64262300212022-09-23 16:45:166 days 23 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xa78b76fd7bab31e73ea7b761f6039fbedb1bd3f005b26be04f59e8ff5cef4832262295692022-09-23 16:42:396 days 23 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xd725f0125b8035ae95d63cf8daad5466f81286afabe04e733d439f2e4b078cb4261794912022-09-23 12:39:147 days 3 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xd31f41276e32ddf8db230b8f0d347bd8eaef8c9a0a2b6d529a4d4e4723ed83a0261742442022-09-23 12:14:167 days 3 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xaa265547816989458dd48018c0e532ec62d583b22b6bb8e2da41f856f5f0bef1259850992022-09-22 14:41:088 days 1 hr ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x5941dacfe3181adb9b6ccd5fcf8b7a562bc87a08cca8d17ebde6210732c4d55d259453342022-09-22 11:14:398 days 4 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x6d0daf2825584ec54bc6817aed38e00b61cff850f40cd1c6844741fda3010d8c259452772022-09-22 11:14:238 days 4 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x620f365a69af5b0e61762c8f145de764db818a853865b596a27696b2f523abb6256640352022-09-21 9:09:349 days 6 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x2e1d47b47ee7f339dda2a946c01196f0a0069006dfb25079ac2d696f6de79883250229322022-09-17 15:05:1713 days 50 mins ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xb0b7bb88d25690be66382a99021ca9be424846d4b35f458f8e4e45dcac05efa4241123452022-09-11 15:54:5619 days 1 min ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x03875f4bf75fcdc7a6791503097196236d954016dbd86c947ddf24183e7dc174241122662022-09-11 15:54:2119 days 1 min ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xca048c36551756b20675c153105aa9d08951107171121adc0e88d816c96b3b31241071382022-09-11 15:15:0919 days 40 mins ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x2f69c9a018feef10fc1f7567e2a6a693a8c36f9f1412e00da432c71a9c5c2ea5241070592022-09-11 15:14:2919 days 41 mins ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xf241e5b3634db1f096edf0a777402fc46bf975bad711fc294e866f5ce08e7525241069992022-09-11 15:13:5019 days 42 mins ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x131d989cb847ec23a0646fd96113c7a323b20b7285f7502fa99184f19e075957241053132022-09-11 14:59:5019 days 56 mins ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x2f1ba1074996c00a66836f60466ad4a70c5c206c04b42ce2119b52704c6aba8d235072142022-09-08 5:21:5722 days 10 hrs ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x0a7f43eb6fd171f7bea1156a25ebded199be7450bef0d8a318c4bb06fdd42604230590832022-09-06 1:27:0524 days 14 hrs ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x2f04eab0152b38d55192ff96d07e6c9e58939b3e7e7f97b404d0c054904abe64228878832022-09-05 2:43:1625 days 13 hrs ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x400d3dabae7be51815f8d01633c172ac345ab329adffa3f3a74e29d56a4a648e227574472022-09-04 7:44:3426 days 8 hrs ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x786517862be39d0db6fc996b2ef69ee3f9a4cb01bfed0c0bd3e95894ecece4fa226607412022-09-03 14:47:3327 days 1 hr ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xfb589610cdbed1b763a52f3b09474ec7448c5544459e4e1d40931a92ff7dac56224125902022-09-02 0:54:5328 days 15 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x25b01da0bb02250d849bf3777472da8d60a0673e0c621a1c69ef6386a4160bd8223300792022-09-01 11:48:5329 days 4 hrs ago 0x998ef16ea4111094eb5ee72fc2c6f4e6e86476660xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x5197fd6b5976c1c69f1cfa03223b5f6d9eaa36af6ff0a2234ee84fb7f8d5211b222435092022-08-31 22:17:3029 days 17 hrs ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0xc8b864b457c2f733fc7f2bd0e0ad793b3c1295e7d0889679c4eb48255b2350a7222190012022-08-31 18:53:2229 days 21 hrs ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
0x4ccf3b856b3df44c39a7914f4dac15a1d92dc86ab71ec7e5713e079fd0ca0981222186372022-08-31 18:50:0729 days 21 hrs ago tofuNFT: Market0xb20b4d45640fe8a71ca2329f6c7ec415a2a26b510 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OOCrazySnails

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Arbiscan on 2022-07-24
*/

// File: contracts/IMagic.sol



// @title: IMagic
// @author: crazytoli
//
// Onchain Omnichain PFP collection of 10k unique profile images with the following properties:
//   - First Onchain Omnichain PFP NFT Project
//   - all metadata on chain
//   - all images on chain in svg optimized format
//   - all 10,000 OOCrazySnails are unique
//   - there are 8 traits with 125 values
//   - the traits have distribution and rarities interesting for collecting
//   - everything on chain can be used in other apps and collections in the future

pragma solidity ^0.8.15;

interface IMagic {
    function getBG(uint256 id) external pure returns (string memory);
    function infoBG(uint256 id) external pure returns (string memory);
    function getBO(uint256 id) external pure returns (string memory);
    function infoBO(uint256 id) external pure returns (string memory);
    function getEar(uint256 id) external pure returns (string memory);
    function infoEar(uint256 id) external pure returns (string memory);
    function getM(uint256 id) external pure returns (string memory);
    function infoM(uint256 id) external pure returns (string memory);
    function getE(uint256 id) external pure returns (string memory);
    function infoE(uint256 id) external pure returns (string memory);
    function getC(uint256 id) external pure returns (string memory);
    function infoC(uint256 id) external pure returns (string memory);
    function infoChain(uint256 id) external pure returns(string memory);
}
// File: contracts/ICrazy.sol



// @title: ICrazy
// @author: crazytoli
//
// Onchain Omnichain PFP collection of 10k unique profile images with the following properties:
//   - First Onchain Omnichain PFP NFT Project
//   - all metadata on chain
//   - all images on chain in svg optimized format
//   - all 10,000 OOCrazySnails are unique
//   - there are 8 traits with 125 values
//   - the traits have distribution and rarities interesting for collecting
//   - everything on chain can be used in other apps and collections in the future

pragma solidity ^0.8.15;

interface ICrazy {
    function getS(uint256 id) external pure returns (string memory);
    function infoS(uint256 id) external pure returns (string memory);
    function getSA(uint256 id) external pure returns (string memory);
    function infoSA(uint256 id) external pure returns (string memory);
}
// File: @openzeppelin/contracts/utils/Base64.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        /// @solidity memory-safe-assembly
        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

// File: contracts/layerzero/contracts/interfaces/ILayerZeroUserApplicationConfig.sol



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;
}
// File: contracts/layerzero/contracts/interfaces/ILayerZeroEndpoint.sol



pragma solidity >=0.5.0;


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 lzApp 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: contracts/layerzero/contracts/interfaces/ILayerZeroReceiver.sol



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: @openzeppelin/contracts/utils/Strings.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

// File: @openzeppelin/contracts/utils/Context.sol


// 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: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;


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

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

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

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

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

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

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

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

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

// File: contracts/layerzero/contracts/lzApp/LzApp.sol



pragma solidity ^0.8.15;





/*
 * a generic LzReceiver implementation
 */
abstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {
    uint256 private immutable fee;

    ILayerZeroEndpoint public immutable lzEndpoint;

    mapping(uint16 => bytes) public trustedRemoteLookup;

    constructor(address _endpoint, uint256 _fee) {
        lzEndpoint = ILayerZeroEndpoint(_endpoint);
        fee = _fee;
    }

    function lzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public virtual override {
        // lzReceive must be called by the endpoint for security
        require(_msgSender() == address(lzEndpoint));

        bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];
        // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.
        require(_srcAddress.length == trustedRemote.length && keccak256(_srcAddress) == keccak256(trustedRemote));

        _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging
    function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;

    function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual {
        bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];
        require(trustedRemote.length != 0);
        lzEndpoint.send{value: msg.value - fee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);
    }

    //---------------------------UserApplication config----------------------------------------
    function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {
        return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);
    }

    // generic config for LayerZero user Application
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {
        lzEndpoint.setConfig(_version, _chainId, _configType, _config);
    }

    function setSendVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setSendVersion(_version);
    }

    function setReceiveVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setReceiveVersion(_version);
    }

    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {
        lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);
    }

    function setTrustedRemote(uint16[] calldata _srcChainId, bytes[] calldata _srcAddress) external onlyOwner {
        for (uint256 i = 0; i < _srcChainId.length; i ++) {
            trustedRemoteLookup[_srcChainId[i]] = _srcAddress[i];
        }
    }

    //--------------------------- VIEW FUNCTION ----------------------------------------

    function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {
        bytes memory trustedSource = trustedRemoteLookup[_srcChainId];
        return keccak256(trustedSource) == keccak256(_srcAddress);
    }
}
// File: contracts/layerzero/contracts/lzApp/NonblockingLzApp.sol



pragma solidity ^0.8.15;


/*
 * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel
 * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking
 * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)
 */
abstract contract NonblockingLzApp is LzApp {
    constructor(address _endpoint, uint256 _fee) LzApp(_endpoint, _fee) {}

    mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;

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

    // overriding the virtual function in LzReceiver
    function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {
        // try-catch all errors/exceptions
        try this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload) {
            // do nothing
        } catch {
            // error / exception
            failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);
            emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
        }
    }

    function nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public virtual {
        // only internal transaction
        require(_msgSender() == address(this));
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    //@notice override this function
    function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;

    function retryMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public payable virtual {
        // assert there is message to retry
        bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];
        require(payloadHash != bytes32(0));
        require(keccak256(_payload) == payloadHash);
        // clear the stored message
        failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);
        // execute the message. revert if it fails again
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }
}
// File: @openzeppelin/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol


// 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: @openzeppelin/contracts/utils/introspection/IERC165.sol


// 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: contracts/layerzero/contracts/token/onft/IONFT721Core.sol



pragma solidity ^0.8.15;


/**
 * @dev Interface of the ONFT Core standard
 */
interface IONFT721Core is IERC165 {
    /**
     * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)
     * _dstChainId - L0 defined chain id to send tokens too
     * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain
     * _tokenId - token Id to transfer
     * _useZro - indicates to use zro to pay L0 fees
     * _adapterParams - flexible bytes array to indicate messaging adapter services in L0
     */
    function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);

    /**
     * @dev send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from`
     * `_toAddress` can be any size depending on the `dstChainId`.
     * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)
     * `_adapterParams` is a flexible bytes array to indicate messaging adapter services
     */
    function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    /**
     * @dev Emitted when `_tokenId` are moved from the `_sender` to (`_dstChainId`, `_toAddress`)
     * `_nonce` is the outbound nonce from
     */
    event SendToChain(address indexed _sender, uint16 indexed _dstChainId, bytes indexed _toAddress, uint _tokenId, uint64 _nonce);

    /**
     * @dev Emitted when `_tokenId` are sent from `_srcChainId` to the `_toAddress` at this chain. `_nonce` is the inbound nonce.
     */
    event ReceiveFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint _tokenId, uint64 _nonce);
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @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: contracts/layerzero/contracts/token/onft/ONFT721Core.sol



pragma solidity ^0.8.15;




abstract contract ONFT721Core is NonblockingLzApp, ERC165, IONFT721Core {
    constructor(address _lzEndpoint, uint256 _fee) NonblockingLzApp(_lzEndpoint, _fee) {}

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IONFT721Core).interfaceId || super.supportsInterface(interfaceId);
    }

    function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {
        // mock the payload for send()
        bytes memory payload = abi.encode(_toAddress, _tokenId);
        return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);
    }

    function sendFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {
        _send(_from, _dstChainId, _toAddress, _tokenId, _refundAddress, _zroPaymentAddress, _adapterParams);
    }

    function _send(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual {
        _debitFrom(_from, _dstChainId, _toAddress, _tokenId);

        bytes memory payload = abi.encode(_toAddress, _tokenId);
        _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams);

        uint64 nonce = lzEndpoint.getOutboundNonce(_dstChainId, address(this));
        emit SendToChain(_from, _dstChainId, _toAddress, _tokenId, nonce);
    }

    function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {
        // decode and load the toAddress
        (bytes memory toAddressBytes, uint tokenId) = abi.decode(_payload, (bytes, uint));
        address toAddress;
        assembly {
            toAddress := mload(add(toAddressBytes, 20))
        }

        _creditTo(_srcChainId, toAddress, tokenId);

        emit ReceiveFromChain(_srcChainId, _srcAddress, toAddress, tokenId, _nonce);
    }

    function _debitFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId) internal virtual;

    function _creditTo(uint16 _srcChainId, address _toAddress, uint _tokenId) internal virtual;
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol


// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;


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

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

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

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

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

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

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

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

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

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

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

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

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @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: contracts/OERC721R.sol



pragma solidity ^0.8.15;








/**
 * @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. This does random batch minting.
 */
contract OERC721R is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;
    
    // Random logic
    mapping(uint => uint) private _availableTokens;
    uint256 private _numAvailableTokens;
    uint256 immutable _maxSupply;

    // Omni logic
    uint256 immutable _offset;
    int256 private _flow;
    
    // 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_, uint offset_, uint maxSupply_) {
        _name = name_;
        _symbol = symbol_;
        _offset = offset_;
        _maxSupply = maxSupply_;
        _numAvailableTokens = maxSupply_;
    }
    
    /**
     * @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);
    }

    function maxMint() public view virtual returns (uint256) {
        return _maxSupply;
    }
    
    function totalMint() public view virtual returns (uint256) {
        return _maxSupply - _numAvailableTokens;
    }
    
    function totalSupply() public view virtual returns (uint256) {
        return uint256(int256(totalMint()) + _flow);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0));
        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));
        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));

        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 = OERC721R.ownerOf(tokenId);
        require(to != owner);

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()));

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId));

        _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));
        _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));
    }

    /**
     * @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));
        address owner = OERC721R.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @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));
        require(!_exists(tokenId));

        _balances[to] += 1;
        _mintIdWithoutBalanceUpdate(to, tokenId);

        _flow ++;
    }

    /**
     * @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 = OERC721R.ownerOf(tokenId);

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

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

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

        _flow --;

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

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

    function _mintIdWithoutBalanceUpdate(address to, uint256 tokenId) private {
        _beforeTokenTransfer(address(0), to, tokenId);
        
        _owners[tokenId] = to;
        
        emit Transfer(address(0), to, tokenId);
        
        _afterTokenTransfer(address(0), to, tokenId);
    }

    function _mintRandom(address to, uint _numToMint) internal virtual {
        require(_msgSender() == tx.origin);
        require(to != address(0));
        require(_numToMint > 0);
        
        uint updatedNumAvailableTokens = _numAvailableTokens;
        for (uint256 i; i < _numToMint; ++i) {
            uint256 tokenId = getRandomAvailableTokenId(to, updatedNumAvailableTokens);
            
            _mintIdWithoutBalanceUpdate(to, tokenId + _offset);
            
            --updatedNumAvailableTokens;
        }
        
        _numAvailableTokens = updatedNumAvailableTokens;
        _balances[to] += _numToMint;
    }
        
    function getRandomAvailableTokenId(address to, uint updatedNumAvailableTokens)
        internal
        returns (uint256)
    {
        uint256 randomNum = uint256(
            keccak256(
                abi.encode(
                    to,
                    tx.gasprice,
                    block.number,
                    block.timestamp,
                    block.difficulty,
                    blockhash(block.number - 1),
                    address(this),
                    updatedNumAvailableTokens
                )
            )
        );
        uint256 randomIndex = randomNum % updatedNumAvailableTokens;
        return getAvailableTokenAtIndex(randomIndex, updatedNumAvailableTokens);
    }

    // Implements https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle. Code taken from CryptoPhunksV2
    function getAvailableTokenAtIndex(uint256 indexToUse, uint updatedNumAvailableTokens)
        internal
        returns (uint256)
    {
        uint256 valAtIndex = _availableTokens[indexToUse];
        uint256 result;
        if (valAtIndex == 0) {
            // This means the index itself is still an available token
            result = indexToUse;
        } else {
            // This means the index itself is not an available token, but the val at that index is.
            result = valAtIndex;
        }

        uint256 lastIndex = updatedNumAvailableTokens - 1;
        if (indexToUse != lastIndex) {
            // Replace the value at indexToUse, now that it's been used.
            // Replace it with the data from the last index in the array, since we are going to decrease the array size afterwards.
            uint256 lastValInArray = _availableTokens[lastIndex];
            if (lastValInArray == 0) {
                // This means the index itself is still an available token
                _availableTokens[indexToUse] = lastIndex;
            } else {
                // This means the index itself is not an available token, but the val at that index is.
                _availableTokens[indexToUse] = lastValInArray;
                // Gas refund courtsey of @dievardump
                delete _availableTokens[lastIndex];
            }
        }
        
        return result;
    }

    /**
     * @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(OERC721R.ownerOf(tokenId) == from);
        require(to != address(0));

        _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(OERC721R.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);
        _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();
                } 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: contracts/IERC2981.sol



pragma solidity ^0.8.15;


interface IERC2981 is IERC165 {

    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
        
}
// File: contracts/OOCrazySnails.sol



// @title: OOCrazySnailsNFT
// @author: crazytoli
//
// Onchain Omnichain PFP collection of 10k unique profile images with the following properties:
//   - First Onchain Omnichain PFP NFT Project
//   - all metadata on chain
//   - all images on chain in svg optimized format
//   - all 10,000 OOCrazySnails are unique
//   - there are 8 traits with 125 values
//   - the traits have distribution and rarities interesting for collecting
//   - everything on chain can be used in other apps and collections in the future

pragma solidity ^0.8.9;









contract OOCrazySnails is Ownable, IERC2981, OERC721R, ONFT721Core {

    using Address for address;
    using Strings for uint256;

    uint256 public saleStartTimestamp = 1658998800;
    uint256 public whitelistEndTimestamp = 1659085200;

    uint256 public royaltyAmount = 1000;
    address public royaltyAddress;
    address public crazyLibAddress;
    address public magicLibAddress;
    ICrazy crazy;
    IMagic magic = IMagic(magicLibAddress);
    
    uint256 public mintPrice;

    string public baseProofURI;
    string public baseTokenURI;

    string private wholeContractURI;

    mapping(address => uint256) public whitelist;

    uint256 private whitelistQuantity;

    constructor(
        uint256 _mintPrice,
        uint256 _traverseFee,
        address _lzEndpoint,
        uint256 _offset,
        uint256 _supply
    )
        OERC721R(
            "OOCrazySnails", 
            "OOCS",
            _offset,
            _supply
        )
        ONFT721Core(
            _lzEndpoint, 
            _traverseFee
        )
    {
        mintPrice = _mintPrice;
        royaltyAddress = owner();
    }

    function claim(address _to) external {
        require(isSaleLive(), "The sale has not started");
        uint256 _amount = whitelist[_msgSender()];
        require(_amount > 0, "Already claimed");
        _removeWhitelist(_msgSender());
        _mintRandom(_to, _amount);
    }

    function mint(address _to, uint256 _amount) external payable {
        require(isSaleLive(), "The sale has not started");
        require(_amount <= 2, "Only 2 per TX");
        require(_amount + totalMint() <= _availableMint(), "NOT ENOUGH SUPPLY");
        _mintRandom(_to, _amount);
    }

    function addWhitelist(address[] memory _address, uint256 _quantity) external onlyOwner {
        for (uint256 i = 0; i < _address.length; i ++) {
            whitelist[_address[i]] = _quantity;
        }
        whitelistQuantity += (_address.length * _quantity);
    }

    function removeWhitelist(address _address) external onlyOwner {
        _removeWhitelist(_address);
    }

    function setContractURI(string memory _string) external onlyOwner {
        wholeContractURI = _string;
    }

    function setBaseProofURI(string memory _string) external onlyOwner {
        require(!isSaleLive());
        baseProofURI = _string;
    }

    function setBaseTokenURI(string memory _string) external onlyOwner {
        baseTokenURI = _string;
    }

    function setSaleStartTimestamp(uint256 _timestamp) external onlyOwner {
        require(!isSaleLive());
        saleStartTimestamp = _timestamp;
    }

    function setWhitelistEndTimestamp(uint256 _timestamp) external onlyOwner {
        whitelistEndTimestamp = _timestamp;
    }

    function setMintPrice(uint256 _price) external onlyOwner {
        mintPrice = _price;
    }

    function setRoyaltyAmount(uint256 _amount) external onlyOwner {
        royaltyAmount = _amount;
    }

    function setRoyaltyAddress(address _address) external onlyOwner {
        royaltyAddress = _address;
    }

    function setMagicLibAddress(address _address) external onlyOwner {
        magicLibAddress = _address;
        magic = IMagic(magicLibAddress);
    }

    function setCrazyLibAddress(address _address) external onlyOwner {
        crazyLibAddress = _address;
        crazy = ICrazy(crazyLibAddress);
    }

    // donations
    function withdraw(address _address) external onlyOwner {
        payable(_address).transfer(address(this).balance);
    }

    function royaltyInfo(uint256, uint256 _salePrice) external view override returns (address, uint256) {
		return (royaltyAddress, (_salePrice * royaltyAmount) / 10000);
	}

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

    function supportsInterface(bytes4 interfaceId) public view virtual override(OERC721R, ONFT721Core, IERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    function isSaleLive() public view returns (bool) {
        return saleStartTimestamp <= block.timestamp;
    }

    function proofURI(uint256 tokenId) public view returns (string memory) {
        return bytes(baseProofURI).length > 0 ? string(abi.encodePacked(baseProofURI, tokenId.toString())) : "";
    }

    function _removeWhitelist(address _address) internal {
        whitelistQuantity -= whitelist[_address];
        whitelist[_address] = 0;
    }

    function _debitFrom(address _from, uint16, bytes memory, uint _tokenId) internal virtual override {
        require(_isApprovedOrOwner(_msgSender(), _tokenId), "Need be owner");
        require(OERC721R.ownerOf(_tokenId) == _from,"Need to be same address");
        _burn(_tokenId);
    }

    function _creditTo(uint16, address _toAddress, uint _tokenId) internal virtual override {
        _mint(_toAddress, _tokenId);
    }

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

    function tokenURI(uint256 tokenId) override public view returns (string memory) {
        string memory rl4='data:application/json;base64,';
        string memory rl1='{"name": "OOCS #';
        string memory tr8='"}],"image": "data:image/svg+xml;base64,';
        string memory rl3 ='"}';
        //bg, body, clothes, ears, eyes, mouth, shell, shella, network
        uint8[8] memory w = [10, 11, 22, 3, 25, 3, 15, 36];
        uint256[8] memory e;
        uint256 n = tokenId;
        uint256 i = 0;
        while(i<4){
            e[i] = n % w[i] + 1;
            n = n/w[i];
            i+=1;
        }
        n = tokenId;
        while(i<7){
            e[i] = n % w[i] + 1;
            n = n/w[i];
            i+=1;
        }
        n = tokenId;
        while(i<8){
            e[i] = n % w[i] + 1;
            n = n/w[i];
            i+=1;
        }
        
        string memory svg = string(abi.encodePacked('<svg stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round" viewBox="0 0 1800 1800" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">',magic.getBG(e[0]),magic.getBO(e[1]), magic.getC(e[2]),magic.getEar(e[3]),magic.getE(e[4]), magic.getM(e[5]), crazy.getS(e[6]),crazy.getSA(e[7]),'</svg>'));
        string memory traits = string(abi.encodePacked(magic.infoBG(e[0]),magic.infoBO(e[1]), magic.infoC(e[2]),magic.infoEar(e[3]),magic.infoE(e[4]), magic.infoM(e[5]), crazy.infoS(e[6]),crazy.infoSA(e[7])));
        traits = string(abi.encodePacked(traits,magic.infoChain(tokenId),tr8));
        return string(abi.encodePacked(rl4,Base64.encode(bytes(string(abi.encodePacked(rl1,Strings.toString(tokenId),traits,Base64.encode(bytes(svg)),rl3))))));
    }

    function teamMint(address _address, uint256 quantity) external onlyOwner {
        require(_availableMint() >= quantity, "NOT ENOUGH SUPPLY");
        _mintRandom(_address, quantity);
    }

    function traverseChains(
        uint16 _chainId,
        uint256 tokenId,
        address _address
    ) public payable {
        sendFrom(_address, _chainId, abi.encodePacked(_address), tokenId, payable(_address), 0x0000000000000000000000000000000000000000, "");
    }

    function _availableMint() internal view returns (uint256) {
        if (whitelistEndTimestamp > block.timestamp) {
            return maxMint() - whitelistQuantity;
        }
        return maxMint();
    }

}

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"},{"internalType":"uint256","name":"_traverseFee","type":"uint256"},{"internalType":"address","name":"_lzEndpoint","type":"address"},{"internalType":"uint256","name":"_offset","type":"uint256"},{"internalType":"uint256","name":"_supply","type":"uint256"}],"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":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":true,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":true,"internalType":"address","name":"_toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"ReceiveFromChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"indexed":true,"internalType":"bytes","name":"_toAddress","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"SendToChain","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":[{"internalType":"address[]","name":"_address","type":"address[]"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"addWhitelist","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":"baseProofURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crazyLibAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bool","name":"_useZro","type":"bool"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"estimateSendFee","outputs":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"zroFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"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":"isSaleLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"isTrustedRemote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzEndpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"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":"magicLibAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"nonblockingLzReceive","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"proofURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeWhitelist","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":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":"saleStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"address","name":"_zroPaymentAddress","type":"address"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"sendFrom","outputs":[],"stateMutability":"payable","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":"_string","type":"string"}],"name":"setBaseProofURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_string","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_string","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setCrazyLibAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setMagicLibAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setRoyaltyAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setSaleStartTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"_srcChainId","type":"uint16[]"},{"internalType":"bytes[]","name":"_srcAddress","type":"bytes[]"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setWhitelistEndTimestamp","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":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"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"},{"internalType":"address","name":"_address","type":"address"}],"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":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040526362e25010600c556362e3a190600d556103e8600e55601154601380546001600160a01b0319166001600160a01b039092169190911790553480156200004a57600080fd5b5060405162004f4d38038062004f4d8339810160408190526200006d916200019d565b82846040518060400160405280600d81526020016c4f4f4372617a79536e61696c7360981b815250604051806040016040528060048152602001634f4f435360e01b815250858585858181620000d2620000cc6200014960201b60201c565b6200014d565b6001600160a01b0390911660a0526080525060039050620000f485826200029b565b5060046200010384826200029b565b5060e09190915260c08190526006555050506014959095555050600054600f80546001600160a01b0319166001600160a01b039092169190911790555062000367915050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080600060a08688031215620001b657600080fd5b85516020870151604088015191965094506001600160a01b0381168114620001dd57600080fd5b6060870151608090970151959894975095949392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200022157607f821691505b6020821081036200024257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200029657600081815260208120601f850160051c81016020861015620002715750805b601f850160051c820191505b8181101562000292578281556001016200027d565b5050505b505050565b81516001600160401b03811115620002b757620002b7620001f6565b620002cf81620002c884546200020c565b8462000248565b602080601f831160018114620003075760008415620002ee5750858301515b600019600386901b1c1916600185901b17855562000292565b600085815260208120601f198616915b82811015620003385788860151825594840194600190910190840162000317565b5085821015620003575787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051614b58620003f56000396000612a690152600081816108aa015281816115a601528181612c940152612cbb015260008181610a4901528181610c4101528181610e5301528181610f71015281816111380152818161141f015281816124300152818161263901528181612d3e01526133b5015260006133df0152614b586000f3fe6080604052600436106103cd5760003560e01c806366ad5c8a116101fd578063add5a4fa11610118578063d547cfb7116100ab578063f4a0a5281161007a578063f4a0a52814610ba6578063f5ecbdbc14610bc6578063f71143ca14610be6578063fbb0b9b714610bfe578063fc0043b614610c1e57600080fd5b8063d547cfb714610b13578063e8a3d48514610b28578063e985e9c514610b3d578063f2fde38b14610b8657600080fd5b8063c87b56dd116100e7578063c87b56dd14610aa0578063cbed8b9c14610ac0578063d1deba1f14610ae0578063d49482e114610af357600080fd5b8063add5a4fa14610a17578063b353aaa714610a37578063b4e38ae114610a6b578063b88d4fde14610a8057600080fd5b80637c6e551d1161019057806395d89b411161015f57806395d89b41146109955780639b19251a146109aa578063a22cb465146109d7578063ad2f852a146109f757600080fd5b80637c6e551d146109215780638da5cb5b146109375780638fbbcb2014610955578063938e3d7b1461097557600080fd5b80637501f741116101cc5780637501f7411461089b5780637533d788146108ce57806377f1af97146108ee57806378c8cda71461090157600080fd5b806366ad5c8a146108305780636817c76c1461085057806370a0823114610866578063715018a61461088657600080fd5b806330176e13116102ed5780634db405611161028057806359a7715a1161024f57806359a7715a1461078c5780635b8c41e6146107a15780636352211e146107f0578063645b67011461081057600080fd5b80634db40561146107195780634f07de0914610739578063519056361461075957806351cff8d91461076c57600080fd5b806340c10f19116102bc57806340c10f19146106a657806342842e0e146106b957806342d65a8d146106d95780634a0c78b5146106f957600080fd5b806330176e13146106305780633c276d86146106505780633d8b38f6146106665780633db82fb51461068657600080fd5b80630c2cd50c116103655780631e83409a116103345780631e83409a1461057c57806323b872dd1461059c5780632a205e3d146105bc5780632a55205a146105f157600080fd5b80630c2cd50c1461050357806310ddb13714610527578063125804d41461054757806318160ddd1461056757600080fd5b806306fdde03116103a157806306fdde031461048157806307e0db17146104a3578063081812fc146104c3578063095ea7b3146104e357600080fd5b80621d3567146103d257806301ffc9a7146103f457806305a26b0d1461042957806306d254da14610461575b600080fd5b3480156103de57600080fd5b506103f26103ed366004613830565b610c3e565b005b34801561040057600080fd5b5061041461040f3660046138ce565b610d4b565b60405190151581526020015b60405180910390f35b34801561043557600080fd5b50601054610449906001600160a01b031681565b6040516001600160a01b039091168152602001610420565b34801561046d57600080fd5b506103f261047c366004613900565b610d76565b34801561048d57600080fd5b50610496610da0565b6040516104209190613975565b3480156104af57600080fd5b506103f26104be366004613988565b610e32565b3480156104cf57600080fd5b506104496104de3660046139a3565b610eb4565b3480156104ef57600080fd5b506103f26104fe3660046139bc565b610ef1565b34801561050f57600080fd5b50610519600d5481565b604051908152602001610420565b34801561053357600080fd5b506103f2610542366004613988565b610f50565b34801561055357600080fd5b506104966105623660046139a3565b610fa8565b34801561057357600080fd5b50610519611006565b34801561058857600080fd5b506103f2610597366004613900565b611022565b3480156105a857600080fd5b506103f26105b73660046139e8565b6110da565b3480156105c857600080fd5b506105dc6105d7366004613a39565b6110f9565b60408051928352602083019190915201610420565b3480156105fd57600080fd5b5061061161060c366004613ac7565b6111c4565b604080516001600160a01b039093168352602083019190915201610420565b34801561063c57600080fd5b506103f261064b366004613ae9565b6111ff565b34801561065c57600080fd5b50610519600c5481565b34801561067257600080fd5b50610414610681366004613b72565b611213565b34801561069257600080fd5b506103f26106a13660046139a3565b6112e0565b6103f26106b43660046139bc565b6112fb565b3480156106c557600080fd5b506103f26106d43660046139e8565b6113e5565b3480156106e557600080fd5b506103f26106f4366004613b72565b611400565b34801561070557600080fd5b506103f2610714366004613c08565b61148f565b34801561072557600080fd5b506103f2610734366004613ae9565b611524565b34801561074557600080fd5b506103f26107543660046139a3565b611546565b6103f2610767366004613c73565b611553565b34801561077857600080fd5b506103f2610787366004613900565b611562565b34801561079857600080fd5b5061051961159f565b3480156107ad57600080fd5b506105196107bc366004613d2c565b6002602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156107fc57600080fd5b5061044961080b3660046139a3565b6115cf565b34801561081c57600080fd5b506103f261082b366004613d8d565b6115f1565b34801561083c57600080fd5b506103f261084b366004613830565b611683565b34801561085c57600080fd5b5061051960145481565b34801561087257600080fd5b50610519610881366004613900565b6116a1565b34801561089257600080fd5b506103f26116d2565b3480156108a757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610519565b3480156108da57600080fd5b506104966108e9366004613988565b6116e6565b6103f26108fc366004613e44565b611780565b34801561090d57600080fd5b506103f261091c366004613900565b6117cb565b34801561092d57600080fd5b50610519600e5481565b34801561094357600080fd5b506000546001600160a01b0316610449565b34801561096157600080fd5b506103f2610970366004613900565b6117df565b34801561098157600080fd5b506103f2610990366004613ae9565b611813565b3480156109a157600080fd5b50610496611827565b3480156109b657600080fd5b506105196109c5366004613900565b60186020526000908152604090205481565b3480156109e357600080fd5b506103f26109f2366004613e79565b611836565b348015610a0357600080fd5b50600f54610449906001600160a01b031681565b348015610a2357600080fd5b506103f2610a323660046139bc565b611841565b348015610a4357600080fd5b506104497f000000000000000000000000000000000000000000000000000000000000000081565b348015610a7757600080fd5b50610496611894565b348015610a8c57600080fd5b506103f2610a9b366004613eae565b6118a1565b348015610aac57600080fd5b50610496610abb3660046139a3565b6118c0565b348015610acc57600080fd5b506103f2610adb366004613f0d565b612411565b6103f2610aee366004613830565b6124a6565b348015610aff57600080fd5b506103f2610b0e3660046139a3565b61255c565b348015610b1f57600080fd5b50610496612569565b348015610b3457600080fd5b50610496612576565b348015610b4957600080fd5b50610414610b58366004613f7b565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b348015610b9257600080fd5b506103f2610ba1366004613900565b612585565b348015610bb257600080fd5b506103f2610bc13660046139a3565b6125fb565b348015610bd257600080fd5b50610496610be1366004613fb4565b612608565b348015610bf257600080fd5b50600c54421015610414565b348015610c0a57600080fd5b506103f2610c19366004613900565b6126bb565b348015610c2a57600080fd5b50601154610449906001600160a01b031681565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c7357600080fd5b61ffff841660009081526001602052604081208054610c9190614001565b80601f0160208091040260200160405190810160405280929190818152602001828054610cbd90614001565b8015610d0a5780601f10610cdf57610100808354040283529160200191610d0a565b820191906000526020600020905b815481529060010190602001808311610ced57829003601f168201915b5050505050905080518451148015610d2f575080805190602001208480519060200120145b610d3857600080fd5b610d44858585856126ef565b5050505050565b60006001600160e01b0319821663152a902d60e11b1480610d705750610d70826127e0565b92915050565b610d7e612805565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b606060038054610daf90614001565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddb90614001565b8015610e285780601f10610dfd57610100808354040283529160200191610e28565b820191906000526020600020905b815481529060010190602001808311610e0b57829003601f168201915b5050505050905090565b610e3a612805565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610ea057600080fd5b505af1158015610d44573d6000803e3d6000fd5b6000818152600860205260408120546001600160a01b0316610ed557600080fd5b506000908152600a60205260409020546001600160a01b031690565b6000610efc826115cf565b9050806001600160a01b0316836001600160a01b031603610f1c57600080fd5b336001600160a01b0382161480610f385750610f388133610b58565b610f4157600080fd5b610f4b838361285f565b505050565b610f58612805565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610e86565b6060600060158054610fb990614001565b905011610fd55760405180602001604052806000815250610d70565b6015610fe0836128cd565b604051602001610ff1929190614057565b60405160208183030381529060405292915050565b600060075461101361159f565b61101d91906140f4565b905090565b600c544210156110745760405162461bcd60e51b8152602060048201526018602482015277151a19481cd85b19481a185cc81b9bdd081cdd185c9d195960421b60448201526064015b60405180910390fd5b33600090815260186020526040902054806110c35760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b604482015260640161106b565b6110cc336129cd565b6110d68282612a18565b5050565b6110e5335b82612ae8565b6110ee57600080fd5b610f4b838383612b83565b60008060008686604051602001611111929190614135565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090611175908b90309086908b908b90600401614157565b6040805180830381865afa158015611191573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b591906141ab565b92509250509550959350505050565b600f54600e5460009182916001600160a01b0390911690612710906111e990866141cf565b6111f39190614204565b915091505b9250929050565b611207612805565b60166110d68282614266565b61ffff83166000908152600160205260408120805482919061123490614001565b80601f016020809104026020016040519081016040528092919081815260200182805461126090614001565b80156112ad5780601f10611282576101008083540402835291602001916112ad565b820191906000526020600020905b81548152906001019060200180831161129057829003601f168201915b5050505050905083836040516112c4929190614325565b60405180910390208180519060200120149150505b9392505050565b6112e8612805565b600c5442106112f657600080fd5b600c55565b600c544210156113485760405162461bcd60e51b8152602060048201526018602482015277151a19481cd85b19481a185cc81b9bdd081cdd185c9d195960421b604482015260640161106b565b60028111156113895760405162461bcd60e51b815260206004820152600d60248201526c09edcd8f2406440e0cae440a8b609b1b604482015260640161106b565b611391612c7f565b61139961159f565b6113a39083614335565b11156110cc5760405162461bcd60e51b81526020600482015260116024820152704e4f5420454e4f55474820535550504c5960781b604482015260640161106b565b610f4b838383604051806020016040528060008152506118a1565b611408612805565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061145890869086908690600401614376565b600060405180830381600087803b15801561147257600080fd5b505af1158015611486573d6000803e3d6000fd5b50505050505050565b611497612805565b60005b83811015610d44578282828181106114b4576114b4614394565b90506020028101906114c691906143aa565b600160008888868181106114dc576114dc614394565b90506020020160208101906114f19190613988565b61ffff1681526020810191909152604001600020916115119190836143f0565b508061151c816144af565b91505061149a565b61152c612805565b600c54421061153a57600080fd5b60156110d68282614266565b61154e612805565b600e55565b61148687878787878787612cdd565b61156a612805565b6040516001600160a01b038216904780156108fc02916000818181858888f193505050501580156110d6573d6000803e3d6000fd5b60006006547f000000000000000000000000000000000000000000000000000000000000000061101d91906144c8565b6000818152600860205260408120546001600160a01b031680610d7057600080fd5b6115f9612805565b60005b825181101561165b57816018600085848151811061161c5761161c614394565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080611653906144af565b9150506115fc565b5080825161166991906141cf565b6019600082825461167a9190614335565b90915550505050565b33301461168f57600080fd5b61169b84848484612e25565b50505050565b60006001600160a01b0382166116b657600080fd5b506001600160a01b031660009081526009602052604090205490565b6116da612805565b6116e46000612ec0565b565b600160205260009081526040902080546116ff90614001565b80601f016020809104026020016040519081016040528092919081815260200182805461172b90614001565b80156117785780601f1061174d57610100808354040283529160200191611778565b820191906000526020600020905b81548152906001019060200180831161175b57829003601f168201915b505050505081565b6040516bffffffffffffffffffffffff19606083901b166020820152610f4b908290859060340160408051601f19818403018152602083019091526000808352909187918791611553565b6117d3612805565b6117dc816129cd565b50565b6117e7612805565b601080546001600160a01b039092166001600160a01b0319928316811790915560128054909216179055565b61181b612805565b60176110d68282614266565b606060048054610daf90614001565b6110d6338383612f10565b611849612805565b80611852612c7f565b10156110cc5760405162461bcd60e51b81526020600482015260116024820152704e4f5420454e4f55474820535550504c5960781b604482015260640161106b565b601580546116ff90614001565b6118ab3383612ae8565b6118b457600080fd5b61169b84848484612f9b565b604080518082018252601d81527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000060208083019190915282518084018452601081526f7b226e616d65223a20224f4f4353202360801b81830152835160608181019095526028808252919260009290614abb908301396040805180820182526002815261227d60f01b602080830191909152825161010081018452600a8152600b918101919091526016928101929092526003606083018190526019608084015260a0830152600f60c0830152602460e083015291925061199f61371a565b8760005b6004811015611a2a578381600881106119be576119be614394565b60200201516119d09060ff16836144df565b6119db906001614335565b8382600881106119ed576119ed614394565b6020020152838160088110611a0457611a04614394565b6020020151611a169060ff1683614204565b9150611a23600182614335565b90506119a3565b8991505b6007811015611ab557838160088110611a4957611a49614394565b6020020151611a5b9060ff16836144df565b611a66906001614335565b838260088110611a7857611a78614394565b6020020152838160088110611a8f57611a8f614394565b6020020151611aa19060ff1683614204565b9150611aae600182614335565b9050611a2e565b8991505b6008811015611b4057838160088110611ad457611ad4614394565b6020020151611ae69060ff16836144df565b611af1906001614335565b838260088110611b0357611b03614394565b6020020152838160088110611b1a57611b1a614394565b6020020151611b2c9060ff1683614204565b9150611b39600182614335565b9050611ab9565b6013548351604051630113bf5960e61b815260048101919091526000916001600160a01b0316906344efd64090602401600060405180830381865afa158015611b8d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611bb59190810190614523565b601354602086015160405163d1dfb9ed60e01b815260048101919091526001600160a01b039091169063d1dfb9ed90602401600060405180830381865afa158015611c04573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c2c9190810190614523565b6013546001600160a01b031663f7048c9787600260200201516040518263ffffffff1660e01b8152600401611c6391815260200190565b600060405180830381865afa158015611c80573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ca89190810190614523565b6013546060880151604051630457213760e21b815260048101919091526001600160a01b039091169063115c84dc90602401600060405180830381865afa158015611cf7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d1f9190810190614523565b6013546080890151604051635b18208f60e01b815260048101919091526001600160a01b0390911690635b18208f90602401600060405180830381865afa158015611d6e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d969190810190614523565b60135460a08a015160405160016213232360e31b0319815260048101919091526001600160a01b039091169063ff66e6e890602401600060405180830381865afa158015611de8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e109190810190614523565b60125460c08b01516040516306a06bdb60e51b815260048101919091526001600160a01b039091169063d40d7b6090602401600060405180830381865afa158015611e5f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e879190810190614523565b60125460e08c015160405163166c107760e11b815260048101919091526001600160a01b0390911690632cd820ee90602401600060405180830381865afa158015611ed6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611efe9190810190614523565b604051602001611f1598979695949392919061456b565b60408051808303601f190181529082905260135486516319969b1360e01b845260048401529092506000916001600160a01b03909116906319969b1390602401600060405180830381865afa158015611f72573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f9a9190810190614523565b60135460208701516040516385b959eb60e01b815260048101919091526001600160a01b03909116906385b959eb90602401600060405180830381865afa158015611fe9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120119190810190614523565b6013546001600160a01b03166323e1ff1f88600260200201516040518263ffffffff1660e01b815260040161204891815260200190565b600060405180830381865afa158015612065573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261208d9190810190614523565b60135460608901516040516329d9be8360e11b815260048101919091526001600160a01b03909116906353b37d0690602401600060405180830381865afa1580156120dc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121049190810190614523565b60135460808a0151604051634045708560e01b815260048101919091526001600160a01b0390911690634045708590602401600060405180830381865afa158015612153573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261217b9190810190614523565b60135460a08b015160405163928b0c6d60e01b815260048101919091526001600160a01b039091169063928b0c6d90602401600060405180830381865afa1580156121ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121f29190810190614523565b60125460c08c015160405163053ac35960e11b815260048101919091526001600160a01b0390911690630a7586b290602401600060405180830381865afa158015612241573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122699190810190614523565b60125460e08d015160405163eb19413d60e01b815260048101919091526001600160a01b039091169063eb19413d90602401600060405180830381865afa1580156122b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526122e09190810190614523565b6040516020016122f79897969594939291906146f2565b60408051601f19818403018152908290526013546338db804f60e01b8352600483018f905290925082916001600160a01b03909116906338db804f90602401600060405180830381865afa158015612353573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261237b9190810190614523565b8960405160200161238e93929190614797565b6040516020818303038152906040529050896123e08a6123ad8f6128cd565b846123b787612fbb565b8c6040516020016123cc9594939291906147da565b604051602081830303815290604052612fbb565b6040516020016123f1929190614845565b6040516020818303038152906040529a5050505050505050505050919050565b612419612805565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c9061246d908890889088908890889060040161486b565b600060405180830381600087803b15801561248757600080fd5b505af115801561249b573d6000803e3d6000fd5b505050505050505050565b61ffff841660009081526002602052604080822090516124c79086906148a4565b90815260408051602092819003830190206001600160401b038616600090815292529020549050806124f857600080fd5b81516020830120811461250a57600080fd5b61ffff8516600090815260026020526040808220905161252b9087906148a4565b90815260408051602092819003830190206001600160401b03871660009081529252902055610d4485858585612e25565b612564612805565b600d55565b601680546116ff90614001565b606060178054610daf90614001565b61258d612805565b6001600160a01b0381166125f25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161106b565b6117dc81612ec0565b612603612805565b601455565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015612688573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526126b091908101906148e0565b90505b949350505050565b6126c3612805565b601180546001600160a01b039092166001600160a01b0319928316811790915560138054909216179055565b604051633356ae4560e11b815230906366ad5c8a90612718908790879087908790600401614914565b600060405180830381600087803b15801561273257600080fd5b505af1925050508015612743575060015b61169b578080519060200120600260008661ffff1661ffff1681526020019081526020016000208460405161277891906148a4565b9081526040805191829003602090810183206001600160401b0387166000908152915220919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d906127d3908690869086908690614914565b60405180910390a161169b565b60006001600160e01b03198216637bb0080b60e01b1480610d705750610d708261310d565b6000546001600160a01b031633146116e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161106b565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612894826115cf565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6060816000036128f45750506040805180820190915260018152600360fc1b602082015290565b8160005b811561291e5780612908816144af565b91506129179050600a83614204565b91506128f8565b6000816001600160401b0381111561293857612938613750565b6040519080825280601f01601f191660200182016040528015612962576020820181803683370190505b5090505b84156126b3576129776001836144c8565b9150612984600a866144df565b61298f906030614335565b60f81b8183815181106129a4576129a4614394565b60200101906001600160f81b031916908160001a9053506129c6600a86614204565b9450612966565b6001600160a01b03811660009081526018602052604081205460198054919290916129f99084906144c8565b90915550506001600160a01b0316600090815260186020526040812055565b333214612a2457600080fd5b6001600160a01b038216612a3757600080fd5b60008111612a4457600080fd5b60065460005b82811015612ab0576000612a5e858461315d565b9050612a9385612a8e7f000000000000000000000000000000000000000000000000000000000000000084614335565b6131ef565b612a9c83614952565b92505080612aa9906144af565b9050612a4a565b5060068190556001600160a01b03831660009081526009602052604081208054849290612ade908490614335565b9091555050505050565b6000818152600860205260408120546001600160a01b0316612b0957600080fd5b6000612b14836115cf565b9050806001600160a01b0316846001600160a01b03161480612b4f5750836001600160a01b0316612b4484610eb4565b6001600160a01b0316145b806126b357506001600160a01b038082166000908152600b602090815260408083209388168352929052205460ff166126b3565b826001600160a01b0316612b96826115cf565b6001600160a01b031614612ba957600080fd5b6001600160a01b038216612bbc57600080fd5b612bc760008261285f565b6001600160a01b0383166000908152600960205260408120805460019290612bf09084906144c8565b90915550506001600160a01b0382166000908152600960205260408120805460019290612c1e908490614335565b909155505060008181526008602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600042600d541115612cb85760195461101d907f00000000000000000000000000000000000000000000000000000000000000006144c8565b507f000000000000000000000000000000000000000000000000000000000000000090565b612ce987878787613248565b60008585604051602001612cfe929190614135565b6040516020818303038152906040529050612d1c87828686866132ff565b604051630f428ae960e31b815261ffff881660048201523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637a14574890604401602060405180830381865afa158015612d8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612db19190614969565b905086604051612dc191906148a4565b604080519182900382208883526001600160401b03841660208401529161ffff8b16916001600160a01b038d16917f024797cc77ce15dc717112d54fb1df125fdfd8c81344fb046c5e074427ce1543910160405180910390a4505050505050505050565b60008082806020019051810190612e3c9190614986565b60148201519193509150612e51878284613465565b806001600160a01b031686604051612e6991906148a4565b604080519182900382208583526001600160401b03891660208401529161ffff8b16917f64e10c37f404d128982dce114f5d233c14c5c7f6d8db93099e3d99dacb9e27ba910160405180910390a450505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b031603612f2e57600080fd5b6001600160a01b038381166000818152600b6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612fa6848484612b83565b612fb28484848461346f565b61169b57600080fd5b60608151600003612fda57505060408051602081019091526000815290565b6000604051806060016040528060408152602001614ae360409139905060006003845160026130099190614335565b6130139190614204565b61301e9060046141cf565b6001600160401b0381111561303557613035613750565b6040519080825280601f01601f19166020018201604052801561305f576020820181803683370190505b509050600182016020820185865187015b808210156130cb576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250613070565b50506003865106600181146130e757600281146130fa57613102565b603d6001830353603d6002830353613102565b603d60018303535b509195945050505050565b60006001600160e01b031982166380ac58cd60e01b148061313e57506001600160e01b03198216635b5e139f60e01b145b80610d7057506301ffc9a760e01b6001600160e01b0319831614610d70565b600080833a4342446131706001846144c8565b604080516001600160a01b0390971660208801528601949094526060850192909252608084015260a08301524060c08201523060e082015261010081018490526101200160408051601f198184030181529190528051602090910120905060006131da84836144df565b90506131e6818561355a565b95945050505050565b60008181526008602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b613251336110df565b61328d5760405162461bcd60e51b815260206004820152600d60248201526c2732b2b21031329037bbb732b960991b604482015260640161106b565b836001600160a01b03166132a0826115cf565b6001600160a01b0316146132f65760405162461bcd60e51b815260206004820152601760248201527f4e65656420746f2062652073616d652061646472657373000000000000000000604482015260640161106b565b61169b816135e2565b61ffff85166000908152600160205260408120805461331d90614001565b80601f016020809104026020016040519081016040528092919081815260200182805461334990614001565b80156133965780601f1061336b57610100808354040283529160200191613396565b820191906000526020600020905b81548152906001019060200180831161337957829003601f168201915b5050505050905080516000036133ab57600080fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663c58031006134047f0000000000000000000000000000000000000000000000000000000000000000346144c8565b8884898989896040518863ffffffff1660e01b815260040161342b969594939291906149cc565b6000604051808303818588803b15801561344457600080fd5b505af1158015613458573d6000803e3d6000fd5b5050505050505050505050565b610f4b8282613693565b60006001600160a01b0384163b1561355257604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906134b3903390899088908890600401614a33565b6020604051808303816000875af19250505080156134ee575060408051601f3d908101601f191682019092526134eb91810190614a70565b60015b613538573d80801561351c576040519150601f19603f3d011682016040523d82523d6000602084013e613521565b606091505b50805160000361353057600080fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506126b3565b5060016126b3565b6000828152600560205260408120548181810361357857508361357b565b50805b60006135886001866144c8565b90508086146135d957600081815260056020526040812054908190036135be5760008781526005602052604090208290556135d7565b6000878152600560205260408082208390558382528120555b505b50949350505050565b60006135ed826115cf565b90506135fa60008361285f565b6001600160a01b03811660009081526009602052604081208054600192906136239084906144c8565b9091555050600082815260086020526040812080546001600160a01b0319169055600780549161365283614a8d565b909155505060405182906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166136a657600080fd5b6000818152600860205260409020546001600160a01b0316156136c857600080fd5b6001600160a01b03821660009081526009602052604081208054600192906136f1908490614335565b90915550613701905082826131ef565b6007805490600061371183614aa2565b91905055505050565b6040518061010001604052806008906020820280368337509192915050565b803561ffff8116811461374b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561378e5761378e613750565b604052919050565b60006001600160401b038211156137af576137af613750565b50601f01601f191660200190565b60006137d06137cb84613796565b613766565b90508281528383830111156137e457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261380c57600080fd5b6112d9838335602085016137bd565b6001600160401b03811681146117dc57600080fd5b6000806000806080858703121561384657600080fd5b61384f85613739565b935060208501356001600160401b038082111561386b57600080fd5b613877888389016137fb565b9450604087013591506138898261381b565b9092506060860135908082111561389f57600080fd5b506138ac878288016137fb565b91505092959194509250565b6001600160e01b0319811681146117dc57600080fd5b6000602082840312156138e057600080fd5b81356112d9816138b8565b6001600160a01b03811681146117dc57600080fd5b60006020828403121561391257600080fd5b81356112d9816138eb565b60005b83811015613938578181015183820152602001613920565b8381111561169b5750506000910152565b6000815180845261396181602086016020860161391d565b601f01601f19169290920160200192915050565b6020815260006112d96020830184613949565b60006020828403121561399a57600080fd5b6112d982613739565b6000602082840312156139b557600080fd5b5035919050565b600080604083850312156139cf57600080fd5b82356139da816138eb565b946020939093013593505050565b6000806000606084860312156139fd57600080fd5b8335613a08816138eb565b92506020840135613a18816138eb565b929592945050506040919091013590565b8035801515811461374b57600080fd5b600080600080600060a08688031215613a5157600080fd5b613a5a86613739565b945060208601356001600160401b0380821115613a7657600080fd5b613a8289838a016137fb565b955060408801359450613a9760608901613a29565b93506080880135915080821115613aad57600080fd5b50613aba888289016137fb565b9150509295509295909350565b60008060408385031215613ada57600080fd5b50508035926020909101359150565b600060208284031215613afb57600080fd5b81356001600160401b03811115613b1157600080fd5b8201601f81018413613b2257600080fd5b6126b3848235602084016137bd565b60008083601f840112613b4357600080fd5b5081356001600160401b03811115613b5a57600080fd5b6020830191508360208285010111156111f857600080fd5b600080600060408486031215613b8757600080fd5b613b9084613739565b925060208401356001600160401b03811115613bab57600080fd5b613bb786828701613b31565b9497909650939450505050565b60008083601f840112613bd657600080fd5b5081356001600160401b03811115613bed57600080fd5b6020830191508360208260051b85010111156111f857600080fd5b60008060008060408587031215613c1e57600080fd5b84356001600160401b0380821115613c3557600080fd5b613c4188838901613bc4565b90965094506020870135915080821115613c5a57600080fd5b50613c6787828801613bc4565b95989497509550505050565b600080600080600080600060e0888a031215613c8e57600080fd5b8735613c99816138eb565b9650613ca760208901613739565b955060408801356001600160401b0380821115613cc357600080fd5b613ccf8b838c016137fb565b965060608a0135955060808a01359150613ce8826138eb565b90935060a089013590613cfa826138eb565b90925060c08901359080821115613d1057600080fd5b50613d1d8a828b016137fb565b91505092959891949750929550565b600080600060608486031215613d4157600080fd5b613d4a84613739565b925060208401356001600160401b03811115613d6557600080fd5b613d71868287016137fb565b9250506040840135613d828161381b565b809150509250925092565b60008060408385031215613da057600080fd5b82356001600160401b0380821115613db757600080fd5b818501915085601f830112613dcb57600080fd5b8135602082821115613ddf57613ddf613750565b8160051b9250613df0818401613766565b8281529284018101928181019089851115613e0a57600080fd5b948201945b84861015613e345785359350613e24846138eb565b8382529482019490820190613e0f565b9997909101359750505050505050565b600080600060608486031215613e5957600080fd5b613e6284613739565b9250602084013591506040840135613d82816138eb565b60008060408385031215613e8c57600080fd5b8235613e97816138eb565b9150613ea560208401613a29565b90509250929050565b60008060008060808587031215613ec457600080fd5b8435613ecf816138eb565b93506020850135613edf816138eb565b92506040850135915060608501356001600160401b03811115613f0157600080fd5b6138ac878288016137fb565b600080600080600060808688031215613f2557600080fd5b613f2e86613739565b9450613f3c60208701613739565b93506040860135925060608601356001600160401b03811115613f5e57600080fd5b613f6a88828901613b31565b969995985093965092949392505050565b60008060408385031215613f8e57600080fd5b8235613f99816138eb565b91506020830135613fa9816138eb565b809150509250929050565b60008060008060808587031215613fca57600080fd5b613fd385613739565b9350613fe160208601613739565b92506040850135613ff1816138eb565b9396929550929360600135925050565b600181811c9082168061401557607f821691505b60208210810361403557634e487b7160e01b600052602260045260246000fd5b50919050565b6000815161404d81856020860161391d565b9290920192915050565b600080845461406581614001565b6001828116801561407d5760018114614092576140c1565b60ff19841687528215158302870194506140c1565b8860005260208060002060005b858110156140b85781548a82015290840190820161409f565b50505082870194505b5050505083516140d581836020880161391d565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b600080821280156001600160ff1b0384900385131615614116576141166140de565b600160ff1b839003841281161561412f5761412f6140de565b50500190565b6040815260006141486040830185613949565b90508260208301529392505050565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061418590830186613949565b8415156060840152828103608084015261419f8185613949565b98975050505050505050565b600080604083850312156141be57600080fd5b505080516020909101519092909150565b60008160001904831182151516156141e9576141e96140de565b500290565b634e487b7160e01b600052601260045260246000fd5b600082614213576142136141ee565b500490565b601f821115610f4b57600081815260208120601f850160051c8101602086101561423f5750805b601f850160051c820191505b8181101561425e5782815560010161424b565b505050505050565b81516001600160401b0381111561427f5761427f613750565b6142938161428d8454614001565b84614218565b602080601f8311600181146142c857600084156142b05750858301515b600019600386901b1c1916600185901b17855561425e565b600085815260208120601f198616915b828110156142f7578886015182559484019460019091019084016142d8565b50858210156143155787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8183823760009101908152919050565b60008219821115614348576143486140de565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff841681526040602082015260006126b060408301848661434d565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126143c157600080fd5b8301803591506001600160401b038211156143db57600080fd5b6020019150368190038213156111f857600080fd5b6001600160401b0383111561440757614407613750565b61441b836144158354614001565b83614218565b6000601f84116001811461444f57600085156144375750838201355b600019600387901b1c1916600186901b178355610d44565b600083815260209020601f19861690835b828110156144805786850135825560209485019460019092019101614460565b508682101561449d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000600182016144c1576144c16140de565b5060010190565b6000828210156144da576144da6140de565b500390565b6000826144ee576144ee6141ee565b500690565b60006145016137cb84613796565b905082815283838301111561451557600080fd5b6112d983602083018461391d565b60006020828403121561453557600080fd5b81516001600160401b0381111561454b57600080fd5b8201601f8101841361455c57600080fd5b6126b3848251602084016144f3565b7f3c737667207374726f6b652d6d697465726c696d69743d22313022207374796c81527f653d2266696c6c2d72756c653a6e6f6e7a65726f3b636c69702d72756c653a6560208201527f76656e6f64643b7374726f6b652d6c696e656361703a726f756e643b7374726f60408201527f6b652d6c696e656a6f696e3a726f756e64222076696577426f783d223020302060608201527f3138303020313830302220786d6c3a73706163653d227072657365727665222060808201527f786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737660a08201526233911f60e91b60c08201526000895161466d8160c3850160208e0161391d565b8951908301906146848160c3840160208e0161391d565b895191019061469a8160c3840160208d0161391d565b6146e26146d06146ca6146c46146be6146b860c3878901018f61403b565b8d61403b565b8b61403b565b8961403b565b8761403b565b651e17b9bb339f60d11b815260060190565b9c9b505050505050505050505050565b6000895160206147058285838f0161391d565b8a51918401916147188184848f0161391d565b8a5192019161472a8184848e0161391d565b895192019161473c8184848d0161391d565b885192019161474e8184848c0161391d565b87519201916147608184848b0161391d565b86519201916147728184848a0161391d565b8551920191614784818484890161391d565b919091019b9a5050505050505050505050565b600084516147a981846020890161391d565b8451908301906147bd81836020890161391d565b84519101906147d081836020880161391d565b0195945050505050565b600086516147ec818460208b0161391d565b865190830190614800818360208b0161391d565b8651910190614813818360208a0161391d565b855191019061482681836020890161391d565b845191019061483981836020880161391d565b01979650505050505050565b6000835161485781846020880161391d565b8351908301906140d581836020880161391d565b600061ffff80881683528087166020840152508460408301526080606083015261489960808301848661434d565b979650505050505050565b600082516148b681846020870161391d565b9190910192915050565b600082601f8301126148d157600080fd5b6112d9838351602085016144f3565b6000602082840312156148f257600080fd5b81516001600160401b0381111561490857600080fd5b6126b3848285016148c0565b61ffff851681526080602082015260006149316080830186613949565b6001600160401b038516604084015282810360608401526148998185613949565b600081614961576149616140de565b506000190190565b60006020828403121561497b57600080fd5b81516112d98161381b565b6000806040838503121561499957600080fd5b82516001600160401b038111156149af57600080fd5b6149bb858286016148c0565b925050602083015190509250929050565b61ffff8716815260c0602082015260006149e960c0830188613949565b82810360408401526149fb8188613949565b6001600160a01b0387811660608601528616608085015283810360a08501529050614a268185613949565b9998505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614a6690830184613949565b9695505050505050565b600060208284031215614a8257600080fd5b81516112d9816138b8565b6000600160ff1b8201614961576149616140de565b60006001600160ff1b0182016144c1576144c16140de56fe227d5d2c22696d616765223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220d9d0035993020db065071b539732622633c47e53834ee95b43487c2af686bab564736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000557300000000000000000000000003c2269811836af69497e5f486a85d7316753cf620000000000000000000000000000000000000000000000000000000000001c8500000000000000000000000000000000000000000000000000000000000005dc

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

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000557300000000000000000000000003c2269811836af69497e5f486a85d7316753cf620000000000000000000000000000000000000000000000000000000000001c8500000000000000000000000000000000000000000000000000000000000005dc

-----Decoded View---------------
Arg [0] : _mintPrice (uint256): 0
Arg [1] : _traverseFee (uint256): 350000
Arg [2] : _lzEndpoint (address): 0x3c2269811836af69497e5f486a85d7316753cf62
Arg [3] : _offset (uint256): 7301
Arg [4] : _supply (uint256): 1500

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000055730
Arg [2] : 0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62
Arg [3] : 0000000000000000000000000000000000000000000000000000000000001c85
Arg [4] : 00000000000000000000000000000000000000000000000000000000000005dc


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.