ETH Price: $3,198.67 (+2.05%)
Gas: 3 Gwei

Token

Shibuya Girls (SG)
 

Overview

Max Total Supply

1,836 SG

Holders

669

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
5 SG
0xd6bd8448426484a746529e2dda957f1c59b28ff4
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:
SmartContract

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : SmartContract.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";


contract SmartContract is ERC721Enumerable, Ownable {
  using Strings for uint256;

  string public baseURI;
  uint256 public cost = 0.08 ether;
  uint256 public maxSupply = 10000;
  uint256 public maxMintAmount = 5;
  uint256 public maxNftPerAddress = 5;

  mapping(address => uint256) public numberOfMints;

  uint256 public reserveAmount = 30;
  uint256 public amountReserved = 0;
  bool public reserved = false;


  bool public paused = false;

  address private _signerAddress = 0x236F922715d6CA84D56232abd1df938331DA5634;
  address private _advisorAddress = 0x5F058DCcffB7862566aBe44F85d409823F5ce921;

  constructor(
    string memory _name,
    string memory _symbol,
    string memory _initBaseURI
  ) ERC721(_name, _symbol) {
    setBaseURI(_initBaseURI);
  }

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

  function reserveSG() external onlyOwner {
    require(!reserved, "Reserved already");
    uint256 supply = totalSupply();
    require(supply + reserveAmount <= maxSupply, "Max Supply exceeded");
    for (uint256 i = 0; i < reserveAmount; i++) {
      _safeMint(msg.sender, supply + i);
      amountReserved++;
    }
    reserved = true;
  }

  function mint(uint256 _mintAmount, bytes memory _signature) external payable {
    require(!paused, "Minting is not active");
    uint256 supply = totalSupply();
    require(_mintAmount > 0, "At least one NFT needs to be minted");
    require(_mintAmount <= maxMintAmount, "Max mint amount exceeded");
    require(supply + _mintAmount + reserveAmount - amountReserved <= maxSupply, "Max Supply exceeded");
    require(numberOfMints[msg.sender] + _mintAmount <= maxNftPerAddress, "Max mint per wallet exceeded");
    require(verifySigner(msg.sender, _signature) == _signerAddress, "Direct mint is not allowed");
    if (msg.sender != owner()) {
      uint256 ownerTokenCount = balanceOf(msg.sender);
      require(ownerTokenCount <= maxNftPerAddress - _mintAmount, "Max NFT per address exceeded");
      require(msg.value >= cost * _mintAmount, "Insufficient funds");
    }

    for (uint256 i = 0; i < _mintAmount; i++) {
      numberOfMints[msg.sender]++;
      _safeMint(msg.sender, supply + i);
    }
  }
  
  function verifySigner(address wallet, bytes memory _signature) public pure returns (address) {
    bytes32 _hash = keccak256(abi.encodePacked(wallet));
    bytes32 _prefixedHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _hash));
    return ECDSA.recover(_prefixedHash, _signature);
  }

  function walletOfOwner(address _owner)
    public
    view
    returns (uint256[] memory)
  {
    uint256 ownerTokenCount = balanceOf(_owner);
    uint256[] memory tokenIds = new uint256[](ownerTokenCount);
    for (uint256 i; i < ownerTokenCount; i++) {
      tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
    }
    return tokenIds;
  }

  function numberOfMintsCount(address addr) external view returns (uint256) {
    return numberOfMints[addr];
  }

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

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

  function setMaxNftPerAddress(uint256 _limit) external onlyOwner() {
    maxNftPerAddress = _limit;
  }

  function setCost(uint256 _newCost) external onlyOwner() {
    cost = _newCost;
  }

  function setMaxMintAmount(uint256 _newmaxMintAmount) external onlyOwner() {
    maxMintAmount = _newmaxMintAmount;
  }

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

  function pause(bool _state) external onlyOwner {
    paused = _state;
  }

  function withdraw() external onlyOwner {
    payable(_advisorAddress).transfer(address(this).balance * 5 / 100);
    payable(msg.sender).transfer(address(this).balance);
  }

  function setSignerAddress(address addr) external onlyOwner {
    _signerAddress = addr;
  }

}

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

