ETH Price: $3,489.30 (+4.66%)

Token

(0xea5cee63af2ffc865e82a6b6563870b3d4c4f04b)
 

Overview

Max Total Supply

2,721 ERC-721 TOKEN*

Holders

979

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
0 ERC-721 TOKEN*
0xb0266ee121dfdcd712657068497257f2b3523865
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
AstraArmy

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 69 runs

Other Settings:
default evmVersion
File 1 of 13 : AstraArmy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import '@openzeppelin/contracts/utils/math/SafeMath.sol';

interface IAstraMetadata {
    function tokenURI(uint256 tokenId, uint256 meta, bool isLocking, string memory genesisImageUrl) external view returns (string memory);
    function generate(uint256 seed) external view returns (uint256, uint256);
}

contract AstraArmy is ERC721, Ownable {
    using SafeMath for uint256;

    uint256 constant MAX_ALPHA_SUPPLY       = 8869;         // Maximum limit of tokens for sale by ETH
    uint256 constant MAX_TOTAL_SUPPLY       = 696969;       // Maximum limit of tokens in the collection
    uint256 constant MAX_GIVEAWAY_REVERSE   = 69;           // Maximum limit of tokens for giving away purposes
    uint256 constant BATCH_PRESALE_LIMIT    = 2;            // Maximum limit of tokens per pre-sale transaction
    uint256 constant BATCH_BORN_LIMIT       = 3;            // Maximum limit of tokens per mint by token transaction
    uint256 constant PRESALE_PRICE          = 0.050 ether;  // Price for pre-sale
    uint256 constant PUBLICSALE_PRICE       = 0.069 ether;  // Price for minting
    uint256 constant CLAIM_TIMEOUT          = 14*24*3600;   // Claim expiration time after reserve
    uint256 constant STATS_MASK             = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000; // Mask for separate props and stats

    uint256 public MaxSalePerAddress        = 10;           // Maximum limit of tokens per address for minting
    uint256 public LockingTime              = 2*24*3600;    // Lock metadata after mint in seconds
    uint256 public TotalSupply;                             // Current total supply
    uint256 public GiveAwaySupply;                          // Total supply for giving away purposes
    uint256 public ResevedSupply;                            // Current total supply for sale by ETH

    bytes32 public PresaleMerkleRoot;                       // Merkle root hash to verify pre-sale address 
    address public PaymentAddress;                          // The address where payment will be received
    address public MetadataAddress;                         // The address of metadata's contract
    address public BattleAddress;                           // The address of game's contract

    bool public PreSaleActived;                             // Pre-sale is activated
    bool public PublicSaleActived;                          // Public sale is activated
    bool public BornActived;                                // Mint by token is activated

    mapping (uint256 => uint256)    MintTimestampMapping;   // Mapping minting time
    mapping (uint256 => uint256)    MetadataMapping;        // Mapping token's metadata
    mapping (uint256 => bool)       MetadataExisting;       // Mapping metadata's existence
    mapping (address => bool)       PresaleClaimedMapping;  // Mapping pre-sale claimed rewards
    mapping (address => uint256)    ReserveSaleMapping;     // Mapping reservations for public sale
    mapping (address => uint256)    ReserveTimestampMapping;// Mapping minting time
    mapping (address => uint256)    ClaimedSaleMapping;     // Mapping claims for public sale

    // Initialization function will initialize the initial values
    constructor(address metadataAddress, address paymentAddress) ERC721("Astra Chipmunks Army", "ACA") {
        PaymentAddress = paymentAddress;
        MetadataAddress = metadataAddress;
        
        // Generate first tokens for Alvxns & teams
        saveMetadata(1, 0x00000a000e001c001b0011001700000000000000000000000000000000000000);
        super._safeMint(paymentAddress, 1);
        TotalSupply++;
    }

    // Randomize metadata util it's unique
    function generateMetadata(uint256 tokenId, uint256 seed) internal returns (uint256) {
        (uint256 random, uint256 meta) = IAstraMetadata(MetadataAddress).generate(seed);
        if(MetadataExisting[meta])
            return generateMetadata(tokenId, random);
        else
            return meta;
    }

    // Get the tokenURI onchain
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        return IAstraMetadata(MetadataAddress).tokenURI(tokenId, MetadataMapping[tokenId], MintTimestampMapping[tokenId] + LockingTime > block.timestamp, "");
    }

    // The function that reassigns a global variable named MetadataAddress (owner only)
    function setMetadataAddress(address metadataAddress) external onlyOwner {
        MetadataAddress = metadataAddress;
    }

    // The function that reassigns a global variable named BattleAddress (owner only)
    function setBattleAddress(address battleAddress) external onlyOwner {
        BattleAddress = battleAddress;
    }

    // The function that reassigns a global variable named PaymentAddress (owner only)
    function setPaymentAddress(address paymentAddress) external onlyOwner {
        PaymentAddress = paymentAddress;
    }

    // The function that reassigns a global variable named PresaleMerkleRoot (owner only)
    function setPresaleMerkleRoot(bytes32 presaleMerkleRoot) external onlyOwner {
        PresaleMerkleRoot = presaleMerkleRoot;
    }

    // The function that reassigns a global variable named PreSaleActived (owner only)
    function setPresaleActived(bool preSaleActived) external onlyOwner {
        PreSaleActived = preSaleActived;
    }

    // The function that reassigns a global variable named BornActived (owner only)
    function setBornActived(bool bornActived) external onlyOwner {
        BornActived = bornActived;
    }

    // The function that reassigns a global variable named PublicSaleActived (owner only)
    function setPublicSaleActived(bool publicSaleActived) external onlyOwner {
        PublicSaleActived = publicSaleActived;
    }

    // The function that reassigns a global variable named LockingTime (owner only)
    function setLockingTime(uint256 lockingTime) external onlyOwner {
        LockingTime = lockingTime;
    }

    // The function that reassigns a global variable named MaxSalePerAddress (owner only)
    function setMaxSalePerAddress(uint256 maxSalePerAddress) external onlyOwner {
        MaxSalePerAddress = maxSalePerAddress;
    }

    // Pre-sale whitelist check function
    function checkPresaleProof(address buyer, bool hasFreeMint, bytes32[] memory merkleProof) public view returns (bool) {
        // Calculate the hash of leaf
        bytes32 leafHash = keccak256(abi.encode(buyer, hasFreeMint));
        // Verify leaf using openzeppelin library
        return MerkleProof.verify(merkleProof, PresaleMerkleRoot, leafHash);
    }

    // Give away minting function (owner only)
    function mintGiveAway(uint256 numberOfTokens, address toAddress) external onlyOwner {
        // Calculate current index for minting
        uint256 i = TotalSupply + 1;
        TotalSupply += numberOfTokens;
        GiveAwaySupply += numberOfTokens;

        // Exceeded the maximum total give away supply
        require(0 < numberOfTokens && GiveAwaySupply <= MAX_GIVEAWAY_REVERSE && TotalSupply <= MAX_ALPHA_SUPPLY, 'Exceed total supply!');

        for (;i <= TotalSupply; i++) {
            // To the sun
            _safeMint(toAddress, i);
        }
    }

    // Presale minting function
    function mintPreSale(uint256 numberOfTokens, bool hasFreeMint, bytes32[] memory merkleProof) external payable {
        // Calculate current index for minting
        uint256 i = TotalSupply + 1;
        TotalSupply += numberOfTokens.add(hasFreeMint ? 1 : 0);

        // The sender must be a wallet
        require(msg.sender == tx.origin, 'Not a wallet!');
        // Pre-sale is not open yet
        require(PreSaleActived, 'Not open yet!');
        // Exceeded the maximum total supply
        require(TotalSupply <= MAX_ALPHA_SUPPLY, 'Exceed total supply!');
        // Exceeded the limit for each pre-sale
        require(0 < numberOfTokens && numberOfTokens <= BATCH_PRESALE_LIMIT, 'Exceed limitation!');
        // You are not on the pre-sale whitelist
        require(this.checkPresaleProof(msg.sender, hasFreeMint, merkleProof), 'Not on the whitelist!');
        // Your promotion has been used
        require(!PresaleClaimedMapping[msg.sender], 'Promotion is over!');
        // Your ETH amount is insufficient
        require(PRESALE_PRICE.mul(numberOfTokens) <= msg.value, 'Insufficient funds!');

        // Mark the address that has used the promotion
        PresaleClaimedMapping[msg.sender] = true;

        // Make the payment to diffrence wallet
        payable(PaymentAddress).transfer(msg.value);
        
        for (; i <= TotalSupply; i++) {
            // To the moon
            _safeMint(msg.sender, i);
        }
    }

    // Getting the reserve status
    function reserveStatus(address addressOf) external view returns (uint256, uint256) {
        uint256 claimable = ReserveSaleMapping[addressOf] - ClaimedSaleMapping[addressOf];
        uint256 reservable = MaxSalePerAddress > ReserveSaleMapping[addressOf] ? MaxSalePerAddress - ReserveSaleMapping[addressOf] : 0;
        return (claimable, reservable);
    }

    // Public sale by ETH minting function
    function reserve(uint256 numberOfTokens) external payable {
        // Register for a ticket
        ReserveSaleMapping[msg.sender] = ReserveSaleMapping[msg.sender].add(numberOfTokens);
        ResevedSupply = ResevedSupply.add(numberOfTokens);
        ReserveTimestampMapping[msg.sender] = block.timestamp;

        // The sender must be a wallet
        require(msg.sender == tx.origin, 'Not a wallet!');
        // Public sale is not open yet
        require(PublicSaleActived, 'Not open yet!');
        // Exceeded the maximum total supply
        require(TotalSupply + ResevedSupply <= MAX_ALPHA_SUPPLY, 'Exceed total supply!');
        // Your ETH amount is insufficient
        require(0 < numberOfTokens && PUBLICSALE_PRICE.mul(numberOfTokens) <= msg.value, 'Insufficient funds!');
        // Exceeded the limit per address
        require(numberOfTokens <= MaxSalePerAddress && ReserveSaleMapping[msg.sender] <= MaxSalePerAddress, 'Exceed address limitation!');
        // Make the payment to diffrence wallet
        payable(PaymentAddress).transfer(msg.value);
    }

    // Public sale by ETH minting function
    function claim() external payable {
        // The sender must be a wallet
        require(msg.sender == tx.origin, 'Not a wallet!');
        // Reservetions must come first
        require(ReserveSaleMapping[msg.sender] > ClaimedSaleMapping[msg.sender], 'Already claimed!');
        // Expired claims
        require(ReserveTimestampMapping[msg.sender] + CLAIM_TIMEOUT > block.timestamp, 'Expired claims!');

        // Calculate current index for minting
        uint256 i = TotalSupply + 1;
        uint256 numberOfTokens = ReserveSaleMapping[msg.sender] - ClaimedSaleMapping[msg.sender];
        ResevedSupply -= numberOfTokens;
        TotalSupply += numberOfTokens;
        // Reassign used tickets
        ClaimedSaleMapping[msg.sender] = ReserveSaleMapping[msg.sender];
        delete(ReserveTimestampMapping[msg.sender]);


        for (; i <= TotalSupply; i++) {
            // To the moon
            _safeMint(msg.sender, i);
        }
    }

    // Public sale by token minting function
    function born(address toAddress, uint256 numberOfTokens) external {
        // Calculate current index for minting
        uint256 i = TotalSupply + 1;
        TotalSupply = TotalSupply.add(numberOfTokens);

        // Born is not open yet
        require(BornActived, 'Not open yet!');
        // Exceeded the limit for each mint egg
        require(0 < numberOfTokens && numberOfTokens <= BATCH_BORN_LIMIT, 'Exceed batch limitation!');
        // Exceeded the maximum total supply
        require(TotalSupply <= MAX_TOTAL_SUPPLY, 'Exceed total supply!');
        //  The sender must be game contract
        require(msg.sender == BattleAddress, 'Not authorized!');

        for (; i <= TotalSupply; i++) {
            // To the moon
            _safeMint(toAddress, i);
        }
    }

    // Setting the stats of the token
    function setStats(uint256 tokenId, uint256 meta) external {
        // The sender must be game contract
        require(msg.sender == BattleAddress, 'Not authorized!');
        // Put on a mask to make sure nothing can change the art, just stats
        MetadataMapping[tokenId] = (MetadataMapping[tokenId] & ~STATS_MASK) | (meta & STATS_MASK);
    }

    // Save the metadata information
    function saveMetadata(uint256 tokenId, uint256 meta) internal {
        MintTimestampMapping[tokenId] = block.timestamp;
        MetadataMapping[tokenId] = meta;
        MetadataExisting[meta] = true;
    }

    // Customize safeMint function
    function _safeMint(address to, uint256 tokenId) internal virtual override {
        // Generate and save metadata
        saveMetadata(tokenId, generateMetadata(tokenId, tokenId));

        // Call the function super
        super._safeMint(to, tokenId);
    }

    // Customize beforeTokenTransfer function
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        // Call the function super
        super._beforeTokenTransfer(from, to, tokenId);
        // Lock the tranfer of LockingTime seconds, except for the alpha generation
        require(tokenId <= MAX_ALPHA_SUPPLY || MintTimestampMapping[tokenId] + LockingTime < block.timestamp, 'Not transferable!');
    }

    // Customize totalSupply function
    function totalSupply() external virtual returns (uint256) {
        return TotalSupply;
    }
}

