Contract 0x96c7138c5ed741E5C923470bD27b8272fa3C717F 1

 
 
Txn Hash
Method
Block
From
To
Value
0x27ffba8f04ebedbfee09688d97ebf83761beec1881861ac4e04489f8213b2b6bSet Approval For...165275432023-01-31 14:56:353 days 9 hrs agoENS Name *.eth IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00123012 26.32644934
0x30d88c6775c627042eef1bb5773f9f8824a15fd516bdd0f5828ba4be82a0e9e5Set Approval For...165001932023-01-27 19:19:357 days 4 hrs ago0x9ebb0893557850012fbf5652d4dea77084535faa IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00063164 22.61219055
0x29da84ca7a59610ff93aaea5c50160aa20e58e7446053522c4bb268f0e25c3dcSet Approval For...164879642023-01-26 2:19:358 days 21 hrs agoENS Name luckybear.eth IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.0007606 16.26967389
0x1463f8421c98d892ae759470e34884f1c2c6206d39f116cd90a7b9d919c3559eSet Approval For...164636382023-01-22 16:48:2312 days 7 hrs agoENS Name numbaqq.eth IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00039738 16.01463653
0x35848676158c4ac296491539a153a9ecca0aa5a9c52d49395c415db9d029e033Set Approval For...164391512023-01-19 6:45:4715 days 17 hrs agoENS Name zhahugh9527.eth IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00041045 16.54145762
0x6ee42c354c8f9da90cf1e953a59417e7ed492f0372d1c3f8d95b3e4017283947Set Approval For...163741902023-01-10 5:03:2324 days 18 hrs agoENS Name maxyeo.eth IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00045169 18.18549581
0xa6eb9251d736babb3bdebf986bd1881e3d9cd9c959a3610d4dec20c4dee67fc9Set Approval For...163524712023-01-07 4:18:3527 days 19 hrs ago0x9974dca370e31274a371fb1d28c4e34972456e39 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00066372 14.20469955
0x802051c1f7feef0afee5a4911d0c030767bf9646a0fab066ffb81ea28b67d6daSet Approval For...162952302022-12-30 4:34:4735 days 19 hrs ago0xa45a41eef0a512811c335604134a514d35c331a9 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00068241 14.60453475
0x6fcdce28b15279354b96c27f5701f2a848d3d1137159dc6f20d76e4a95d5e86cSafe Transfer Fr...162906422022-12-29 13:13:5936 days 10 hrs ago0x1f16b011b9d095ed92b997cb9aea90dec0e37385 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00368143 51.83515035
0x3c9627e1af9f4cefe2e7e9b818be0d7c208cd1421e3a07830fbeb23be16b697fSafe Transfer Fr...162832482022-12-28 12:27:5937 days 11 hrs ago0xb285a3a8050ad0cdb52463fa9f42d15a75c6e0a5 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00073026 13.54303593
0x1c2b21edbb83c2165244503812aec9bcaec122e0ef77ce4d31b3e7522d562c9fSafe Transfer Fr...162832482022-12-28 12:27:5937 days 11 hrs ago0xd7206bcc984320edc2cab9c5ebf0c97204e0442b IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00096185 13.54303593
0x845e78584039eccd292130f58521d08730ebf21652ab238deb0c8f9c42390fa4Safe Transfer Fr...162829542022-12-28 11:28:5937 days 12 hrs ago0x2f3035e914dce6a0428afeb5902427cb7bc8a59d IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00523472 13.2812883
0xcd6fcc8dc9ff5202269dc630fa6b2b4dacd9d84b692a058ca3df7e3e46645d1eSafe Transfer Fr...162829382022-12-28 11:25:4737 days 12 hrs ago0x2f3035e914dce6a0428afeb5902427cb7bc8a59d IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00515909 12.8136134
0xf9171bc8e1057720dfeddf8c3120df98864d3f98dad76652521e988be96da673Set Approval For...162638222022-12-25 19:22:4740 days 4 hrs ago0xf56900fb75b72a94b10ee54c9fb4e847aee68759 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.0005307 11.35778712
0xa3b8011cf39b080336012f224d888e26a04c08a9c38bafff666446f17235bbd5Set Approval For...162608032022-12-25 9:15:3540 days 14 hrs agoENS Name winterfyre.eth IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00030164 12.15619424
0xb6a1afa21b9c5e5aafdb2b8a24833eef667120fc560fa061be839bfccdd8a8b3Set Approval For...162608012022-12-25 9:15:1140 days 14 hrs agoENS Name winterfyre.eth IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00032929 13.22583606
0x6f3d7ecbe2a9462fc2255555dfc03e211cabefb62ac87eadfaa885b187f4494bSet Approval For...162493942022-12-23 19:03:5942 days 4 hrs ago0xad9198c1b68d1b9cf33e6fdbd6532a02f907703c IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00090576 19.38458798
0x14f5d7feb0538dd2af741e4d74b2599262da3e195183de0d3a9da40f04ee98baSafe Transfer Fr...162484722022-12-23 15:59:2342 days 8 hrs ago0xed0bfa959506b68997d889e854d62120facf7f0f IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00156195 23.24401563
0xf42e3f9b4cafb529f76187b1bc4e16580267513f1022ed6ddab0a46965659edfSet Approval For...162474142022-12-23 12:26:5942 days 11 hrs ago0x29c2bbe6c72d127ab9a176d448c437e161b2aaf1 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00030086 12.12499233
0xb40054713c1e6db7897be7d08234160e4a812aa746e16664f47dd915523321beSet Approval For...162446532022-12-23 3:13:3542 days 20 hrs ago0x659bf70dc34f0f584f4ea5c1ecfaac2d715a4928 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00061297 13.11845628
0x6c15c1f6ab5b4efa93f0ad2be722b846e700319a7fc5204ac40df17e2234bebcSet Approval For...162401792022-12-22 12:15:3543 days 11 hrs ago0x3503981061432c1fc9872314675e1e01119e69b5 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00099056 21.19934603
0xe2cf2a90a75909b47b05b044fbd84cf7c36ea3f9c912db9f21d660016bcee070Set Approval For...162390602022-12-22 8:30:5943 days 15 hrs ago0xb735b24baf131d46640dd9af3e378ddb99867ea0 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00029398 11.8475593
0x15e7b88b869b214df1d05046d257331ca509276670f280bbca89d0cfd25e7e94Set Approval For...162380482022-12-22 5:07:3543 days 18 hrs ago0xdc67b87bd1cf96d32f1db99b4a408b21aedd5f79 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00056532 12.09861947
0x9386e9d5bc3230e69b47037e400267f1e8d18e3e58233c1959542f7afc7eeb77Set Approval For...162354922022-12-21 20:33:4744 days 3 hrs ago0xe937e37a332c62362794dc653f4e4203a978e8f1 IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00072099 15.43017694
0xaebe0005e1b1873f3b4797994442fbe630aadf8c4ae58d2e8a8b203d92b7c685Set Approval For...161917892022-12-15 18:09:1150 days 5 hrs ago0x1066ad4897c6a10cef9a39d93c48af475bc5364f IN  0x96c7138c5ed741e5c923470bd27b8272fa3c717f0 Ether0.00149536 31.94534543
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xc7452079b7b6480bda414cb15a493d06285392ea60be5347e2aaa19ed9527335157032482022-10-08 12:03:23118 days 11 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x2be4b8ba656919172ca0c929fd06d5b73eb4e491628539cbc342b345796ceb7c157032282022-10-08 11:59:23118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xce6bdbaa2306022a00a66bd21461a0b5b4f15119d80cdc03850d4a7d1a149825157032202022-10-08 11:57:47118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x6ee6ce15ed0dce557b5f138efa3eda070981f036149c6d2e5ae0281d4df36f2d157032112022-10-08 11:55:59118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x57539c4624769eae0da9d33506e516cec8bcec959f588e6de299e8631a8ca427157032082022-10-08 11:55:23118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x901a92f33bf1bc3312b430863b8b650748abb8f39a72145dc530441f3fc6a673157032072022-10-08 11:55:11118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xd076b84792126923044dee0f8ba1017d1f2bee45783149338a75248faa7d6897157032022022-10-08 11:54:11118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x1e9046bbe9be70dd5a7bb3732fc6ecca544185c0d374c7bbe83a279a303b423e157031862022-10-08 11:50:59118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x7c5a8d56bf154f72712238587f78616fa3db0ee1d21491a30c028cb15f579f71157031862022-10-08 11:50:59118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xdd40a71d3305c0aab63abaac40d398f9799efc1ea4296b49dbcb1a4a75f32b85157031842022-10-08 11:50:35118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x3278383c581002849d3e9e3d3a3e4c0af60331ae0823aaa7c54793d39cb79345157031802022-10-08 11:49:47118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xbe20085c218279933f53f4160101a48020f51be5a4cb729085eb6ce07ed63ac4157031572022-10-08 11:45:11118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xf366ceb8e669b2da7a040baa80ec38a6f36d125012270fe5fb02b37a1299a40b157031482022-10-08 11:43:23118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x3e3a0df2c9cb63032df5ad40d09bf893e20fe5ae0c3543280c2dad5d64014c6b157031462022-10-08 11:42:59118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x5ba1af4b903273689b4f2e033d06db37a2c863dfd6b19a312c2bf0108bbb0737157031372022-10-08 11:40:59118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x2912adff6cb931e548127faa9ba159b5934d0fa43aa4e27633b7a30f7cb2c0f6157031362022-10-08 11:40:47118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x07820064c2b86a55cdf785e83ddba9b13d9f02991e62722cfe26a9dfbdb336df157031342022-10-08 11:40:23118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xcfe88b4d73a7cf41646ae9b28046642e568e8006fbf9ee5698618413de6aef54157031242022-10-08 11:38:23118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xac4ceaa2c2f26554be4b50bae8b974ce0a01ed1800068b024cd5220a0e024d91157030792022-10-08 11:29:23118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x27fbbc00c878157a0a318b72ca2c08fd0bb68319a1a0b204262a03565d92b1eb157030732022-10-08 11:28:11118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x082cbf7665af624f10c1c0d317b1b6ebaf2d399bd6c95696daccd7ced5e078d5157030732022-10-08 11:28:11118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x17b6717b94e0d6f6894a909e44ad6795778732a77fc7acefb1000768a9d4dcc9157030712022-10-08 11:27:47118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0xc718234c26995bd86ccf1e46c546c6a50ff604d024dd3af7959b3fa427217a4e157030692022-10-08 11:27:23118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x181e02d4d1ff08cade3915aa731849b90526b538f9ac03205f9aab461cd4bd6e157030622022-10-08 11:25:59118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
0x765ec2802cd1fcec860af761b2e64a9d46cf1ebfb541b112dac87845a6deb96c157030582022-10-08 11:25:11118 days 12 hrs ago 0x96c7138c5ed741e5c923470bd27b8272fa3c717f0xfa62aaf889fb866ec4e089e81fdfe836af2fcae00.05 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AiRein

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : AiRein.sol
// SPDX-License-Identifier: MIT