File 3 of 14 : 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 4 of 14 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 5 of 14 : 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 6 of 14 : 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 7 of 14 : 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 8 of 14 : 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 14 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 10 of 14 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_initBaseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"amountReserved","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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxNftPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numberOfMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"numberOfMintsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reserveSG","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newmaxMintAmount","type":"uint256"}],"name":"setMaxMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setMaxNftPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"verifySigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405267011c37937e080000600c55612710600d556005600e819055600f55601e60115560006012556013805475236f922715d6ca84d56232abd1df938331da563400006001600160b01b0319909116179055601480546001600160a01b031916735f058dccffb7862566abe44f85d409823f5ce9211790553480156200008757600080fd5b506040516200332838038062003328833981016040819052620000aa9162000328565b825183908390620000c3906000906020850190620001d7565b508051620000d9906001906020840190620001d7565b505050620000f6620000f06200010a60201b60201c565b6200010e565b620001018162000160565b5050506200043d565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200016a6200010a565b6001600160a01b03166200017d620001c8565b6001600160a01b031614620001af5760405162461bcd60e51b8152600401620001a690620003b5565b60405180910390fd5b8051620001c490600b906020840190620001d7565b5050565b600a546001600160a01b031690565b828054620001e590620003ea565b90600052602060002090601f01602090048101928262000209576000855562000254565b82601f106200022457805160ff191683800117855562000254565b8280016001018555821562000254579182015b828111156200025457825182559160200191906001019062000237565b506200026292915062000266565b5090565b5b8082111562000262576000815560010162000267565b600082601f8301126200028e578081fd5b81516001600160401b0380821115620002ab57620002ab62000427565b6040516020601f8401601f1916820181018381118382101715620002d357620002d362000427565b6040528382528584018101871015620002ea578485fd5b8492505b838310156200030d5785830181015182840182015291820191620002ee565b838311156200031e57848185840101525b5095945050505050565b6000806000606084860312156200033d578283fd5b83516001600160401b038082111562000354578485fd5b62000362878388016200027d565b9450602086015191508082111562000378578384fd5b62000386878388016200027d565b935060408601519150808211156200039c578283fd5b50620003ab868287016200027d565b9150509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600281046001821680620003ff57607f821691505b602082108114156200042157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b612edb806200044d6000396000f3fe6080604052600436106102465760003560e01c80634f6ccce71161013957806395d89b41116100b6578063db7fd4081161007a578063db7fd4081461065d578063e985e9c514610670578063ea0d8da414610690578063ebf17f44146106a5578063f2fde38b146106c5578063fe60d12c146106e557610246565b806395d89b41146105d3578063a22cb465146105e8578063b88d4fde14610608578063c87b56dd14610628578063d5abeb011461064857610246565b80636c0360eb116100fd5780636c0360eb1461055f57806370a0823114610574578063715018a614610594578063864fe6e8146105a95780638da5cb5b146105be57610246565b80634f6ccce7146104ca57806355f804b3146104ea5780635c975abb1461050a5780636352211e1461051f57806363b1abd81461053f57610246565b8063239c70ae116101c757806342842e0e1161018b57806342842e0e14610433578063438b63001461045357806344a0d68a1461048057806347a3320a146104a05780634b09b72a146104b557610246565b8063239c70ae146103a957806323b872dd146103be5780632f745c59146103de578063336256de146103fe5780633ccfd60b1461041e57610246565b8063088a4ed01161020e578063088a4ed014610312578063095ea7b31461033257806313faede61461035257806318160ddd14610374578063198605571461038957610246565b806301ffc9a71461024b57806302329a2914610281578063046dc166146102a357806306fdde03146102c3578063081812fc146102e5575b600080fd5b34801561025757600080fd5b5061026b61026636600461234d565b6106fa565b6040516102789190612550565b60405180910390f35b34801561028d57600080fd5b506102a161029c366004612333565b610727565b005b3480156102af57600080fd5b506102a16102be3660046121a8565b610789565b3480156102cf57600080fd5b506102d86107f2565b6040516102789190612579565b3480156102f157600080fd5b506103056103003660046123cb565b610884565b60405161027891906124bb565b34801561031e57600080fd5b506102a161032d3660046123cb565b6108c7565b34801561033e57600080fd5b506102a161034d36600461230a565b61090b565b34801561035e57600080fd5b506103676109a3565b6040516102789190612d4c565b34801561038057600080fd5b506103676109a9565b34801561039557600080fd5b506103676103a43660046121a8565b6109af565b3480156103b557600080fd5b506103676109c1565b3480156103ca57600080fd5b506102a16103d93660046121f4565b6109c7565b3480156103ea57600080fd5b506103676103f936600461230a565b6109ff565b34801561040a57600080fd5b506102a16104193660046123cb565b610a51565b34801561042a57600080fd5b506102a1610a95565b34801561043f57600080fd5b506102a161044e3660046121f4565b610b52565b34801561045f57600080fd5b5061047361046e3660046121a8565b610b6d565b604051610278919061250c565b34801561048c57600080fd5b506102a161049b3660046123cb565b610c2b565b3480156104ac57600080fd5b50610367610c6f565b3480156104c157600080fd5b50610367610c75565b3480156104d657600080fd5b506103676104e53660046123cb565b610c7b565b3480156104f657600080fd5b506102a1610505366004612385565b610cd6565b34801561051657600080fd5b5061026b610d2c565b34801561052b57600080fd5b5061030561053a3660046123cb565b610d3a565b34801561054b57600080fd5b5061036761055a3660046121a8565b610d6f565b34801561056b57600080fd5b506102d8610d8a565b34801561058057600080fd5b5061036761058f3660046121a8565b610e18565b3480156105a057600080fd5b506102a1610e5c565b3480156105b557600080fd5b506102a1610ea7565b3480156105ca57600080fd5b50610305610f9d565b3480156105df57600080fd5b506102d8610fac565b3480156105f457600080fd5b506102a1610603366004612295565b610fbb565b34801561061457600080fd5b506102a161062336600461222f565b611089565b34801561063457600080fd5b506102d86106433660046123cb565b6110c8565b34801561065457600080fd5b5061036761114b565b6102a161066b3660046123e3565b611151565b34801561067c57600080fd5b5061026b61068b3660046121c2565b61135f565b34801561069c57600080fd5b5061036761138d565b3480156106b157600080fd5b506103056106c03660046122be565b611393565b3480156106d157600080fd5b506102a16106e03660046121a8565b6113fd565b3480156106f157600080fd5b5061026b61146b565b60006001600160e01b0319821663780e9d6360e01b148061071f575061071f82611474565b90505b919050565b61072f6114b4565b6001600160a01b0316610740610f9d565b6001600160a01b03161461076f5760405162461bcd60e51b815260040161076690612b3b565b60405180910390fd5b601380549115156101000261ff0019909216919091179055565b6107916114b4565b6001600160a01b03166107a2610f9d565b6001600160a01b0316146107c85760405162461bcd60e51b815260040161076690612b3b565b601380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60606000805461080190612de3565b80601f016020809104026020016040519081016040528092919081815260200182805461082d90612de3565b801561087a5780601f1061084f5761010080835404028352916020019161087a565b820191906000526020600020905b81548152906001019060200180831161085d57829003601f168201915b5050505050905090565b600061088f826114b8565b6108ab5760405162461bcd60e51b815260040161076690612aef565b506000908152600460205260409020546001600160a01b031690565b6108cf6114b4565b6001600160a01b03166108e0610f9d565b6001600160a01b0316146109065760405162461bcd60e51b815260040161076690612b3b565b600e55565b600061091682610d3a565b9050806001600160a01b0316836001600160a01b0316141561094a5760405162461bcd60e51b815260040161076690612c6e565b806001600160a01b031661095c6114b4565b6001600160a01b0316148061097857506109788161068b6114b4565b6109945760405162461bcd60e51b815260040161076690612951565b61099e83836114d5565b505050565b600c5481565b60085490565b60106020526000908152604090205481565b600e5481565b6109d86109d26114b4565b82611543565b6109f45760405162461bcd60e51b815260040161076690612caf565b61099e8383836115c8565b6000610a0a83610e18565b8210610a285760405162461bcd60e51b815260040161076690612631565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b610a596114b4565b6001600160a01b0316610a6a610f9d565b6001600160a01b031614610a905760405162461bcd60e51b815260040161076690612b3b565b600f55565b610a9d6114b4565b6001600160a01b0316610aae610f9d565b6001600160a01b031614610ad45760405162461bcd60e51b815260040161076690612b3b565b6014546001600160a01b03166108fc6064610af0476005612d81565b610afa9190612d6d565b6040518115909202916000818181858888f19350505050158015610b22573d6000803e3d6000fd5b5060405133904780156108fc02916000818181858888f19350505050158015610b4f573d6000803e3d6000fd5b50565b61099e83838360405180602001604052806000815250611089565b60606000610b7a83610e18565b905060008167ffffffffffffffff811115610ba557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610bce578160200160208202803683370190505b50905060005b82811015610c2357610be685826109ff565b828281518110610c0657634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610c1b81612e1e565b915050610bd4565b509392505050565b610c336114b4565b6001600160a01b0316610c44610f9d565b6001600160a01b031614610c6a5760405162461bcd60e51b815260040161076690612b3b565b600c55565b600f5481565b60115481565b6000610c856109a9565b8210610ca35760405162461bcd60e51b815260040161076690612d00565b60088281548110610cc457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b610cde6114b4565b6001600160a01b0316610cef610f9d565b6001600160a01b031614610d155760405162461bcd60e51b815260040161076690612b3b565b8051610d2890600b906020840190612059565b5050565b601354610100900460ff1681565b6000818152600260205260408120546001600160a01b03168061071f5760405162461bcd60e51b815260040161076690612a2f565b6001600160a01b031660009081526010602052604090205490565b600b8054610d9790612de3565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc390612de3565b8015610e105780601f10610de557610100808354040283529160200191610e10565b820191906000526020600020905b815481529060010190602001808311610df357829003601f168201915b505050505081565b60006001600160a01b038216610e405760405162461bcd60e51b8152600401610766906129e5565b506001600160a01b031660009081526003602052604090205490565b610e646114b4565b6001600160a01b0316610e75610f9d565b6001600160a01b031614610e9b5760405162461bcd60e51b815260040161076690612b3b565b610ea560006116f5565b565b610eaf6114b4565b6001600160a01b0316610ec0610f9d565b6001600160a01b031614610ee65760405162461bcd60e51b815260040161076690612b3b565b60135460ff1615610f095760405162461bcd60e51b8152600401610766906128fb565b6000610f136109a9565b9050600d5460115482610f269190612d55565b1115610f445760405162461bcd60e51b81526004016107669061274b565b60005b601154811015610f8c57610f6433610f5f8385612d55565b611747565b60128054906000610f7483612e1e565b91905055508080610f8490612e1e565b915050610f47565b50506013805460ff19166001179055565b600a546001600160a01b031690565b60606001805461080190612de3565b610fc36114b4565b6001600160a01b0316826001600160a01b03161415610ff45760405162461bcd60e51b8152600401610766906127ff565b80600560006110016114b4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556110456114b4565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161107d9190612550565b60405180910390a35050565b61109a6110946114b4565b83611543565b6110b65760405162461bcd60e51b815260040161076690612caf565b6110c284848484611761565b50505050565b60606110d3826114b8565b6110ef5760405162461bcd60e51b815260040161076690612be8565b60006110f9611794565b905060008151116111195760405180602001604052806000815250611144565b80611123846117a3565b60405160200161113492919061245b565b6040516020818303038152906040525b9392505050565b600d5481565b601354610100900460ff16156111795760405162461bcd60e51b815260040161076690612b70565b60006111836109a9565b9050600083116111a55760405162461bcd60e51b815260040161076690612778565b600e548311156111c75760405162461bcd60e51b8152600401610766906129ae565b600d546012546011546111da8685612d55565b6111e49190612d55565b6111ee9190612da0565b111561120c5760405162461bcd60e51b81526004016107669061274b565b600f543360009081526010602052604090205461122a908590612d55565b11156112485760405162461bcd60e51b815260040161076690612878565b6013546201000090046001600160a01b03166112643384611393565b6001600160a01b03161461128a5760405162461bcd60e51b8152600401610766906125fa565b611292610f9d565b6001600160a01b0316336001600160a01b0316146113135760006112b533610e18565b905083600f546112c59190612da0565b8111156112e45760405162461bcd60e51b815260040161076690612c37565b83600c546112f29190612d81565b3410156113115760405162461bcd60e51b815260040161076690612925565b505b60005b838110156110c25733600090815260106020526040812080549161133983612e1e565b9091555061134d905033610f5f8385612d55565b8061135781612e1e565b915050611316565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60125481565b600080836040516020016113a7919061243e565b6040516020818303038152906040528051906020012090506000816040516020016113d2919061248a565b6040516020818303038152906040528051906020012090506113f481856118be565b95945050505050565b6114056114b4565b6001600160a01b0316611416610f9d565b6001600160a01b03161461143c5760405162461bcd60e51b815260040161076690612b3b565b6001600160a01b0381166114625760405162461bcd60e51b8152600401610766906126ce565b610b4f816116f5565b60135460ff1681565b60006001600160e01b031982166380ac58cd60e01b14806114a557506001600160e01b03198216635b5e139f60e01b145b8061071f575061071f826118da565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061150a82610d3a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061154e826114b8565b61156a5760405162461bcd60e51b8152600401610766906128af565b600061157583610d3a565b9050806001600160a01b0316846001600160a01b031614806115b05750836001600160a01b03166115a584610884565b6001600160a01b0316145b806115c057506115c0818561135f565b949350505050565b826001600160a01b03166115db82610d3a565b6001600160a01b0316146116015760405162461bcd60e51b815260040161076690612b9f565b6001600160a01b0382166116275760405162461bcd60e51b8152600401610766906127bb565b6116328383836118f3565b61163d6000826114d5565b6001600160a01b0383166000908152600360205260408120805460019290611666908490612da0565b90915550506001600160a01b0382166000908152600360205260408120805460019290611694908490612d55565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610d2882826040518060200160405280600081525061197c565b61176c8484846115c8565b611778848484846119af565b6110c25760405162461bcd60e51b81526004016107669061267c565b6060600b805461080190612de3565b6060816117c857506040805180820190915260018152600360fc1b6020820152610722565b8160005b81156117f257806117dc81612e1e565b91506117eb9050600a83612d6d565b91506117cc565b60008167ffffffffffffffff81111561181b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611845576020820181803683370190505b5090505b84156115c05761185a600183612da0565b9150611867600a86612e39565b611872906030612d55565b60f81b81838151811061189557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506118b7600a86612d6d565b9450611849565b60008060006118cd8585611aca565b91509150610c2381611b3a565b6001600160e01b031981166301ffc9a760e01b14919050565b6118fe83838361099e565b6001600160a01b03831661191a5761191581611c67565b61193d565b816001600160a01b0316836001600160a01b03161461193d5761193d8382611cab565b6001600160a01b0382166119595761195481611d48565b61099e565b826001600160a01b0316826001600160a01b03161461099e5761099e8282611e21565b6119868383611e65565b61199360008484846119af565b61099e5760405162461bcd60e51b81526004016107669061267c565b60006119c3846001600160a01b0316611f44565b15611abf57836001600160a01b031663150b7a026119df6114b4565b8786866040518563ffffffff1660e01b8152600401611a0194939291906124cf565b602060405180830381600087803b158015611a1b57600080fd5b505af1925050508015611a4b575060408051601f3d908101601f19168201909252611a4891810190612369565b60015b611aa5573d808015611a79576040519150601f19603f3d011682016040523d82523d6000602084013e611a7e565b606091505b508051611a9d5760405162461bcd60e51b81526004016107669061267c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115c0565b506001949350505050565b600080825160411415611b015760208301516040840151606085015160001a611af587828585611f4a565b94509450505050611b33565b825160401415611b2b5760208301516040840151611b2086838361202a565b935093505050611b33565b506000905060025b9250929050565b6000816004811115611b5c57634e487b7160e01b600052602160045260246000fd5b1415611b6757610b4f565b6001816004811115611b8957634e487b7160e01b600052602160045260246000fd5b1415611ba75760405162461bcd60e51b81526004016107669061258c565b6002816004811115611bc957634e487b7160e01b600052602160045260246000fd5b1415611be75760405162461bcd60e51b8152600401610766906125c3565b6003816004811115611c0957634e487b7160e01b600052602160045260246000fd5b1415611c275760405162461bcd60e51b815260040161076690612836565b6004816004811115611c4957634e487b7160e01b600052602160045260246000fd5b1415610b4f5760405162461bcd60e51b815260040161076690612a78565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b60006001611cb884610e18565b611cc29190612da0565b600083815260076020526040902054909150808214611d15576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611d5a90600190612da0565b60008381526009602052604081205460088054939450909284908110611d9057634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110611dbf57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480611e0557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000611e2c83610e18565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216611e8b5760405162461bcd60e51b815260040161076690612aba565b611e94816114b8565b15611eb15760405162461bcd60e51b815260040161076690612714565b611ebd600083836118f3565b6001600160a01b0382166000908152600360205260408120805460019290611ee6908490612d55565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611f815750600090506003612021565b8460ff16601b14158015611f9957508460ff16601c14155b15611faa5750600090506004612021565b600060018787878760405160008152602001604052604051611fcf949392919061255b565b6020604051602081039080840390855afa158015611ff1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661201a57600060019250925050612021565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161204b87828885611f4a565b935093505050935093915050565b82805461206590612de3565b90600052602060002090601f01602090048101928261208757600085556120cd565b82601f106120a057805160ff19168380011785556120cd565b828001600101855582156120cd579182015b828111156120cd5782518255916020019190600101906120b2565b506120d99291506120dd565b5090565b5b808211156120d957600081556001016120de565b600067ffffffffffffffff8084111561210d5761210d612e79565b604051601f8501601f19168101602001828111828210171561213157612131612e79565b60405284815291508183850186101561214957600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b038116811461072257600080fd5b8035801515811461072257600080fd5b600082601f830112612199578081fd5b611144838335602085016120f2565b6000602082840312156121b9578081fd5b61114482612162565b600080604083850312156121d4578081fd5b6121dd83612162565b91506121eb60208401612162565b90509250929050565b600080600060608486031215612208578081fd5b61221184612162565b925061221f60208501612162565b9150604084013590509250925092565b60008060008060808587031215612244578081fd5b61224d85612162565b935061225b60208601612162565b925060408501359150606085013567ffffffffffffffff81111561227d578182fd5b61228987828801612189565b91505092959194509250565b600080604083850312156122a7578182fd5b6122b083612162565b91506121eb60208401612179565b600080604083850312156122d0578182fd5b6122d983612162565b9150602083013567ffffffffffffffff8111156122f4578182fd5b61230085828601612189565b9150509250929050565b6000806040838503121561231c578182fd5b61232583612162565b946020939093013593505050565b600060208284031215612344578081fd5b61114482612179565b60006020828403121561235e578081fd5b813561114481612e8f565b60006020828403121561237a578081fd5b815161114481612e8f565b600060208284031215612396578081fd5b813567ffffffffffffffff8111156123ac578182fd5b8201601f810184136123bc578182fd5b6115c0848235602084016120f2565b6000602082840312156123dc578081fd5b5035919050565b600080604083850312156123f5578182fd5b82359150602083013567ffffffffffffffff8111156122f4578182fd5b6000815180845261242a816020860160208601612db7565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6000835161246d818460208801612db7565b835190830190612481818360208801612db7565b01949350505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061250290830184612412565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561254457835183529284019291840191600101612528565b50909695505050505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526111446020830184612412565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252601a908201527f446972656374206d696e74206973206e6f7420616c6c6f776564000000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526013908201527213585e0814dd5c1c1b1e48195e18d959591959606a1b604082015260600190565b60208082526023908201527f4174206c65617374206f6e65204e4654206e6565647320746f206265206d696e6040820152621d195960ea1b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252601c908201527f4d6178206d696e74207065722077616c6c657420657863656564656400000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526010908201526f526573657276656420616c726561647960801b604082015260600190565b602080825260129082015271496e73756666696369656e742066756e647360701b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526018908201527f4d6178206d696e7420616d6f756e742065786365656465640000000000000000604082015260600190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601590820152744d696e74696e67206973206e6f742061637469766560581b604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601c908201527f4d6178204e465420706572206164647265737320657863656564656400000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b90815260200190565b60008219821115612d6857612d68612e4d565b500190565b600082612d7c57612d7c612e63565b500490565b6000816000190483118215151615612d9b57612d9b612e4d565b500290565b600082821015612db257612db2612e4d565b500390565b60005b83811015612dd2578181015183820152602001612dba565b838111156110c25750506000910152565b600281046001821680612df757607f821691505b60208210811415612e1857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612e3257612e32612e4d565b5060010190565b600082612e4857612e48612e63565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610b4f57600080fdfea26469706673582212206fb9ea500bee7d683b1f0d282c7ed80337f1bfb634a1bdd0e4eb767660b21c9464736f6c63430008000033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000d53686962757961204769726c7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000253470000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d624a4a617a6f4372344470324d7661426e65766d6e6d4a79577445617375543976506d7879347256385a56782f00000000000000000000