File 2 of 13 : ERC721.sol
// SPDX-License-Identifier: MIT

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 overriden 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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //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 || getApproved(tokenId) == spender || isApprovedForAll(owner, 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);
    }

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

    /**
     * @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 of token that is not own");
        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);
    }

    /**
     * @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 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 {}
}

File 3 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 13 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

File 5 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 6 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT

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`, 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 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);

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

File 7 of 13 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 13 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 9 of 13 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 13 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 11 of 13 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 12 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 13 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"metadataAddress","type":"address"},{"internalType":"address","name":"paymentAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BattleAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BornActived","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GiveAwaySupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LockingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MaxSalePerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MetadataAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PaymentAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PreSaleActived","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PresaleMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PublicSaleActived","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ResevedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"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":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"born","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"buyer","type":"address"},{"internalType":"bool","name":"hasFreeMint","type":"bool"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"checkPresaleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"address","name":"toAddress","type":"address"}],"name":"mintGiveAway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"bool","name":"hasFreeMint","type":"bool"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mintPreSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"addressOf","type":"address"}],"name":"reserveStatus","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"battleAddress","type":"address"}],"name":"setBattleAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"bornActived","type":"bool"}],"name":"setBornActived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockingTime","type":"uint256"}],"name":"setLockingTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxSalePerAddress","type":"uint256"}],"name":"setMaxSalePerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"metadataAddress","type":"address"}],"name":"setMetadataAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"paymentAddress","type":"address"}],"name":"setPaymentAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"preSaleActived","type":"bool"}],"name":"setPresaleActived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"}],"name":"setPresaleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"publicSaleActived","type":"bool"}],"name":"setPublicSaleActived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"meta","type":"uint256"}],"name":"setStats","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","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"}]

6080604052600a6007556202a3006008553480156200001d57600080fd5b506040516200352c3803806200352c8339810160408190526200004091620005ca565b604080518082018252601481527f417374726120436869706d756e6b732041726d7900000000000000000000000060208083019182528351808501909452600384526241434160e81b908401528151919291620000a0916000916200050c565b508051620000b69060019060208401906200050c565b505050620000d3620000cd6200016560201b60201c565b62000169565b600d80546001600160a01b038084166001600160a01b031992831617909255600e8054928516929091169190911790556200012e60017d0a000e001c001b0011001700000000000000000000000000000000000000620001bb565b62000146816001620001ef60201b620018571760201c565b600980549060006200015883620007ec565b9190505550505062000820565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600091825260106020908152604080842042905560118252808420839055918352601290529020805460ff19166001179055565b620002118282604051806020016040528060008152506200021560201b60201c565b5050565b6200022183836200025d565b62000230600084848462000348565b620002585760405162461bcd60e51b81526004016200024f90620006d6565b60405180910390fd5b505050565b6001600160a01b038216620002865760405162461bcd60e51b81526004016200024f906200075f565b620002918162000481565b15620002b15760405162461bcd60e51b81526004016200024f9062000728565b620002bf60008383620004a1565b6001600160a01b0382166000908152600360205260408120805460019290620002ea90849062000794565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600062000369846001600160a01b03166200050660201b620018711760201c565b1562000475576001600160a01b03841663150b7a026200038862000165565b8786866040518563ffffffff1660e01b8152600401620003ac949392919062000632565b602060405180830381600087803b158015620003c757600080fd5b505af1925050508015620003fa575060408051601f3d908101601f19168201909252620003f79181019062000601565b60015b6200045a573d8080156200042b576040519150601f19603f3d011682016040523d82523d6000602084013e62000430565b606091505b508051620004525760405162461bcd60e51b81526004016200024f90620006d6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905062000479565b5060015b949350505050565b6000818152600260205260409020546001600160a01b031615155b919050565b620004b98383836200025860201b620009211760201c565b6122a581111580620004e757506008546000828152601060205260409020544291620004e59162000794565b105b620002585760405162461bcd60e51b81526004016200024f90620006ab565b3b151590565b8280546200051a90620007af565b90600052602060002090601f0160209004810192826200053e576000855562000589565b82601f106200055957805160ff191683800117855562000589565b8280016001018555821562000589579182015b82811115620005895782518255916020019190600101906200056c565b50620005979291506200059b565b5090565b5b808211156200059757600081556001016200059c565b80516001600160a01b03811681146200049c57600080fd5b60008060408385031215620005dd578182fd5b620005e883620005b2565b9150620005f860208401620005b2565b90509250929050565b60006020828403121562000613578081fd5b81516001600160e01b0319811681146200062b578182fd5b9392505050565b600060018060a01b0380871683526020818716818501528560408501526080606085015284519150816080850152825b82811015620006805785810182015185820160a00152810162000662565b8281111562000692578360a084870101525b5050601f01601f19169190910160a00195945050505050565b6020808252601190820152704e6f74207472616e7366657261626c652160781b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b60008219821115620007aa57620007aa6200080a565b500190565b600281046001821680620007c457607f821691505b60208210811415620007e657634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200080357620008036200080a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b612cfc80620008306000396000f3fe60806040526004361061023d5760003560e01c8063819b25ba1161012f578063be9dc24d116100b1578063be9dc24d146105f8578063c33a168f14610618578063c721b34b14610638578063c87b56dd14610658578063cb14f61914610678578063e17b25af1461068d578063e985e9c5146106ad578063f1761007146106cd578063f2fde38b146106ed578063f77aed161461070d578063f7a129681461072d578063f7ef8525146107425761023d565b8063819b25ba146104c557806387f8b836146104d8578063888d84da146104f85780638b8ae627146105185780638da5cb5b1461052b57806395d89b41146105405780639f29572f14610555578063a22cb46514610583578063a44b47f7146105a3578063a7d860eb146105b8578063b88d4fde146105d85761023d565b806342842e0e116101c357806342842e0e1461039f5780634e71d92d146103bf57806350f32cb3146103c757806356676a59146103dc57806356f427f9146103f15780635832d5b6146104115780635ce2db00146104265780635e1e10041461043b5780636352211e1461045b57806370a082311461047b578063715018a61461049b5780637b62417d146104b05761023d565b8063011ad3c71461024257806301ffc9a71461026d57806306fdde031461029a578063081812fc146102bc578063095ea7b3146102e95780630ff4934e1461030b57806318160ddd1461032057806323b872dd146103355780632508c8e81461035557806328d7b2761461036a5780633c5e8a251461038a575b600080fd5b34801561024e57600080fd5b50610257610762565b60405161026491906124c8565b60405180910390f35b34801561027957600080fd5b5061028d610288366004612289565b610768565b60405161026491906124bd565b3480156102a657600080fd5b506102af6107b0565b60405161026491906124d1565b3480156102c857600080fd5b506102dc6102d7366004612271565b610842565b60405161026491906123f0565b3480156102f557600080fd5b50610309610304366004612210565b61088e565b005b34801561031757600080fd5b5061028d610926565b34801561032c57600080fd5b50610257610936565b34801561034157600080fd5b506103096103503660046120a0565b61093c565b34801561036157600080fd5b50610257610974565b34801561037657600080fd5b50610309610385366004612271565b61097a565b34801561039657600080fd5b506102dc6109be565b3480156103ab57600080fd5b506103096103ba3660046120a0565b6109cd565b6103096109e8565b3480156103d357600080fd5b5061028d610b37565b3480156103e857600080fd5b50610257610b47565b3480156103fd57600080fd5b5061030961040c366004612210565b610b4d565b34801561041d57600080fd5b506102dc610c3b565b34801561043257600080fd5b5061028d610c4a565b34801561044757600080fd5b50610309610456366004612054565b610c5a565b34801561046757600080fd5b506102dc610476366004612271565b610cbb565b34801561048757600080fd5b50610257610496366004612054565b610cf0565b3480156104a757600080fd5b50610309610d34565b3480156104bc57600080fd5b50610257610d7f565b6103096104d3366004612271565b610d85565b3480156104e457600080fd5b506103096104f3366004612239565b610efd565b34801561050457600080fd5b5061028d6105133660046121b3565b610f5a565b61030961052636600461234c565b610f9e565b34801561053757600080fd5b506102dc6111f0565b34801561054c57600080fd5b506102af6111ff565b34801561056157600080fd5b50610575610570366004612054565b61120e565b6040516102649291906123e2565b34801561058f57600080fd5b5061030961059e36600461217d565b61129f565b3480156105af57600080fd5b5061025761136d565b3480156105c457600080fd5b506103096105d3366004612372565b611373565b3480156105e457600080fd5b506103096105f33660046120db565b6113cc565b34801561060457600080fd5b5061030961061336600461232a565b611405565b34801561062457600080fd5b50610309610633366004612271565b6114ea565b34801561064457600080fd5b50610309610653366004612054565b61152e565b34801561066457600080fd5b506102af610673366004612271565b61158f565b34801561068457600080fd5b506102dc611642565b34801561069957600080fd5b506103096106a8366004612054565b611651565b3480156106b957600080fd5b5061028d6106c836600461206e565b6116b2565b3480156106d957600080fd5b506103096106e8366004612239565b6116e2565b3480156106f957600080fd5b50610309610708366004612054565b61173f565b34801561071957600080fd5b50610309610728366004612271565b6117b0565b34801561073957600080fd5b506102576117f4565b34801561074e57600080fd5b5061030961075d366004612239565b6117fa565b600a5481565b60006001600160e01b031982166380ac58cd60e01b148061079957506001600160e01b03198216635b5e139f60e01b145b806107a857506107a882611877565b90505b919050565b6060600080546107bf90612c20565b80601f01602080910402602001604051908101604052809291908181526020018280546107eb90612c20565b80156108385780601f1061080d57610100808354040283529160200191610838565b820191906000526020600020905b81548152906001019060200180831161081b57829003601f168201915b5050505050905090565b600061084d82611890565b6108725760405162461bcd60e51b815260040161086990612928565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061089982610cbb565b9050806001600160a01b0316836001600160a01b031614156108cd5760405162461bcd60e51b815260040161086990612a70565b806001600160a01b03166108df6118ad565b6001600160a01b031614806108fb57506108fb816106c86118ad565b6109175760405162461bcd60e51b8152600401610869906127aa565b61092183836118b1565b505050565b600f54600160b01b900460ff1681565b60095490565b61094d6109476118ad565b8261191f565b6109695760405162461bcd60e51b815260040161086990612ab1565b6109218383836119a4565b60085481565b6109826118ad565b6001600160a01b03166109936111f0565b6001600160a01b0316146109b95760405162461bcd60e51b815260040161086990612974565b600c55565b600e546001600160a01b031681565b610921838383604051806020016040528060008152506113cc565b333214610a075760405162461bcd60e51b81526004016108699061262e565b3360009081526016602090815260408083205460149092529091205411610a405760405162461bcd60e51b81526004016108699061253d565b336000908152601560205260409020544290610a60906212750090612ba6565b11610a7d5760405162461bcd60e51b815260040161086990612a1e565b60006009546001610a8e9190612ba6565b3360009081526016602090815260408083205460149092528220549293509091610ab89190612bdd565b905080600b6000828254610acc9190612bdd565b925050819055508060096000828254610ae59190612ba6565b909155505033600090815260146020908152604080832054601683528184205560159091528120555b6009548211610b3357610b213383611ad1565b81610b2b81612c5b565b925050610b0e565b5050565b600f54600160a01b900460ff1681565b600c5481565b60006009546001610b5e9190612ba6565b600954909150610b6e9083611aee565b600955600f54600160b01b900460ff16610b9a5760405162461bcd60e51b81526004016108699061268c565b816000108015610bab575060038211155b610bc75760405162461bcd60e51b815260040161086990612895565b620aa2896009541115610bec5760405162461bcd60e51b8152600401610869906124e4565b600f546001600160a01b03163314610c165760405162461bcd60e51b815260040161086990612a47565b600954811161092157610c298382611ad1565b80610c3381612c5b565b915050610c16565b600d546001600160a01b031681565b600f54600160a81b900460ff1681565b610c626118ad565b6001600160a01b0316610c736111f0565b6001600160a01b031614610c995760405162461bcd60e51b815260040161086990612974565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260408120546001600160a01b0316806107a85760405162461bcd60e51b81526004016108699061284c565b60006001600160a01b038216610d185760405162461bcd60e51b815260040161086990612802565b506001600160a01b031660009081526003602052604090205490565b610d3c6118ad565b6001600160a01b0316610d4d6111f0565b6001600160a01b031614610d735760405162461bcd60e51b815260040161086990612974565b610d7d6000611b01565b565b60075481565b33600090815260146020526040902054610d9f9082611aee565b33600090815260146020526040902055600b54610dbc9082611aee565b600b553360008181526015602052604090204290553214610def5760405162461bcd60e51b81526004016108699061262e565b600f54600160a81b900460ff16610e185760405162461bcd60e51b81526004016108699061268c565b6122a5600b54600954610e2b9190612ba6565b1115610e495760405162461bcd60e51b8152600401610869906124e4565b806000108015610e69575034610e6666f523226980800083611b53565b11155b610e855760405162461bcd60e51b815260040161086990612b02565b6007548111158015610ea857506007543360009081526014602052604090205411155b610ec45760405162461bcd60e51b815260040161086990612776565b600d546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610b33573d6000803e3d6000fd5b610f056118ad565b6001600160a01b0316610f166111f0565b6001600160a01b031614610f3c5760405162461bcd60e51b815260040161086990612974565b600f8054911515600160a01b0260ff60a01b19909216919091179055565b6000808484604051602001610f70929190612441565b604051602081830303815290604052805190602001209050610f9583600c5483611b5f565b95945050505050565b60006009546001610faf9190612ba6565b9050610fcd83610fc0576000610fc3565b60015b859060ff16611aee565b60096000828254610fde9190612ba6565b90915550503332146110025760405162461bcd60e51b81526004016108699061262e565b600f54600160a01b900460ff1661102b5760405162461bcd60e51b81526004016108699061268c565b6122a5600954111561104f5760405162461bcd60e51b8152600401610869906124e4565b836000108015611060575060028411155b61107c5760405162461bcd60e51b8152600401610869906128fc565b604051634446c26d60e11b8152309063888d84da906110a39033908790879060040161245c565b60206040518083038186803b1580156110bb57600080fd5b505afa1580156110cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f39190612255565b61110f5760405162461bcd60e51b815260040161086990612567565b3360009081526013602052604090205460ff161561113f5760405162461bcd60e51b8152600401610869906129f2565b3461115166b1a2bc2ec5000086611b53565b111561116f5760405162461bcd60e51b815260040161086990612b02565b33600090815260136020526040808220805460ff19166001179055600d5490516001600160a01b0391909116913480156108fc02929091818181858888f193505050501580156111c3573d6000803e3d6000fd5b505b60095481116111ea576111d83382611ad1565b806111e281612c5b565b9150506111c5565b50505050565b6006546001600160a01b031690565b6060600180546107bf90612c20565b6001600160a01b0381166000908152601660209081526040808320546014909252822054829182916112409190612bdd565b6001600160a01b03851660009081526014602052604081205460075492935090911161126d576000611293565b6001600160a01b0385166000908152601460205260409020546007546112939190612bdd565b91935090915050915091565b6112a76118ad565b6001600160a01b0316826001600160a01b031614156112d85760405162461bcd60e51b8152600401610869906126f7565b80600560006112e56118ad565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556113296118ad565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161136191906124bd565b60405180910390a35050565b60095481565b600f546001600160a01b0316331461139d5760405162461bcd60e51b815260040161086990612a47565b60009182526011602052604090912080546001600160901b03166001600160901b031992909216919091179055565b6113dd6113d76118ad565b8361191f565b6113f95760405162461bcd60e51b815260040161086990612ab1565b6111ea84848484611c1a565b61140d6118ad565b6001600160a01b031661141e6111f0565b6001600160a01b0316146114445760405162461bcd60e51b815260040161086990612974565b600060095460016114559190612ba6565b905082600960008282546114699190612ba6565b9250508190555082600a60008282546114829190612ba6565b9091555050821580159061149957506045600a5411155b80156114a957506122a560095411155b6114c55760405162461bcd60e51b8152600401610869906124e4565b6009548111610921576114d88282611ad1565b806114e281612c5b565b9150506114c5565b6114f26118ad565b6001600160a01b03166115036111f0565b6001600160a01b0316146115295760405162461bcd60e51b815260040161086990612974565b600855565b6115366118ad565b6001600160a01b03166115476111f0565b6001600160a01b03161461156d5760405162461bcd60e51b815260040161086990612974565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600e5460008281526011602090815260408083205460085460109093529220546060936001600160a01b03169263f21d165492869242916115cf91612ba6565b116040518463ffffffff1660e01b81526004016115ee93929190612b2f565b60006040518083038186803b15801561160657600080fd5b505afa15801561161a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107a891908101906122c1565b600f546001600160a01b031681565b6116596118ad565b6001600160a01b031661166a6111f0565b6001600160a01b0316146116905760405162461bcd60e51b815260040161086990612974565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0380831660009081526005602090815260408083209385168352929052205460ff165b92915050565b6116ea6118ad565b6001600160a01b03166116fb6111f0565b6001600160a01b0316146117215760405162461bcd60e51b815260040161086990612974565b600f8054911515600160a81b0260ff60a81b19909216919091179055565b6117476118ad565b6001600160a01b03166117586111f0565b6001600160a01b03161461177e5760405162461bcd60e51b815260040161086990612974565b6001600160a01b0381166117a45760405162461bcd60e51b8152600401610869906125e8565b6117ad81611b01565b50565b6117b86118ad565b6001600160a01b03166117c96111f0565b6001600160a01b0316146117ef5760405162461bcd60e51b815260040161086990612974565b600755565b600b5481565b6118026118ad565b6001600160a01b03166118136111f0565b6001600160a01b0316146118395760405162461bcd60e51b815260040161086990612974565b600f8054911515600160b01b0260ff60b01b19909216919091179055565b610b33828260405180602001604052806000815250611c4d565b3b151590565b6001600160e01b031981166301ffc9a760e01b14919050565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118e682610cbb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061192a82611890565b6119465760405162461bcd60e51b81526004016108699061272a565b600061195183610cbb565b9050806001600160a01b0316846001600160a01b0316148061198c5750836001600160a01b031661198184610842565b6001600160a01b0316145b8061199c575061199c81856116b2565b949350505050565b826001600160a01b03166119b782610cbb565b6001600160a01b0316146119dd5760405162461bcd60e51b8152600401610869906129a9565b6001600160a01b038216611a035760405162461bcd60e51b8152600401610869906126b3565b611a0e838383611c80565b611a196000826118b1565b6001600160a01b0383166000908152600360205260408120805460019290611a42908490612bdd565b90915550506001600160a01b0382166000908152600360205260408120805460019290611a70908490612ba6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611ae481611adf8384611cd2565b611d8e565b610b338282611857565b6000611afa8284612ba6565b9392505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000611afa8284612bbe565b600081815b8551811015611c0f576000868281518110611b8f57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311611bd0578281604051602001611bb39291906123e2565b604051602081830303815290604052805190602001209250611bfc565b8083604051602001611be39291906123e2565b6040516020818303038152906040528051906020012092505b5080611c0781612c5b565b915050611b64565b509092149392505050565b611c258484846119a4565b611c3184848484611dc2565b6111ea5760405162461bcd60e51b815260040161086990612596565b611c578383611edd565b611c646000848484611dc2565b6109215760405162461bcd60e51b815260040161086990612596565b611c8b838383610921565b6122a581111580611cb657506008546000828152601060205260409020544291611cb491612ba6565b105b6109215760405162461bcd60e51b815260040161086990612512565b600e54604051634a7dd52360e01b8152600091829182916001600160a01b031690634a7dd52390611d079087906004016124c8565b604080518083038186803b158015611d1e57600080fd5b505afa158015611d32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d569190612393565b600081815260126020526040902054919350915060ff1615611d8557611d7c8583611cd2565b925050506116dc565b91506116dc9050565b600091825260106020908152604080842042905560118252808420839055918352601290529020805460ff19166001179055565b6000611dd6846001600160a01b0316611871565b15611ed257836001600160a01b031663150b7a02611df26118ad565b8786866040518563ffffffff1660e01b8152600401611e149493929190612404565b602060405180830381600087803b158015611e2e57600080fd5b505af1925050508015611e5e575060408051601f3d908101601f19168201909252611e5b918101906122a5565b60015b611eb8573d808015611e8c576040519150601f19603f3d011682016040523d82523d6000602084013e611e91565b606091505b508051611eb05760405162461bcd60e51b815260040161086990612596565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061199c565b506001949350505050565b6001600160a01b038216611f035760405162461bcd60e51b8152600401610869906128c7565b611f0c81611890565b15611f295760405162461bcd60e51b815260040161086990612655565b611f3560008383611c80565b6001600160a01b0382166000908152600360205260408120805460019290611f5e908490612ba6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80356001600160a01b03811681146107ab57600080fd5b600082601f830112611fe3578081fd5b813560206001600160401b03821115611ffe57611ffe612c8c565b80820261200c828201612b56565b838152828101908684018388018501891015612026578687fd5b8693505b8584101561204857803583526001939093019291840191840161202a565b50979650505050505050565b600060208284031215612065578081fd5b611afa82611fbc565b60008060408385031215612080578081fd5b61208983611fbc565b915061209760208401611fbc565b90509250929050565b6000806000606084860312156120b4578081fd5b6120bd84611fbc565b92506120cb60208501611fbc565b9150604084013590509250925092565b600080600080608085870312156120f0578081fd5b6120f985611fbc565b935061210760208601611fbc565b92506040850135915060608501356001600160401b03811115612128578182fd5b8501601f81018713612138578182fd5b803561214b61214682612b7f565b612b56565b81815288602083850101111561215f578384fd5b81602084016020830137908101602001929092525092959194509250565b6000806040838503121561218f578182fd5b61219883611fbc565b915060208301356121a881612ca2565b809150509250929050565b6000806000606084860312156121c7578283fd5b6121d084611fbc565b925060208401356121e081612ca2565b915060408401356001600160401b038111156121fa578182fd5b61220686828701611fd3565b9150509250925092565b60008060408385031215612222578182fd5b61222b83611fbc565b946020939093013593505050565b60006020828403121561224a578081fd5b8135611afa81612ca2565b600060208284031215612266578081fd5b8151611afa81612ca2565b600060208284031215612282578081fd5b5035919050565b60006020828403121561229a578081fd5b8135611afa81612cb0565b6000602082840312156122b6578081fd5b8151611afa81612cb0565b6000602082840312156122d2578081fd5b81516001600160401b038111156122e7578182fd5b8201601f810184136122f7578182fd5b805161230561214682612b7f565b818152856020838501011115612319578384fd5b610f95826020830160208601612bf4565b6000806040838503121561233c578182fd5b8235915061209760208401611fbc565b600080600060608486031215612360578081fd5b8335925060208401356121e081612ca2565b60008060408385031215612384578182fd5b50508035926020909101359150565b600080604083850312156123a5578182fd5b505080516020909101519092909150565b600081518084526123ce816020860160208601612bf4565b601f01601f19169290920160200192915050565b918252602082015260400190565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612437908301846123b6565b9695505050505050565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03841681528215156020808301919091526060604083018190528351908301819052600091848101916080850190845b818110156124af57845183529383019391830191600101612493565b509098975050505050505050565b901515815260200190565b90815260200190565b600060208252611afa60208301846123b6565b60208082526014908201527345786365656420746f74616c20737570706c792160601b604082015260600190565b6020808252601190820152704e6f74207472616e7366657261626c652160781b604082015260600190565b60208082526010908201526f416c726561647920636c61696d65642160801b604082015260600190565b6020808252601590820152744e6f74206f6e207468652077686974656c6973742160581b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600d908201526c4e6f7420612077616c6c65742160981b604082015260600190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600d908201526c4e6f74206f70656e207965742160981b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252601a90820152794578636565642061646472657373206c696d69746174696f6e2160301b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776040820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b602080825260189082015277457863656564206261746368206c696d69746174696f6e2160401b604082015260600190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b602080825260129082015271457863656564206c696d69746174696f6e2160701b604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b60208082526012908201527150726f6d6f74696f6e206973206f7665722160701b604082015260600190565b6020808252600f908201526e4578706972656420636c61696d732160881b604082015260600190565b6020808252600f908201526e4e6f7420617574686f72697a65642160881b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260139082015272496e73756666696369656e742066756e64732160681b604082015260600190565b92835260208301919091521515604082015260806060820181905260009082015260a00190565b6040518181016001600160401b0381118282101715612b7757612b77612c8c565b604052919050565b60006001600160401b03821115612b9857612b98612c8c565b50601f01601f191660200190565b60008219821115612bb957612bb9612c76565b500190565b6000816000190483118215151615612bd857612bd8612c76565b500290565b600082821015612bef57612bef612c76565b500390565b60005b83811015612c0f578181015183820152602001612bf7565b838111156111ea5750506000910152565b600281046001821680612c3457607f821691505b60208210811415612c5557634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612c6f57612c6f612c76565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146117ad57600080fd5b6001600160e01b0319811681146117ad57600080fdfea264697066735822122046bc1dcb2a53685c355a0515dce2a44522db05d04b6b3255a781ef25dd1e55eb64736f6c63430008000033000000000000000000000000ca3f738b068db8a260ce738278daaf72a05fdc0800000000000000000000000001ada506b3ce4874f6443c4d0dd2eb35002097c7

Deployed Bytecode

0x60806040526004361061023d5760003560e01c8063819b25ba1161012f578063be9dc24d116100b1578063be9dc24d146105f8578063c33a168f14610618578063c721b34b14610638578063c87b56dd14610658578063cb14f61914610678578063e17b25af1461068d578063e985e9c5146106ad578063f1761007146106cd578063f2fde38b146106ed578063f77aed161461070d578063f7a129681461072d578063f7ef8525146107425761023d565b8063819b25ba146104c557806387f8b836146104d8578063888d84da146104f85780638b8ae627146105185780638da5cb5b1461052b57806395d89b41146105405780639f29572f14610555578063a22cb46514610583578063a44b47f7146105a3578063a7d860eb146105b8578063b88d4fde146105d85761023d565b806342842e0e116101c357806342842e0e1461039f5780634e71d92d146103bf57806350f32cb3146103c757806356676a59146103dc57806356f427f9146103f15780635832d5b6146104115780635ce2db00146104265780635e1e10041461043b5780636352211e1461045b57806370a082311461047b578063715018a61461049b5780637b62417d146104b05761023d565b8063011ad3c71461024257806301ffc9a71461026d57806306fdde031461029a578063081812fc146102bc578063095ea7b3146102e95780630ff4934e1461030b57806318160ddd1461032057806323b872dd146103355780632508c8e81461035557806328d7b2761461036a5780633c5e8a251461038a575b600080fd5b34801561024e57600080fd5b50610257610762565b60405161026491906124c8565b60405180910390f35b34801561027957600080fd5b5061028d610288366004612289565b610768565b60405161026491906124bd565b3480156102a657600080fd5b506102af6107b0565b60405161026491906124d1565b3480156102c857600080fd5b506102dc6102d7366004612271565b610842565b60405161026491906123f0565b3480156102f557600080fd5b50610309610304366004612210565b61088e565b005b34801561031757600080fd5b5061028d610926565b34801561032c57600080fd5b50610257610936565b34801561034157600080fd5b506103096103503660046120a0565b61093c565b34801561036157600080fd5b50610257610974565b34801561037657600080fd5b50610309610385366004612271565b61097a565b34801561039657600080fd5b506102dc6109be565b3480156103ab57600080fd5b506103096103ba3660046120a0565b6109cd565b6103096109e8565b3480156103d357600080fd5b5061028d610b37565b3480156103e857600080fd5b50610257610b47565b3480156103fd57600080fd5b5061030961040c366004612210565b610b4d565b34801561041d57600080fd5b506102dc610c3b565b34801561043257600080fd5b5061028d610c4a565b34801561044757600080fd5b50610309610456366004612054565b610c5a565b34801561046757600080fd5b506102dc610476366004612271565b610cbb565b34801561048757600080fd5b50610257610496366004612054565b610cf0565b3480156104a757600080fd5b50610309610d34565b3480156104bc57600080fd5b50610257610d7f565b6103096104d3366004612271565b610d85565b3480156104e457600080fd5b506103096104f3366004612239565b610efd565b34801561050457600080fd5b5061028d6105133660046121b3565b610f5a565b61030961052636600461234c565b610f9e565b34801561053757600080fd5b506102dc6111f0565b34801561054c57600080fd5b506102af6111ff565b34801561056157600080fd5b50610575610570366004612054565b61120e565b6040516102649291906123e2565b34801561058f57600080fd5b5061030961059e36600461217d565b61129f565b3480156105af57600080fd5b5061025761136d565b3480156105c457600080fd5b506103096105d3366004612372565b611373565b3480156105e457600080fd5b506103096105f33660046120db565b6113cc565b34801561060457600080fd5b5061030961061336600461232a565b611405565b34801561062457600080fd5b50610309610633366004612271565b6114ea565b34801561064457600080fd5b50610309610653366004612054565b61152e565b34801561066457600080fd5b506102af610673366004612271565b61158f565b34801561068457600080fd5b506102dc611642565b34801561069957600080fd5b506103096106a8366004612054565b611651565b3480156106b957600080fd5b5061028d6106c836600461206e565b6116b2565b3480156106d957600080fd5b506103096106e8366004612239565b6116e2565b3480156106f957600080fd5b50610309610708366004612054565b61173f565b34801561071957600080fd5b50610309610728366004612271565b6117b0565b34801561073957600080fd5b506102576117f4565b34801561074e57600080fd5b5061030961075d366004612239565b6117fa565b600a5481565b60006001600160e01b031982166380ac58cd60e01b148061079957506001600160e01b03198216635b5e139f60e01b145b806107a857506107a882611877565b90505b919050565b6060600080546107bf90612c20565b80601f01602080910402602001604051908101604052809291908181526020018280546107eb90612c20565b80156108385780601f1061080d57610100808354040283529160200191610838565b820191906000526020600020905b81548152906001019060200180831161081b57829003601f168201915b5050505050905090565b600061084d82611890565b6108725760405162461bcd60e51b815260040161086990612928565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061089982610cbb565b9050806001600160a01b0316836001600160a01b031614156108cd5760405162461bcd60e51b815260040161086990612a70565b806001600160a01b03166108df6118ad565b6001600160a01b031614806108fb57506108fb816106c86118ad565b6109175760405162461bcd60e51b8152600401610869906127aa565b61092183836118b1565b505050565b600f54600160b01b900460ff1681565b60095490565b61094d6109476118ad565b8261191f565b6109695760405162461bcd60e51b815260040161086990612ab1565b6109218383836119a4565b60085481565b6109826118ad565b6001600160a01b03166109936111f0565b6001600160a01b0316146109b95760405162461bcd60e51b815260040161086990612974565b600c55565b600e546001600160a01b031681565b610921838383604051806020016040528060008152506113cc565b333214610a075760405162461bcd60e51b81526004016108699061262e565b3360009081526016602090815260408083205460149092529091205411610a405760405162461bcd60e51b81526004016108699061253d565b336000908152601560205260409020544290610a60906212750090612ba6565b11610a7d5760405162461bcd60e51b815260040161086990612a1e565b60006009546001610a8e9190612ba6565b3360009081526016602090815260408083205460149092528220549293509091610ab89190612bdd565b905080600b6000828254610acc9190612bdd565b925050819055508060096000828254610ae59190612ba6565b909155505033600090815260146020908152604080832054601683528184205560159091528120555b6009548211610b3357610b213383611ad1565b81610b2b81612c5b565b925050610b0e565b5050565b600f54600160a01b900460ff1681565b600c5481565b60006009546001610b5e9190612ba6565b600954909150610b6e9083611aee565b600955600f54600160b01b900460ff16610b9a5760405162461bcd60e51b81526004016108699061268c565b816000108015610bab575060038211155b610bc75760405162461bcd60e51b815260040161086990612895565b620aa2896009541115610bec5760405162461bcd60e51b8152600401610869906124e4565b600f546001600160a01b03163314610c165760405162461bcd60e51b815260040161086990612a47565b600954811161092157610c298382611ad1565b80610c3381612c5b565b915050610c16565b600d546001600160a01b031681565b600f54600160a81b900460ff1681565b610c626118ad565b6001600160a01b0316610c736111f0565b6001600160a01b031614610c995760405162461bcd60e51b815260040161086990612974565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600260205260408120546001600160a01b0316806107a85760405162461bcd60e51b81526004016108699061284c565b60006001600160a01b038216610d185760405162461bcd60e51b815260040161086990612802565b506001600160a01b031660009081526003602052604090205490565b610d3c6118ad565b6001600160a01b0316610d4d6111f0565b6001600160a01b031614610d735760405162461bcd60e51b815260040161086990612974565b610d7d6000611b01565b565b60075481565b33600090815260146020526040902054610d9f9082611aee565b33600090815260146020526040902055600b54610dbc9082611aee565b600b553360008181526015602052604090204290553214610def5760405162461bcd60e51b81526004016108699061262e565b600f54600160a81b900460ff16610e185760405162461bcd60e51b81526004016108699061268c565b6122a5600b54600954610e2b9190612ba6565b1115610e495760405162461bcd60e51b8152600401610869906124e4565b806000108015610e69575034610e6666f523226980800083611b53565b11155b610e855760405162461bcd60e51b815260040161086990612b02565b6007548111158015610ea857506007543360009081526014602052604090205411155b610ec45760405162461bcd60e51b815260040161086990612776565b600d546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610b33573d6000803e3d6000fd5b610f056118ad565b6001600160a01b0316610f166111f0565b6001600160a01b031614610f3c5760405162461bcd60e51b815260040161086990612974565b600f8054911515600160a01b0260ff60a01b19909216919091179055565b6000808484604051602001610f70929190612441565b604051602081830303815290604052805190602001209050610f9583600c5483611b5f565b95945050505050565b60006009546001610faf9190612ba6565b9050610fcd83610fc0576000610fc3565b60015b859060ff16611aee565b60096000828254610fde9190612ba6565b90915550503332146110025760405162461bcd60e51b81526004016108699061262e565b600f54600160a01b900460ff1661102b5760405162461bcd60e51b81526004016108699061268c565b6122a5600954111561104f5760405162461bcd60e51b8152600401610869906124e4565b836000108015611060575060028411155b61107c5760405162461bcd60e51b8152600401610869906128fc565b604051634446c26d60e11b8152309063888d84da906110a39033908790879060040161245c565b60206040518083038186803b1580156110bb57600080fd5b505afa1580156110cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f39190612255565b61110f5760405162461bcd60e51b815260040161086990612567565b3360009081526013602052604090205460ff161561113f5760405162461bcd60e51b8152600401610869906129f2565b3461115166b1a2bc2ec5000086611b53565b111561116f5760405162461bcd60e51b815260040161086990612b02565b33600090815260136020526040808220805460ff19166001179055600d5490516001600160a01b0391909116913480156108fc02929091818181858888f193505050501580156111c3573d6000803e3d6000fd5b505b60095481116111ea576111d83382611ad1565b806111e281612c5b565b9150506111c5565b50505050565b6006546001600160a01b031690565b6060600180546107bf90612c20565b6001600160a01b0381166000908152601660209081526040808320546014909252822054829182916112409190612bdd565b6001600160a01b03851660009081526014602052604081205460075492935090911161126d576000611293565b6001600160a01b0385166000908152601460205260409020546007546112939190612bdd565b91935090915050915091565b6112a76118ad565b6001600160a01b0316826001600160a01b031614156112d85760405162461bcd60e51b8152600401610869906126f7565b80600560006112e56118ad565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556113296118ad565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161136191906124bd565b60405180910390a35050565b60095481565b600f546001600160a01b0316331461139d5760405162461bcd60e51b815260040161086990612a47565b60009182526011602052604090912080546001600160901b03166001600160901b031992909216919091179055565b6113dd6113d76118ad565b8361191f565b6113f95760405162461bcd60e51b815260040161086990612ab1565b6111ea84848484611c1a565b61140d6118ad565b6001600160a01b031661141e6111f0565b6001600160a01b0316146114445760405162461bcd60e51b815260040161086990612974565b600060095460016114559190612ba6565b905082600960008282546114699190612ba6565b9250508190555082600a60008282546114829190612ba6565b9091555050821580159061149957506045600a5411155b80156114a957506122a560095411155b6114c55760405162461bcd60e51b8152600401610869906124e4565b6009548111610921576114d88282611ad1565b806114e281612c5b565b9150506114c5565b6114f26118ad565b6001600160a01b03166115036111f0565b6001600160a01b0316146115295760405162461bcd60e51b815260040161086990612974565b600855565b6115366118ad565b6001600160a01b03166115476111f0565b6001600160a01b03161461156d5760405162461bcd60e51b815260040161086990612974565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600e5460008281526011602090815260408083205460085460109093529220546060936001600160a01b03169263f21d165492869242916115cf91612ba6565b116040518463ffffffff1660e01b81526004016115ee93929190612b2f565b60006040518083038186803b15801561160657600080fd5b505afa15801561161a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107a891908101906122c1565b600f546001600160a01b031681565b6116596118ad565b6001600160a01b031661166a6111f0565b6001600160a01b0316146116905760405162461bcd60e51b815260040161086990612974565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0380831660009081526005602090815260408083209385168352929052205460ff165b92915050565b6116ea6118ad565b6001600160a01b03166116fb6111f0565b6001600160a01b0316146117215760405162461bcd60e51b815260040161086990612974565b600f8054911515600160a81b0260ff60a81b19909216919091179055565b6117476118ad565b6001600160a01b03166117586111f0565b6001600160a01b03161461177e5760405162461bcd60e51b815260040161086990612974565b6001600160a01b0381166117a45760405162461bcd60e51b8152600401610869906125e8565b6117ad81611b01565b50565b6117b86118ad565b6001600160a01b03166117c96111f0565b6001600160a01b0316146117ef5760405162461bcd60e51b815260040161086990612974565b600755565b600b5481565b6118026118ad565b6001600160a01b03166118136111f0565b6001600160a01b0316146118395760405162461bcd60e51b815260040161086990612974565b600f8054911515600160b01b0260ff60b01b19909216919091179055565b610b33828260405180602001604052806000815250611c4d565b3b151590565b6001600160e01b031981166301ffc9a760e01b14919050565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118e682610cbb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061192a82611890565b6119465760405162461bcd60e51b81526004016108699061272a565b600061195183610cbb565b9050806001600160a01b0316846001600160a01b0316148061198c5750836001600160a01b031661198184610842565b6001600160a01b0316145b8061199c575061199c81856116b2565b949350505050565b826001600160a01b03166119b782610cbb565b6001600160a01b0316146119dd5760405162461bcd60e51b8152600401610869906129a9565b6001600160a01b038216611a035760405162461bcd60e51b8152600401610869906126b3565b611a0e838383611c80565b611a196000826118b1565b6001600160a01b0383166000908152600360205260408120805460019290611a42908490612bdd565b90915550506001600160a01b0382166000908152600360205260408120805460019290611a70908490612ba6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611ae481611adf8384611cd2565b611d8e565b610b338282611857565b6000611afa8284612ba6565b9392505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000611afa8284612bbe565b600081815b8551811015611c0f576000868281518110611b8f57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311611bd0578281604051602001611bb39291906123e2565b604051602081830303815290604052805190602001209250611bfc565b8083604051602001611be39291906123e2565b6040516020818303038152906040528051906020012092505b5080611c0781612c5b565b915050611b64565b509092149392505050565b611c258484846119a4565b611c3184848484611dc2565b6111ea5760405162461bcd60e51b815260040161086990612596565b611c578383611edd565b611c646000848484611dc2565b6109215760405162461bcd60e51b815260040161086990612596565b611c8b838383610921565b6122a581111580611cb657506008546000828152601060205260409020544291611cb491612ba6565b105b6109215760405162461bcd60e51b815260040161086990612512565b600e54604051634a7dd52360e01b8152600091829182916001600160a01b031690634a7dd52390611d079087906004016124c8565b604080518083038186803b158015611d1e57600080fd5b505afa158015611d32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d569190612393565b600081815260126020526040902054919350915060ff1615611d8557611d7c8583611cd2565b925050506116dc565b91506116dc9050565b600091825260106020908152604080842042905560118252808420839055918352601290529020805460ff19166001179055565b6000611dd6846001600160a01b0316611871565b15611ed257836001600160a01b031663150b7a02611df26118ad565b8786866040518563ffffffff1660e01b8152600401611e149493929190612404565b602060405180830381600087803b158015611e2e57600080fd5b505af1925050508015611e5e575060408051601f3d908101601f19168201909252611e5b918101906122a5565b60015b611eb8573d808015611e8c576040519150601f19603f3d011682016040523d82523d6000602084013e611e91565b606091505b508051611eb05760405162461bcd60e51b815260040161086990612596565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061199c565b506001949350505050565b6001600160a01b038216611f035760405162461bcd60e51b8152600401610869906128c7565b611f0c81611890565b15611f295760405162461bcd60e51b815260040161086990612655565b611f3560008383611c80565b6001600160a01b0382166000908152600360205260408120805460019290611f5e908490612ba6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80356001600160a01b03811681146107ab57600080fd5b600082601f830112611fe3578081fd5b813560206001600160401b03821115611ffe57611ffe612c8c565b80820261200c828201612b56565b838152828101908684018388018501891015612026578687fd5b8693505b8584101561204857803583526001939093019291840191840161202a565b50979650505050505050565b600060208284031215612065578081fd5b611afa82611fbc565b60008060408385031215612080578081fd5b61208983611fbc565b915061209760208401611fbc565b90509250929050565b6000806000606084860312156120b4578081fd5b6120bd84611fbc565b92506120cb60208501611fbc565b9150604084013590509250925092565b600080600080608085870312156120f0578081fd5b6120f985611fbc565b935061210760208601611fbc565b92506040850135915060608501356001600160401b03811115612128578182fd5b8501601f81018713612138578182fd5b803561214b61214682612b7f565b612b56565b81815288602083850101111561215f578384fd5b81602084016020830137908101602001929092525092959194509250565b6000806040838503121561218f578182fd5b61219883611fbc565b915060208301356121a881612ca2565b809150509250929050565b6000806000606084860312156121c7578283fd5b6121d084611fbc565b925060208401356121e081612ca2565b915060408401356001600160401b038111156121fa578182fd5b61220686828701611fd3565b9150509250925092565b60008060408385031215612222578182fd5b61222b83611fbc565b946020939093013593505050565b60006020828403121561224a578081fd5b8135611afa81612ca2565b600060208284031215612266578081fd5b8151611afa81612ca2565b600060208284031215612282578081fd5b5035919050565b60006020828403121561229a578081fd5b8135611afa81612cb0565b6000602082840312156122b6578081fd5b8151611afa81612cb0565b6000602082840312156122d2578081fd5b81516001600160401b038111156122e7578182fd5b8201601f810184136122f7578182fd5b805161230561214682612b7f565b818152856020838501011115612319578384fd5b610f95826020830160208601612bf4565b6000806040838503121561233c578182fd5b8235915061209760208401611fbc565b600080600060608486031215612360578081fd5b8335925060208401356121e081612ca2565b60008060408385031215612384578182fd5b50508035926020909101359150565b600080604083850312156123a5578182fd5b505080516020909101519092909150565b600081518084526123ce816020860160208601612bf4565b601f01601f19169290920160200192915050565b918252602082015260400190565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612437908301846123b6565b9695505050505050565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03841681528215156020808301919091526060604083018190528351908301819052600091848101916080850190845b818110156124af57845183529383019391830191600101612493565b509098975050505050505050565b901515815260200190565b90815260200190565b600060208252611afa60208301846123b6565b60208082526014908201527345786365656420746f74616c20737570706c792160601b604082015260600190565b6020808252601190820152704e6f74207472616e7366657261626c652160781b604082015260600190565b60208082526010908201526f416c726561647920636c61696d65642160801b604082015260600190565b6020808252601590820152744e6f74206f6e207468652077686974656c6973742160581b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600d908201526c4e6f7420612077616c6c65742160981b604082015260600190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600d908201526c4e6f74206f70656e207965742160981b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252601a90820152794578636565642061646472657373206c696d69746174696f6e2160301b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776040820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b602080825260189082015277457863656564206261746368206c696d69746174696f6e2160401b604082015260600190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b602080825260129082015271457863656564206c696d69746174696f6e2160701b604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b60208082526012908201527150726f6d6f74696f6e206973206f7665722160701b604082015260600190565b6020808252600f908201526e4578706972656420636c61696d732160881b604082015260600190565b6020808252600f908201526e4e6f7420617574686f72697a65642160881b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260139082015272496e73756666696369656e742066756e64732160681b604082015260600190565b92835260208301919091521515604082015260806060820181905260009082015260a00190565b6040518181016001600160401b0381118282101715612b7757612b77612c8c565b604052919050565b60006001600160401b03821115612b9857612b98612c8c565b50601f01601f191660200190565b60008219821115612bb957612bb9612c76565b500190565b6000816000190483118215151615612bd857612bd8612c76565b500290565b600082821015612bef57612bef612c76565b500390565b60005b83811015612c0f578181015183820152602001612bf7565b838111156111ea5750506000910152565b600281046001821680612c3457607f821691505b60208210811415612c5557634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612c6f57612c6f612c76565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146117ad57600080fd5b6001600160e01b0319811681146117ad57600080fdfea264697066735822122046bc1dcb2a53685c355a0515dce2a44522db05d04b6b3255a781ef25dd1e55eb64736f6c63430008000033

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

000000000000000000000000ca3f738b068db8a260ce738278daaf72a05fdc0800000000000000000000000001ada506b3ce4874f6443c4d0dd2eb35002097c7

-----Decoded View---------------
Arg [0] : metadataAddress (address): 0xCA3F738b068Db8a260CE738278DAAf72a05fdc08
Arg [1] : paymentAddress (address): 0x01aDA506B3ce4874F6443c4d0DD2EB35002097c7

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ca3f738b068db8a260ce738278daaf72a05fdc08
Arg [1] : 00000000000000000000000001ada506b3ce4874f6443c4d0dd2eb35002097c7


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.