// v4.5.0
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";

pragma solidity ^0.8.7;

error SaleInactive();
error SoldOut();
error InvalidPrice();
error WithdrawFailed();
error InvalidQuantity();
error InvalidProof();
error InvalidPayeeAddress();
error InvalidOfficialAddress();
error InvalidSuperAddress();

contract AiRein is ERC721A, Ownable, ERC2981, ReentrancyGuard {
    using Strings for uint256;

    enum SaleState {
        CLOSED,
        OPEN
    }

    uint96 constant defaultFeeNumerator = 500;
    uint256 public immutable supply = 2999;
    uint256 public price = 0.05 ether;
    uint256 public maxPerWallet = 1;
    address public payeeAddress;
    address public adminAddress;
    address public officialAddress;
    address public superAddress;

    // Use for record
    address public royaltyAddress;
    uint96 public royaltyFeeNumerator;
    SaleState public saleState = SaleState.CLOSED;
    string public baseTokenURI;
    bytes32 public merkleRoot;
    mapping(address => uint256) public addressMintBalance;

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _baseUri,
        bytes32 _merkleRoot,
        address _adminAddress,
        address _payeeAddress,
        address _royaltyAddress,
        address _officialAddress,
        address _superAddress
    ) ERC721A(_name, _symbol) {
        payeeAddress = _payeeAddress;
        adminAddress = _adminAddress;
        officialAddress = _officialAddress;
        superAddress = _superAddress;
        baseTokenURI = _baseUri;
        merkleRoot = _merkleRoot;
        royaltyAddress = _royaltyAddress;
        royaltyFeeNumerator = defaultFeeNumerator;
        _setDefaultRoyalty(royaltyAddress, royaltyFeeNumerator);
    }

    // ---------------------------------- external -----------------------------------

    function setAdmin(address _adminAddress) external onlyOwner {
        require(_adminAddress != address(0), "Admin address cannot be zero");
        adminAddress = _adminAddress;
    }

    // Only user in whitelist can mint
    function mint(uint256 qty, bytes32[] calldata merkleProof) external payable nonReentrant {
        if (saleState != SaleState.OPEN) revert SaleInactive();
        if (_totalMinted() + qty > supply) revert SoldOut();
        if (msg.value != price * qty) revert InvalidPrice();
        if (addressMintBalance[msg.sender] + qty > maxPerWallet) revert InvalidQuantity();
        if (payeeAddress == address(0)) revert InvalidPayeeAddress();
        if (!MerkleProof.verify(merkleProof, merkleRoot, keccak256(abi.encodePacked(msg.sender)))) {
            revert InvalidProof();
        }

        // Mint
        addressMintBalance[msg.sender] += qty;
        _safeMint(msg.sender, qty);

        // Send to payment address
        payable(payeeAddress).transfer(msg.value);
    }

    function officialMint() external onlyAdmin {
        if (_totalMinted() != 0) revert InvalidQuantity();
        _safeMint(officialAddress, 200);
    }

    function superMint(uint256 qty) external {
        if (_msgSender() != superAddress) revert InvalidSuperAddress();
        if (_totalMinted() + qty > supply) revert SoldOut();
        _safeMint(superAddress, qty);
    }

    function setOfficialAddress(address _officialAddress) external onlyAdmin {
        if (_officialAddress == address(0)) revert InvalidOfficialAddress();
        officialAddress = _officialAddress;
    }

    function setSuperAddress(address _superAddress) external onlyAdmin {
        if (_superAddress == address(0)) revert InvalidSuperAddress();
        superAddress = _superAddress;
    }

    function setPayeeAddress(address _payeeAddress) external onlyAdmin {
        if (_payeeAddress == address(0)) revert InvalidPayeeAddress();
        payeeAddress = _payeeAddress;
    }

    function setBaseURI(string memory baseURI) external onlyAdmin {
        baseTokenURI = baseURI;
    }

    function setPrice(uint256 newPrice) external onlyAdmin {
        price = newPrice;
    }

    function setSaleState(SaleState state) external onlyAdmin {
        saleState = state;
    }

    function setPerWalletMax(uint256 _val) external onlyAdmin {
        maxPerWallet = _val;
    }

    function setMerkleRoot(bytes32 _merkleRoot) public onlyAdmin {
        merkleRoot = _merkleRoot;
    }

    function setRoyaltyInfo(address _royaltyAddress, uint96 _royaltyFeeNumerator) external onlyAdmin {
        royaltyAddress = _royaltyAddress;
        royaltyFeeNumerator = _royaltyFeeNumerator;
        _setDefaultRoyalty(_royaltyAddress, _royaltyFeeNumerator);
    }

    // ---------------------------------- override -----------------------------------

    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();

        if (bytes(baseURI).length == 0) {
            return "";
        } else {
            return string(abi.encodePacked(baseURI, tokenId.toString()));
        }
    }

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

    function supportsInterface(bytes4 interfaceId) public view override(ERC721A, ERC2981) returns (bool) {
        // Reference: https://chiru-labs.github.io/ERC721A/#/migration?id=supportsinterface
        // Uses less than 30,000 gas
        return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId);
    }

    // -------------------------------------------------------------------------------

    modifier onlyAdmin() {
        require(msg.sender == adminAddress, "Management: Not admin");
        _;
    }

    // @notice Will receive any eth sent to the contract
    // fallback() external payable {}
}