Deployed Bytecode

0x6080604052600436106102465760003560e01c80634f6ccce71161013957806395d89b41116100b6578063db7fd4081161007a578063db7fd4081461065d578063e985e9c514610670578063ea0d8da414610690578063ebf17f44146106a5578063f2fde38b146106c5578063fe60d12c146106e557610246565b806395d89b41146105d3578063a22cb465146105e8578063b88d4fde14610608578063c87b56dd14610628578063d5abeb011461064857610246565b80636c0360eb116100fd5780636c0360eb1461055f57806370a0823114610574578063715018a614610594578063864fe6e8146105a95780638da5cb5b146105be57610246565b80634f6ccce7146104ca57806355f804b3146104ea5780635c975abb1461050a5780636352211e1461051f57806363b1abd81461053f57610246565b8063239c70ae116101c757806342842e0e1161018b57806342842e0e14610433578063438b63001461045357806344a0d68a1461048057806347a3320a146104a05780634b09b72a146104b557610246565b8063239c70ae146103a957806323b872dd146103be5780632f745c59146103de578063336256de146103fe5780633ccfd60b1461041e57610246565b8063088a4ed01161020e578063088a4ed014610312578063095ea7b31461033257806313faede61461035257806318160ddd14610374578063198605571461038957610246565b806301ffc9a71461024b57806302329a2914610281578063046dc166146102a357806306fdde03146102c3578063081812fc146102e5575b600080fd5b34801561025757600080fd5b5061026b61026636600461234d565b6106fa565b6040516102789190612550565b60405180910390f35b34801561028d57600080fd5b506102a161029c366004612333565b610727565b005b3480156102af57600080fd5b506102a16102be3660046121a8565b610789565b3480156102cf57600080fd5b506102d86107f2565b6040516102789190612579565b3480156102f157600080fd5b506103056103003660046123cb565b610884565b60405161027891906124bb565b34801561031e57600080fd5b506102a161032d3660046123cb565b6108c7565b34801561033e57600080fd5b506102a161034d36600461230a565b61090b565b34801561035e57600080fd5b506103676109a3565b6040516102789190612d4c565b34801561038057600080fd5b506103676109a9565b34801561039557600080fd5b506103676103a43660046121a8565b6109af565b3480156103b557600080fd5b506103676109c1565b3480156103ca57600080fd5b506102a16103d93660046121f4565b6109c7565b3480156103ea57600080fd5b506103676103f936600461230a565b6109ff565b34801561040a57600080fd5b506102a16104193660046123cb565b610a51565b34801561042a57600080fd5b506102a1610a95565b34801561043f57600080fd5b506102a161044e3660046121f4565b610b52565b34801561045f57600080fd5b5061047361046e3660046121a8565b610b6d565b604051610278919061250c565b34801561048c57600080fd5b506102a161049b3660046123cb565b610c2b565b3480156104ac57600080fd5b50610367610c6f565b3480156104c157600080fd5b50610367610c75565b3480156104d657600080fd5b506103676104e53660046123cb565b610c7b565b3480156104f657600080fd5b506102a1610505366004612385565b610cd6565b34801561051657600080fd5b5061026b610d2c565b34801561052b57600080fd5b5061030561053a3660046123cb565b610d3a565b34801561054b57600080fd5b5061036761055a3660046121a8565b610d6f565b34801561056b57600080fd5b506102d8610d8a565b34801561058057600080fd5b5061036761058f3660046121a8565b610e18565b3480156105a057600080fd5b506102a1610e5c565b3480156105b557600080fd5b506102a1610ea7565b3480156105ca57600080fd5b50610305610f9d565b3480156105df57600080fd5b506102d8610fac565b3480156105f457600080fd5b506102a1610603366004612295565b610fbb565b34801561061457600080fd5b506102a161062336600461222f565b611089565b34801561063457600080fd5b506102d86106433660046123cb565b6110c8565b34801561065457600080fd5b5061036761114b565b6102a161066b3660046123e3565b611151565b34801561067c57600080fd5b5061026b61068b3660046121c2565b61135f565b34801561069c57600080fd5b5061036761138d565b3480156106b157600080fd5b506103056106c03660046122be565b611393565b3480156106d157600080fd5b506102a16106e03660046121a8565b6113fd565b3480156106f157600080fd5b5061026b61146b565b60006001600160e01b0319821663780e9d6360e01b148061071f575061071f82611474565b90505b919050565b61072f6114b4565b6001600160a01b0316610740610f9d565b6001600160a01b03161461076f5760405162461bcd60e51b815260040161076690612b3b565b60405180910390fd5b601380549115156101000261ff0019909216919091179055565b6107916114b4565b6001600160a01b03166107a2610f9d565b6001600160a01b0316146107c85760405162461bcd60e51b815260040161076690612b3b565b601380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60606000805461080190612de3565b80601f016020809104026020016040519081016040528092919081815260200182805461082d90612de3565b801561087a5780601f1061084f5761010080835404028352916020019161087a565b820191906000526020600020905b81548152906001019060200180831161085d57829003601f168201915b5050505050905090565b600061088f826114b8565b6108ab5760405162461bcd60e51b815260040161076690612aef565b506000908152600460205260409020546001600160a01b031690565b6108cf6114b4565b6001600160a01b03166108e0610f9d565b6001600160a01b0316146109065760405162461bcd60e51b815260040161076690612b3b565b600e55565b600061091682610d3a565b9050806001600160a01b0316836001600160a01b0316141561094a5760405162461bcd60e51b815260040161076690612c6e565b806001600160a01b031661095c6114b4565b6001600160a01b0316148061097857506109788161068b6114b4565b6109945760405162461bcd60e51b815260040161076690612951565b61099e83836114d5565b505050565b600c5481565b60085490565b60106020526000908152604090205481565b600e5481565b6109d86109d26114b4565b82611543565b6109f45760405162461bcd60e51b815260040161076690612caf565b61099e8383836115c8565b6000610a0a83610e18565b8210610a285760405162461bcd60e51b815260040161076690612631565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b610a596114b4565b6001600160a01b0316610a6a610f9d565b6001600160a01b031614610a905760405162461bcd60e51b815260040161076690612b3b565b600f55565b610a9d6114b4565b6001600160a01b0316610aae610f9d565b6001600160a01b031614610ad45760405162461bcd60e51b815260040161076690612b3b565b6014546001600160a01b03166108fc6064610af0476005612d81565b610afa9190612d6d565b6040518115909202916000818181858888f19350505050158015610b22573d6000803e3d6000fd5b5060405133904780156108fc02916000818181858888f19350505050158015610b4f573d6000803e3d6000fd5b50565b61099e83838360405180602001604052806000815250611089565b60606000610b7a83610e18565b905060008167ffffffffffffffff811115610ba557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610bce578160200160208202803683370190505b50905060005b82811015610c2357610be685826109ff565b828281518110610c0657634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610c1b81612e1e565b915050610bd4565b509392505050565b610c336114b4565b6001600160a01b0316610c44610f9d565b6001600160a01b031614610c6a5760405162461bcd60e51b815260040161076690612b3b565b600c55565b600f5481565b60115481565b6000610c856109a9565b8210610ca35760405162461bcd60e51b815260040161076690612d00565b60088281548110610cc457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b610cde6114b4565b6001600160a01b0316610cef610f9d565b6001600160a01b031614610d155760405162461bcd60e51b815260040161076690612b3b565b8051610d2890600b906020840190612059565b5050565b601354610100900460ff1681565b6000818152600260205260408120546001600160a01b03168061071f5760405162461bcd60e51b815260040161076690612a2f565b6001600160a01b031660009081526010602052604090205490565b600b8054610d9790612de3565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc390612de3565b8015610e105780601f10610de557610100808354040283529160200191610e10565b820191906000526020600020905b815481529060010190602001808311610df357829003601f168201915b505050505081565b60006001600160a01b038216610e405760405162461bcd60e51b8152600401610766906129e5565b506001600160a01b031660009081526003602052604090205490565b610e646114b4565b6001600160a01b0316610e75610f9d565b6001600160a01b031614610e9b5760405162461bcd60e51b815260040161076690612b3b565b610ea560006116f5565b565b610eaf6114b4565b6001600160a01b0316610ec0610f9d565b6001600160a01b031614610ee65760405162461bcd60e51b815260040161076690612b3b565b60135460ff1615610f095760405162461bcd60e51b8152600401610766906128fb565b6000610f136109a9565b9050600d5460115482610f269190612d55565b1115610f445760405162461bcd60e51b81526004016107669061274b565b60005b601154811015610f8c57610f6433610f5f8385612d55565b611747565b60128054906000610f7483612e1e565b91905055508080610f8490612e1e565b915050610f47565b50506013805460ff19166001179055565b600a546001600160a01b031690565b60606001805461080190612de3565b610fc36114b4565b6001600160a01b0316826001600160a01b03161415610ff45760405162461bcd60e51b8152600401610766906127ff565b80600560006110016114b4565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556110456114b4565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161107d9190612550565b60405180910390a35050565b61109a6110946114b4565b83611543565b6110b65760405162461bcd60e51b815260040161076690612caf565b6110c284848484611761565b50505050565b60606110d3826114b8565b6110ef5760405162461bcd60e51b815260040161076690612be8565b60006110f9611794565b905060008151116111195760405180602001604052806000815250611144565b80611123846117a3565b60405160200161113492919061245b565b6040516020818303038152906040525b9392505050565b600d5481565b601354610100900460ff16156111795760405162461bcd60e51b815260040161076690612b70565b60006111836109a9565b9050600083116111a55760405162461bcd60e51b815260040161076690612778565b600e548311156111c75760405162461bcd60e51b8152600401610766906129ae565b600d546012546011546111da8685612d55565b6111e49190612d55565b6111ee9190612da0565b111561120c5760405162461bcd60e51b81526004016107669061274b565b600f543360009081526010602052604090205461122a908590612d55565b11156112485760405162461bcd60e51b815260040161076690612878565b6013546201000090046001600160a01b03166112643384611393565b6001600160a01b03161461128a5760405162461bcd60e51b8152600401610766906125fa565b611292610f9d565b6001600160a01b0316336001600160a01b0316146113135760006112b533610e18565b905083600f546112c59190612da0565b8111156112e45760405162461bcd60e51b815260040161076690612c37565b83600c546112f29190612d81565b3410156113115760405162461bcd60e51b815260040161076690612925565b505b60005b838110156110c25733600090815260106020526040812080549161133983612e1e565b9091555061134d905033610f5f8385612d55565b8061135781612e1e565b915050611316565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60125481565b600080836040516020016113a7919061243e565b6040516020818303038152906040528051906020012090506000816040516020016113d2919061248a565b6040516020818303038152906040528051906020012090506113f481856118be565b95945050505050565b6114056114b4565b6001600160a01b0316611416610f9d565b6001600160a01b03161461143c5760405162461bcd60e51b815260040161076690612b3b565b6001600160a01b0381166114625760405162461bcd60e51b8152600401610766906126ce565b610b4f816116f5565b60135460ff1681565b60006001600160e01b031982166380ac58cd60e01b14806114a557506001600160e01b03198216635b5e139f60e01b145b8061071f575061071f826118da565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061150a82610d3a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061154e826114b8565b61156a5760405162461bcd60e51b8152600401610766906128af565b600061157583610d3a565b9050806001600160a01b0316846001600160a01b031614806115b05750836001600160a01b03166115a584610884565b6001600160a01b0316145b806115c057506115c0818561135f565b949350505050565b826001600160a01b03166115db82610d3a565b6001600160a01b0316146116015760405162461bcd60e51b815260040161076690612b9f565b6001600160a01b0382166116275760405162461bcd60e51b8152600401610766906127bb565b6116328383836118f3565b61163d6000826114d5565b6001600160a01b0383166000908152600360205260408120805460019290611666908490612da0565b90915550506001600160a01b0382166000908152600360205260408120805460019290611694908490612d55565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610d2882826040518060200160405280600081525061197c565b61176c8484846115c8565b611778848484846119af565b6110c25760405162461bcd60e51b81526004016107669061267c565b6060600b805461080190612de3565b6060816117c857506040805180820190915260018152600360fc1b6020820152610722565b8160005b81156117f257806117dc81612e1e565b91506117eb9050600a83612d6d565b91506117cc565b60008167ffffffffffffffff81111561181b57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611845576020820181803683370190505b5090505b84156115c05761185a600183612da0565b9150611867600a86612e39565b611872906030612d55565b60f81b81838151811061189557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506118b7600a86612d6d565b9450611849565b60008060006118cd8585611aca565b91509150610c2381611b3a565b6001600160e01b031981166301ffc9a760e01b14919050565b6118fe83838361099e565b6001600160a01b03831661191a5761191581611c67565b61193d565b816001600160a01b0316836001600160a01b03161461193d5761193d8382611cab565b6001600160a01b0382166119595761195481611d48565b61099e565b826001600160a01b0316826001600160a01b03161461099e5761099e8282611e21565b6119868383611e65565b61199360008484846119af565b61099e5760405162461bcd60e51b81526004016107669061267c565b60006119c3846001600160a01b0316611f44565b15611abf57836001600160a01b031663150b7a026119df6114b4565b8786866040518563ffffffff1660e01b8152600401611a0194939291906124cf565b602060405180830381600087803b158015611a1b57600080fd5b505af1925050508015611a4b575060408051601f3d908101601f19168201909252611a4891810190612369565b60015b611aa5573d808015611a79576040519150601f19603f3d011682016040523d82523d6000602084013e611a7e565b606091505b508051611a9d5760405162461bcd60e51b81526004016107669061267c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115c0565b506001949350505050565b600080825160411415611b015760208301516040840151606085015160001a611af587828585611f4a565b94509450505050611b33565b825160401415611b2b5760208301516040840151611b2086838361202a565b935093505050611b33565b506000905060025b9250929050565b6000816004811115611b5c57634e487b7160e01b600052602160045260246000fd5b1415611b6757610b4f565b6001816004811115611b8957634e487b7160e01b600052602160045260246000fd5b1415611ba75760405162461bcd60e51b81526004016107669061258c565b6002816004811115611bc957634e487b7160e01b600052602160045260246000fd5b1415611be75760405162461bcd60e51b8152600401610766906125c3565b6003816004811115611c0957634e487b7160e01b600052602160045260246000fd5b1415611c275760405162461bcd60e51b815260040161076690612836565b6004816004811115611c4957634e487b7160e01b600052602160045260246000fd5b1415610b4f5760405162461bcd60e51b815260040161076690612a78565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b60006001611cb884610e18565b611cc29190612da0565b600083815260076020526040902054909150808214611d15576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611d5a90600190612da0565b60008381526009602052604081205460088054939450909284908110611d9057634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110611dbf57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480611e0557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000611e2c83610e18565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216611e8b5760405162461bcd60e51b815260040161076690612aba565b611e94816114b8565b15611eb15760405162461bcd60e51b815260040161076690612714565b611ebd600083836118f3565b6001600160a01b0382166000908152600360205260408120805460019290611ee6908490612d55565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3b151590565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611f815750600090506003612021565b8460ff16601b14158015611f9957508460ff16601c14155b15611faa5750600090506004612021565b600060018787878760405160008152602001604052604051611fcf949392919061255b565b6020604051602081039080840390855afa158015611ff1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661201a57600060019250925050612021565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161204b87828885611f4a565b935093505050935093915050565b82805461206590612de3565b90600052602060002090601f01602090048101928261208757600085556120cd565b82601f106120a057805160ff19168380011785556120cd565b828001600101855582156120cd579182015b828111156120cd5782518255916020019190600101906120b2565b506120d99291506120dd565b5090565b5b808211156120d957600081556001016120de565b600067ffffffffffffffff8084111561210d5761210d612e79565b604051601f8501601f19168101602001828111828210171561213157612131612e79565b60405284815291508183850186101561214957600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b038116811461072257600080fd5b8035801515811461072257600080fd5b600082601f830112612199578081fd5b611144838335602085016120f2565b6000602082840312156121b9578081fd5b61114482612162565b600080604083850312156121d4578081fd5b6121dd83612162565b91506121eb60208401612162565b90509250929050565b600080600060608486031215612208578081fd5b61221184612162565b925061221f60208501612162565b9150604084013590509250925092565b60008060008060808587031215612244578081fd5b61224d85612162565b935061225b60208601612162565b925060408501359150606085013567ffffffffffffffff81111561227d578182fd5b61228987828801612189565b91505092959194509250565b600080604083850312156122a7578182fd5b6122b083612162565b91506121eb60208401612179565b600080604083850312156122d0578182fd5b6122d983612162565b9150602083013567ffffffffffffffff8111156122f4578182fd5b61230085828601612189565b9150509250929050565b6000806040838503121561231c578182fd5b61232583612162565b946020939093013593505050565b600060208284031215612344578081fd5b61114482612179565b60006020828403121561235e578081fd5b813561114481612e8f565b60006020828403121561237a578081fd5b815161114481612e8f565b600060208284031215612396578081fd5b813567ffffffffffffffff8111156123ac578182fd5b8201601f810184136123bc578182fd5b6115c0848235602084016120f2565b6000602082840312156123dc578081fd5b5035919050565b600080604083850312156123f5578182fd5b82359150602083013567ffffffffffffffff8111156122f4578182fd5b6000815180845261242a816020860160208601612db7565b601f01601f19169290920160200192915050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6000835161246d818460208801612db7565b835190830190612481818360208801612db7565b01949350505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061250290830184612412565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561254457835183529284019291840191600101612528565b50909695505050505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526111446020830184612412565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252601a908201527f446972656374206d696e74206973206e6f7420616c6c6f776564000000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526013908201527213585e0814dd5c1c1b1e48195e18d959591959606a1b604082015260600190565b60208082526023908201527f4174206c65617374206f6e65204e4654206e6565647320746f206265206d696e6040820152621d195960ea1b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252601c908201527f4d6178206d696e74207065722077616c6c657420657863656564656400000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526010908201526f526573657276656420616c726561647960801b604082015260600190565b602080825260129082015271496e73756666696369656e742066756e647360701b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526018908201527f4d6178206d696e7420616d6f756e742065786365656465640000000000000000604082015260600190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601590820152744d696e74696e67206973206e6f742061637469766560581b604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601c908201527f4d6178204e465420706572206164647265737320657863656564656400000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b90815260200190565b60008219821115612d6857612d68612e4d565b500190565b600082612d7c57612d7c612e63565b500490565b6000816000190483118215151615612d9b57612d9b612e4d565b500290565b600082821015612db257612db2612e4d565b500390565b60005b83811015612dd2578181015183820152602001612dba565b838111156110c25750506000910152565b600281046001821680612df757607f821691505b60208210811415612e1857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612e3257612e32612e4d565b5060010190565b600082612e4857612e48612e63565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610b4f57600080fdfea26469706673582212206fb9ea500bee7d683b1f0d282c7ed80337f1bfb634a1bdd0e4eb767660b21c9464736f6c63430008000033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000d53686962757961204769726c7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000253470000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d624a4a617a6f4372344470324d7661426e65766d6e6d4a79577445617375543976506d7879347256385a56782f00000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Shibuya Girls
Arg [1] : _symbol (string): SG
Arg [2] : _initBaseURI (string): ipfs://QmbJJazoCr4Dp2MvaBnevmnmJyWtEasuT9vPmxy4rV8ZVx/

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [4] : 53686962757961204769726c7300000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [6] : 5347000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [8] : 697066733a2f2f516d624a4a617a6f4372344470324d7661426e65766d6e6d4a
Arg [9] : 79577445617375543976506d7879347256385a56782f00000000000000000000


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.