ETH Price: $3,032.79 (-5.66%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...190657112024-01-23 0:08:23728 days ago1705968503IN
0x92342459...D3E46C33d
0 ETH0.0005357411.54270934
Set Approval For...190604362024-01-22 6:16:35729 days ago1705904195IN
0x92342459...D3E46C33d
0 ETH0.000508110.94721842
Transfer From190589962024-01-22 1:23:23729 days ago1705886603IN
0x92342459...D3E46C33d
0 ETH0.0012016713.83795281
Transfer From190589792024-01-22 1:19:59729 days ago1705886399IN
0x92342459...D3E46C33d
0 ETH0.0009846111.33839424
Transfer From190589282024-01-22 1:09:47729 days ago1705885787IN
0x92342459...D3E46C33d
0 ETH0.0009175510.56616588
Transfer From190589182024-01-22 1:07:47729 days ago1705885667IN
0x92342459...D3E46C33d
0 ETH0.0009351910.76924642
Set Approval For...183238462023-10-11 1:11:47832 days ago1696986707IN
0x92342459...D3E46C33d
0 ETH0.000250485.39685172
Approve182235242023-09-27 0:28:11846 days ago1695774491IN
0x92342459...D3E46C33d
0 ETH0.000464799.47867028
Set Approval For...181095632023-09-11 0:32:59862 days ago1694392379IN
0x92342459...D3E46C33d
0 ETH0.000438679.45128991
Set Approval For...171130882023-04-24 2:10:351002 days ago1682302235IN
0x92342459...D3E46C33d
0 ETH0.0017107736.8589609
Approve170452482023-04-14 11:53:471012 days ago1681473227IN
0x92342459...D3E46C33d
0 ETH0.0014055928.66464221
Safe Transfer Fr...169234722023-03-28 4:29:111029 days ago1679977751IN
0x92342459...D3E46C33d
0 ETH0.0020414420.2648762
Set Approval For...168395262023-03-16 9:29:111041 days ago1678958951IN
0x92342459...D3E46C33d
0 ETH0.0009941921.42023013
Set Approval For...167302662023-03-01 0:39:591056 days ago1677631199IN
0x92342459...D3E46C33d
0 ETH0.0008166817.59555986
Gift Nft166223042023-02-13 20:45:231071 days ago1676321123IN
0x92342459...D3E46C33d
0 ETH0.0505366623.43137216
Gift Nft166222882023-02-13 20:42:111071 days ago1676320931IN
0x92342459...D3E46C33d
0 ETH0.0302441724.89900398
Gift Nft166222702023-02-13 20:38:351071 days ago1676320715IN
0x92342459...D3E46C33d
0 ETH0.0517705321.64025254
Gift Nft166222372023-02-13 20:31:591071 days ago1676320319IN
0x92342459...D3E46C33d
0 ETH0.0039034825.21812142
Set Approval For...166163912023-02-13 0:55:471072 days ago1676249747IN
0x92342459...D3E46C33d
0 ETH0.0007251615.59570608
Transfer Ownersh...166157452023-02-12 22:45:351072 days ago1676241935IN
0x92342459...D3E46C33d
0 ETH0.0006176621.52959514
Safe Transfer Fr...165951862023-02-10 1:51:111075 days ago1675993871IN
0x92342459...D3E46C33d
0 ETH0.0020266522.91296762
Safe Transfer Fr...165951662023-02-10 1:47:111075 days ago1675993631IN
0x92342459...D3E46C33d
0 ETH0.0019698322.27056416
Set Approval For...165888752023-02-09 4:40:591076 days ago1675917659IN
0x92342459...D3E46C33d
0 ETH0.0010970923.63718343
Set Approval For...165448262023-02-03 0:55:591082 days ago1675385759IN
0x92342459...D3E46C33d
0 ETH0.0015321433.01032514
Gift Nft165447122023-02-03 0:33:111082 days ago1675384391IN
0x92342459...D3E46C33d
0 ETH0.0185082229.43958644
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer159310632022-11-09 7:43:591168 days ago1667979839
0x92342459...D3E46C33d
120 ETH
Transfer156157232022-09-26 6:21:231212 days ago1664173283
0x92342459...D3E46C33d
120 ETH
Transfer156153952022-09-26 5:15:231212 days ago1664169323
0x92342459...D3E46C33d
150 ETH
Transfer156151412022-09-26 4:24:231212 days ago1664166263
0x92342459...D3E46C33d
120 ETH
Transfer156150612022-09-26 4:08:231212 days ago1664165303
0x92342459...D3E46C33d
120 ETH
Transfer156147342022-09-26 3:02:471212 days ago1664161367
0x92342459...D3E46C33d
120 ETH
Transfer156145112022-09-26 2:17:471212 days ago1664158667
0x92342459...D3E46C33d
60 ETH
Transfer156144272022-09-26 2:00:591212 days ago1664157659
0x92342459...D3E46C33d
60 ETH
Transfer156142922022-09-26 1:33:591212 days ago1664156039
0x92342459...D3E46C33d
120 ETH
Transfer155917222022-09-22 21:59:111215 days ago1663883951
0x92342459...D3E46C33d
60 ETH
Transfer155877352022-09-22 8:37:471216 days ago1663835867
0x92342459...D3E46C33d
210 ETH
Transfer155866282022-09-22 4:54:471216 days ago1663822487
0x92342459...D3E46C33d
150 ETH
Transfer155864812022-09-22 4:25:111216 days ago1663820711
0x92342459...D3E46C33d
60 ETH
Transfer155862982022-09-22 3:47:591216 days ago1663818479
0x92342459...D3E46C33d
210 ETH
Transfer155861622022-09-22 3:19:471216 days ago1663816787
0x92342459...D3E46C33d
210 ETH
Transfer155860012022-09-22 2:47:231216 days ago1663814843
0x92342459...D3E46C33d
180 ETH
Transfer155858062022-09-22 2:07:591216 days ago1663812479
0x92342459...D3E46C33d
120 ETH
Transfer155857052022-09-22 1:47:471216 days ago1663811267
0x92342459...D3E46C33d
210 ETH
Transfer155855662022-09-22 1:19:591216 days ago1663809599
0x92342459...D3E46C33d
120 ETH
Transfer155847052022-09-21 22:25:351216 days ago1663799135
0x92342459...D3E46C33d
120 ETH
Transfer155845862022-09-21 22:01:351216 days ago1663797695
0x92342459...D3E46C33d
120 ETH
Transfer155800672022-09-21 6:36:351217 days ago1663742195
0x92342459...D3E46C33d
60 ETH
Transfer155800342022-09-21 6:29:111217 days ago1663741751
0x92342459...D3E46C33d
60 ETH
Transfer155800112022-09-21 6:23:231217 days ago1663741403
0x92342459...D3E46C33d
90 ETH
Transfer155798982022-09-21 5:58:231217 days ago1663739903
0x92342459...D3E46C33d
90 ETH
View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Nft

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.15;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable {
    address tokenAddress;
   using Strings for uint256;
    string public baseURI;
    string public baseExtension = ".json";
    string public notRevealedUri;
    uint256 public price = 68 ether;
    uint256 public premintprice = 30 ether;
    address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f;
    uint256 public maxSupply = 444;
    bool public revealed = false;
    bool public saleIsActive = false;
    bool public salePremActive = false;
    uint256 public makenftlimit = 124;
    uint256 public premintlimit = 186;
    uint256 public brandlimit = 20;
    uint256 public premintSaleCounter = 0;
    uint256 public nftSaleCounter = 0;
    uint256 public brandSaleCounter = 0;
    
    struct User {
        uint256 counter;
    }
    mapping(address => User) userStructs;

   struct metaData {
        uint256 tokenid;
        string data;
        address addr;
  }

metaData[] public Metadata;

event Mintedlegendary(
        uint256 tokenId,
        uint256 amount,
        address indexed buyer,
        string saleType
    );
   
    constructor(
        string memory _name,
        string memory _symbol,
        string memory _initBaseURI,
        string memory _initNotRevealedUri
    ) ERC721(_name, _symbol) {
        setBaseURI(_initBaseURI);
        setNotRevealedURI(_initNotRevealedUri);
    }

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

    function premintNFT(uint256 _mintAmount) public payable nonReentrant {
        uint256 supply = totalSupply();
        IERC1155 token = IERC1155(tokenAddress);
       
        require(tokenAddress != address(0x0), "Zero address found");
        
        require(token.balanceOf(msg.sender, 3) >= 1, "No Mintpass found");
       require(salePremActive, "Sale is not active");
        require(supply + _mintAmount <= maxSupply, "Sold out");
         require(_mintAmount > 0, "need to mint at least 1 NFT");
      require(msg.value == premintprice * _mintAmount, "Funds Incorrect");
      require(premintSaleCounter + _mintAmount <= premintlimit,"Premint Sale Limit Reached");
        
       for (uint256 i = 1; i <= _mintAmount; i++) {
            _safeMint(msg.sender, supply + i);

            emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Premint");
        }
        addPremintCount(_mintAmount);

        
         
    }

     function makeNft(uint256 _mintAmount) public payable nonReentrant {
        uint256 supply = totalSupply();
        
        IERC1155 token = IERC1155(tokenAddress);
        require(tokenAddress != address(0x0), "Zero address found");
        uint256 brand = token.balanceOf(msg.sender, 1);
        uint256 artist = token.balanceOf(msg.sender, 2);
        uint256 legendaryplus = token.balanceOf(msg.sender, 3);
        uint256 legendary = token.balanceOf(msg.sender, 4);

        require(saleIsActive, "Sale is not active");
        require(supply + _mintAmount <= maxSupply, "Sold out");
         require(brand >= 1 || artist >= 1 || legendaryplus >= 1 || legendary >= 1, "No Mintpass found");
        require(_mintAmount > 0, "need to mint at least 1 NFT");
        require(msg.value == price * _mintAmount, "Funds Incorrect");
        require(nftSaleCounter + _mintAmount <= makenftlimit,"NFT Sale Limit Reached");
       
        for (uint256 i = 1; i <= _mintAmount; i++) {
            _safeMint(msg.sender, supply + i);
            emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Make NFT");
        }
       
        addnftCount(_mintAmount);
    }

    function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner {
        uint256 supply = totalSupply();
       require(supply + _mintAmount <= maxSupply, "Sold out");
        require(_mintAmount > 0, "need to mint at least 1 NFT");
       
        for (uint256 i = 1; i <= _mintAmount; i++) {
            _safeMint(_address, supply + i);
             emit Mintedlegendary(supply + i, _mintAmount, msg.sender,_saleType);
        }
    }


    function brandNft(uint256 _mintAmount) public payable nonReentrant {
        uint256 supply = totalSupply();
        IERC1155 token = IERC1155(tokenAddress);
        require(tokenAddress != address(0x0), "Zero address found");
        require(token.balanceOf(msg.sender, 1) >= 1, "No Mintpass found");
        require(salePremActive, "Sale is not active");
        require(supply + _mintAmount <= maxSupply, "Sold out");
        require(_mintAmount > 0, "need to mint at least 1 NFT");
        require(brandSaleCounter + _mintAmount <= brandlimit,"Brand Sale Limit Reached");
        require(msg.value == price * _mintAmount, "insufficient funds");
         require(
            viewBrandCount(msg.sender) + _mintAmount <= 2,
            "you have reached your limit"
        );
        uint256 count = viewBrandCount(msg.sender);
        addBrandCounts(_mintAmount);
       for (uint256 i = 1; i <= _mintAmount; i++) {
            _safeMint(msg.sender, supply + i);
            emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Brand NFT");
        }
        
        addBrandCount(count +_mintAmount);
         
    }

    function setMintPass(address _tokenAddress) public onlyOwner {
        tokenAddress = _tokenAddress;
    }

    function addPremintCount(uint256 y) private
    {
       premintSaleCounter= premintSaleCounter + y;
    }

    function addnftCount(uint256 y) private
    {
      nftSaleCounter= nftSaleCounter + y;
    }

     function addBrandCounts(uint256 y) private
    {
       brandSaleCounter= brandSaleCounter + y;
    }

    function addBrandCount(uint256 counter) private {
        userStructs[msg.sender].counter = counter;
    }

function updateMeta(uint256 _tokenid,string calldata  data) public {
    
        require(ownerOf(_tokenid) == msg.sender, "You are not the owner of this NFT");
        Metadata.push(
            metaData({
                tokenid: _tokenid,
                data: data,
                addr: msg.sender
            })
        );
    }
   

    function reveal() public onlyOwner {
        revealed = true;
    }

    function notreveal() public onlyOwner {
        revealed = false;
    }

    function setPrice(uint256 _newCost) public onlyOwner {
        price = _newCost;
    }

    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        baseURI = _newBaseURI;
    }

    function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner {
        makenftlimit = _newMakeNftLimit;
    }

    function setPremintLimit(uint256 _newPremintLimit) public onlyOwner {
        premintlimit = _newPremintLimit;
    }

    function setBrandLimit(uint256 _newBrandLimit) public onlyOwner {
        brandlimit = _newBrandLimit;
    }

    

    function setBaseExtension(string memory _newBaseExtension)
        public
        onlyOwner
    {
        baseExtension = _newBaseExtension;
    }

    function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
        notRevealedUri = _notRevealedURI;
    }

   

    function flipSale() public onlyOwner {
        saleIsActive = !saleIsActive;
    }

    function flipPreSale() public onlyOwner {
             salePremActive = !salePremActive;
    }
 
    function viewBrandCount(address _inst) public view returns (uint256) {
        return userStructs[_inst].counter;
    }


     function withdrawAll() public payable onlyOwner {
      (bool success, ) =  payable(t1).call{value: address(this).balance}("");
         require(success);
    }

    function withdrawFixed(uint256 _amt) public payable onlyOwner {
      (bool success, ) =  payable(t1).call{value: _amt}("");
         require(success);
    }

   

    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        require(
            _exists(tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );

        if (revealed == false) {
            return notRevealedUri;
        }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

        return array;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

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

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 6 of 18 : 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;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 18 : 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);
}

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"string","name":"_initNotRevealedUri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"string","name":"saleType","type":"string"}],"name":"Mintedlegendary","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":"uint256","name":"","type":"uint256"}],"name":"Metadata","outputs":[{"internalType":"uint256","name":"tokenid","type":"uint256"},{"internalType":"string","name":"data","type":"string"},{"internalType":"address","name":"addr","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":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"brandNft","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"brandSaleCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"brandlimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipPreSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"string","name":"_saleType","type":"string"}],"name":"giftNft","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"makeNft","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"makenftlimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftSaleCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notreveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"premintNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"premintSaleCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"premintlimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"premintprice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"salePremActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"_newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newBrandLimit","type":"uint256"}],"name":"setBrandLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMakeNftLimit","type":"uint256"}],"name":"setMakeNftLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"setMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPremintLimit","type":"uint256"}],"name":"setPremintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"inputs":[{"internalType":"uint256","name":"_tokenid","type":"uint256"},{"internalType":"string","name":"data","type":"string"}],"name":"updateMeta","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_inst","type":"address"}],"name":"viewBrandCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"withdrawFixed","outputs":[],"stateMutability":"payable","type":"function"}]