File 2 of 15 : ERC721A.sol
// SPDX-License-Identifier: MIT
// File erc721a/contracts/[email protected]
// Creator: Chiru Labs
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // 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;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr && curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

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

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

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

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 {
        _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 {
        _transfer(from, to, tokenId);
        if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, "");
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity, _data, true);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (safe && to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex != end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex != end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev This is equivalent to _burn(tokenId, false)
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 5 of 15 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 11 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 12 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 14 of 15 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"address","name":"_adminAddress","type":"address"},{"internalType":"address","name":"_payeeAddress","type":"address"},{"internalType":"address","name":"_royaltyAddress","type":"address"},{"internalType":"address","name":"_officialAddress","type":"address"},{"internalType":"address","name":"_superAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidOfficialAddress","type":"error"},{"inputs":[],"name":"InvalidPayeeAddress","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidQuantity","type":"error"},{"inputs":[],"name":"InvalidSuperAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"SaleInactive","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"","type":"address"}],"name":"addressMintBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adminAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"qty","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"officialAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"officialMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payeeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyFeeNumerator","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","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":"saleState","outputs":[{"internalType":"enum AiRein.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_officialAddress","type":"address"}],"name":"setOfficialAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_payeeAddress","type":"address"}],"name":"setPayeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_val","type":"uint256"}],"name":"setPerWalletMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"},{"internalType":"uint96","name":"_royaltyFeeNumerator","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum AiRein.SaleState","name":"state","type":"uint8"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_superAddress","type":"address"}],"name":"setSuperAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"superAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"qty","type":"uint256"}],"name":"superMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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"}]

