ETH Price: $3,176.73 (+2.34%)

Token

gmDAO Token v2 (GMV2)
 

Overview

Max Total Supply

0 GMV2

Holders

481

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 GMV2
0xc66dd2dc3aeb82df500bd4434cd7456b34043736
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The gmDAO consists of 900 members active within NFT sector, with backgrounds ranging from accredited investors, to renowned generative artists with collections featured on AB curated.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
GmV2

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : GmV2.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @title gmDAO Token v2
/// @notice Migration of gm token v1 from shared Rarible contract to v2 custom contract
/// @author: 0xChaosbi.eth
/// "Omnia sol temperat" - The sun warms all

///////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                               //
//               ::::::::  ::::    ::::  ::::    ::: :::::::::::     :::                         //
//              :+:    :+: +:+:+: :+:+:+ :+:+:   :+:     :+:       :+: :+:                       //
//              +:+    +:+ +:+ +:+:+ +:+ :+:+:+  +:+     +:+      +:+   +:+                      //
//              +#+    +:+ +#+  +:+  +#+ +#+ +:+ +#+     +#+     +#++:++#++:                     //
//              +#+    +#+ +#+       +#+ +#+  +#+#+#     +#+     +#+     +#+                     //
//              #+#    #+# #+#       #+# #+#   #+#+#     #+#     #+#     #+#                     //
//               ########  ###       ### ###    #### ########### ###     ###                     //
//                              ::::::::   ::::::::  :::                                         //
//                             :+:    :+: :+:    :+: :+:                                         //
//                             +:+        +:+    +:+ +:+                                         //
//                             +#++:++#++ +#+    +:+ +#+                                         //
//                                    +#+ +#+    +#+ +#+                                         //
//                             #+#    #+# #+#    #+# #+#                                         //
//                              ########   ########  ##########                                  //
//   ::::::::::: :::::::::: ::::    ::::  :::::::::  :::::::::: :::::::::      ::: :::::::::::   //
//       :+:     :+:        +:+:+: :+:+:+ :+:    :+: :+:        :+:    :+:   :+: :+:   :+:       //
//       +:+     +:+        +:+ +:+:+ +:+ +:+    +:+ +:+        +:+    +:+  +:+   +:+  +:+       //
//       +#+     +#++:++#   +#+  +:+  +#+ +#++:++#+  +#++:++#   +#++:++#:  +#++:++#++: +#+       //
//       +#+     +#+        +#+       +#+ +#+        +#+        +#+    +#+ +#+     +#+ +#+       //
//       #+#     #+#        #+#       #+# #+#        #+#        #+#    #+# #+#     #+# #+#       //
//       ###     ########## ###       ### ###        ########## ###    ### ###     ### ###       //
//                                                                                               //
///////////////////////////////////////////////////////////////////////////////////////////////////

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract GmV2 is ERC721, IERC1155Receiver, IERC2981, Ownable, ReentrancyGuard {
    using Strings for uint256;

    address public raribleContractAddress; // shared Rarible ERC-1155 contract address
    uint256 public raribleTokenId = 706480; // gm v1 token id on shared Rarible contract
    address public gmDAOAddress = 0xD18e205b41eEe3D208D3B10445DB95Ff02ba4acA; // gmdao.eth
    uint256 public royaltyPercent = 20; // 20%
    uint256 public maxSupply = 900;
    uint256 public maxNormalTokens = 870; // v2 tokens that correspond directly to existing v1 tokens
    uint256 public maxSpecialTokens = 30; // special edition 1/1 tokens that can be created from burned tokens
    string public baseTokenURI;
    bool public isMigrationActive;

    // @dev Using special counter functions due to token id requirements for special tokens
    uint256 public nextNormalTokenId = 0;
    uint256 public nextSpecialTokenId = maxSupply - maxSpecialTokens;

    // @dev When a gm dao member sends their v1 token to this contract, we record that.
    mapping(address => uint256) public sentV1Tokens;

    constructor(string memory baseURI, address raribleAddress) ERC721("gmDAO Token v2", "GMV2") {
        baseTokenURI = string(abi.encodePacked(baseURI));
        raribleContractAddress = raribleAddress;
    }

    // ☉☉☉ MINT FUNCTIONS ☉☉☉

    /**
     * @dev Mints a gm v2 ERC-721 token.
     * @dev Requires user to have transferred their Rarible ERC-1155 gm v1 token to this contract first.
     */
    function upgradeToken() external migrationActive nonReentrant {
        require(getTotalTokenCount() < maxSupply, "MAX_TOTAL_SUPPLY");
        require(nextNormalTokenId < maxNormalTokens, "MAX_NORMAL_SUPPLY");

        // Requires that the minter has sent their v1 token and we have recorded that in sentV1Tokens
        require(sentV1Tokens[msg.sender] > 0, "NO_V1");

        uint256 newItemId = nextNormalTokenId;

        // Update state
        nextNormalTokenId += 1;
        sentV1Tokens[msg.sender] -= 1;

        // Mint v2 token
        _safeMint(msg.sender, newItemId);
    }

    /**
     * @dev Mints a batch of gm v2 ERC-721 tokens.
     * @dev Only callable by the owner.
     */
    function upgradeBatch(uint256 qty) external onlyOwner nonReentrant {
        require((getTotalTokenCount() + qty) <= maxSupply, "MAX_TOTAL_SUPPLY");
        require((getNormalTokenCount() + qty) <= maxNormalTokens, "MAX_NORMAL_SUPPLY");

        for (uint256 i = 0; i < qty; i++) {
            uint256 newItemId = nextNormalTokenId;

            // Update state
            nextNormalTokenId += 1;

            // Mint v2 token
            _safeMint(msg.sender, newItemId);
        }
    }

    /**
     * @dev Mints a special edition 1/1 gm v2 ERC-721 token.
     * @dev Only callable by the owner.
     */
    function upgradeSpecialToken() public onlyOwner nonReentrant {
        require(getTotalTokenCount() < maxSupply, "MAX_TOTAL_SUPPLY");
        require(getSpecialTokenCount() < maxSpecialTokens, "MAX_SPECIAL_SUPPLY");

        uint256 newItemId = nextSpecialTokenId;

        // Update state
        nextSpecialTokenId += 1;

        // Mint v2 token
        _safeMint(msg.sender, newItemId);
    }

    /**
     * @dev Mints a batch of special edition 1/1 gm v2 ERC-721 tokens.
     * @dev Only callable by the owner.
     */
    function upgradeSpecialBatch(uint256 qty) external onlyOwner nonReentrant {
        require((getTotalTokenCount() + qty) <= maxSupply, "MAX_TOTAL_SUPPLY");
        require((getSpecialTokenCount() + qty) <= maxSpecialTokens, "MAX_SPECIAL_SUPPLY");

        for (uint256 i = 0; i < qty; i++) {
            uint256 newItemId = nextSpecialTokenId;

            // Update state
            nextSpecialTokenId += 1;

            // Mint v2 token
            _safeMint(msg.sender, newItemId);
        }
    }

    // ☉☉☉ RECEIVE FUNCTIONS ☉☉☉

    /**
     * @dev Implements custom onERC1155Received hook.
     * @dev Only allows the gm v1 token (an ERC-1155 with tokenId 706480 on the shared Rarible contract 0xd07dc4262bcdbf85190c01c996b4c06a461d2430) to be sent.
     * @dev Stores the address of the sender so we know who can mint/redeem a gm v2 token.
     * @dev msg.sender is the NFT contract and param 'from' is the owner of the NFT.
     */
    function onERC1155Received(
        address,
        address from,
        uint256 id,
        uint256 amount,
        bytes calldata
    ) external override migrationActive nonReentrant returns (bytes4) {
        require(msg.sender == address(raribleContractAddress), "WRONG_NFT_CONTRACT");
        require(id == raribleTokenId, "ONLY_GM");

        sentV1Tokens[from] += amount;

        return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
    }

    /**
     * @dev Implements custom onERC1155BatchReceived hook.
     * @dev Only allows batches of the gm v1 token to be sent by checking the ids array.
     * @dev Stores the address of the sender so we know who can mint/redeem a gm v2 token.
     */
    function onERC1155BatchReceived(
        address,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes memory
    ) external override migrationActive nonReentrant returns (bytes4) {
        require(msg.sender == address(raribleContractAddress), "WRONG_NFT_CONTRACT");
        require(ids[0] == raribleTokenId, "ONLY_GM");
        require(ids.length == 1, "ONLY_GM");

        sentV1Tokens[from] += values[0];

        return bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"));
    }

    // ☉☉☉ ADMIN ACTIONS ☉☉☉

    function setBaseURI(string memory uri) external onlyOwner {
        baseTokenURI = uri;
    }

    function setRoyaltyPercent(uint256 percent) external onlyOwner {
        royaltyPercent = percent;
    }

    function setRaribleContractAddress(address raribleAddress) external onlyOwner {
        raribleContractAddress = raribleAddress;
    }

    function setRaribleTokenId(uint256 tokenId) external onlyOwner {
        raribleTokenId = tokenId;
    }

    /**
     * @dev Toggle whether contract is active or not.
     */
    function toggleMigrationActive() public onlyOwner {
        isMigrationActive = !isMigrationActive;
    }

    // ☉☉☉ MODIFIERS ☉☉☉

    modifier migrationActive() {
        require(isMigrationActive, "NOT_ACTIVE");
        _;
    }

    // ☉☉☉ PUBLIC VIEW FUNCTIONS ☉☉☉

    function getNormalTokenCount() public view returns (uint256) {
        return nextNormalTokenId;
    }

    function getSpecialTokenCount() public view returns (uint256) {
        return nextSpecialTokenId - (maxSupply - maxSpecialTokens);
    }

    function getTotalTokenCount() public view returns (uint256) {
        return getNormalTokenCount() + getSpecialTokenCount();
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "NONEXISTENT_TOKEN");

        return string(abi.encodePacked(baseTokenURI, tokenId.toString(), ".json"));
    }

    // ☉☉☉ ROYALTIES ☉☉☉

    /**
     * @dev See {IERC165-royaltyInfo}.
     * @dev Sets a 90% royalty on the token to discourage resales.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        require(_exists(tokenId), "NONEXISTENT_TOKEN");

        return (address(gmDAOAddress), SafeMath.div(SafeMath.mul(salePrice, royaltyPercent), 100));
    }

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

File 2 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be 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 {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || 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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

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

File 3 of 16 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

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

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

File 4 of 16 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Called with the sale price to determine how much royalty is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by `tokenId`
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for `salePrice`
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 8 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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 10 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 12 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

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 13 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 16 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"address","name":"raribleAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNormalTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSpecialTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gmDAOAddress","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":"isMigrationActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxNormalTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSpecialTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextNormalTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextSpecialTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raribleContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raribleTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyPercent","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":"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":"","type":"address"}],"name":"sentV1Tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"raribleAddress","type":"address"}],"name":"setRaribleContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setRaribleTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"setRoyaltyPercent","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":[],"name":"toggleMigrationActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"qty","type":"uint256"}],"name":"upgradeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"qty","type":"uint256"}],"name":"upgradeSpecialBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeSpecialToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052620ac7b0600955600a80546001600160a01b03191673d18e205b41eee3d208d3b10445db95ff02ba4aca1790556014600b55610384600c819055610366600d55601e600e81905560006011556200005b91620003d5565b6012553480156200006b57600080fd5b5060405162002dc038038062002dc08339810160408190526200008e91620002f9565b604080518082018252600e81526d33b6a220a7902a37b5b2b7103b1960911b60208083019182528351808501909452600484526323a6ab1960e11b908401528151919291620000e091600091620001cf565b508051620000f6906001906020840190620001cf565b505050620001136200010d6200017960201b60201c565b6200017d565b60016007556040516200012b90839060200162000374565b604051602081830303815290604052600f908051906020019062000151929190620001cf565b50600880546001600160a01b0319166001600160a01b039290921691909117905550620004f0565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001dd9062000434565b90600052602060002090601f0160209004810192826200020157600085556200024c565b82601f106200021c57805160ff19168380011785556200024c565b828001600101855582156200024c579182015b828111156200024c5782518255916020019190600101906200022f565b506200025a9291506200025e565b5090565b5b808211156200025a57600081556001016200025f565b60006200028c6200028684620003a8565b62000389565b905082815260208101848484011115620002a557600080fd5b620002b284828562000401565b509392505050565b8051620002c781620004d6565b92915050565b600082601f830112620002df57600080fd5b8151620002f184826020860162000275565b949350505050565b600080604083850312156200030d57600080fd5b82516001600160401b038111156200032457600080fd5b6200033285828601620002cd565b92505060206200034585828601620002ba565b9150509250929050565b60006200035a825190565b6200036a81856020860162000401565b9290920192915050565b60006200038282846200034f565b9392505050565b60006200039560405190565b9050620003a3828262000465565b919050565b60006001600160401b03821115620003c457620003c4620004c0565b601f19601f83011660200192915050565b600082821015620003ea57620003ea62000494565b500390565b60006001600160a01b038216620002c7565b60005b838110156200041e57818101518382015260200162000404565b838111156200042e576000848401525b50505050565b6002810460018216806200044957607f821691505b602082108114156200045f576200045f620004aa565b50919050565b601f19601f83011681018181106001600160401b03821117156200048d576200048d620004c0565b6040525050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b620004e181620003ef565b8114620004ed57600080fd5b50565b6128c080620005006000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c80639a4fc64011610151578063cbeb6bc8116100c3578063d8f5e7e411610087578063d8f5e7e4146104ed578063e536266714610500578063e985e9c514610508578063ea2033b51461051b578063f23a6e6114610524578063f2fde38b1461053757610269565b8063cbeb6bc8146104ab578063d3494d23146104b4578063d547cfb7146104bc578063d5abeb01146104c4578063d5f8678f146104cd57610269565b8063b88d4fde11610115578063b88d4fde1461042c578063bacc587f1461043f578063bc197c8114610452578063c2ffbb7714610472578063c87b56dd14610485578063c9f8819d1461049857610269565b80639a4fc640146103e25780639f67756d146103f5578063a22cb465146103fe578063b2ebac2914610411578063b358a2511461041957610269565b80632a55205a116101ea578063715018a6116101ae578063715018a6146103a757806375361318146103af5780637e7a09a7146103b757806384c84e09146103c05780638da5cb5b146103c957806395d89b41146103da57610269565b80632a55205a1461033a57806342842e0e1461035b57806355f804b31461036e5780636352211e1461038157806370a082311461039457610269565b80630c912555116102315780630c912555146102f45780630e913a6c146102fc578063117300951461030957806323b872dd1461031f57806327911b681461033257610269565b806301c644241461026e57806301ffc9a71461028357806306fdde03146102ac578063081812fc146102c1578063095ea7b3146102e1575b600080fd5b61028161027c366004611dc0565b61054a565b005b610296610291366004611d4f565b610659565b6040516102a391906124cf565b60405180910390f35b6102b4610686565b6040516102a391906124eb565b6102d46102cf366004611dc0565b610718565b6040516102a39190612462565b6102816102ef366004611d1f565b610768565b6102816107ee565b6010546102969060ff1681565b610312600e5481565b6040516102a3919061267c565b61028161032d366004611b99565b610900565b601154610312565b61034d610348366004611dde565b610931565b6040516102a39291906124b4565b610281610369366004611b99565b61099b565b61028161037c366004611d8b565b6109b6565b6102d461038f366004611dc0565b6109f7565b6103126103a2366004611a7b565b610a2c565b610281610a70565b610281610aa6565b61031260115481565b610312600d5481565b6006546001600160a01b03166102d4565b6102b4610b5c565b6102816103f0366004611dc0565b610b6b565b610312600b5481565b61028161040c366004611cef565b610b9a565b610312610ba5565b600a546102d4906001600160a01b031681565b61028161043a366004611be6565b610bc9565b61028161044d366004611a7b565b610c01565b610465610460366004611ad3565b610c4d565b6040516102a391906124dd565b610281610480366004611dc0565b610dbf565b6102b4610493366004611dc0565b610ebb565b6008546102d4906001600160a01b031681565b61031260095481565b610281610f24565b6102b4610f62565b610312600c5481565b6103126104db366004611a7b565b60136020526000908152604090205481565b6102816104fb366004611dc0565b610ff0565b61031261101f565b610296610516366004611a99565b611036565b61031260125481565b610465610532366004611c5f565b611066565b610281610545366004611a7b565b61115c565b6006546001600160a01b0316331461057d5760405162461bcd60e51b8152600401610574906125fc565b60405180910390fd5b600260075414156105a05760405162461bcd60e51b81526004016105749061266c565b6002600755600c54816105b161101f565b6105bb91906126cc565b11156105d95760405162461bcd60e51b81526004016105749061263c565b600d54816105e660115490565b6105f091906126cc565b111561060e5760405162461bcd60e51b81526004016105749061255c565b60005b81811015610650576011805490600190600061062d83856126cc565b9091555061063d905033826111b8565b5080610648816127d1565b915050610611565b50506001600755565b60006001600160e01b0319821663152a902d60e11b148061067e575061067e826111d2565b90505b919050565b60606000805461069590612777565b80601f01602080910402602001604051908101604052809291908181526020018280546106c190612777565b801561070e5780601f106106e35761010080835404028352916020019161070e565b820191906000526020600020905b8154815290600101906020018083116106f157829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661074c5760405162461bcd60e51b8152600401610574906125ec565b506000908152600460205260409020546001600160a01b031690565b6000610773826109f7565b9050806001600160a01b0316836001600160a01b031614156107a75760405162461bcd60e51b81526004016105749061262c565b336001600160a01b03821614806107c357506107c38133610516565b6107df5760405162461bcd60e51b81526004016105749061257c565b6107e98383611222565b505050565b60105460ff166108105760405162461bcd60e51b81526004016105749061260c565b600260075414156108335760405162461bcd60e51b81526004016105749061266c565b6002600755600c5461084361101f565b106108605760405162461bcd60e51b81526004016105749061263c565b600d54601154106108835760405162461bcd60e51b81526004016105749061255c565b336000908152601360205260409020546108af5760405162461bcd60e51b8152600401610574906125cc565b601180549060019060006108c383856126cc565b90915550503360009081526013602052604081208054600192906108e8908490612717565b909155506108f8905033826111b8565b506001600755565b61090a3382611290565b6109265760405162461bcd60e51b81526004016105749061264c565b6107e9838383611322565b60008281526002602052604081205481906001600160a01b03166109675760405162461bcd60e51b81526004016105749061256c565b600a54600b546001600160a01b039091169061098f90610988908690611444565b6064611457565b915091505b9250929050565b6107e983838360405180602001604052806000815250610bc9565b6006546001600160a01b031633146109e05760405162461bcd60e51b8152600401610574906125fc565b80516109f390600f9060208401906118c8565b5050565b6000818152600260205260408120546001600160a01b03168061067e5760405162461bcd60e51b8152600401610574906125ac565b60006001600160a01b038216610a545760405162461bcd60e51b81526004016105749061259c565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610a9a5760405162461bcd60e51b8152600401610574906125fc565b610aa46000611463565b565b6006546001600160a01b03163314610ad05760405162461bcd60e51b8152600401610574906125fc565b60026007541415610af35760405162461bcd60e51b81526004016105749061266c565b6002600755600c54610b0361101f565b10610b205760405162461bcd60e51b81526004016105749061263c565b600e54610b2b610ba5565b10610b485760405162461bcd60e51b81526004016105749061265c565b601280549060019060006108e883856126cc565b60606001805461069590612777565b6006546001600160a01b03163314610b955760405162461bcd60e51b8152600401610574906125fc565b600b55565b6109f33383836114b5565b6000600e54600c54610bb79190612717565b601254610bc49190612717565b905090565b610bd33383611290565b610bef5760405162461bcd60e51b81526004016105749061264c565b610bfb84848484611558565b50505050565b6006546001600160a01b03163314610c2b5760405162461bcd60e51b8152600401610574906125fc565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60105460009060ff16610c725760405162461bcd60e51b81526004016105749061260c565b60026007541415610c955760405162461bcd60e51b81526004016105749061266c565b60026007556008546001600160a01b03163314610cc45760405162461bcd60e51b8152600401610574906125bc565b60095486866000818110610ce857634e487b7160e01b600052603260045260246000fd5b9050602002013514610d0c5760405162461bcd60e51b81526004016105749061258c565b60018514610d2c5760405162461bcd60e51b81526004016105749061258c565b83836000818110610d4d57634e487b7160e01b600052603260045260246000fd5b9050602002013560136000896001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d8891906126cc565b90915550506001600755507fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f6694146621979650505050505050565b6006546001600160a01b03163314610de95760405162461bcd60e51b8152600401610574906125fc565b60026007541415610e0c5760405162461bcd60e51b81526004016105749061266c565b6002600755600c5481610e1d61101f565b610e2791906126cc565b1115610e455760405162461bcd60e51b81526004016105749061263c565b600e5481610e51610ba5565b610e5b91906126cc565b1115610e795760405162461bcd60e51b81526004016105749061265c565b60005b818110156106505760128054906001906000610e9883856126cc565b90915550610ea8905033826111b8565b5080610eb3816127d1565b915050610e7c565b6000818152600260205260409020546060906001600160a01b0316610ef25760405162461bcd60e51b81526004016105749061256c565b600f610efd8361158b565b604051602001610f0e929190612434565b6040516020818303038152906040529050919050565b6006546001600160a01b03163314610f4e5760405162461bcd60e51b8152600401610574906125fc565b6010805460ff19811660ff90911615179055565b600f8054610f6f90612777565b80601f0160208091040260200160405190810160405280929190818152602001828054610f9b90612777565b8015610fe85780601f10610fbd57610100808354040283529160200191610fe8565b820191906000526020600020905b815481529060010190602001808311610fcb57829003601f168201915b505050505081565b6006546001600160a01b0316331461101a5760405162461bcd60e51b8152600401610574906125fc565b600955565b6000611029610ba5565b601154610bc491906126cc565b6001600160a01b0380831660009081526005602090815260408083209385168352929052205460ff165b92915050565b60105460009060ff1661108b5760405162461bcd60e51b81526004016105749061260c565b600260075414156110ae5760405162461bcd60e51b81526004016105749061266c565b60026007556008546001600160a01b031633146110dd5760405162461bcd60e51b8152600401610574906125bc565b60095485146110fe5760405162461bcd60e51b81526004016105749061258c565b6001600160a01b038616600090815260136020526040812080548692906111269084906126cc565b90915550506001600755507ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf979695505050505050565b6006546001600160a01b031633146111865760405162461bcd60e51b8152600401610574906125fc565b6001600160a01b0381166111ac5760405162461bcd60e51b81526004016105749061250c565b6111b581611463565b50565b6109f38282604051806020016040528060008152506116a6565b60006001600160e01b031982166380ac58cd60e01b148061120357506001600160e01b03198216635b5e139f60e01b145b8061067e57506301ffc9a760e01b6001600160e01b031983161461067e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611257826109f7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166112c45760405162461bcd60e51b81526004016105749061254c565b60006112cf836109f7565b9050806001600160a01b0316846001600160a01b0316148061130a5750836001600160a01b03166112ff84610718565b6001600160a01b0316145b8061131a575061131a8185611036565b949350505050565b826001600160a01b0316611335826109f7565b6001600160a01b03161461135b5760405162461bcd60e51b81526004016105749061261c565b6001600160a01b0382166113815760405162461bcd60e51b81526004016105749061252c565b61138c600082611222565b6001600160a01b03831660009081526003602052604081208054600192906113b5908490612717565b90915550506001600160a01b03821660009081526003602052604081208054600192906113e39084906126cc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061145082846126f8565b9392505050565b600061145082846126e4565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156114e75760405162461bcd60e51b81526004016105749061253c565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061154b9085906124cf565b60405180910390a3505050565b611563848484611322565b61156f848484846116d9565b610bfb5760405162461bcd60e51b8152600401610574906124fc565b6060816115b057506040805180820190915260018152600360fc1b6020820152610681565b8160005b81156115da57806115c4816127d1565b91506115d39050600a836126e4565b91506115b4565b60008167ffffffffffffffff81111561160357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561162d576020820181803683370190505b5090505b841561131a57611642600183612717565b915061164f600a866127ec565b61165a9060306126cc565b60f81b81838151811061167d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061169f600a866126e4565b9450611631565b6116b083836117e6565b6116bd60008484846116d9565b6107e95760405162461bcd60e51b8152600401610574906124fc565b60006001600160a01b0384163b156117db57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061171d903390899088908890600401612470565b602060405180830381600087803b15801561173757600080fd5b505af1925050508015611767575060408051601f3d908101601f1916820190925261176491810190611d6d565b60015b6117c1573d808015611795576040519150601f19603f3d011682016040523d82523d6000602084013e61179a565b606091505b5080516117b95760405162461bcd60e51b8152600401610574906124fc565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061131a565b506001949350505050565b6001600160a01b03821661180c5760405162461bcd60e51b8152600401610574906125dc565b6000818152600260205260409020546001600160a01b0316156118415760405162461bcd60e51b81526004016105749061251c565b6001600160a01b038216600090815260036020526040812080546001929061186a9084906126cc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546118d490612777565b90600052602060002090601f0160209004810192826118f6576000855561193c565b82601f1061190f57805160ff191683800117855561193c565b8280016001018555821561193c579182015b8281111561193c578251825591602001919060010190611921565b5061194892915061194c565b5090565b5b80821115611948576000815560010161194d565b600061197461196f846126a1565b61268a565b90508281526020810184848401111561198c57600080fd5b61199784828561273f565b509392505050565b803561106081612858565b60008083601f8401126119bc57600080fd5b50813567ffffffffffffffff8111156119d457600080fd5b60208301915083602082028301111561099457600080fd5b80356110608161286c565b803561106081612874565b805161106081612874565b60008083601f840112611a1f57600080fd5b50813567ffffffffffffffff811115611a3757600080fd5b60208301915083600182028301111561099457600080fd5b600082601f830112611a6057600080fd5b813561131a848260208601611961565b803561106081612884565b600060208284031215611a8d57600080fd5b600061131a848461199f565b60008060408385031215611aac57600080fd5b6000611ab8858561199f565b9250506020611ac98582860161199f565b9150509250929050565b600080600080600080600060a0888a031215611aee57600080fd5b6000611afa8a8a61199f565b9750506020611b0b8a828b0161199f565b965050604088013567ffffffffffffffff811115611b2857600080fd5b611b348a828b016119aa565b9550955050606088013567ffffffffffffffff811115611b5357600080fd5b611b5f8a828b016119aa565b9350935050608088013567ffffffffffffffff811115611b7e57600080fd5b611b8a8a828b01611a4f565b91505092959891949750929550565b600080600060608486031215611bae57600080fd5b6000611bba868661199f565b9350506020611bcb8682870161199f565b9250506040611bdc86828701611a70565b9150509250925092565b60008060008060808587031215611bfc57600080fd5b6000611c08878761199f565b9450506020611c198782880161199f565b9350506040611c2a87828801611a70565b925050606085013567ffffffffffffffff811115611c4757600080fd5b611c5387828801611a4f565b91505092959194509250565b60008060008060008060a08789031215611c7857600080fd5b6000611c84898961199f565b9650506020611c9589828a0161199f565b9550506040611ca689828a01611a70565b9450506060611cb789828a01611a70565b935050608087013567ffffffffffffffff811115611cd457600080fd5b611ce089828a01611a0d565b92509250509295509295509295565b60008060408385031215611d0257600080fd5b6000611d0e858561199f565b9250506020611ac9858286016119ec565b60008060408385031215611d3257600080fd5b6000611d3e858561199f565b9250506020611ac985828601611a70565b600060208284031215611d6157600080fd5b600061131a84846119f7565b600060208284031215611d7f57600080fd5b600061131a8484611a02565b600060208284031215611d9d57600080fd5b813567ffffffffffffffff811115611db457600080fd5b61131a84828501611a4f565b600060208284031215611dd257600080fd5b600061131a8484611a70565b60008060408385031215611df157600080fd5b6000611d3e8585611a70565b611e068161272e565b82525050565b801515611e06565b6001600160e01b03198116611e06565b6000611e2e825190565b808452602084019350611e4581856020860161274b565b601f01601f19169290920192915050565b6000611e60825190565b611e6e81856020860161274b565b9290920192915050565b60008154611e8581612777565b600182168015611e9c5760018114611ead57611edd565b60ff19831686528186019350611edd565b60008581526020902060005b83811015611ed557815488820152600190910190602001611eb9565b838801955050505b50505092915050565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b602082015291505b5060400190565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150611f31565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000815291505b5060200190565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b60208201529150611f31565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529150611fab565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150611f31565b60118152600060208201704d41585f4e4f524d414c5f535550504c5960781b81529150611fab565b60118152600060208201702727a722ac24a9aa22a72a2faa27a5a2a760791b81529150611fab565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529150611f31565b60078152600060208201664f4e4c595f474d60c81b81529150611fab565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b60208201529150611f31565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b60208201529150611f31565b601281526000602082017115d493d391d7d3919517d0d3d395149050d560721b81529150611fab565b60058152600060208201644e4f5f563160d81b81529150611fab565b60208082527f4552433732313a206d696e7420746f20746865207a65726f206164647265737391019081526000611fab565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150611f31565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000611fab565b600a8152600060208201694e4f545f41435449564560b01b81529150611fab565b602981526000602082017f4552433732313a207472616e73666572206f6620746f6b656e2074686174206981526839903737ba1037bbb760b91b60208201529150611f31565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b60208201529150611f31565b601081526000602082016f4d41585f544f54414c5f535550504c5960801b81529150611fab565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60208201529150611f31565b60128152600060208201714d41585f5350454349414c5f535550504c5960701b81529150611fab565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529150611fab565b80611e06565b60006124408285611e78565b915061244c8284611e56565b64173539b7b760d91b815291506005820161131a565b602081016110608284611dfd565b6080810161247e8287611dfd565b61248b6020830186611dfd565b612498604083018561242e565b81810360608301526124aa8184611e24565b9695505050505050565b604081016124c28285611dfd565b611450602083018461242e565b602081016110608284611e0c565b602081016110608284611e14565b602080825281016114508184611e24565b6020808252810161067e81611ee6565b6020808252810161067e81611f38565b6020808252810161067e81611f7b565b6020808252810161067e81611fb2565b6020808252810161067e81611ff3565b6020808252810161067e81612027565b6020808252810161067e81612070565b6020808252810161067e81612098565b6020808252810161067e816120c0565b6020808252810161067e8161211a565b6020808252810161067e81612138565b6020808252810161067e8161217f565b6020808252810161067e816121c5565b6020808252810161067e816121ee565b6020808252810161067e8161220a565b6020808252810161067e8161223c565b6020808252810161067e81612285565b6020808252810161067e816122b7565b6020808252810161067e816122d8565b6020808252810161067e8161231e565b6020808252810161067e8161235c565b6020808252810161067e81612383565b6020808252810161067e816123d1565b6020808252810161067e816123fa565b60208101611060828461242e565b600061269560405190565b905061068182826127a4565b600067ffffffffffffffff8211156126bb576126bb612842565b601f19601f83011660200192915050565b600082198211156126df576126df612800565b500190565b6000826126f3576126f3612816565b500490565b600081600019048311821515161561271257612712612800565b500290565b60008282101561272957612729612800565b500390565b60006001600160a01b03821661067e565b82818337506000910152565b60005b8381101561276657818101518382015260200161274e565b83811115610bfb5750506000910152565b60028104600182168061278b57607f821691505b6020821081141561279e5761279e61282c565b50919050565b601f19601f830116810181811067ffffffffffffffff821117156127ca576127ca612842565b6040525050565b60006000198214156127e5576127e5612800565b5060010190565b6000826127fb576127fb612816565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6128618161272e565b81146111b557600080fd5b801515612861565b6001600160e01b03198116612861565b8061286156fea2646970667358221220a394a3257bc748f0ec5898c20d33415250291bb1df4e6866df8a31e2b52bdf0264736f6c634300080200330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000d07dc4262bcdbf85190c01c996b4c06a461d2430000000000000000000000000000000000000000000000000000000000000003068747470733a2f2f6170692e676d73747564696f2e6172742f636f6c6c656374696f6e732f676d76322f746f6b656e2f00000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102695760003560e01c80639a4fc64011610151578063cbeb6bc8116100c3578063d8f5e7e411610087578063d8f5e7e4146104ed578063e536266714610500578063e985e9c514610508578063ea2033b51461051b578063f23a6e6114610524578063f2fde38b1461053757610269565b8063cbeb6bc8146104ab578063d3494d23146104b4578063d547cfb7146104bc578063d5abeb01146104c4578063d5f8678f146104cd57610269565b8063b88d4fde11610115578063b88d4fde1461042c578063bacc587f1461043f578063bc197c8114610452578063c2ffbb7714610472578063c87b56dd14610485578063c9f8819d1461049857610269565b80639a4fc640146103e25780639f67756d146103f5578063a22cb465146103fe578063b2ebac2914610411578063b358a2511461041957610269565b80632a55205a116101ea578063715018a6116101ae578063715018a6146103a757806375361318146103af5780637e7a09a7146103b757806384c84e09146103c05780638da5cb5b146103c957806395d89b41146103da57610269565b80632a55205a1461033a57806342842e0e1461035b57806355f804b31461036e5780636352211e1461038157806370a082311461039457610269565b80630c912555116102315780630c912555146102f45780630e913a6c146102fc578063117300951461030957806323b872dd1461031f57806327911b681461033257610269565b806301c644241461026e57806301ffc9a71461028357806306fdde03146102ac578063081812fc146102c1578063095ea7b3146102e1575b600080fd5b61028161027c366004611dc0565b61054a565b005b610296610291366004611d4f565b610659565b6040516102a391906124cf565b60405180910390f35b6102b4610686565b6040516102a391906124eb565b6102d46102cf366004611dc0565b610718565b6040516102a39190612462565b6102816102ef366004611d1f565b610768565b6102816107ee565b6010546102969060ff1681565b610312600e5481565b6040516102a3919061267c565b61028161032d366004611b99565b610900565b601154610312565b61034d610348366004611dde565b610931565b6040516102a39291906124b4565b610281610369366004611b99565b61099b565b61028161037c366004611d8b565b6109b6565b6102d461038f366004611dc0565b6109f7565b6103126103a2366004611a7b565b610a2c565b610281610a70565b610281610aa6565b61031260115481565b610312600d5481565b6006546001600160a01b03166102d4565b6102b4610b5c565b6102816103f0366004611dc0565b610b6b565b610312600b5481565b61028161040c366004611cef565b610b9a565b610312610ba5565b600a546102d4906001600160a01b031681565b61028161043a366004611be6565b610bc9565b61028161044d366004611a7b565b610c01565b610465610460366004611ad3565b610c4d565b6040516102a391906124dd565b610281610480366004611dc0565b610dbf565b6102b4610493366004611dc0565b610ebb565b6008546102d4906001600160a01b031681565b61031260095481565b610281610f24565b6102b4610f62565b610312600c5481565b6103126104db366004611a7b565b60136020526000908152604090205481565b6102816104fb366004611dc0565b610ff0565b61031261101f565b610296610516366004611a99565b611036565b61031260125481565b610465610532366004611c5f565b611066565b610281610545366004611a7b565b61115c565b6006546001600160a01b0316331461057d5760405162461bcd60e51b8152600401610574906125fc565b60405180910390fd5b600260075414156105a05760405162461bcd60e51b81526004016105749061266c565b6002600755600c54816105b161101f565b6105bb91906126cc565b11156105d95760405162461bcd60e51b81526004016105749061263c565b600d54816105e660115490565b6105f091906126cc565b111561060e5760405162461bcd60e51b81526004016105749061255c565b60005b81811015610650576011805490600190600061062d83856126cc565b9091555061063d905033826111b8565b5080610648816127d1565b915050610611565b50506001600755565b60006001600160e01b0319821663152a902d60e11b148061067e575061067e826111d2565b90505b919050565b60606000805461069590612777565b80601f01602080910402602001604051908101604052809291908181526020018280546106c190612777565b801561070e5780601f106106e35761010080835404028352916020019161070e565b820191906000526020600020905b8154815290600101906020018083116106f157829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661074c5760405162461bcd60e51b8152600401610574906125ec565b506000908152600460205260409020546001600160a01b031690565b6000610773826109f7565b9050806001600160a01b0316836001600160a01b031614156107a75760405162461bcd60e51b81526004016105749061262c565b336001600160a01b03821614806107c357506107c38133610516565b6107df5760405162461bcd60e51b81526004016105749061257c565b6107e98383611222565b505050565b60105460ff166108105760405162461bcd60e51b81526004016105749061260c565b600260075414156108335760405162461bcd60e51b81526004016105749061266c565b6002600755600c5461084361101f565b106108605760405162461bcd60e51b81526004016105749061263c565b600d54601154106108835760405162461bcd60e51b81526004016105749061255c565b336000908152601360205260409020546108af5760405162461bcd60e51b8152600401610574906125cc565b601180549060019060006108c383856126cc565b90915550503360009081526013602052604081208054600192906108e8908490612717565b909155506108f8905033826111b8565b506001600755565b61090a3382611290565b6109265760405162461bcd60e51b81526004016105749061264c565b6107e9838383611322565b60008281526002602052604081205481906001600160a01b03166109675760405162461bcd60e51b81526004016105749061256c565b600a54600b546001600160a01b039091169061098f90610988908690611444565b6064611457565b915091505b9250929050565b6107e983838360405180602001604052806000815250610bc9565b6006546001600160a01b031633146109e05760405162461bcd60e51b8152600401610574906125fc565b80516109f390600f9060208401906118c8565b5050565b6000818152600260205260408120546001600160a01b03168061067e5760405162461bcd60e51b8152600401610574906125ac565b60006001600160a01b038216610a545760405162461bcd60e51b81526004016105749061259c565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b03163314610a9a5760405162461bcd60e51b8152600401610574906125fc565b610aa46000611463565b565b6006546001600160a01b03163314610ad05760405162461bcd60e51b8152600401610574906125fc565b60026007541415610af35760405162461bcd60e51b81526004016105749061266c565b6002600755600c54610b0361101f565b10610b205760405162461bcd60e51b81526004016105749061263c565b600e54610b2b610ba5565b10610b485760405162461bcd60e51b81526004016105749061265c565b601280549060019060006108e883856126cc565b60606001805461069590612777565b6006546001600160a01b03163314610b955760405162461bcd60e51b8152600401610574906125fc565b600b55565b6109f33383836114b5565b6000600e54600c54610bb79190612717565b601254610bc49190612717565b905090565b610bd33383611290565b610bef5760405162461bcd60e51b81526004016105749061264c565b610bfb84848484611558565b50505050565b6006546001600160a01b03163314610c2b5760405162461bcd60e51b8152600401610574906125fc565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60105460009060ff16610c725760405162461bcd60e51b81526004016105749061260c565b60026007541415610c955760405162461bcd60e51b81526004016105749061266c565b60026007556008546001600160a01b03163314610cc45760405162461bcd60e51b8152600401610574906125bc565b60095486866000818110610ce857634e487b7160e01b600052603260045260246000fd5b9050602002013514610d0c5760405162461bcd60e51b81526004016105749061258c565b60018514610d2c5760405162461bcd60e51b81526004016105749061258c565b83836000818110610d4d57634e487b7160e01b600052603260045260246000fd5b9050602002013560136000896001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d8891906126cc565b90915550506001600755507fbc197c819b3e337a6f9652dd10becd7eef83032af3b9d958d3d42f6694146621979650505050505050565b6006546001600160a01b03163314610de95760405162461bcd60e51b8152600401610574906125fc565b60026007541415610e0c5760405162461bcd60e51b81526004016105749061266c565b6002600755600c5481610e1d61101f565b610e2791906126cc565b1115610e455760405162461bcd60e51b81526004016105749061263c565b600e5481610e51610ba5565b610e5b91906126cc565b1115610e795760405162461bcd60e51b81526004016105749061265c565b60005b818110156106505760128054906001906000610e9883856126cc565b90915550610ea8905033826111b8565b5080610eb3816127d1565b915050610e7c565b6000818152600260205260409020546060906001600160a01b0316610ef25760405162461bcd60e51b81526004016105749061256c565b600f610efd8361158b565b604051602001610f0e929190612434565b6040516020818303038152906040529050919050565b6006546001600160a01b03163314610f4e5760405162461bcd60e51b8152600401610574906125fc565b6010805460ff19811660ff90911615179055565b600f8054610f6f90612777565b80601f0160208091040260200160405190810160405280929190818152602001828054610f9b90612777565b8015610fe85780601f10610fbd57610100808354040283529160200191610fe8565b820191906000526020600020905b815481529060010190602001808311610fcb57829003601f168201915b505050505081565b6006546001600160a01b0316331461101a5760405162461bcd60e51b8152600401610574906125fc565b600955565b6000611029610ba5565b601154610bc491906126cc565b6001600160a01b0380831660009081526005602090815260408083209385168352929052205460ff165b92915050565b60105460009060ff1661108b5760405162461bcd60e51b81526004016105749061260c565b600260075414156110ae5760405162461bcd60e51b81526004016105749061266c565b60026007556008546001600160a01b031633146110dd5760405162461bcd60e51b8152600401610574906125bc565b60095485146110fe5760405162461bcd60e51b81526004016105749061258c565b6001600160a01b038616600090815260136020526040812080548692906111269084906126cc565b90915550506001600755507ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf979695505050505050565b6006546001600160a01b031633146111865760405162461bcd60e51b8152600401610574906125fc565b6001600160a01b0381166111ac5760405162461bcd60e51b81526004016105749061250c565b6111b581611463565b50565b6109f38282604051806020016040528060008152506116a6565b60006001600160e01b031982166380ac58cd60e01b148061120357506001600160e01b03198216635b5e139f60e01b145b8061067e57506301ffc9a760e01b6001600160e01b031983161461067e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611257826109f7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166112c45760405162461bcd60e51b81526004016105749061254c565b60006112cf836109f7565b9050806001600160a01b0316846001600160a01b0316148061130a5750836001600160a01b03166112ff84610718565b6001600160a01b0316145b8061131a575061131a8185611036565b949350505050565b826001600160a01b0316611335826109f7565b6001600160a01b03161461135b5760405162461bcd60e51b81526004016105749061261c565b6001600160a01b0382166113815760405162461bcd60e51b81526004016105749061252c565b61138c600082611222565b6001600160a01b03831660009081526003602052604081208054600192906113b5908490612717565b90915550506001600160a01b03821660009081526003602052604081208054600192906113e39084906126cc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061145082846126f8565b9392505050565b600061145082846126e4565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156114e75760405162461bcd60e51b81526004016105749061253c565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061154b9085906124cf565b60405180910390a3505050565b611563848484611322565b61156f848484846116d9565b610bfb5760405162461bcd60e51b8152600401610574906124fc565b6060816115b057506040805180820190915260018152600360fc1b6020820152610681565b8160005b81156115da57806115c4816127d1565b91506115d39050600a836126e4565b91506115b4565b60008167ffffffffffffffff81111561160357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561162d576020820181803683370190505b5090505b841561131a57611642600183612717565b915061164f600a866127ec565b61165a9060306126cc565b60f81b81838151811061167d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061169f600a866126e4565b9450611631565b6116b083836117e6565b6116bd60008484846116d9565b6107e95760405162461bcd60e51b8152600401610574906124fc565b60006001600160a01b0384163b156117db57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061171d903390899088908890600401612470565b602060405180830381600087803b15801561173757600080fd5b505af1925050508015611767575060408051601f3d908101601f1916820190925261176491810190611d6d565b60015b6117c1573d808015611795576040519150601f19603f3d011682016040523d82523d6000602084013e61179a565b606091505b5080516117b95760405162461bcd60e51b8152600401610574906124fc565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061131a565b506001949350505050565b6001600160a01b03821661180c5760405162461bcd60e51b8152600401610574906125dc565b6000818152600260205260409020546001600160a01b0316156118415760405162461bcd60e51b81526004016105749061251c565b6001600160a01b038216600090815260036020526040812080546001929061186a9084906126cc565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546118d490612777565b90600052602060002090601f0160209004810192826118f6576000855561193c565b82601f1061190f57805160ff191683800117855561193c565b8280016001018555821561193c579182015b8281111561193c578251825591602001919060010190611921565b5061194892915061194c565b5090565b5b80821115611948576000815560010161194d565b600061197461196f846126a1565b61268a565b90508281526020810184848401111561198c57600080fd5b61199784828561273f565b509392505050565b803561106081612858565b60008083601f8401126119bc57600080fd5b50813567ffffffffffffffff8111156119d457600080fd5b60208301915083602082028301111561099457600080fd5b80356110608161286c565b803561106081612874565b805161106081612874565b60008083601f840112611a1f57600080fd5b50813567ffffffffffffffff811115611a3757600080fd5b60208301915083600182028301111561099457600080fd5b600082601f830112611a6057600080fd5b813561131a848260208601611961565b803561106081612884565b600060208284031215611a8d57600080fd5b600061131a848461199f565b60008060408385031215611aac57600080fd5b6000611ab8858561199f565b9250506020611ac98582860161199f565b9150509250929050565b600080600080600080600060a0888a031215611aee57600080fd5b6000611afa8a8a61199f565b9750506020611b0b8a828b0161199f565b965050604088013567ffffffffffffffff811115611b2857600080fd5b611b348a828b016119aa565b9550955050606088013567ffffffffffffffff811115611b5357600080fd5b611b5f8a828b016119aa565b9350935050608088013567ffffffffffffffff811115611b7e57600080fd5b611b8a8a828b01611a4f565b91505092959891949750929550565b600080600060608486031215611bae57600080fd5b6000611bba868661199f565b9350506020611bcb8682870161199f565b9250506040611bdc86828701611a70565b9150509250925092565b60008060008060808587031215611bfc57600080fd5b6000611c08878761199f565b9450506020611c198782880161199f565b9350506040611c2a87828801611a70565b925050606085013567ffffffffffffffff811115611c4757600080fd5b611c5387828801611a4f565b91505092959194509250565b60008060008060008060a08789031215611c7857600080fd5b6000611c84898961199f565b9650506020611c9589828a0161199f565b9550506040611ca689828a01611a70565b9450506060611cb789828a01611a70565b935050608087013567ffffffffffffffff811115611cd457600080fd5b611ce089828a01611a0d565b92509250509295509295509295565b60008060408385031215611d0257600080fd5b6000611d0e858561199f565b9250506020611ac9858286016119ec565b60008060408385031215611d3257600080fd5b6000611d3e858561199f565b9250506020611ac985828601611a70565b600060208284031215611d6157600080fd5b600061131a84846119f7565b600060208284031215611d7f57600080fd5b600061131a8484611a02565b600060208284031215611d9d57600080fd5b813567ffffffffffffffff811115611db457600080fd5b61131a84828501611a4f565b600060208284031215611dd257600080fd5b600061131a8484611a70565b60008060408385031215611df157600080fd5b6000611d3e8585611a70565b611e068161272e565b82525050565b801515611e06565b6001600160e01b03198116611e06565b6000611e2e825190565b808452602084019350611e4581856020860161274b565b601f01601f19169290920192915050565b6000611e60825190565b611e6e81856020860161274b565b9290920192915050565b60008154611e8581612777565b600182168015611e9c5760018114611ead57611edd565b60ff19831686528186019350611edd565b60008581526020902060005b83811015611ed557815488820152600190910190602001611eb9565b838801955050505b50505092915050565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b602082015291505b5060400190565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b60208201529150611f31565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000815291505b5060200190565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b60208201529150611f31565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c65720000000000000081529150611fab565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150611f31565b60118152600060208201704d41585f4e4f524d414c5f535550504c5960781b81529150611fab565b60118152600060208201702727a722ac24a9aa22a72a2faa27a5a2a760791b81529150611fab565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060208201529150611f31565b60078152600060208201664f4e4c595f474d60c81b81529150611fab565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b60208201529150611f31565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b60208201529150611f31565b601281526000602082017115d493d391d7d3919517d0d3d395149050d560721b81529150611fab565b60058152600060208201644e4f5f563160d81b81529150611fab565b60208082527f4552433732313a206d696e7420746f20746865207a65726f206164647265737391019081526000611fab565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b60208201529150611f31565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000611fab565b600a8152600060208201694e4f545f41435449564560b01b81529150611fab565b602981526000602082017f4552433732313a207472616e73666572206f6620746f6b656e2074686174206981526839903737ba1037bbb760b91b60208201529150611f31565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b60208201529150611f31565b601081526000602082016f4d41585f544f54414c5f535550504c5960801b81529150611fab565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60208201529150611f31565b60128152600060208201714d41585f5350454349414c5f535550504c5960701b81529150611fab565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081529150611fab565b80611e06565b60006124408285611e78565b915061244c8284611e56565b64173539b7b760d91b815291506005820161131a565b602081016110608284611dfd565b6080810161247e8287611dfd565b61248b6020830186611dfd565b612498604083018561242e565b81810360608301526124aa8184611e24565b9695505050505050565b604081016124c28285611dfd565b611450602083018461242e565b602081016110608284611e0c565b602081016110608284611e14565b602080825281016114508184611e24565b6020808252810161067e81611ee6565b6020808252810161067e81611f38565b6020808252810161067e81611f7b565b6020808252810161067e81611fb2565b6020808252810161067e81611ff3565b6020808252810161067e81612027565b6020808252810161067e81612070565b6020808252810161067e81612098565b6020808252810161067e816120c0565b6020808252810161067e8161211a565b6020808252810161067e81612138565b6020808252810161067e8161217f565b6020808252810161067e816121c5565b6020808252810161067e816121ee565b6020808252810161067e8161220a565b6020808252810161067e8161223c565b6020808252810161067e81612285565b6020808252810161067e816122b7565b6020808252810161067e816122d8565b6020808252810161067e8161231e565b6020808252810161067e8161235c565b6020808252810161067e81612383565b6020808252810161067e816123d1565b6020808252810161067e816123fa565b60208101611060828461242e565b600061269560405190565b905061068182826127a4565b600067ffffffffffffffff8211156126bb576126bb612842565b601f19601f83011660200192915050565b600082198211156126df576126df612800565b500190565b6000826126f3576126f3612816565b500490565b600081600019048311821515161561271257612712612800565b500290565b60008282101561272957612729612800565b500390565b60006001600160a01b03821661067e565b82818337506000910152565b60005b8381101561276657818101518382015260200161274e565b83811115610bfb5750506000910152565b60028104600182168061278b57607f821691505b6020821081141561279e5761279e61282c565b50919050565b601f19601f830116810181811067ffffffffffffffff821117156127ca576127ca612842565b6040525050565b60006000198214156127e5576127e5612800565b5060010190565b6000826127fb576127fb612816565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6128618161272e565b81146111b557600080fd5b801515612861565b6001600160e01b03198116612861565b8061286156fea2646970667358221220a394a3257bc748f0ec5898c20d33415250291bb1df4e6866df8a31e2b52bdf0264736f6c63430008020033

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

0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000d07dc4262bcdbf85190c01c996b4c06a461d2430000000000000000000000000000000000000000000000000000000000000003068747470733a2f2f6170692e676d73747564696f2e6172742f636f6c6c656374696f6e732f676d76322f746f6b656e2f00000000000000000000000000000000

-----Decoded View---------------
Arg [0] : baseURI (string): https://api.gmstudio.art/collections/gmv2/token/
Arg [1] : raribleAddress (address): 0xd07dc4262BCDbf85190C01c996b4C06a461d2430

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 000000000000000000000000d07dc4262bcdbf85190c01c996b4c06a461d2430
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000030
Arg [3] : 68747470733a2f2f6170692e676d73747564696f2e6172742f636f6c6c656374
Arg [4] : 696f6e732f676d76322f746f6b656e2f00000000000000000000000000000000


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.