60c06040526005608090815264173539b7b760d91b60a052600e9062000026908262000301565b506803afb087b8769000006010556801a055690d9db80000601155601280546001600160a01b031916733c10d90796ce828644951c0682012b3faba52f8f1790556101bc6013556014805462ffffff19168155607c60155560ba601655601755600060188190556019819055601a55348015620000a257600080fd5b50604051620041d8380380620041d8833981016040819052620000c591620004f8565b83836000620000d5838262000301565b506001620000e4828262000301565b50506001600a5550620000f73362000117565b620001028262000169565b6200010d81620001b1565b5050505062000610565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600b546001600160a01b031633146200019f5760405162461bcd60e51b81526004016200019690620005d5565b60405180910390fd5b600d620001ad828262000301565b5050565b600b546001600160a01b03163314620001de5760405162461bcd60e51b81526004016200019690620005d5565b600f620001ad828262000301565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b6002810460018216806200022d57607f821691505b60208210810362000242576200024262000202565b50919050565b600062000259620002568381565b90565b92915050565b6200026a8362000248565b81546008840282811b60001990911b908116901990911617825550505050565b6000620002998184846200025f565b505050565b81811015620001ad57620002b46000826200028a565b6001016200029e565b601f82111562000299576000818152602090206020601f85010481016020851015620002e65750805b620002fa6020601f8601048301826200029e565b5050505050565b81516001600160401b038111156200031d576200031d620001ec565b62000329825462000218565b62000336828285620002bd565b6020601f8311600181146200036d5760008415620003545750858201515b600019600886021c1981166002860217865550620003c9565b600085815260208120601f198616915b828110156200039f57888501518255602094850194600190920191016200037d565b86831015620003bc5784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b601f19601f83011681018181106001600160401b0382111715620003f957620003f9620001ec565b6040525050565b60006200040c60405190565b90506200041a8282620003d1565b919050565b60006001600160401b038211156200043b576200043b620001ec565b601f19601f83011660200192915050565b60005b83811015620004695781810151838201526020016200044f565b8381111562000479576000848401525b50505050565b60006200049662000490846200041f565b62000400565b905082815260208101848484011115620004b357620004b3600080fd5b620004c08482856200044c565b509392505050565b600082601f830112620004de57620004de600080fd5b8151620004f08482602086016200047f565b949350505050565b60008060008060808587031215620005135762000513600080fd5b84516001600160401b038111156200052e576200052e600080fd5b6200053c87828801620004c8565b94505060208501516001600160401b038111156200055d576200055d600080fd5b6200056b87828801620004c8565b93505060408501516001600160401b038111156200058c576200058c600080fd5b6200059a87828801620004c8565b92505060608501516001600160401b03811115620005bb57620005bb600080fd5b620005c987828801620004c8565b91505092959194509250565b60208082528181019081527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408301526060820162000259565b613bb880620006206000396000f3fe6080604052600436106103505760003560e01c8063853828b6116101c6578063b88d4fde116100f7578063eb8d244411610095578063f2fde38b1161006f578063f2fde38b14610937578063f5be779d14610957578063fade7b5e1461096a578063fb66a82e1461098057600080fd5b8063eb8d2444146108e5578063f21acbb314610904578063f2c4ce1e1461091757600080fd5b8063c87b56dd116100d1578063c87b56dd14610846578063d5abeb0114610866578063da3ef23f1461087c578063e985e9c51461089c57600080fd5b8063b88d4fde146107fb578063c058d5c81461081b578063c66828621461083157600080fd5b8063a035b1fe11610164578063acdd42ee1161013e578063acdd42ee14610777578063ace1f05514610797578063b2a9cfa6146107c6578063b3bce3f3146107e657600080fd5b8063a035b1fe1461072c578063a22cb46514610742578063a475b5dd1461076257600080fd5b806391b7f5ed116101a057806391b7f5ed146106ae5780639353e642146106ce57806393921870146106e157806395d89b411461071757600080fd5b8063853828b6146106735780638b62f5331461067b5780638da5cb5b1461069057600080fd5b806338a9a686116102a05780635a7e69c91161023e57806370a082311161021857806370a0823114610613578063715018a6146106335780637ba5e62114610648578063818924281461065d57600080fd5b80635a7e69c9146105be5780636352211e146105de5780636c0360eb146105fe57600080fd5b80634bfc21de1161027a5780634bfc21de1461054e5780634f6ccce714610564578063518302271461058457806355f804b31461059e57600080fd5b806338a9a686146104fb578063401dc2431461050e57806342842e0e1461052e57600080fd5b80632188aa7f1161030d57806325bb9f42116102e757806325bb9f421461048f57806326f878fd146104af5780632f745c59146104c55780632fe2fe77146104e557600080fd5b80632188aa7f1461042f57806322bf37421461044f57806323b872dd1461046f57600080fd5b806301ffc9a71461035557806306fdde031461038b578063081812fc146103ad578063081c8c44146103da578063095ea7b3146103ef57806318160ddd14610411575b600080fd5b34801561036157600080fd5b506103756103703660046127f0565b610996565b604051610382919061281b565b60405180910390f35b34801561039757600080fd5b506103a06109c1565b6040516103829190612887565b3480156103b957600080fd5b506103cd6103c83660046128a9565b610a53565b60405161038291906128e4565b3480156103e657600080fd5b506103a0610aac565b3480156103fb57600080fd5b5061040f61040a366004612906565b610b3a565b005b34801561041d57600080fd5b506008545b6040516103829190612949565b34801561043b57600080fd5b5061040f61044a366004612a52565b610bbf565b34801561045b57600080fd5b506014546103759062010000900460ff1681565b34801561047b57600080fd5b5061040f61048a366004612abd565b610cab565b34801561049b57600080fd5b5061040f6104aa3660046128a9565b610cdc565b3480156104bb57600080fd5b50610422601a5481565b3480156104d157600080fd5b506104226104e0366004612906565b610d0b565b3480156104f157600080fd5b5061042260115481565b61040f6105093660046128a9565b610d5d565b34801561051a57600080fd5b5061040f610529366004612b55565b610df9565b34801561053a57600080fd5b5061040f610549366004612abd565b610edb565b34801561055a57600080fd5b5061042260165481565b34801561057057600080fd5b5061042261057f3660046128a9565b610ef6565b34801561059057600080fd5b506014546103759060ff1681565b3480156105aa57600080fd5b5061040f6105b9366004612bb1565b610f44565b3480156105ca57600080fd5b5061040f6105d93660046128a9565b610f7a565b3480156105ea57600080fd5b506103cd6105f93660046128a9565b610fa9565b34801561060a57600080fd5b506103a0610fde565b34801561061f57600080fd5b5061042261062e366004612bec565b610feb565b34801561063f57600080fd5b5061040f61102f565b34801561065457600080fd5b5061040f611065565b34801561066957600080fd5b5061042260175481565b61040f6110ac565b34801561068757600080fd5b5061040f611147565b34801561069c57600080fd5b50600b546001600160a01b03166103cd565b3480156106ba57600080fd5b5061040f6106c93660046128a9565b611190565b61040f6106dc3660046128a9565b6111bf565b3480156106ed57600080fd5b506104226106fc366004612bec565b6001600160a01b03166000908152601b602052604090205490565b34801561072357600080fd5b506103a06113e9565b34801561073857600080fd5b5061042260105481565b34801561074e57600080fd5b5061040f61075d366004612c20565b6113f8565b34801561076e57600080fd5b5061040f611403565b34801561078357600080fd5b5061040f6107923660046128a9565b61143c565b3480156107a357600080fd5b506107b76107b23660046128a9565b61146b565b60405161038293929190612c53565b3480156107d257600080fd5b5061040f6107e1366004612bec565b611532565b3480156107f257600080fd5b5061040f61157e565b34801561080757600080fd5b5061040f610816366004612c82565b6115b4565b34801561082757600080fd5b5061042260185481565b34801561083d57600080fd5b506103a06115ec565b34801561085257600080fd5b506103a06108613660046128a9565b6115f9565b34801561087257600080fd5b5061042260135481565b34801561088857600080fd5b5061040f610897366004612bb1565b611730565b3480156108a857600080fd5b506103756108b7366004612d01565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108f157600080fd5b5060145461037590610100900460ff1681565b61040f6109123660046128a9565b611766565b34801561092357600080fd5b5061040f610932366004612bb1565b611b16565b34801561094357600080fd5b5061040f610952366004612bec565b611b4c565b61040f6109653660046128a9565b611ba5565b34801561097657600080fd5b5061042260155481565b34801561098c57600080fd5b5061042260195481565b60006001600160e01b0319821663780e9d6360e01b14806109bb57506109bb82611e3a565b92915050565b6060600080546109d090612d4a565b80601f01602080910402602001604051908101604052809291908181526020018280546109fc90612d4a565b8015610a495780601f10610a1e57610100808354040283529160200191610a49565b820191906000526020600020905b815481529060010190602001808311610a2c57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a905760405162461bcd60e51b8152600401610a8790612dc2565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600f8054610ab990612d4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae590612d4a565b8015610b325780601f10610b0757610100808354040283529160200191610b32565b820191906000526020600020905b815481529060010190602001808311610b1557829003601f168201915b505050505081565b6000610b4582610fa9565b9050806001600160a01b0316836001600160a01b031603610b785760405162461bcd60e51b8152600401610a8790612e10565b336001600160a01b0382161480610b945750610b9481336108b7565b610bb05760405162461bcd60e51b8152600401610a8790612e7a565b610bba8383611e8a565b505050565b600b546001600160a01b03163314610be95760405162461bcd60e51b8152600401610a8790612ebf565b6000610bf460085490565b601354909150610c048583612ee5565b1115610c225760405162461bcd60e51b8152600401610a8790612f1c565b60008411610c425760405162461bcd60e51b8152600401610a8790612f60565b60015b848111610ca457610c5f84610c5a8385612ee5565b611ef8565b33600080516020613b63833981519152610c798385612ee5565b8786604051610c8a93929190612f70565b60405180910390a280610c9c81612fa6565b915050610c45565b5050505050565b610cb53382611f12565b610cd15760405162461bcd60e51b8152600401610a879061300e565b610bba838383611fc4565b600b546001600160a01b03163314610d065760405162461bcd60e51b8152600401610a8790612ebf565b601755565b6000610d1683610feb565b8210610d345760405162461bcd60e51b8152600401610a8790613066565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600b546001600160a01b03163314610d875760405162461bcd60e51b8152600401610a8790612ebf565b6012546040516000916001600160a01b0316908390610da590613079565b60006040518083038185875af1925050503d8060008114610de2576040519150601f19603f3d011682016040523d82523d6000602084013e610de7565b606091505b5050905080610df557600080fd5b5050565b33610e0384610fa9565b6001600160a01b031614610e295760405162461bcd60e51b8152600401610a87906130bf565b601c604051806060016040528085815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250503360209384015250835460018181018655948252908290208351600390920201908155908201519192909190820190610eac9082613165565b5060409190910151600290910180546001600160a01b0319166001600160a01b03909216919091179055505050565b610bba838383604051806020016040528060008152506115b4565b6000610f0160085490565b8210610f1f5760405162461bcd60e51b8152600401610a8790613272565b60088281548110610f3257610f32613282565b90600052602060002001549050919050565b600b546001600160a01b03163314610f6e5760405162461bcd60e51b8152600401610a8790612ebf565b600d610df58282613165565b600b546001600160a01b03163314610fa45760405162461bcd60e51b8152600401610a8790612ebf565b601655565b6000818152600260205260408120546001600160a01b0316806109bb5760405162461bcd60e51b8152600401610a87906132de565b600d8054610ab990612d4a565b60006001600160a01b0382166110135760405162461bcd60e51b8152600401610a8790613335565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146110595760405162461bcd60e51b8152600401610a8790612ebf565b61106360006120f1565b565b600b546001600160a01b0316331461108f5760405162461bcd60e51b8152600401610a8790612ebf565b6014805461ff001981166101009182900460ff1615909102179055565b600b546001600160a01b031633146110d65760405162461bcd60e51b8152600401610a8790612ebf565b6012546040516000916001600160a01b03169047906110f490613079565b60006040518083038185875af1925050503d8060008114611131576040519150601f19603f3d011682016040523d82523d6000602084013e611136565b606091505b505090508061114457600080fd5b50565b600b546001600160a01b031633146111715760405162461bcd60e51b8152600401610a8790612ebf565b6014805462ff0000198116620100009182900460ff1615909102179055565b600b546001600160a01b031633146111ba5760405162461bcd60e51b8152600401610a8790612ebf565b601055565b6002600a54036111e15760405162461bcd60e51b8152600401610a8790613379565b6002600a5560006111f160085490565b600c549091506001600160a01b03168061121d5760405162461bcd60e51b8152600401610a87906133b2565b604051627eeac760e11b81526001906001600160a01b0383169062fdd58e9061124d9033906003906004016133cb565b602060405180830381865afa15801561126a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128e91906133f1565b10156112ac5760405162461bcd60e51b8152600401610a879061343a565b60145462010000900460ff166112d45760405162461bcd60e51b8152600401610a8790613473565b6013546112e18484612ee5565b11156112ff5760405162461bcd60e51b8152600401610a8790612f1c565b6000831161131f5760405162461bcd60e51b8152600401610a8790612f60565b8260115461132d9190613483565b341461134b5760405162461bcd60e51b8152600401610a87906134c8565b6016548360185461135c9190612ee5565b111561137a5760405162461bcd60e51b8152600401610a879061350c565b60015b8381116113d55761139233610c5a8386612ee5565b33600080516020613b638339815191526113ac8386612ee5565b866040516113bb92919061353a565b60405180910390a2806113cd81612fa6565b91505061137d565b506113df83612143565b50506001600a5550565b6060600180546109d090612d4a565b610df5338383612157565b600b546001600160a01b0316331461142d5760405162461bcd60e51b8152600401610a8790612ebf565b6014805460ff19166001179055565b600b546001600160a01b031633146114665760405162461bcd60e51b8152600401610a8790612ebf565b601555565b601c818154811061147b57600080fd5b600091825260209091206003909102018054600182018054919350906114a090612d4a565b80601f01602080910402602001604051908101604052809291908181526020018280546114cc90612d4a565b80156115195780601f106114ee57610100808354040283529160200191611519565b820191906000526020600020905b8154815290600101906020018083116114fc57829003601f168201915b505050600290930154919250506001600160a01b031683565b600b546001600160a01b0316331461155c5760405162461bcd60e51b8152600401610a8790612ebf565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600b546001600160a01b031633146115a85760405162461bcd60e51b8152600401610a8790612ebf565b6014805460ff19169055565b6115be3383611f12565b6115da5760405162461bcd60e51b8152600401610a879061300e565b6115e6848484846121f9565b50505050565b600e8054610ab990612d4a565b6000818152600260205260409020546060906001600160a01b03166116305760405162461bcd60e51b8152600401610a87906135b2565b60145460ff1615156000036116d157600f805461164c90612d4a565b80601f016020809104026020016040519081016040528092919081815260200182805461167890612d4a565b80156116c55780601f1061169a576101008083540402835291602001916116c5565b820191906000526020600020905b8154815290600101906020018083116116a857829003601f168201915b50505050509050919050565b60006116db61222c565b905060008151116116fb5760405180602001604052806000815250611729565b806117058461223b565b600e60405160200161171993929190613656565b6040516020818303038152906040525b9392505050565b600b546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610a8790612ebf565b600e610df58282613165565b6002600a54036117885760405162461bcd60e51b8152600401610a8790613379565b6002600a55600061179860085490565b600c549091506001600160a01b0316806117c45760405162461bcd60e51b8152600401610a87906133b2565b604051627eeac760e11b81526000906001600160a01b0383169062fdd58e906117f49033906001906004016133cb565b602060405180830381865afa158015611811573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183591906133f1565b90506000826001600160a01b031662fdd58e3360026040518363ffffffff1660e01b81526004016118679291906133cb565b602060405180830381865afa158015611884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a891906133f1565b90506000836001600160a01b031662fdd58e3360036040518363ffffffff1660e01b81526004016118da9291906133cb565b602060405180830381865afa1580156118f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191b91906133f1565b90506000846001600160a01b031662fdd58e3360046040518363ffffffff1660e01b815260040161194d9291906133cb565b602060405180830381865afa15801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e91906133f1565b601454909150610100900460ff166119b85760405162461bcd60e51b8152600401610a8790613473565b6013546119c58888612ee5565b11156119e35760405162461bcd60e51b8152600401610a8790612f1c565b6001841015806119f4575060018310155b80611a00575060018210155b80611a0c575060018110155b611a285760405162461bcd60e51b8152600401610a879061343a565b60008711611a485760405162461bcd60e51b8152600401610a8790612f60565b86601054611a569190613483565b3414611a745760405162461bcd60e51b8152600401610a87906134c8565b60155487601954611a859190612ee5565b1115611aa35760405162461bcd60e51b8152600401610a87906136a7565b60015b878111611afe57611abb33610c5a838a612ee5565b33600080516020613b63833981519152611ad5838a612ee5565b8a604051611ae49291906136d6565b60405180910390a280611af681612fa6565b915050611aa6565b50611b088761233c565b50506001600a555050505050565b600b546001600160a01b03163314611b405760405162461bcd60e51b8152600401610a8790612ebf565b600f610df58282613165565b600b546001600160a01b03163314611b765760405162461bcd60e51b8152600401610a8790612ebf565b6001600160a01b038116611b9c5760405162461bcd60e51b8152600401610a8790613745565b611144816120f1565b6002600a5403611bc75760405162461bcd60e51b8152600401610a8790613379565b6002600a556000611bd760085490565b600c549091506001600160a01b031680611c035760405162461bcd60e51b8152600401610a87906133b2565b604051627eeac760e11b81526001906001600160a01b0383169062fdd58e90611c3290339085906004016133cb565b602060405180830381865afa158015611c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7391906133f1565b1015611c915760405162461bcd60e51b8152600401610a879061343a565b60145462010000900460ff16611cb95760405162461bcd60e51b8152600401610a8790613473565b601354611cc68484612ee5565b1115611ce45760405162461bcd60e51b8152600401610a8790612f1c565b60008311611d045760405162461bcd60e51b8152600401610a8790612f60565b60175483601a54611d159190612ee5565b1115611d335760405162461bcd60e51b8152600401610a8790613789565b82601054611d419190613483565b3414611d5f5760405162461bcd60e51b8152600401610a87906137c2565b336000908152601b6020526040902054600290611d7d908590612ee5565b1115611d9b5760405162461bcd60e51b8152600401610a8790613806565b336000908152601b6020526040902054611db484612350565b60015b848111611e0f57611dcc33610c5a8387612ee5565b33600080516020613b63833981519152611de68387612ee5565b87604051611df5929190613836565b60405180910390a280611e0781612fa6565b915050611db7565b50611e2f611e1d8583612ee5565b336000908152601b6020526040902055565b50506001600a555050565b60006001600160e01b031982166380ac58cd60e01b1480611e6b57506001600160e01b03198216635b5e139f60e01b145b806109bb57506301ffc9a760e01b6001600160e01b03198316146109bb565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ebf82610fa9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610df5828260405180602001604052806000815250612364565b6000818152600260205260408120546001600160a01b0316611f465760405162461bcd60e51b8152600401610a87906138ab565b6000611f5183610fa9565b9050806001600160a01b0316846001600160a01b03161480611f9857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611fbc5750836001600160a01b0316611fb184610a53565b6001600160a01b0316145b949350505050565b826001600160a01b0316611fd782610fa9565b6001600160a01b031614611ffd5760405162461bcd60e51b8152600401610a87906138fd565b6001600160a01b0382166120235760405162461bcd60e51b8152600401610a879061394e565b61202e838383612397565b612039600082611e8a565b6001600160a01b038316600090815260036020526040812080546001929061206290849061395e565b90915550506001600160a01b0382166000908152600360205260408120805460019290612090908490612ee5565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b806018546121519190612ee5565b60185550565b816001600160a01b0316836001600160a01b0316036121885760405162461bcd60e51b8152600401610a87906139a9565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906121ec90859061281b565b60405180910390a3505050565b612204848484611fc4565b6122108484848461244f565b6115e65760405162461bcd60e51b8152600401610a8790613a08565b6060600d80546109d090612d4a565b6060816000036122625750506040805180820190915260018152600360fc1b602082015290565b8160005b811561228c578061227681612fa6565b91506122859050600a83613a2e565b9150612266565b60008167ffffffffffffffff8111156122a7576122a7612957565b6040519080825280601f01601f1916602001820160405280156122d1576020820181803683370190505b5090505b8415611fbc576122e660018361395e565b91506122f3600a86613a42565b6122fe906030612ee5565b60f81b81838151811061231357612313613282565b60200101906001600160f81b031916908160001a905350612335600a86613a2e565b94506122d5565b8060195461234a9190612ee5565b60195550565b80601a5461235e9190612ee5565b601a5550565b61236e8383612550565b61237b600084848461244f565b610bba5760405162461bcd60e51b8152600401610a8790613a08565b6001600160a01b0383166123f2576123ed81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612415565b816001600160a01b0316836001600160a01b03161461241557612415838261263e565b6001600160a01b03821661242c57610bba816126db565b826001600160a01b0316826001600160a01b031614610bba57610bba828261278a565b60006001600160a01b0384163b1561254557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612493903390899088908890600401613a56565b6020604051808303816000875af19250505080156124ce575060408051601f3d908101601f191682019092526124cb91810190613aa5565b60015b61252b573d8080156124fc576040519150601f19603f3d011682016040523d82523d6000602084013e612501565b606091505b5080516000036125235760405162461bcd60e51b8152600401610a8790613a08565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611fbc565b506001949350505050565b6001600160a01b0382166125765760405162461bcd60e51b8152600401610a8790613af8565b6000818152600260205260409020546001600160a01b0316156125ab5760405162461bcd60e51b8152600401610a8790613b3c565b6125b760008383612397565b6001600160a01b03821660009081526003602052604081208054600192906125e0908490612ee5565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161264b84610feb565b612655919061395e565b6000838152600760205260409020549091508082146126a8576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906126ed9060019061395e565b6000838152600960205260408120546008805493945090928490811061271557612715613282565b90600052602060002001549050806008838154811061273657612736613282565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061276e5761276e613b4c565b6001900381819060005260206000200160009055905550505050565b600061279583610feb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981165b811461114457600080fd5b80356109bb816127ce565b60006020828403121561280557612805600080fd5b6000611fbc84846127e5565b8015155b82525050565b602081016109bb8284612811565b60005b8381101561284457818101518382015260200161282c565b838111156115e65750506000910152565b600061285f825190565b808452602084019350612876818560208601612829565b601f01601f19169290920192915050565b602080825281016117298184612855565b806127da565b80356109bb81612898565b6000602082840312156128be576128be600080fd5b6000611fbc848461289e565b60006001600160a01b0382166109bb565b612815816128ca565b602081016109bb82846128db565b6127da816128ca565b80356109bb816128f2565b6000806040838503121561291c5761291c600080fd5b600061292885856128fb565b92505060206129398582860161289e565b9150509250929050565b80612815565b602081016109bb8284612943565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171561299357612993612957565b6040525050565b60006129a560405190565b90506129b1828261296d565b919050565b600067ffffffffffffffff8211156129d0576129d0612957565b601f19601f83011660200192915050565b82818337506000910152565b6000612a006129fb846129b6565b61299a565b905082815260208101848484011115612a1b57612a1b600080fd5b612a268482856129e1565b509392505050565b600082601f830112612a4257612a42600080fd5b8135611fbc8482602086016129ed565b600080600060608486031215612a6a57612a6a600080fd5b6000612a76868661289e565b9350506020612a87868287016128fb565b925050604084013567ffffffffffffffff811115612aa757612aa7600080fd5b612ab386828701612a2e565b9150509250925092565b600080600060608486031215612ad557612ad5600080fd5b6000612ae186866128fb565b9350506020612af2868287016128fb565b9250506040612ab38682870161289e565b60008083601f840112612b1857612b18600080fd5b50813567ffffffffffffffff811115612b3357612b33600080fd5b602083019150836001820283011115612b4e57612b4e600080fd5b9250929050565b600080600060408486031215612b6d57612b6d600080fd5b6000612b79868661289e565b935050602084013567ffffffffffffffff811115612b9957612b99600080fd5b612ba586828701612b03565b92509250509250925092565b600060208284031215612bc657612bc6600080fd5b813567ffffffffffffffff811115612be057612be0600080fd5b611fbc84828501612a2e565b600060208284031215612c0157612c01600080fd5b6000611fbc84846128fb565b8015156127da565b80356109bb81612c0d565b60008060408385031215612c3657612c36600080fd5b6000612c4285856128fb565b925050602061293985828601612c15565b60608101612c618286612943565b8181036020830152612c738185612855565b9050611fbc60408301846128db565b60008060008060808587031215612c9b57612c9b600080fd5b6000612ca787876128fb565b9450506020612cb8878288016128fb565b9350506040612cc98782880161289e565b925050606085013567ffffffffffffffff811115612ce957612ce9600080fd5b612cf587828801612a2e565b91505092959194509250565b60008060408385031215612d1757612d17600080fd5b6000612d2385856128fb565b9250506020612939858286016128fb565b634e487b7160e01b600052602260045260246000fd5b600281046001821680612d5e57607f821691505b602082108103612d7057612d70612d34565b50919050565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b602080825281016109bb81612d76565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b60208201529150612dbb565b602080825281016109bb81612dd2565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529150612dbb565b602080825281016109bb81612e20565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b602080825281016109bb81612e8a565b634e487b7160e01b600052601160045260246000fd5b60008219821115612ef857612ef8612ecf565b500190565b600881526000602082016714dbdb19081bdd5d60c21b81529150612eb8565b602080825281016109bb81612efd565b601b81526000602082017f6e65656420746f206d696e74206174206c656173742031204e4654000000000081529150612eb8565b602080825281016109bb81612f2c565b60608101612f7e8286612943565b612f8b6020830185612943565b8181036040830152612f9d8184612855565b95945050505050565b60006000198203612fb957612fb9612ecf565b5060010190565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60208201529150612dbb565b602080825281016109bb81612fc0565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b60208201529150612dbb565b602080825281016109bb8161301e565b90565b6000816109bb565b602181526000602082017f596f7520617265206e6f7420746865206f776e6572206f662074686973204e468152601560fa1b60208201529150612dbb565b602080825281016109bb81613081565b60006109bb6130768381565b6130e4836130cf565b81546008840282811b60001990911b908116901990911617825550505050565b6000610bba8184846130db565b81811015610df557613124600082613104565b600101613111565b601f821115610bba576000818152602090206020601f850104810160208510156131535750805b610ca46020601f860104830182613111565b815167ffffffffffffffff81111561317f5761317f612957565b6131898254612d4a565b61319482828561312c565b6020601f8311600181146131c857600084156131b05750858201515b600019600886021c1981166002860217865550613221565b600085815260208120601f198616915b828110156131f857888501518255602094850194600190920191016131d8565b868310156132145784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b60208201529150612dbb565b602080825281016109bb81613229565b634e487b7160e01b600052603260045260246000fd5b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b60208201529150612dbb565b602080825281016109bb81613298565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b60208201529150612dbb565b602080825281016109bb816132ee565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529150612eb8565b602080825281016109bb81613345565b601281526000602082017116995c9bc81859191c995cdcc8199bdd5b9960721b81529150612eb8565b602080825281016109bb81613389565b612815816130cf565b604081016133d982856128db565b61172960208301846133c2565b80516109bb81612898565b60006020828403121561340657613406600080fd5b6000611fbc84846133e6565b6011815260006020820170139bc8135a5b9d1c185cdcc8199bdd5b99607a1b81529150612eb8565b602080825281016109bb81613412565b601281526000602082017153616c65206973206e6f742061637469766560701b81529150612eb8565b602080825281016109bb8161344a565b600081600019048311821515161561349d5761349d612ecf565b500290565b600f81526000602082016e119d5b991cc8125b98dbdc9c9958dd608a1b81529150612eb8565b602080825281016109bb816134a2565b601a81526000602082017f5072656d696e742053616c65204c696d6974205265616368656400000000000081529150612eb8565b602080825281016109bb816134d8565b6007815260006020820166141c995b5a5b9d60ca1b81529150612eb8565b606081016135488285612943565b6135556020830184612943565b8181036040830152611fbc8161351c565b602f81526000602082017f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b60208201529150612dbb565b602080825281016109bb81613566565b60006135cc825190565b6135da818560208601612829565b9290920192915050565b600081546135f181612d4a565b600182168015613608576001811461361d5761364d565b60ff198316865281151582028601935061364d565b60008581526020902060005b8381101561364557815488820152600190910190602001613629565b838801955050505b50505092915050565b600061366282866135c2565b915061366e82856135c2565b9150612f9d82846135e4565b60168152600060208201751391950814d85b1948131a5b5a5d0814995858da195960521b81529150612eb8565b602080825281016109bb8161367a565b600881526000602082016713585ad94813919560c21b81529150612eb8565b606081016136e48285612943565b6136f16020830184612943565b8181036040830152611fbc816136b7565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150612dbb565b602080825281016109bb81613702565b601881526000602082017f4272616e642053616c65204c696d69742052656163686564000000000000000081529150612eb8565b602080825281016109bb81613755565b6012815260006020820171696e73756666696369656e742066756e647360701b81529150612eb8565b602080825281016109bb81613799565b601b81526000602082017f796f752068617665207265616368656420796f7572206c696d6974000000000081529150612eb8565b602080825281016109bb816137d2565b6009815260006020820168109c985b990813919560ba1b81529150612eb8565b606081016138448285612943565b6138516020830184612943565b8181036040830152611fbc81613816565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150612dbb565b602080825281016109bb81613862565b602581526000602082017f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b60208201529150612dbb565b602080825281016109bb816138bb565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b60208201529150612dbb565b602080825281016109bb8161390d565b60008282101561397057613970612ecf565b500390565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529150612eb8565b602080825281016109bb81613975565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60208201529150612dbb565b602080825281016109bb816139b9565b634e487b7160e01b600052601260045260246000fd5b600082613a3d57613a3d613a18565b500490565b600082613a5157613a51613a18565b500690565b60808101613a6482876128db565b613a7160208301866128db565b613a7e6040830185612943565b8181036060830152613a908184612855565b9695505050505050565b80516109bb816127ce565b600060208284031215613aba57613aba600080fd5b6000611fbc8484613a9a565b60208082527f4552433732313a206d696e7420746f20746865207a65726f206164647265737391019081526000612eb8565b602080825281016109bb81613ac6565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081529150612eb8565b602080825281016109bb81613b08565b634e487b7160e01b600052603160045260246000fdfec8b776da235ad26881693c73d869dd3f7ce0e4f2c91d10dc81c701debd03f613a2646970667358221220192d67be6ec660e37c8ab6a13a069ac1b824914101a1e00c5847da34011ee05464736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000001a4c6567656e646172792044616e63696e6720536561686f72736500000000000000000000000000000000000000000000000000000000000000000000000000034c4453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012f00000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106103505760003560e01c8063853828b6116101c6578063b88d4fde116100f7578063eb8d244411610095578063f2fde38b1161006f578063f2fde38b14610937578063f5be779d14610957578063fade7b5e1461096a578063fb66a82e1461098057600080fd5b8063eb8d2444146108e5578063f21acbb314610904578063f2c4ce1e1461091757600080fd5b8063c87b56dd116100d1578063c87b56dd14610846578063d5abeb0114610866578063da3ef23f1461087c578063e985e9c51461089c57600080fd5b8063b88d4fde146107fb578063c058d5c81461081b578063c66828621461083157600080fd5b8063a035b1fe11610164578063acdd42ee1161013e578063acdd42ee14610777578063ace1f05514610797578063b2a9cfa6146107c6578063b3bce3f3146107e657600080fd5b8063a035b1fe1461072c578063a22cb46514610742578063a475b5dd1461076257600080fd5b806391b7f5ed116101a057806391b7f5ed146106ae5780639353e642146106ce57806393921870146106e157806395d89b411461071757600080fd5b8063853828b6146106735780638b62f5331461067b5780638da5cb5b1461069057600080fd5b806338a9a686116102a05780635a7e69c91161023e57806370a082311161021857806370a0823114610613578063715018a6146106335780637ba5e62114610648578063818924281461065d57600080fd5b80635a7e69c9146105be5780636352211e146105de5780636c0360eb146105fe57600080fd5b80634bfc21de1161027a5780634bfc21de1461054e5780634f6ccce714610564578063518302271461058457806355f804b31461059e57600080fd5b806338a9a686146104fb578063401dc2431461050e57806342842e0e1461052e57600080fd5b80632188aa7f1161030d57806325bb9f42116102e757806325bb9f421461048f57806326f878fd146104af5780632f745c59146104c55780632fe2fe77146104e557600080fd5b80632188aa7f1461042f57806322bf37421461044f57806323b872dd1461046f57600080fd5b806301ffc9a71461035557806306fdde031461038b578063081812fc146103ad578063081c8c44146103da578063095ea7b3146103ef57806318160ddd14610411575b600080fd5b34801561036157600080fd5b506103756103703660046127f0565b610996565b604051610382919061281b565b60405180910390f35b34801561039757600080fd5b506103a06109c1565b6040516103829190612887565b3480156103b957600080fd5b506103cd6103c83660046128a9565b610a53565b60405161038291906128e4565b3480156103e657600080fd5b506103a0610aac565b3480156103fb57600080fd5b5061040f61040a366004612906565b610b3a565b005b34801561041d57600080fd5b506008545b6040516103829190612949565b34801561043b57600080fd5b5061040f61044a366004612a52565b610bbf565b34801561045b57600080fd5b506014546103759062010000900460ff1681565b34801561047b57600080fd5b5061040f61048a366004612abd565b610cab565b34801561049b57600080fd5b5061040f6104aa3660046128a9565b610cdc565b3480156104bb57600080fd5b50610422601a5481565b3480156104d157600080fd5b506104226104e0366004612906565b610d0b565b3480156104f157600080fd5b5061042260115481565b61040f6105093660046128a9565b610d5d565b34801561051a57600080fd5b5061040f610529366004612b55565b610df9565b34801561053a57600080fd5b5061040f610549366004612abd565b610edb565b34801561055a57600080fd5b5061042260165481565b34801561057057600080fd5b5061042261057f3660046128a9565b610ef6565b34801561059057600080fd5b506014546103759060ff1681565b3480156105aa57600080fd5b5061040f6105b9366004612bb1565b610f44565b3480156105ca57600080fd5b5061040f6105d93660046128a9565b610f7a565b3480156105ea57600080fd5b506103cd6105f93660046128a9565b610fa9565b34801561060a57600080fd5b506103a0610fde565b34801561061f57600080fd5b5061042261062e366004612bec565b610feb565b34801561063f57600080fd5b5061040f61102f565b34801561065457600080fd5b5061040f611065565b34801561066957600080fd5b5061042260175481565b61040f6110ac565b34801561068757600080fd5b5061040f611147565b34801561069c57600080fd5b50600b546001600160a01b03166103cd565b3480156106ba57600080fd5b5061040f6106c93660046128a9565b611190565b61040f6106dc3660046128a9565b6111bf565b3480156106ed57600080fd5b506104226106fc366004612bec565b6001600160a01b03166000908152601b602052604090205490565b34801561072357600080fd5b506103a06113e9565b34801561073857600080fd5b5061042260105481565b34801561074e57600080fd5b5061040f61075d366004612c20565b6113f8565b34801561076e57600080fd5b5061040f611403565b34801561078357600080fd5b5061040f6107923660046128a9565b61143c565b3480156107a357600080fd5b506107b76107b23660046128a9565b61146b565b60405161038293929190612c53565b3480156107d257600080fd5b5061040f6107e1366004612bec565b611532565b3480156107f257600080fd5b5061040f61157e565b34801561080757600080fd5b5061040f610816366004612c82565b6115b4565b34801561082757600080fd5b5061042260185481565b34801561083d57600080fd5b506103a06115ec565b34801561085257600080fd5b506103a06108613660046128a9565b6115f9565b34801561087257600080fd5b5061042260135481565b34801561088857600080fd5b5061040f610897366004612bb1565b611730565b3480156108a857600080fd5b506103756108b7366004612d01565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156108f157600080fd5b5060145461037590610100900460ff1681565b61040f6109123660046128a9565b611766565b34801561092357600080fd5b5061040f610932366004612bb1565b611b16565b34801561094357600080fd5b5061040f610952366004612bec565b611b4c565b61040f6109653660046128a9565b611ba5565b34801561097657600080fd5b5061042260155481565b34801561098c57600080fd5b5061042260195481565b60006001600160e01b0319821663780e9d6360e01b14806109bb57506109bb82611e3a565b92915050565b6060600080546109d090612d4a565b80601f01602080910402602001604051908101604052809291908181526020018280546109fc90612d4a565b8015610a495780601f10610a1e57610100808354040283529160200191610a49565b820191906000526020600020905b815481529060010190602001808311610a2c57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610a905760405162461bcd60e51b8152600401610a8790612dc2565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600f8054610ab990612d4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae590612d4a565b8015610b325780601f10610b0757610100808354040283529160200191610b32565b820191906000526020600020905b815481529060010190602001808311610b1557829003601f168201915b505050505081565b6000610b4582610fa9565b9050806001600160a01b0316836001600160a01b031603610b785760405162461bcd60e51b8152600401610a8790612e10565b336001600160a01b0382161480610b945750610b9481336108b7565b610bb05760405162461bcd60e51b8152600401610a8790612e7a565b610bba8383611e8a565b505050565b600b546001600160a01b03163314610be95760405162461bcd60e51b8152600401610a8790612ebf565b6000610bf460085490565b601354909150610c048583612ee5565b1115610c225760405162461bcd60e51b8152600401610a8790612f1c565b60008411610c425760405162461bcd60e51b8152600401610a8790612f60565b60015b848111610ca457610c5f84610c5a8385612ee5565b611ef8565b33600080516020613b63833981519152610c798385612ee5565b8786604051610c8a93929190612f70565b60405180910390a280610c9c81612fa6565b915050610c45565b5050505050565b610cb53382611f12565b610cd15760405162461bcd60e51b8152600401610a879061300e565b610bba838383611fc4565b600b546001600160a01b03163314610d065760405162461bcd60e51b8152600401610a8790612ebf565b601755565b6000610d1683610feb565b8210610d345760405162461bcd60e51b8152600401610a8790613066565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600b546001600160a01b03163314610d875760405162461bcd60e51b8152600401610a8790612ebf565b6012546040516000916001600160a01b0316908390610da590613079565b60006040518083038185875af1925050503d8060008114610de2576040519150601f19603f3d011682016040523d82523d6000602084013e610de7565b606091505b5050905080610df557600080fd5b5050565b33610e0384610fa9565b6001600160a01b031614610e295760405162461bcd60e51b8152600401610a87906130bf565b601c604051806060016040528085815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250503360209384015250835460018181018655948252908290208351600390920201908155908201519192909190820190610eac9082613165565b5060409190910151600290910180546001600160a01b0319166001600160a01b03909216919091179055505050565b610bba838383604051806020016040528060008152506115b4565b6000610f0160085490565b8210610f1f5760405162461bcd60e51b8152600401610a8790613272565b60088281548110610f3257610f32613282565b90600052602060002001549050919050565b600b546001600160a01b03163314610f6e5760405162461bcd60e51b8152600401610a8790612ebf565b600d610df58282613165565b600b546001600160a01b03163314610fa45760405162461bcd60e51b8152600401610a8790612ebf565b601655565b6000818152600260205260408120546001600160a01b0316806109bb5760405162461bcd60e51b8152600401610a87906132de565b600d8054610ab990612d4a565b60006001600160a01b0382166110135760405162461bcd60e51b8152600401610a8790613335565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146110595760405162461bcd60e51b8152600401610a8790612ebf565b61106360006120f1565b565b600b546001600160a01b0316331461108f5760405162461bcd60e51b8152600401610a8790612ebf565b6014805461ff001981166101009182900460ff1615909102179055565b600b546001600160a01b031633146110d65760405162461bcd60e51b8152600401610a8790612ebf565b6012546040516000916001600160a01b03169047906110f490613079565b60006040518083038185875af1925050503d8060008114611131576040519150601f19603f3d011682016040523d82523d6000602084013e611136565b606091505b505090508061114457600080fd5b50565b600b546001600160a01b031633146111715760405162461bcd60e51b8152600401610a8790612ebf565b6014805462ff0000198116620100009182900460ff1615909102179055565b600b546001600160a01b031633146111ba5760405162461bcd60e51b8152600401610a8790612ebf565b601055565b6002600a54036111e15760405162461bcd60e51b8152600401610a8790613379565b6002600a5560006111f160085490565b600c549091506001600160a01b03168061121d5760405162461bcd60e51b8152600401610a87906133b2565b604051627eeac760e11b81526001906001600160a01b0383169062fdd58e9061124d9033906003906004016133cb565b602060405180830381865afa15801561126a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128e91906133f1565b10156112ac5760405162461bcd60e51b8152600401610a879061343a565b60145462010000900460ff166112d45760405162461bcd60e51b8152600401610a8790613473565b6013546112e18484612ee5565b11156112ff5760405162461bcd60e51b8152600401610a8790612f1c565b6000831161131f5760405162461bcd60e51b8152600401610a8790612f60565b8260115461132d9190613483565b341461134b5760405162461bcd60e51b8152600401610a87906134c8565b6016548360185461135c9190612ee5565b111561137a5760405162461bcd60e51b8152600401610a879061350c565b60015b8381116113d55761139233610c5a8386612ee5565b33600080516020613b638339815191526113ac8386612ee5565b866040516113bb92919061353a565b60405180910390a2806113cd81612fa6565b91505061137d565b506113df83612143565b50506001600a5550565b6060600180546109d090612d4a565b610df5338383612157565b600b546001600160a01b0316331461142d5760405162461bcd60e51b8152600401610a8790612ebf565b6014805460ff19166001179055565b600b546001600160a01b031633146114665760405162461bcd60e51b8152600401610a8790612ebf565b601555565b601c818154811061147b57600080fd5b600091825260209091206003909102018054600182018054919350906114a090612d4a565b80601f01602080910402602001604051908101604052809291908181526020018280546114cc90612d4a565b80156115195780601f106114ee57610100808354040283529160200191611519565b820191906000526020600020905b8154815290600101906020018083116114fc57829003601f168201915b505050600290930154919250506001600160a01b031683565b600b546001600160a01b0316331461155c5760405162461bcd60e51b8152600401610a8790612ebf565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600b546001600160a01b031633146115a85760405162461bcd60e51b8152600401610a8790612ebf565b6014805460ff19169055565b6115be3383611f12565b6115da5760405162461bcd60e51b8152600401610a879061300e565b6115e6848484846121f9565b50505050565b600e8054610ab990612d4a565b6000818152600260205260409020546060906001600160a01b03166116305760405162461bcd60e51b8152600401610a87906135b2565b60145460ff1615156000036116d157600f805461164c90612d4a565b80601f016020809104026020016040519081016040528092919081815260200182805461167890612d4a565b80156116c55780601f1061169a576101008083540402835291602001916116c5565b820191906000526020600020905b8154815290600101906020018083116116a857829003601f168201915b50505050509050919050565b60006116db61222c565b905060008151116116fb5760405180602001604052806000815250611729565b806117058461223b565b600e60405160200161171993929190613656565b6040516020818303038152906040525b9392505050565b600b546001600160a01b0316331461175a5760405162461bcd60e51b8152600401610a8790612ebf565b600e610df58282613165565b6002600a54036117885760405162461bcd60e51b8152600401610a8790613379565b6002600a55600061179860085490565b600c549091506001600160a01b0316806117c45760405162461bcd60e51b8152600401610a87906133b2565b604051627eeac760e11b81526000906001600160a01b0383169062fdd58e906117f49033906001906004016133cb565b602060405180830381865afa158015611811573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183591906133f1565b90506000826001600160a01b031662fdd58e3360026040518363ffffffff1660e01b81526004016118679291906133cb565b602060405180830381865afa158015611884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a891906133f1565b90506000836001600160a01b031662fdd58e3360036040518363ffffffff1660e01b81526004016118da9291906133cb565b602060405180830381865afa1580156118f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191b91906133f1565b90506000846001600160a01b031662fdd58e3360046040518363ffffffff1660e01b815260040161194d9291906133cb565b602060405180830381865afa15801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e91906133f1565b601454909150610100900460ff166119b85760405162461bcd60e51b8152600401610a8790613473565b6013546119c58888612ee5565b11156119e35760405162461bcd60e51b8152600401610a8790612f1c565b6001841015806119f4575060018310155b80611a00575060018210155b80611a0c575060018110155b611a285760405162461bcd60e51b8152600401610a879061343a565b60008711611a485760405162461bcd60e51b8152600401610a8790612f60565b86601054611a569190613483565b3414611a745760405162461bcd60e51b8152600401610a87906134c8565b60155487601954611a859190612ee5565b1115611aa35760405162461bcd60e51b8152600401610a87906136a7565b60015b878111611afe57611abb33610c5a838a612ee5565b33600080516020613b63833981519152611ad5838a612ee5565b8a604051611ae49291906136d6565b60405180910390a280611af681612fa6565b915050611aa6565b50611b088761233c565b50506001600a555050505050565b600b546001600160a01b03163314611b405760405162461bcd60e51b8152600401610a8790612ebf565b600f610df58282613165565b600b546001600160a01b03163314611b765760405162461bcd60e51b8152600401610a8790612ebf565b6001600160a01b038116611b9c5760405162461bcd60e51b8152600401610a8790613745565b611144816120f1565b6002600a5403611bc75760405162461bcd60e51b8152600401610a8790613379565b6002600a556000611bd760085490565b600c549091506001600160a01b031680611c035760405162461bcd60e51b8152600401610a87906133b2565b604051627eeac760e11b81526001906001600160a01b0383169062fdd58e90611c3290339085906004016133cb565b602060405180830381865afa158015611c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7391906133f1565b1015611c915760405162461bcd60e51b8152600401610a879061343a565b60145462010000900460ff16611cb95760405162461bcd60e51b8152600401610a8790613473565b601354611cc68484612ee5565b1115611ce45760405162461bcd60e51b8152600401610a8790612f1c565b60008311611d045760405162461bcd60e51b8152600401610a8790612f60565b60175483601a54611d159190612ee5565b1115611d335760405162461bcd60e51b8152600401610a8790613789565b82601054611d419190613483565b3414611d5f5760405162461bcd60e51b8152600401610a87906137c2565b336000908152601b6020526040902054600290611d7d908590612ee5565b1115611d9b5760405162461bcd60e51b8152600401610a8790613806565b336000908152601b6020526040902054611db484612350565b60015b848111611e0f57611dcc33610c5a8387612ee5565b33600080516020613b63833981519152611de68387612ee5565b87604051611df5929190613836565b60405180910390a280611e0781612fa6565b915050611db7565b50611e2f611e1d8583612ee5565b336000908152601b6020526040902055565b50506001600a555050565b60006001600160e01b031982166380ac58cd60e01b1480611e6b57506001600160e01b03198216635b5e139f60e01b145b806109bb57506301ffc9a760e01b6001600160e01b03198316146109bb565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ebf82610fa9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610df5828260405180602001604052806000815250612364565b6000818152600260205260408120546001600160a01b0316611f465760405162461bcd60e51b8152600401610a87906138ab565b6000611f5183610fa9565b9050806001600160a01b0316846001600160a01b03161480611f9857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611fbc5750836001600160a01b0316611fb184610a53565b6001600160a01b0316145b949350505050565b826001600160a01b0316611fd782610fa9565b6001600160a01b031614611ffd5760405162461bcd60e51b8152600401610a87906138fd565b6001600160a01b0382166120235760405162461bcd60e51b8152600401610a879061394e565b61202e838383612397565b612039600082611e8a565b6001600160a01b038316600090815260036020526040812080546001929061206290849061395e565b90915550506001600160a01b0382166000908152600360205260408120805460019290612090908490612ee5565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b806018546121519190612ee5565b60185550565b816001600160a01b0316836001600160a01b0316036121885760405162461bcd60e51b8152600401610a87906139a9565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906121ec90859061281b565b60405180910390a3505050565b612204848484611fc4565b6122108484848461244f565b6115e65760405162461bcd60e51b8152600401610a8790613a08565b6060600d80546109d090612d4a565b6060816000036122625750506040805180820190915260018152600360fc1b602082015290565b8160005b811561228c578061227681612fa6565b91506122859050600a83613a2e565b9150612266565b60008167ffffffffffffffff8111156122a7576122a7612957565b6040519080825280601f01601f1916602001820160405280156122d1576020820181803683370190505b5090505b8415611fbc576122e660018361395e565b91506122f3600a86613a42565b6122fe906030612ee5565b60f81b81838151811061231357612313613282565b60200101906001600160f81b031916908160001a905350612335600a86613a2e565b94506122d5565b8060195461234a9190612ee5565b60195550565b80601a5461235e9190612ee5565b601a5550565b61236e8383612550565b61237b600084848461244f565b610bba5760405162461bcd60e51b8152600401610a8790613a08565b6001600160a01b0383166123f2576123ed81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612415565b816001600160a01b0316836001600160a01b03161461241557612415838261263e565b6001600160a01b03821661242c57610bba816126db565b826001600160a01b0316826001600160a01b031614610bba57610bba828261278a565b60006001600160a01b0384163b1561254557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612493903390899088908890600401613a56565b6020604051808303816000875af19250505080156124ce575060408051601f3d908101601f191682019092526124cb91810190613aa5565b60015b61252b573d8080156124fc576040519150601f19603f3d011682016040523d82523d6000602084013e612501565b606091505b5080516000036125235760405162461bcd60e51b8152600401610a8790613a08565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611fbc565b506001949350505050565b6001600160a01b0382166125765760405162461bcd60e51b8152600401610a8790613af8565b6000818152600260205260409020546001600160a01b0316156125ab5760405162461bcd60e51b8152600401610a8790613b3c565b6125b760008383612397565b6001600160a01b03821660009081526003602052604081208054600192906125e0908490612ee5565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161264b84610feb565b612655919061395e565b6000838152600760205260409020549091508082146126a8576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906126ed9060019061395e565b6000838152600960205260408120546008805493945090928490811061271557612715613282565b90600052602060002001549050806008838154811061273657612736613282565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061276e5761276e613b4c565b6001900381819060005260206000200160009055905550505050565b600061279583610feb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b031981165b811461114457600080fd5b80356109bb816127ce565b60006020828403121561280557612805600080fd5b6000611fbc84846127e5565b8015155b82525050565b602081016109bb8284612811565b60005b8381101561284457818101518382015260200161282c565b838111156115e65750506000910152565b600061285f825190565b808452602084019350612876818560208601612829565b601f01601f19169290920192915050565b602080825281016117298184612855565b806127da565b80356109bb81612898565b6000602082840312156128be576128be600080fd5b6000611fbc848461289e565b60006001600160a01b0382166109bb565b612815816128ca565b602081016109bb82846128db565b6127da816128ca565b80356109bb816128f2565b6000806040838503121561291c5761291c600080fd5b600061292885856128fb565b92505060206129398582860161289e565b9150509250929050565b80612815565b602081016109bb8284612943565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff8211171561299357612993612957565b6040525050565b60006129a560405190565b90506129b1828261296d565b919050565b600067ffffffffffffffff8211156129d0576129d0612957565b601f19601f83011660200192915050565b82818337506000910152565b6000612a006129fb846129b6565b61299a565b905082815260208101848484011115612a1b57612a1b600080fd5b612a268482856129e1565b509392505050565b600082601f830112612a4257612a42600080fd5b8135611fbc8482602086016129ed565b600080600060608486031215612a6a57612a6a600080fd5b6000612a76868661289e565b9350506020612a87868287016128fb565b925050604084013567ffffffffffffffff811115612aa757612aa7600080fd5b612ab386828701612a2e565b9150509250925092565b600080600060608486031215612ad557612ad5600080fd5b6000612ae186866128fb565b9350506020612af2868287016128fb565b9250506040612ab38682870161289e565b60008083601f840112612b1857612b18600080fd5b50813567ffffffffffffffff811115612b3357612b33600080fd5b602083019150836001820283011115612b4e57612b4e600080fd5b9250929050565b600080600060408486031215612b6d57612b6d600080fd5b6000612b79868661289e565b935050602084013567ffffffffffffffff811115612b9957612b99600080fd5b612ba586828701612b03565b92509250509250925092565b600060208284031215612bc657612bc6600080fd5b813567ffffffffffffffff811115612be057612be0600080fd5b611fbc84828501612a2e565b600060208284031215612c0157612c01600080fd5b6000611fbc84846128fb565b8015156127da565b80356109bb81612c0d565b60008060408385031215612c3657612c36600080fd5b6000612c4285856128fb565b925050602061293985828601612c15565b60608101612c618286612943565b8181036020830152612c738185612855565b9050611fbc60408301846128db565b60008060008060808587031215612c9b57612c9b600080fd5b6000612ca787876128fb565b9450506020612cb8878288016128fb565b9350506040612cc98782880161289e565b925050606085013567ffffffffffffffff811115612ce957612ce9600080fd5b612cf587828801612a2e565b91505092959194509250565b60008060408385031215612d1757612d17600080fd5b6000612d2385856128fb565b9250506020612939858286016128fb565b634e487b7160e01b600052602260045260246000fd5b600281046001821680612d5e57607f821691505b602082108103612d7057612d70612d34565b50919050565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b602080825281016109bb81612d76565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b60208201529150612dbb565b602080825281016109bb81612dd2565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529150612dbb565b602080825281016109bb81612e20565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260005b5060200190565b602080825281016109bb81612e8a565b634e487b7160e01b600052601160045260246000fd5b60008219821115612ef857612ef8612ecf565b500190565b600881526000602082016714dbdb19081bdd5d60c21b81529150612eb8565b602080825281016109bb81612efd565b601b81526000602082017f6e65656420746f206d696e74206174206c656173742031204e4654000000000081529150612eb8565b602080825281016109bb81612f2c565b60608101612f7e8286612943565b612f8b6020830185612943565b8181036040830152612f9d8184612855565b95945050505050565b60006000198203612fb957612fb9612ecf565b5060010190565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60208201529150612dbb565b602080825281016109bb81612fc0565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b60208201529150612dbb565b602080825281016109bb8161301e565b90565b6000816109bb565b602181526000602082017f596f7520617265206e6f7420746865206f776e6572206f662074686973204e468152601560fa1b60208201529150612dbb565b602080825281016109bb81613081565b60006109bb6130768381565b6130e4836130cf565b81546008840282811b60001990911b908116901990911617825550505050565b6000610bba8184846130db565b81811015610df557613124600082613104565b600101613111565b601f821115610bba576000818152602090206020601f850104810160208510156131535750805b610ca46020601f860104830182613111565b815167ffffffffffffffff81111561317f5761317f612957565b6131898254612d4a565b61319482828561312c565b6020601f8311600181146131c857600084156131b05750858201515b600019600886021c1981166002860217865550613221565b600085815260208120601f198616915b828110156131f857888501518255602094850194600190920191016131d8565b868310156132145784890151600019601f89166008021c191682555b6001600288020188555050505b505050505050565b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b60208201529150612dbb565b602080825281016109bb81613229565b634e487b7160e01b600052603260045260246000fd5b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b60208201529150612dbb565b602080825281016109bb81613298565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b60208201529150612dbb565b602080825281016109bb816132ee565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529150612eb8565b602080825281016109bb81613345565b601281526000602082017116995c9bc81859191c995cdcc8199bdd5b9960721b81529150612eb8565b602080825281016109bb81613389565b612815816130cf565b604081016133d982856128db565b61172960208301846133c2565b80516109bb81612898565b60006020828403121561340657613406600080fd5b6000611fbc84846133e6565b6011815260006020820170139bc8135a5b9d1c185cdcc8199bdd5b99607a1b81529150612eb8565b602080825281016109bb81613412565b601281526000602082017153616c65206973206e6f742061637469766560701b81529150612eb8565b602080825281016109bb8161344a565b600081600019048311821515161561349d5761349d612ecf565b500290565b600f81526000602082016e119d5b991cc8125b98dbdc9c9958dd608a1b81529150612eb8565b602080825281016109bb816134a2565b601a81526000602082017f5072656d696e742053616c65204c696d6974205265616368656400000000000081529150612eb8565b602080825281016109bb816134d8565b6007815260006020820166141c995b5a5b9d60ca1b81529150612eb8565b606081016135488285612943565b6135556020830184612943565b8181036040830152611fbc8161351c565b602f81526000602082017f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b60208201529150612dbb565b602080825281016109bb81613566565b60006135cc825190565b6135da818560208601612829565b9290920192915050565b600081546135f181612d4a565b600182168015613608576001811461361d5761364d565b60ff198316865281151582028601935061364d565b60008581526020902060005b8381101561364557815488820152600190910190602001613629565b838801955050505b50505092915050565b600061366282866135c2565b915061366e82856135c2565b9150612f9d82846135e4565b60168152600060208201751391950814d85b1948131a5b5a5d0814995858da195960521b81529150612eb8565b602080825281016109bb8161367a565b600881526000602082016713585ad94813919560c21b81529150612eb8565b606081016136e48285612943565b6136f16020830184612943565b8181036040830152611fbc816136b7565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150612dbb565b602080825281016109bb81613702565b601881526000602082017f4272616e642053616c65204c696d69742052656163686564000000000000000081529150612eb8565b602080825281016109bb81613755565b6012815260006020820171696e73756666696369656e742066756e647360701b81529150612eb8565b602080825281016109bb81613799565b601b81526000602082017f796f752068617665207265616368656420796f7572206c696d6974000000000081529150612eb8565b602080825281016109bb816137d2565b6009815260006020820168109c985b990813919560ba1b81529150612eb8565b606081016138448285612943565b6138516020830184612943565b8181036040830152611fbc81613816565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150612dbb565b602080825281016109bb81613862565b602581526000602082017f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b60208201529150612dbb565b602080825281016109bb816138bb565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b60208201529150612dbb565b602080825281016109bb8161390d565b60008282101561397057613970612ecf565b500390565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529150612eb8565b602080825281016109bb81613975565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60208201529150612dbb565b602080825281016109bb816139b9565b634e487b7160e01b600052601260045260246000fd5b600082613a3d57613a3d613a18565b500490565b600082613a5157613a51613a18565b500690565b60808101613a6482876128db565b613a7160208301866128db565b613a7e6040830185612943565b8181036060830152613a908184612855565b9695505050505050565b80516109bb816127ce565b600060208284031215613aba57613aba600080fd5b6000611fbc8484613a9a565b60208082527f4552433732313a206d696e7420746f20746865207a65726f206164647265737391019081526000612eb8565b602080825281016109bb81613ac6565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081529150612eb8565b602080825281016109bb81613b08565b634e487b7160e01b600052603160045260246000fdfec8b776da235ad26881693c73d869dd3f7ce0e4f2c91d10dc81c701debd03f613a2646970667358221220192d67be6ec660e37c8ab6a13a069ac1b824914101a1e00c5847da34011ee05464736f6c634300080f0033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000001a4c6567656e646172792044616e63696e6720536561686f72736500000000000000000000000000000000000000000000000000000000000000000000000000034c4453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012f00000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Legendary Dancing Seahorse
Arg [1] : _symbol (string): LDS
Arg [2] : _initBaseURI (string): /
Arg [3] : _initNotRevealedUri (string): /

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [4] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [5] : 4c6567656e646172792044616e63696e6720536561686f727365000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 4c44530000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [9] : 2f00000000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [11] : 2f00000000000000000000000000000000000000000000000000000000000000


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.