60a0604052610bb760809081525066b1a2bc2ec50000600c556001600d556000601360006101000a81548160ff0219169083600181111562000046576200004562000556565b5b02179055503480156200005857600080fd5b5060405162005b1d38038062005b1d83398181016040528101906200007e9190620007b8565b8888816002908162000091919062000b3f565b508060039081620000a3919062000b3f565b50620000b4620002d260201b60201c565b6000819055505050620000dc620000d0620002db60201b60201c565b620002e360201b60201c565b6001600b8190555083600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508660149081620001f9919062000b3f565b508560158190555082601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101f4601260146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550620002c3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601260149054906101000a90046bffffffffffffffffffffffff16620003a960201b60201c565b50505050505050505062000d41565b60006001905090565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b620003b96200054c60201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156200041a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004119062000cad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036200048c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004839062000d1f565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600960008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000612710905090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620005ee82620005a3565b810181811067ffffffffffffffff8211171562000610576200060f620005b4565b5b80604052505050565b60006200062562000585565b9050620006338282620005e3565b919050565b600067ffffffffffffffff821115620006565762000655620005b4565b5b6200066182620005a3565b9050602081019050919050565b60005b838110156200068e57808201518184015260208101905062000671565b60008484015250505050565b6000620006b1620006ab8462000638565b62000619565b905082815260208101848484011115620006d057620006cf6200059e565b5b620006dd8482856200066e565b509392505050565b600082601f830112620006fd57620006fc62000599565b5b81516200070f8482602086016200069a565b91505092915050565b6000819050919050565b6200072d8162000718565b81146200073957600080fd5b50565b6000815190506200074d8162000722565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620007808262000753565b9050919050565b620007928162000773565b81146200079e57600080fd5b50565b600081519050620007b28162000787565b92915050565b60008060008060008060008060006101208a8c031215620007de57620007dd6200058f565b5b60008a015167ffffffffffffffff811115620007ff57620007fe62000594565b5b6200080d8c828d01620006e5565b99505060208a015167ffffffffffffffff81111562000831576200083062000594565b5b6200083f8c828d01620006e5565b98505060408a015167ffffffffffffffff81111562000863576200086262000594565b5b620008718c828d01620006e5565b9750506060620008848c828d016200073c565b9650506080620008978c828d01620007a1565b95505060a0620008aa8c828d01620007a1565b94505060c0620008bd8c828d01620007a1565b93505060e0620008d08c828d01620007a1565b925050610100620008e48c828d01620007a1565b9150509295985092959850929598565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200094757607f821691505b6020821081036200095d576200095c620008ff565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620009c77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000988565b620009d3868362000988565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000a2062000a1a62000a1484620009eb565b620009f5565b620009eb565b9050919050565b6000819050919050565b62000a3c83620009ff565b62000a5462000a4b8262000a27565b84845462000995565b825550505050565b600090565b62000a6b62000a5c565b62000a7881848462000a31565b505050565b5b8181101562000aa05762000a9460008262000a61565b60018101905062000a7e565b5050565b601f82111562000aef5762000ab98162000963565b62000ac48462000978565b8101602085101562000ad4578190505b62000aec62000ae38562000978565b83018262000a7d565b50505b505050565b600082821c905092915050565b600062000b146000198460080262000af4565b1980831691505092915050565b600062000b2f838362000b01565b9150826002028217905092915050565b62000b4a82620008f4565b67ffffffffffffffff81111562000b665762000b65620005b4565b5b62000b7282546200092e565b62000b7f82828562000aa4565b600060209050601f83116001811462000bb7576000841562000ba2578287015190505b62000bae858262000b21565b86555062000c1e565b601f19841662000bc78662000963565b60005b8281101562000bf15784890151825560018201915060208501945060208101905062000bca565b8683101562000c11578489015162000c0d601f89168262000b01565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b600062000c95602a8362000c26565b915062000ca28262000c37565b604082019050919050565b6000602082019050818103600083015262000cc88162000c86565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b600062000d0760198362000c26565b915062000d148262000ccf565b602082019050919050565b6000602082019050818103600083015262000d3a8162000cf8565b9050919050565b608051614db262000d6b60003960008181610b3c015281816117940152611d5d0152614db26000f3fe6080604052600436106102675760003560e01c8063704b6c0211610144578063ad2f852a116100b6578063d547cfb71161007a578063d547cfb7146108f8578063df37e70414610923578063e985e9c51461094c578063f2fde38b14610989578063fc6f9468146109b2578063fcd41c1f146109dd57610267565b8063ad2f852a14610834578063b077252c1461085f578063b88d4fde14610876578063ba41b0c61461089f578063c87b56dd146108bb57610267565b80638415c954116101085780638415c954146107385780638da5cb5b1461076157806391b7f5ed1461078c57806395d89b41146107b5578063a035b1fe146107e0578063a22cb4651461080b57610267565b8063704b6c021461066757806370a0823114610690578063715018a6146106cd5780637cb64759146106e457806381ddcc1f1461070d57610267565b806333cede13116101dd578063453c2310116101a1578063453c23101461055757806345d3b8db1461058257806355f804b3146105ad5780635a67de07146105d6578063603f4d52146105ff5780636352211e1461062a57610267565b806333cede13146104745780633406c7261461049f578063382a2914146104dc578063391176681461050557806342842e0e1461052e57610267565b8063095ea7b31161022f578063095ea7b3146103655780631517e6011461038e57806318160ddd146103b757806323b872dd146103e25780632a55205a1461040b5780632eb4a7ab1461044957610267565b806301ffc9a71461026c57806302fa7c47146102a9578063047fc9aa146102d257806306fdde03146102fd578063081812fc14610328575b600080fd5b34801561027857600080fd5b50610293600480360381019061028e9190613a3f565b610a08565b6040516102a09190613a87565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190613b44565b610a2a565b005b3480156102de57600080fd5b506102e7610b3a565b6040516102f49190613b9d565b60405180910390f35b34801561030957600080fd5b50610312610b5e565b60405161031f9190613c48565b60405180910390f35b34801561033457600080fd5b5061034f600480360381019061034a9190613c96565b610bf0565b60405161035c9190613cd2565b60405180910390f35b34801561037157600080fd5b5061038c60048036038101906103879190613ced565b610c6c565b005b34801561039a57600080fd5b506103b560048036038101906103b09190613d2d565b610d76565b005b3480156103c357600080fd5b506103cc610eb0565b6040516103d99190613b9d565b60405180910390f35b3480156103ee57600080fd5b5061040960048036038101906104049190613d5a565b610ec7565b005b34801561041757600080fd5b50610432600480360381019061042d9190613dad565b610ed7565b604051610440929190613ded565b60405180910390f35b34801561045557600080fd5b5061045e6110c1565b60405161046b9190613e2f565b60405180910390f35b34801561048057600080fd5b506104896110c7565b6040516104969190613cd2565b60405180910390f35b3480156104ab57600080fd5b506104c660048036038101906104c19190613d2d565b6110ed565b6040516104d39190613b9d565b60405180910390f35b3480156104e857600080fd5b5061050360048036038101906104fe9190613d2d565b611105565b005b34801561051157600080fd5b5061052c60048036038101906105279190613c96565b61123f565b005b34801561053a57600080fd5b5061055560048036038101906105509190613d5a565b6112d9565b005b34801561056357600080fd5b5061056c6112f9565b6040516105799190613b9d565b60405180910390f35b34801561058e57600080fd5b506105976112ff565b6040516105a49190613cd2565b60405180910390f35b3480156105b957600080fd5b506105d460048036038101906105cf9190613f7f565b611325565b005b3480156105e257600080fd5b506105fd60048036038101906105f89190613fed565b6113c8565b005b34801561060b57600080fd5b50610614611485565b6040516106219190614091565b60405180910390f35b34801561063657600080fd5b50610651600480360381019061064c9190613c96565b611498565b60405161065e9190613cd2565b60405180910390f35b34801561067357600080fd5b5061068e60048036038101906106899190613d2d565b6114ae565b005b34801561069c57600080fd5b506106b760048036038101906106b29190613d2d565b611569565b6040516106c49190613b9d565b60405180910390f35b3480156106d957600080fd5b506106e2611638565b005b3480156106f057600080fd5b5061070b600480360381019061070691906140d8565b61164c565b005b34801561071957600080fd5b506107226116e6565b60405161072f9190614114565b60405180910390f35b34801561074457600080fd5b5061075f600480360381019061075a9190613c96565b611704565b005b34801561076d57600080fd5b5061077661182d565b6040516107839190613cd2565b60405180910390f35b34801561079857600080fd5b506107b360048036038101906107ae9190613c96565b611857565b005b3480156107c157600080fd5b506107ca6118f1565b6040516107d79190613c48565b60405180910390f35b3480156107ec57600080fd5b506107f5611983565b6040516108029190613b9d565b60405180910390f35b34801561081757600080fd5b50610832600480360381019061082d919061415b565b611989565b005b34801561084057600080fd5b50610849611b00565b6040516108569190613cd2565b60405180910390f35b34801561086b57600080fd5b50610874611b26565b005b34801561088257600080fd5b5061089d6004803603810190610898919061423c565b611c26565b005b6108b960048036038101906108b4919061431f565b611ca2565b005b3480156108c757600080fd5b506108e260048036038101906108dd9190613c96565b61209a565b6040516108ef9190613c48565b60405180910390f35b34801561090457600080fd5b5061090d61213b565b60405161091a9190613c48565b60405180910390f35b34801561092f57600080fd5b5061094a60048036038101906109459190613d2d565b6121c9565b005b34801561095857600080fd5b50610973600480360381019061096e919061437f565b612303565b6040516109809190613a87565b60405180910390f35b34801561099557600080fd5b506109b060048036038101906109ab9190613d2d565b612397565b005b3480156109be57600080fd5b506109c761241a565b6040516109d49190613cd2565b60405180910390f35b3480156109e957600080fd5b506109f2612440565b6040516109ff9190613cd2565b60405180910390f35b6000610a1382612466565b80610a235750610a2282612548565b5b9050919050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab19061440b565b60405180910390fd5b81601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601260146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610b3682826125c2565b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b606060028054610b6d9061445a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b999061445a565b8015610be65780601f10610bbb57610100808354040283529160200191610be6565b820191906000526020600020905b815481529060010190602001808311610bc957829003601f168201915b5050505050905090565b6000610bfb82612757565b610c31576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610c7782611498565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610cde576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610cfd6127a5565b73ffffffffffffffffffffffffffffffffffffffff1614158015610d2f5750610d2d81610d286127a5565b612303565b155b15610d66576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d718383836127ad565b505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfd9061440b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e6c576040517fbaba6dd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610eba61285f565b6001546000540303905090565b610ed2838383612868565b505050565b6000806000600a60008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff160361106c5760096040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000611076612d1c565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff16866110a291906144ba565b6110ac9190614543565b90508160000151819350935050509250929050565b60155481565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60166020528060005260406000206000915090505481565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611195576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118c9061440b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111fb576040517ff25dd3b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c69061440b565b60405180910390fd5b80600d8190555050565b6112f483838360405180602001604052806000815250611c26565b505050565b600d5481565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ac9061440b565b60405180910390fd5b80601490816113c49190614720565b5050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144f9061440b565b60405180910390fd5b80601360006101000a81548160ff0219169083600181111561147d5761147c61401a565b5b021790555050565b601360009054906101000a900460ff1681565b60006114a382612d26565b600001519050919050565b6114b6612fb5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611525576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151c9061483e565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115d0576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff169050919050565b611640612fb5565b61164a6000613033565b565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d39061440b565b60405180910390fd5b8060158190555050565b601260149054906101000a90046bffffffffffffffffffffffff1681565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117456127a5565b73ffffffffffffffffffffffffffffffffffffffff1614611792576040517fbaba6dd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000816117bc6130f9565b6117c6919061485e565b11156117fe576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61182a601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168261310c565b50565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118de9061440b565b60405180910390fd5b80600c8190555050565b6060600380546119009061445a565b80601f016020809104026020016040519081016040528092919081815260200182805461192c9061445a565b80156119795780601f1061194e57610100808354040283529160200191611979565b820191906000526020600020905b81548152906001019060200180831161195c57829003601f168201915b5050505050905090565b600c5481565b6119916127a5565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036119f5576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611a026127a5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611aaf6127a5565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611af49190613a87565b60405180910390a35050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bad9061440b565b60405180910390fd5b6000611bc06130f9565b14611bf7576040517f524f409b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c24601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660c861310c565b565b611c31848484612868565b611c508373ffffffffffffffffffffffffffffffffffffffff1661312a565b8015611c655750611c638484848461314d565b155b15611c9c576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6002600b5403611ce7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cde906148de565b60405180910390fd5b6002600b81905550600180811115611d0257611d0161401a565b5b601360009054906101000a900460ff166001811115611d2457611d2361401a565b5b14611d5b576040517f3f88677400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000083611d856130f9565b611d8f919061485e565b1115611dc7576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82600c54611dd591906144ba565b3414611e0c576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d5483601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e5a919061485e565b1115611e92576040517f524f409b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611f1a576040517ff25dd3b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f8e828280806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060155433604051602001611f739190614946565b6040516020818303038152906040528051906020012061329d565b611fc4576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612013919061485e565b92505081905550612024338461310c565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561208c573d6000803e3d6000fd5b506001600b81905550505050565b60606120a582612757565b6120db576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006120e56132b4565b905060008151036121085760405180602001604052806000815250915050612136565b8061211284613346565b60405160200161212392919061499d565b6040516020818303038152906040529150505b919050565b601480546121489061445a565b80601f01602080910402602001604051908101604052809291908181526020018280546121749061445a565b80156121c15780601f10612196576101008083540402835291602001916121c1565b820191906000526020600020905b8154815290600101906020018083116121a457829003601f168201915b505050505081565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612259576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122509061440b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036122bf576040517f4850980100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61239f612fb5565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361240e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161240590614a33565b60405180910390fd5b61241781613033565b50565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061253157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806125415750612540826134a6565b5b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806125bb57506125ba82612466565b5b9050919050565b6125ca612d1c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612628576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261f90614ac5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612697576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268e90614b31565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600960008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b60008161276261285f565b11158015612771575060005482105b801561279e575060046000838152602001908152602001600020600001601c9054906101000a900460ff16155b9050919050565b600033905090565b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60006001905090565b600061287382612d26565b90508373ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16146128de576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008473ffffffffffffffffffffffffffffffffffffffff166128ff6127a5565b73ffffffffffffffffffffffffffffffffffffffff16148061292e575061292d856129286127a5565b612303565b5b80612973575061293c6127a5565b73ffffffffffffffffffffffffffffffffffffffff1661295b84610bf0565b73ffffffffffffffffffffffffffffffffffffffff16145b9050806129ac576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612a12576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612a1f8585856001613510565b612a2b600084876127ad565b6001600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160392506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506000600460008581526020019081526020016000209050848160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550428160000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060006001850190506000600460008381526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612caa576000548214612ca957878160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084602001518160000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b5b505050828473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612d158585856001613516565b5050505050565b6000612710905090565b612d2e613990565b600082905080612d3c61285f565b11158015612d4b575060005481105b15612f7e576000600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff16151515158152505090508060400151612f7c57600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614612e60578092505050612fb0565b5b600115612f7b57818060019003925050600460008381526020019081526020016000206040518060600160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200160008201601c9054906101000a900460ff1615151515815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1614612f76578092505050612fb0565b612e61565b5b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b612fbd6127a5565b73ffffffffffffffffffffffffffffffffffffffff16612fdb61182d565b73ffffffffffffffffffffffffffffffffffffffff1614613031576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161302890614b9d565b60405180910390fd5b565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600061310361285f565b60005403905090565b61312682826040518060200160405280600081525061351c565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026131736127a5565b8786866040518563ffffffff1660e01b81526004016131959493929190614c12565b6020604051808303816000875af19250505080156131d157506040513d601f19601f820116820180604052508101906131ce9190614c73565b60015b61324a573d8060008114613201576040519150601f19603f3d011682016040523d82523d6000602084013e613206565b606091505b506000815103613242576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6000826132aa858461352e565b1490509392505050565b6060601480546132c39061445a565b80601f01602080910402602001604051908101604052809291908181526020018280546132ef9061445a565b801561333c5780601f106133115761010080835404028352916020019161333c565b820191906000526020600020905b81548152906001019060200180831161331f57829003601f168201915b5050505050905090565b60606000820361338d576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506134a1565b600082905060005b600082146133bf5780806133a890614ca0565b915050600a826133b89190614543565b9150613395565b60008167ffffffffffffffff8111156133db576133da613e54565b5b6040519080825280601f01601f19166020018201604052801561340d5781602001600182028036833780820191505090505b5090505b6000851461349a576001826134269190614ce8565b9150600a856134359190614d1c565b6030613441919061485e565b60f81b81838151811061345757613456614d4d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856134939190614543565b9450613411565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b50505050565b50505050565b6135298383836001613584565b505050565b60008082905060005b8451811015613579576135648286838151811061355757613556614d4d565b5b602002602001015161394e565b9150808061357190614ca0565b915050613537565b508091505092915050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036135f0576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000840361362a576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6136376000868387613510565b83600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555083600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160088282829054906101000a900467ffffffffffffffff160192506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550846004600083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550426004600083815260200190815260200160002060000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060008190506000858201905083801561380157506138008773ffffffffffffffffffffffffffffffffffffffff1661312a565b5b156138c6575b818773ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4613876600088848060010195508861314d565b6138ac576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8082036138075782600054146138c157600080fd5b613931565b5b818060010192508773ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a48082036138c7575b8160008190555050506139476000868387613516565b5050505050565b6000818310613966576139618284613979565b613971565b6139708383613979565b5b905092915050565b600082600052816020526040600020905092915050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff1681526020016000151581525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a1c816139e7565b8114613a2757600080fd5b50565b600081359050613a3981613a13565b92915050565b600060208284031215613a5557613a546139dd565b5b6000613a6384828501613a2a565b91505092915050565b60008115159050919050565b613a8181613a6c565b82525050565b6000602082019050613a9c6000830184613a78565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613acd82613aa2565b9050919050565b613add81613ac2565b8114613ae857600080fd5b50565b600081359050613afa81613ad4565b92915050565b60006bffffffffffffffffffffffff82169050919050565b613b2181613b00565b8114613b2c57600080fd5b50565b600081359050613b3e81613b18565b92915050565b60008060408385031215613b5b57613b5a6139dd565b5b6000613b6985828601613aeb565b9250506020613b7a85828601613b2f565b9150509250929050565b6000819050919050565b613b9781613b84565b82525050565b6000602082019050613bb26000830184613b8e565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613bf2578082015181840152602081019050613bd7565b60008484015250505050565b6000601f19601f8301169050919050565b6000613c1a82613bb8565b613c248185613bc3565b9350613c34818560208601613bd4565b613c3d81613bfe565b840191505092915050565b60006020820190508181036000830152613c628184613c0f565b905092915050565b613c7381613b84565b8114613c7e57600080fd5b50565b600081359050613c9081613c6a565b92915050565b600060208284031215613cac57613cab6139dd565b5b6000613cba84828501613c81565b91505092915050565b613ccc81613ac2565b82525050565b6000602082019050613ce76000830184613cc3565b92915050565b60008060408385031215613d0457613d036139dd565b5b6000613d1285828601613aeb565b9250506020613d2385828601613c81565b9150509250929050565b600060208284031215613d4357613d426139dd565b5b6000613d5184828501613aeb565b91505092915050565b600080600060608486031215613d7357613d726139dd565b5b6000613d8186828701613aeb565b9350506020613d9286828701613aeb565b9250506040613da386828701613c81565b9150509250925092565b60008060408385031215613dc457613dc36139dd565b5b6000613dd285828601613c81565b9250506020613de385828601613c81565b9150509250929050565b6000604082019050613e026000830185613cc3565b613e0f6020830184613b8e565b9392505050565b6000819050919050565b613e2981613e16565b82525050565b6000602082019050613e446000830184613e20565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613e8c82613bfe565b810181811067ffffffffffffffff82111715613eab57613eaa613e54565b5b80604052505050565b6000613ebe6139d3565b9050613eca8282613e83565b919050565b600067ffffffffffffffff821115613eea57613ee9613e54565b5b613ef382613bfe565b9050602081019050919050565b82818337600083830152505050565b6000613f22613f1d84613ecf565b613eb4565b905082815260208101848484011115613f3e57613f3d613e4f565b5b613f49848285613f00565b509392505050565b600082601f830112613f6657613f65613e4a565b5b8135613f76848260208601613f0f565b91505092915050565b600060208284031215613f9557613f946139dd565b5b600082013567ffffffffffffffff811115613fb357613fb26139e2565b5b613fbf84828501613f51565b91505092915050565b60028110613fd557600080fd5b50565b600081359050613fe781613fc8565b92915050565b600060208284031215614003576140026139dd565b5b600061401184828501613fd8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6002811061405a5761405961401a565b5b50565b600081905061406b82614049565b919050565b600061407b8261405d565b9050919050565b61408b81614070565b82525050565b60006020820190506140a66000830184614082565b92915050565b6140b581613e16565b81146140c057600080fd5b50565b6000813590506140d2816140ac565b92915050565b6000602082840312156140ee576140ed6139dd565b5b60006140fc848285016140c3565b91505092915050565b61410e81613b00565b82525050565b60006020820190506141296000830184614105565b92915050565b61413881613a6c565b811461414357600080fd5b50565b6000813590506141558161412f565b92915050565b60008060408385031215614172576141716139dd565b5b600061418085828601613aeb565b925050602061419185828601614146565b9150509250929050565b600067ffffffffffffffff8211156141b6576141b5613e54565b5b6141bf82613bfe565b9050602081019050919050565b60006141df6141da8461419b565b613eb4565b9050828152602081018484840111156141fb576141fa613e4f565b5b614206848285613f00565b509392505050565b600082601f83011261422357614222613e4a565b5b81356142338482602086016141cc565b91505092915050565b60008060008060808587031215614256576142556139dd565b5b600061426487828801613aeb565b945050602061427587828801613aeb565b935050604061428687828801613c81565b925050606085013567ffffffffffffffff8111156142a7576142a66139e2565b5b6142b38782880161420e565b91505092959194509250565b600080fd5b600080fd5b60008083601f8401126142df576142de613e4a565b5b8235905067ffffffffffffffff8111156142fc576142fb6142bf565b5b602083019150836020820283011115614318576143176142c4565b5b9250929050565b600080600060408486031215614338576143376139dd565b5b600061434686828701613c81565b935050602084013567ffffffffffffffff811115614367576143666139e2565b5b614373868287016142c9565b92509250509250925092565b60008060408385031215614396576143956139dd565b5b60006143a485828601613aeb565b92505060206143b585828601613aeb565b9150509250929050565b7f4d616e6167656d656e743a204e6f742061646d696e0000000000000000000000600082015250565b60006143f5601583613bc3565b9150614400826143bf565b602082019050919050565b60006020820190508181036000830152614424816143e8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061447257607f821691505b6020821081036144855761448461442b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006144c582613b84565b91506144d083613b84565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156145095761450861448b565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061454e82613b84565b915061455983613b84565b92508261456957614568614514565b5b828204905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026145d67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614599565b6145e08683614599565b95508019841693508086168417925050509392505050565b6000819050919050565b600061461d61461861461384613b84565b6145f8565b613b84565b9050919050565b6000819050919050565b61463783614602565b61464b61464382614624565b8484546145a6565b825550505050565b600090565b614660614653565b61466b81848461462e565b505050565b5b8181101561468f57614684600082614658565b600181019050614671565b5050565b601f8211156146d4576146a581614574565b6146ae84614589565b810160208510156146bd578190505b6146d16146c985614589565b830182614670565b50505b505050565b600082821c905092915050565b60006146f7600019846008026146d9565b1980831691505092915050565b600061471083836146e6565b9150826002028217905092915050565b61472982613bb8565b67ffffffffffffffff81111561474257614741613e54565b5b61474c825461445a565b614757828285614693565b600060209050601f83116001811461478a5760008415614778578287015190505b6147828582614704565b8655506147ea565b601f19841661479886614574565b60005b828110156147c05784890151825560018201915060208501945060208101905061479b565b868310156147dd57848901516147d9601f8916826146e6565b8355505b6001600288020188555050505b505050505050565b7f41646d696e20616464726573732063616e6e6f74206265207a65726f00000000600082015250565b6000614828601c83613bc3565b9150614833826147f2565b602082019050919050565b600060208201905081810360008301526148578161481b565b9050919050565b600061486982613b84565b915061487483613b84565b925082820190508082111561488c5761488b61448b565b5b92915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006148c8601f83613bc3565b91506148d382614892565b602082019050919050565b600060208201905081810360008301526148f7816148bb565b9050919050565b60008160601b9050919050565b6000614916826148fe565b9050919050565b60006149288261490b565b9050919050565b61494061493b82613ac2565b61491d565b82525050565b6000614952828461492f565b60148201915081905092915050565b600081905092915050565b600061497782613bb8565b6149818185614961565b9350614991818560208601613bd4565b80840191505092915050565b60006149a9828561496c565b91506149b5828461496c565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614a1d602683613bc3565b9150614a28826149c1565b604082019050919050565b60006020820190508181036000830152614a4c81614a10565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614aaf602a83613bc3565b9150614aba82614a53565b604082019050919050565b60006020820190508181036000830152614ade81614aa2565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614b1b601983613bc3565b9150614b2682614ae5565b602082019050919050565b60006020820190508181036000830152614b4a81614b0e565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614b87602083613bc3565b9150614b9282614b51565b602082019050919050565b60006020820190508181036000830152614bb681614b7a565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614be482614bbd565b614bee8185614bc8565b9350614bfe818560208601613bd4565b614c0781613bfe565b840191505092915050565b6000608082019050614c276000830187613cc3565b614c346020830186613cc3565b614c416040830185613b8e565b8181036060830152614c538184614bd9565b905095945050505050565b600081519050614c6d81613a13565b92915050565b600060208284031215614c8957614c886139dd565b5b6000614c9784828501614c5e565b91505092915050565b6000614cab82613b84565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614cdd57614cdc61448b565b5b600182019050919050565b6000614cf382613b84565b9150614cfe83613b84565b9250828203905081811115614d1657614d1561448b565b5b92915050565b6000614d2782613b84565b9150614d3283613b84565b925082614d4257614d41614514565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea264697066735822122056273418ddb274269d995bfe8b0470f7c67108d20272ba90e9306ede7128412c64736f6c634300081000330000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a098226e37d0a91aa515bf77b85e7400955654d58aed884bf814682c3fc3fad91100000000000000000000000089ce0c7d37825123d053ed20f0b4995373964d33000000000000000000000000fa62aaf889fb866ec4e089e81fdfe836af2fcae00000000000000000000000002794d58f8c0ef1a2b0d96bce79318446c1cf3d9f0000000000000000000000002f3035e914dce6a0428afeb5902427cb7bc8a59d0000000000000000000000003c82a4c454c2f38b755b632262fb0480c463b52900000000000000000000000000000000000000000000000000000000000000074149205265696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000241520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d664b41635664597a55425a32535254325468376273616653474b6469594c544239424b336e715276525376482f00000000000000000000

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

0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a098226e37d0a91aa515bf77b85e7400955654d58aed884bf814682c3fc3fad91100000000000000000000000089ce0c7d37825123d053ed20f0b4995373964d33000000000000000000000000fa62aaf889fb866ec4e089e81fdfe836af2fcae00000000000000000000000002794d58f8c0ef1a2b0d96bce79318446c1cf3d9f0000000000000000000000002f3035e914dce6a0428afeb5902427cb7bc8a59d0000000000000000000000003c82a4c454c2f38b755b632262fb0480c463b52900000000000000000000000000000000000000000000000000000000000000074149205265696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000241520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d664b41635664597a55425a32535254325468376273616653474b6469594c544239424b336e715276525376482f00000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): AI Rein
Arg [1] : _symbol (string): AR
Arg [2] : _baseUri (string): ipfs://QmfKAcVdYzUBZ2SRT2Th7bsafSGKdiYLTB9BK3nqRvRSvH/
Arg [3] : _merkleRoot (bytes32): 0x98226e37d0a91aa515bf77b85e7400955654d58aed884bf814682c3fc3fad911
Arg [4] : _adminAddress (address): 0x89Ce0c7D37825123D053eD20F0B4995373964D33
Arg [5] : _payeeAddress (address): 0xfA62aAf889fb866eC4E089E81fDFE836aF2fcAe0
Arg [6] : _royaltyAddress (address): 0x2794d58f8C0Ef1a2B0d96BcE79318446C1cF3d9F
Arg [7] : _officialAddress (address): 0x2F3035E914dcE6a0428Afeb5902427CB7bc8a59D
Arg [8] : _superAddress (address): 0x3c82A4c454C2f38B755B632262FB0480c463B529

-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [3] : 98226e37d0a91aa515bf77b85e7400955654d58aed884bf814682c3fc3fad911
Arg [4] : 00000000000000000000000089ce0c7d37825123d053ed20f0b4995373964d33
Arg [5] : 000000000000000000000000fa62aaf889fb866ec4e089e81fdfe836af2fcae0
Arg [6] : 0000000000000000000000002794d58f8c0ef1a2b0d96bce79318446c1cf3d9f
Arg [7] : 0000000000000000000000002f3035e914dce6a0428afeb5902427cb7bc8a59d
Arg [8] : 0000000000000000000000003c82a4c454c2f38b755b632262fb0480c463b529
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [10] : 4149205265696e00000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [12] : 4152000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [14] : 697066733a2f2f516d664b41635664597a55425a325352543254683762736166
Arg [15] : 53474b6469594c544239424b336e715276525376482f00000000000000000000


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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