ETH Price: $2,508.04 (-5.21%)

Token

CryptoonGoonzPortal (CGP)
 

Overview

Max Total Supply

3,664 CGP

Holders

1,252

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
0 CGP
0x21d879f2871B63964804625788d896900E7511a6
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
GoonzPortal

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 800 runs

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

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";

contract GoonzPortal is ERC721, IERC721Receiver, Ownable, ReentrancyGuard, IERC2981, AccessControl {
    using Strings for uint256;
    event GoonTransported(uint256 indexed tokenId, uint256 indexed worldId);
    event GoonReturned(uint256 indexed tokenId);
    CryptoonGoonz immutable cryptoonGoonzContract;
    uint256 private _mintCounter = 1;

    address public royaltiesAddress;
    uint256 public royaltiesBasisPoints;
    uint256 private constant ROYALTY_DENOMINATOR = 10_000;

    address private _proxyRegistryAddress;
    bool public isOpenSeaProxyActive = true;

    bool public transfersEnabled = true;
    bool public exitingEnabled = true;
    uint256 private preserveTimeTransfer = 1;

    struct World {
        string baseURI;
        bool isOpen;
    }

    struct PassPortal {
        uint64 startTime;
        uint64 totalTime;
        uint64 currentWorldStartTime;
        uint48 aux;
        uint16 currentWorld;
    }

    // world id -> world
    mapping(uint256 => World) private _worlds;
    // token id -> pass portal
    mapping(uint256 => PassPortal) private _passPortals;

    bytes32 public constant AUX_WRITER_ROLE = keccak256("AUX_WRITER_ROLE");

    constructor(
        string memory _initBaseURI,
        address _cryptoonGoonzContract,
        address proxyRegistryAddress,
        address royaltiesAddress_,
        uint256 royaltiesBasisPoints_
    ) ERC721("CryptoonGoonzPortal", "CGP") {
        _worlds[0].baseURI = _initBaseURI;
        royaltiesAddress = royaltiesAddress_;
        _proxyRegistryAddress = proxyRegistryAddress;
        royaltiesBasisPoints = royaltiesBasisPoints_;
        cryptoonGoonzContract = CryptoonGoonz(_cryptoonGoonzContract);
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view returns (uint256) {
        return _mintCounter - 1;
    }

    function transportMany(uint256[] memory tokenIds) public {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            cryptoonGoonzContract.safeTransferFrom(msg.sender, address(this), tokenIds[i], "");
        }
    }

    function transportManyWithWorld(uint256[] memory tokenIds, uint256 worldId) public {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            cryptoonGoonzContract.safeTransferFrom(msg.sender, address(this), tokenIds[i], abi.encode((worldId)));
        }
    }

    function exitMany(uint256[] memory tokenIds) public {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _safeTransfer(msg.sender, address(this), tokenIds[i], "");
        }
    }

    function exitPortal(uint256 tokenId) public {
        _safeTransfer(msg.sender, address(this), tokenId, "");
    }

    function changeWorlds(uint256[] memory tokenIds, uint256 worldId) public {
        require(_worlds[worldId].isOpen, "world is not open currently");
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(_passPortals[tokenIds[i]].currentWorld != worldId, "already in this world");
            _passPortals[tokenIds[i]].currentWorld = uint16(worldId);
            _passPortals[tokenIds[i]].currentWorldStartTime = uint64(block.timestamp);
            emit GoonTransported(tokenIds[i], worldId);
        }
    }

    function passPortalInfo(uint256 tokenId)
        external
        view
        returns (
            uint256 worldCurrent,
            uint256 current,
            uint256 total
        )
    {
        require(_exists(tokenId), "nonexistent token id");
        PassPortal memory passportal = _passPortals[tokenId];
        worldCurrent = passportal.currentWorldStartTime <= 1
            ? 0
            : uint256(block.timestamp - passportal.currentWorldStartTime);
        current = passportal.startTime <= 1 ? 0 : uint256(block.timestamp - passportal.startTime);
        total = uint256(current + passportal.totalTime);
    }

    function worlds(uint256 worldId)
        public
        view
        returns (
            uint256 id,
            string memory baseURI,
            bool isOpen
        )
    {
        id = worldId;
        World memory world = _worlds[id];
        baseURI = world.baseURI;
        isOpen = world.isOpen;
    }

    function currentWorld(uint256 tokenId)
        public
        view
        returns (
            uint256 id,
            string memory baseURI,
            bool isOpen
        )
    {
        require(_exists(tokenId), "nonexistent token id");
        return worlds(_passPortals[tokenId].currentWorld);
    }

    function upsertWorld(uint256 worldId, string memory baseURI) external onlyOwner {
        _worlds[worldId].baseURI = baseURI;
    }

    function toggleWorldOpen(uint256 worldId) external onlyOwner {
        require(bytes(_worlds[worldId].baseURI).length > 0, "World hasn't been created yet");
        World storage world = _worlds[worldId];
        world.isOpen = !world.isOpen;
    }

    /**
     * @dev To disable OpenSea gasless listings proxy in case of an issue
     */
    function toggleOpenSeaActive() external onlyOwner {
        isOpenSeaProxyActive = !isOpenSeaProxyActive;
    }

    function toggleTransfersEnabled() external onlyOwner {
        transfersEnabled = !transfersEnabled;
    }

    function toggleExitingEnabled() external onlyOwner {
        exitingEnabled = !exitingEnabled;
    }

    function safeTransferPreserveTime(
        address from,
        address to,
        uint256 tokenId
    ) external {
        require(to != address(this), "can't exit the portal");
        preserveTimeTransfer = 2;
        safeTransferFrom(from, to, tokenId);
        preserveTimeTransfer = 1;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        uint256 worldId = _passPortals[tokenId].currentWorld;
        World memory world = _worlds[worldId];
        return
            bytes(world.baseURI).length > 0 ? string(abi.encodePacked(world.baseURI, tokenId.toString(), ".json")) : "";
    }

    function exists(uint256 tokenId) public view returns (bool) {
        return _exists(tokenId);
    }

    function walletOfOwner(address _owner) public view returns (uint256[] memory) {
        uint256 ownerTokenCount = balanceOf(_owner);
        uint256[] memory tokenIds = new uint256[](ownerTokenCount);
        uint256 i = 0;
        for (uint256 tokenId = 1; tokenId <= 6969; tokenId++) {
            if (!_exists(tokenId)) {
                continue;
            }
            if (ownerTokenCount == i) {
                break;
            }
            if (ownerOf(tokenId) == _owner) {
                tokenIds[i] = tokenId;
                i++;
            }
        }
        return tokenIds;
    }

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

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

    /**
     * @notice enable OpenSea gasless listings
     * @dev Overriding `isApprovedForAll` to allowlist user's OpenSea proxy accounts
     */
    function isApprovedForAll(address owner, address operator) public view override returns (bool) {
        ProxyRegistry proxyRegistry = ProxyRegistry(_proxyRegistryAddress);
        if (isOpenSeaProxyActive && address(proxyRegistry.proxies(owner)) == operator) {
            return true;
        }

        return super.isApprovedForAll(owner, operator);
    }

    function setRoyaltiesAddress(address _royaltiesAddress) external onlyOwner {
        royaltiesAddress = _royaltiesAddress;
    }

    function setRoyaltiesBasisPoints(uint256 _royaltiesBasisPoints) external onlyOwner {
        require(_royaltiesBasisPoints < royaltiesBasisPoints, "New royalty amount must be lower");
        royaltiesBasisPoints = _royaltiesBasisPoints;
    }

    function setAux(uint256 tokenId, uint48 newAux) external onlyRole(AUX_WRITER_ROLE) {
        _passPortals[tokenId].aux = newAux;
    }

    function getAux(uint256 tokenId) external view returns (uint256) {
        return uint256(_passPortals[tokenId].aux);
    }

    /**
     * @dev See {IERC2981-royaltyInfo}.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        require(_exists(tokenId), "Non-existent token");
        return (royaltiesAddress, (salePrice * royaltiesBasisPoints) / ROYALTY_DENOMINATOR);
    }

    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external override nonReentrant returns (bytes4) {
        require(
            msg.sender == address(cryptoonGoonzContract) || msg.sender == address(this),
            "Operator not Cryptoon Goonz or Goonz Portal contract"
        );

        bool enteringPortal = msg.sender == address(cryptoonGoonzContract);
        if (enteringPortal) {
            // validate that it can decode properly
            uint256 worldId = data.length > 0 ? abi.decode(data, (uint256)) : 0;
            require(_worlds[worldId].isOpen, "world is not open currently");
            if (_passPortals[tokenId].currentWorld != worldId) {
                unchecked {
                    _passPortals[tokenId].currentWorld = uint16(worldId);
                }
            }

            if (_exists(tokenId)) {
                _safeTransfer(address(this), from, tokenId, "");
            } else {
                _safeMint(from, tokenId);
                _mintCounter++;
            }
            emit GoonTransported(tokenId, worldId);
        } else {
            require(exitingEnabled, "exiting not allowed right now");
            cryptoonGoonzContract.safeTransferFrom(address(this), from, tokenId, "");
            emit GoonReturned(tokenId);
        }

        return this.onERC721Received.selector;
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override {
        unchecked {
            // enter the portal
            if (from == address(this) || from == address(0)) {
                _passPortals[tokenId].currentWorldStartTime = uint64(block.timestamp);
                _passPortals[tokenId].startTime = uint64(block.timestamp);
                // exit the portal
            } else if (to == address(this)) {
                _passPortals[tokenId].currentWorldStartTime = 1;
                _passPortals[tokenId].totalTime += uint64(block.timestamp - _passPortals[tokenId].startTime);
                _passPortals[tokenId].startTime = 1;
                // transfer/sell your NFT
            } else {
                if (preserveTimeTransfer == 1) {
                    require(transfersEnabled, "Traveling the gooniverse");
                    _passPortals[tokenId].currentWorldStartTime = uint64(block.timestamp);
                    _passPortals[tokenId].totalTime += uint64(block.timestamp - _passPortals[tokenId].startTime);
                    _passPortals[tokenId].startTime = uint64(block.timestamp);
                }
            }
        }
    }
}

interface CryptoonGoonz {
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        bytes memory data
    ) external;

    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

contract OwnableDelegateProxy {}

contract ProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 5 of 15 : 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 15 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 12 of 15 : 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 13 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 15 of 15 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"address","name":"_cryptoonGoonzContract","type":"address"},{"internalType":"address","name":"proxyRegistryAddress","type":"address"},{"internalType":"address","name":"royaltiesAddress_","type":"address"},{"internalType":"uint256","name":"royaltiesBasisPoints_","type":"uint256"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"GoonReturned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"worldId","type":"uint256"}],"name":"GoonTransported","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"AUX_WRITER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"worldId","type":"uint256"}],"name":"changeWorlds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"currentWorld","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"isOpen","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"exitMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exitPortal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exitingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getAux","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"isOpenSeaProxyActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"passPortalInfo","outputs":[{"internalType":"uint256","name":"worldCurrent","type":"uint256"},{"internalType":"uint256","name":"current","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltiesAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltiesBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferPreserveTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint48","name":"newAux","type":"uint48"}],"name":"setAux","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltiesAddress","type":"address"}],"name":"setRoyaltiesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royaltiesBasisPoints","type":"uint256"}],"name":"setRoyaltiesBasisPoints","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":"toggleExitingEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleOpenSeaActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleTransfersEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"worldId","type":"uint256"}],"name":"toggleWorldOpen","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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transfersEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"transportMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"worldId","type":"uint256"}],"name":"transportManyWithWorld","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"worldId","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"}],"name":"upsertWorld","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"worldId","type":"uint256"}],"name":"worlds","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"isOpen","type":"bool"}],"stateMutability":"view","type":"function"}]

60a060405260016009819055600c805462ffffff60a01b19166201010160a01b179055600d553480156200003257600080fd5b5060405162003f5b38038062003f5b83398101604081905262000055916200035f565b604080518082018252601381527f43727970746f6f6e476f6f6e7a506f7274616c0000000000000000000000000060208083019182528351808501909452600384526204347560ec1b908401528151919291620000b59160009162000286565b508051620000cb90600190602084019062000286565b505050620000e8620000e26200017c60201b60201c565b62000180565b600160075560008052600e602090815285516200012b917fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c919088019062000286565b50600a80546001600160a01b038085166001600160a01b031992831617909255600c80548684169216919091179055600b829055841660805262000171600033620001d2565b5050505050620004bc565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001de8282620001e2565b5050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620001de5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002423390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b82805462000294906200047f565b90600052602060002090601f016020900481019282620002b8576000855562000303565b82601f10620002d357805160ff191683800117855562000303565b8280016001018555821562000303579182015b8281111562000303578251825591602001919060010190620002e6565b506200031192915062000315565b5090565b5b8082111562000311576000815560010162000316565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200035a57600080fd5b919050565b600080600080600060a086880312156200037857600080fd5b85516001600160401b03808211156200039057600080fd5b818801915088601f830112620003a557600080fd5b815181811115620003ba57620003ba6200032c565b604051601f8201601f19908116603f01168101908382118183101715620003e557620003e56200032c565b81604052828152602093508b848487010111156200040257600080fd5b600091505b8282101562000426578482018401518183018501529083019062000407565b82821115620004385760008484830101525b98506200044a91505088820162000342565b955050506200045c6040870162000342565b92506200046c6060870162000342565b9150608086015190509295509295909350565b600181811c908216806200049457607f821691505b60208210811415620004b657634e487b7160e01b600052602260045260246000fd5b50919050565b608051613a67620004f460003960008181610a4801528181610bd701528181610c7f01528181610ea601526111b90152613a676000f3fe608060405234801561001057600080fd5b50600436106103415760003560e01c80636c529a26116101bd578063b1b06fca116100f9578063dc95c4a7116100a2578063e985e9c51161007c578063e985e9c514610766578063e9ffa61e14610779578063f22e9e4b146107a7578063f2fde38b146107ba57600080fd5b8063dc95c4a714610738578063e4435e131461074b578063e52a8a211461075e57600080fd5b8063c87b56dd116100d3578063c87b56dd146106ff578063caed914314610712578063d547741f1461072557600080fd5b8063b1b06fca146106c5578063b88d4fde146106d8578063bef97c87146106eb57600080fd5b806395d89b4111610166578063a53a84b611610140578063a53a84b614610667578063a6c5e2d714610670578063a9c1c57014610683578063af436af31461069657600080fd5b806395d89b4114610644578063a217fddf1461064c578063a22cb4651461065457600080fd5b80638da5cb5b116101975780638da5cb5b146105e75780638dbea3ba146105f857806391d148541461060b57600080fd5b80636c529a26146105b857806370a08231146105cc578063715018a6146105df57600080fd5b80632d47167f1161028c57806342842e0e116102355780634f558e791161020f5780634f558e791461056b57806355e740761461057e5780636352211e14610592578063640909c3146105a557600080fd5b806342842e0e14610511578063438b6300146105245780634711a5731461054457600080fd5b8063328825351161026657806332882535146104c957806336568abe146104dc5780633a1956ce146104ef57600080fd5b80632d47167f1461049b5780632f2ff15d146104a35780632fe9fd4d146104b657600080fd5b8063150b7a02116102ee57806323b872dd116102c857806323b872dd14610433578063248a9ca3146104465780632a55205a1461046957600080fd5b8063150b7a02146103e957806318160ddd14610415578063238e5ad11461042b57600080fd5b8063095ea7b31161031f578063095ea7b3146103ae5780630e414e0d146103c357806312ca9d41146103d657600080fd5b806301ffc9a71461034657806306fdde031461036e578063081812fc14610383575b600080fd5b6103596103543660046131f9565b6107cd565b60405190151581526020015b60405180910390f35b6103766107f8565b604051610365919061326e565b610396610391366004613281565b61088a565b6040516001600160a01b039091168152602001610365565b6103c16103bc3660046132af565b610924565b005b6103c16103d13660046133a2565b610a3a565b6103c16103e43660046133a2565b610b20565b6103fc6103f73660046133d7565b610b72565b6040516001600160e01b03199091168152602001610365565b61041d610f46565b604051908152602001610365565b6103c1610f5c565b6103c1610441366004613476565b610fe0565b61041d610454366004613281565b60009081526008602052604090206001015490565b61047c6104773660046134b7565b611067565b604080516001600160a01b039093168352602083019190915201610365565b6103c1611102565b6103c16104b13660046134d9565b611186565b6103c16104c4366004613509565b6111ab565b600a54610396906001600160a01b031681565b6103c16104ea3660046134d9565b611288565b6105026104fd366004613281565b611310565b6040516103659392919061354e565b6103c161051f366004613476565b6113e2565b610537610532366004613579565b6113fd565b6040516103659190613596565b61041d7f1b78be8aa59116bcb86ee79690db21659faf7abcb7507943f2407e659c5cd46381565b610359610579366004613281565b6114f9565b600c5461035990600160b01b900460ff1681565b6103966105a0366004613281565b611518565b6103c16105b3366004613281565b6115a3565b600c5461035990600160a01b900460ff1681565b61041d6105da366004613579565b611641565b6103c16116db565b6006546001600160a01b0316610396565b610502610606366004613281565b61172f565b6103596106193660046134d9565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6103766117c8565b61041d600081565b6103c16106623660046135da565b6117d7565b61041d600b5481565b6103c161067e366004613476565b6117e2565b6103c1610691366004613509565b611855565b61041d6106a4366004613281565b6000908152600f6020526040902054600160c01b900465ffffffffffff1690565b6103c16106d3366004613665565b611a46565b6103c16106e63660046136c0565b611aad565b600c5461035990600160a81b900460ff1681565b61037661070d366004613281565b611b3b565b6103c1610720366004613740565b611cf0565b6103c16107333660046134d9565b611d68565b6103c1610746366004613579565b611d8d565b6103c1610759366004613281565b611df7565b6103c1611e15565b610359610774366004613770565b611e99565b61078c610787366004613281565b611f81565b60408051938452602084019290925290820152606001610365565b6103c16107b5366004613281565b6120e3565b6103c16107c8366004613579565b6121b6565b60006001600160e01b0319821663152a902d60e11b14806107f257506107f282612283565b92915050565b6060600080546108079061379e565b80601f01602080910402602001604051908101604052809291908181526020018280546108339061379e565b80156108805780601f1061085557610100808354040283529160200191610880565b820191906000526020600020905b81548152906001019060200180831161086357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109085760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061092f82611518565b9050806001600160a01b0316836001600160a01b0316141561099d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108ff565b336001600160a01b03821614806109b957506109b98133611e99565b610a2b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108ff565b610a3583836122a8565b505050565b60005b8151811015610b1c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b88d4fde3330858581518110610a8957610a896137d9565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152608060648201526000608482015260a401600060405180830381600087803b158015610af157600080fd5b505af1158015610b05573d6000803e3d6000fd5b505050508080610b1490613805565b915050610a3d565b5050565b60005b8151811015610b1c57610b603330848481518110610b4357610b436137d9565b602002602001015160405180602001604052806000815250612316565b80610b6a81613805565b915050610b23565b600060026007541415610bc75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ff565b6002600755336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610c0257503330145b610c745760405162461bcd60e51b815260206004820152603460248201527f4f70657261746f72206e6f742043727970746f6f6e20476f6f6e7a206f72204760448201527f6f6f6e7a20506f7274616c20636f6e747261637400000000000000000000000060648201526084016108ff565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015610e1357600083610cb4576000610cc0565b610cc084860186613281565b6000818152600e602052604090206001015490915060ff16610d245760405162461bcd60e51b815260206004820152601b60248201527f776f726c64206973206e6f74206f70656e2063757272656e746c79000000000060448201526064016108ff565b6000868152600f6020526040902054600160f01b900461ffff168114610d83576000868152600f6020526040902080547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160f01b61ffff8416021790555b6000868152600260205260409020546001600160a01b031615610dc057610dbb30888860405180602001604052806000815250612316565b610de0565b610dca8787612394565b60098054906000610dda83613805565b91905055505b604051819087907fe60fbf276e9e41cf33520ad8e6b947f131d9dc501a3b1b18840d43bb1e5b04ee90600090a350610f2e565b600c54600160b01b900460ff16610e6c5760405162461bcd60e51b815260206004820152601d60248201527f65786974696e67206e6f7420616c6c6f776564207269676874206e6f7700000060448201526064016108ff565b604051635c46a7ef60e11b81523060048201526001600160a01b0387811660248301526044820187905260806064830152600060848301527f0000000000000000000000000000000000000000000000000000000000000000169063b88d4fde9060a401600060405180830381600087803b158015610eea57600080fd5b505af1158015610efe573d6000803e3d6000fd5b50506040518792507fee32000080c2ea75fdca738974237a621eccab6378b2ea07bce8ad1c2d0c45339150600090a25b5050600160075550630a85bd0160e11b949350505050565b60006001600954610f579190613820565b905090565b6006546001600160a01b03163314610fa45760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b610fea33826123ae565b61105c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108ff565b610a35838383612484565b60008281526002602052604081205481906001600160a01b03166110cd5760405162461bcd60e51b815260206004820152601260248201527f4e6f6e2d6578697374656e7420746f6b656e000000000000000000000000000060448201526064016108ff565b600a54600b546001600160a01b0390911690612710906110ed9086613837565b6110f7919061386c565b915091509250929050565b6006546001600160a01b0316331461114a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600c80547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff8116600160b01b9182900460ff1615909102179055565b6000828152600860205260409020600101546111a181612643565b610a35838361264d565b60005b8251811015610a35577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b88d4fde33308685815181106111fa576111fa6137d9565b60200260200101518660405160200161121591815260200190565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016112439493929190613880565b600060405180830381600087803b15801561125d57600080fd5b505af1158015611271573d6000803e3d6000fd5b50505050808061128090613805565b9150506111ae565b6001600160a01b03811633146113065760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108ff565b610b1c82826126ef565b6000818152600e6020526040808220815180830190925280548493606093909283928290829061133f9061379e565b80601f016020809104026020016040519081016040528092919081815260200182805461136b9061379e565b80156113b85780601f1061138d576101008083540402835291602001916113b8565b820191906000526020600020905b81548152906001019060200180831161139b57829003601f168201915b50505091835250506001919091015460ff1615156020918201528151910151949690955092505050565b610a3583838360405180602001604052806000815250611aad565b6060600061140a83611641565b905060008167ffffffffffffffff811115611427576114276132db565b604051908082528060200260200182016040528015611450578160200160208202803683370190505b509050600060015b611b3981116114ef576000818152600260205260409020546001600160a01b0316611482576114dd565b8184141561148f576114ef565b856001600160a01b03166114a282611518565b6001600160a01b031614156114dd57808383815181106114c4576114c46137d9565b6020908102919091010152816114d981613805565b9250505b806114e781613805565b915050611458565b5090949350505050565b6000818152600260205260408120546001600160a01b031615156107f2565b6000818152600260205260408120546001600160a01b0316806107f25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016108ff565b6006546001600160a01b031633146115eb5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600b54811061163c5760405162461bcd60e51b815260206004820181905260248201527f4e657720726f79616c747920616d6f756e74206d757374206265206c6f77657260448201526064016108ff565b600b55565b60006001600160a01b0382166116bf5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016108ff565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146117235760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b61172d6000612772565b565b60008181526002602052604081205460609082906001600160a01b03166117985760405162461bcd60e51b815260206004820152601460248201527f6e6f6e6578697374656e7420746f6b656e20696400000000000000000000000060448201526064016108ff565b6000848152600f60205260409020546117bb90600160f01b900461ffff16611310565b9250925092509193909250565b6060600180546108079061379e565b610b1c3383836127c4565b6001600160a01b03821630141561183b5760405162461bcd60e51b815260206004820152601560248201527f63616e277420657869742074686520706f7274616c000000000000000000000060448201526064016108ff565b6002600d5561184b8383836113e2565b50506001600d5550565b6000818152600e602052604090206001015460ff166118b65760405162461bcd60e51b815260206004820152601b60248201527f776f726c64206973206e6f74206f70656e2063757272656e746c79000000000060448201526064016108ff565b60005b8251811015610a355781600f60008584815181106118d9576118d96137d9565b602090810291909101810151825281019190915260400160002054600160f01b900461ffff16141561194d5760405162461bcd60e51b815260206004820152601560248201527f616c726561647920696e207468697320776f726c64000000000000000000000060448201526064016108ff565b81600f6000858481518110611964576119646137d9565b60200260200101518152602001908152602001600020600001601e6101000a81548161ffff021916908361ffff16021790555042600f60008584815181106119ae576119ae6137d9565b6020026020010151815260200190815260200160002060000160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081838281518110611a0057611a006137d9565b60200260200101517fe60fbf276e9e41cf33520ad8e6b947f131d9dc501a3b1b18840d43bb1e5b04ee60405160405180910390a380611a3e81613805565b9150506118b9565b6006546001600160a01b03163314611a8e5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b6000828152600e602090815260409091208251610a359284019061314a565b611ab733836123ae565b611b295760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108ff565b611b3584848484612316565b50505050565b6000818152600260205260409020546060906001600160a01b0316611bc85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016108ff565b6000828152600f6020908152604080832054600160f01b900461ffff16808452600e9092528083208151808301909252805492939282908290611c0a9061379e565b80601f0160208091040260200160405190810160405280929190818152602001828054611c369061379e565b8015611c835780601f10611c5857610100808354040283529160200191611c83565b820191906000526020600020905b815481529060010190602001808311611c6657829003601f168201915b50505091835250506001919091015460ff161515602090910152805151909150611cbc5760405180602001604052806000815250611ce8565b8051611cc785612893565b604051602001611cd89291906138bc565b6040516020818303038152906040525b949350505050565b7f1b78be8aa59116bcb86ee79690db21659faf7abcb7507943f2407e659c5cd463611d1a81612643565b506000918252600f6020526040909120805465ffffffffffff909216600160c01b027fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b600082815260086020526040902060010154611d8381612643565b610a3583836126ef565b6006546001600160a01b03163314611dd55760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b611e1233308360405180602001604052806000815250612316565b50565b6006546001600160a01b03163314611e5d5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600c80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b600c546000906001600160a01b03811690600160a01b900460ff168015611f44575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015611f0157600080fd5b505afa158015611f15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f399190613913565b6001600160a01b0316145b15611f535760019150506107f2565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff16611ce8565b600081815260026020526040812054819081906001600160a01b0316611fe95760405162461bcd60e51b815260206004820152601460248201527f6e6f6e6578697374656e7420746f6b656e20696400000000000000000000000060448201526064016108ff565b6000848152600f6020908152604091829020825160a081018452905467ffffffffffffffff8082168352680100000000000000008204811693830193909352600160801b8104909216928101839052600160c01b820465ffffffffffff166060820152600160f01b90910461ffff166080820152906001101561208457604081015161207f9067ffffffffffffffff1642613820565b612087565b60005b93506001816000015167ffffffffffffffff1611156120bb5780516120b69067ffffffffffffffff1642613820565b6120be565b60005b9250806020015167ffffffffffffffff16836120da9190613930565b93959294505050565b6006546001600160a01b0316331461212b5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b6000818152600e6020526040812080546121449061379e565b9050116121935760405162461bcd60e51b815260206004820152601d60248201527f576f726c64206861736e2774206265656e20637265617465642079657400000060448201526064016108ff565b6000908152600e60205260409020600101805460ff19811660ff90911615179055565b6006546001600160a01b031633146121fe5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b6001600160a01b03811661227a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108ff565b611e1281612772565b60006001600160e01b03198216637965db0b60e01b14806107f257506107f282612991565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122dd82611518565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612321848484612484565b61232d848484846129e1565b611b355760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108ff565b610b1c828260405180602001604052806000815250612b39565b6000818152600260205260408120546001600160a01b03166124275760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108ff565b600061243283611518565b9050806001600160a01b0316846001600160a01b0316148061245957506124598185611e99565b80611ce85750836001600160a01b03166124728461088a565b6001600160a01b031614949350505050565b826001600160a01b031661249782611518565b6001600160a01b0316146125135760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016108ff565b6001600160a01b0382166125755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108ff565b612580838383612bb7565b61258b6000826122a8565b6001600160a01b03831660009081526003602052604081208054600192906125b4908490613820565b90915550506001600160a01b03821660009081526003602052604081208054600192906125e2908490613930565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611e128133612dcc565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16610b1c5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556126ab3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff1615610b1c5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156128265760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108ff565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6060816128b75750506040805180820190915260018152600360fc1b602082015290565b8160005b81156128e157806128cb81613805565b91506128da9050600a8361386c565b91506128bb565b60008167ffffffffffffffff8111156128fc576128fc6132db565b6040519080825280601f01601f191660200182016040528015612926576020820181803683370190505b5090505b8415611ce85761293b600183613820565b9150612948600a86613948565b612953906030613930565b60f81b818381518110612968576129686137d9565b60200101906001600160f81b031916908160001a90535061298a600a8661386c565b945061292a565b60006001600160e01b031982166380ac58cd60e01b14806129c257506001600160e01b03198216635b5e139f60e01b145b806107f257506301ffc9a760e01b6001600160e01b03198316146107f2565b60006001600160a01b0384163b15612b2e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612a25903390899088908890600401613880565b602060405180830381600087803b158015612a3f57600080fd5b505af1925050508015612a6f575060408051601f3d908101601f19168201909252612a6c9181019061395c565b60015b612b14573d808015612a9d576040519150601f19603f3d011682016040523d82523d6000602084013e612aa2565b606091505b508051612b0c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108ff565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611ce8565b506001949350505050565b612b438383612e4c565b612b5060008484846129e1565b610a355760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108ff565b6001600160a01b038316301480612bd557506001600160a01b038316155b15612c35576000908152600f6020526040902080547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b4267ffffffffffffffff1690810267ffffffffffffffff1916919091171790555050565b6001600160a01b038216301415612cc6576000908152600f602052604090208054600177ffffffffffffffffffffffffffffffff000000000000000019821667ffffffffffffffff808416420368010000000000000000600160801b67ffffffffffffffff60801b199096168617819004831691909101909116021790911767ffffffffffffffff19161790555050565b600d5460011415610a3557600c54600160a81b900460ff16612d2a5760405162461bcd60e51b815260206004820152601860248201527f54726176656c696e672074686520676f6f6e697665727365000000000000000060448201526064016108ff565b6000818152600f60205260409020805467ffffffffffffffff196801000000000000000067ffffffffffffffff42818116600160801b810267ffffffffffffffff60801b1987168117859004841681851685891617909303929092019092169092026fffffffffffffffff00000000000000001990921677ffffffffffffffffffffffffffffffff000000000000000019909416939093171716179055505050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16610b1c57612e0a816001600160a01b03166014612f9a565b612e15836020612f9a565b604051602001612e26929190613979565b60408051601f198184030181529082905262461bcd60e51b82526108ff9160040161326e565b6001600160a01b038216612ea25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108ff565b6000818152600260205260409020546001600160a01b031615612f075760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108ff565b612f1360008383612bb7565b6001600160a01b0382166000908152600360205260408120805460019290612f3c908490613930565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606000612fa9836002613837565b612fb4906002613930565b67ffffffffffffffff811115612fcc57612fcc6132db565b6040519080825280601f01601f191660200182016040528015612ff6576020820181803683370190505b509050600360fc1b81600081518110613011576130116137d9565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613040576130406137d9565b60200101906001600160f81b031916908160001a9053506000613064846002613837565b61306f906001613930565b90505b60018111156130f4577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106130b0576130b06137d9565b1a60f81b8282815181106130c6576130c66137d9565b60200101906001600160f81b031916908160001a90535060049490941c936130ed816139fa565b9050613072565b5083156131435760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ff565b9392505050565b8280546131569061379e565b90600052602060002090601f01602090048101928261317857600085556131be565b82601f1061319157805160ff19168380011785556131be565b828001600101855582156131be579182015b828111156131be5782518255916020019190600101906131a3565b506131ca9291506131ce565b5090565b5b808211156131ca57600081556001016131cf565b6001600160e01b031981168114611e1257600080fd5b60006020828403121561320b57600080fd5b8135613143816131e3565b60005b83811015613231578181015183820152602001613219565b83811115611b355750506000910152565b6000815180845261325a816020860160208601613216565b601f01601f19169290920160200192915050565b6020815260006131436020830184613242565b60006020828403121561329357600080fd5b5035919050565b6001600160a01b0381168114611e1257600080fd5b600080604083850312156132c257600080fd5b82356132cd8161329a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561331a5761331a6132db565b604052919050565b600082601f83011261333357600080fd5b8135602067ffffffffffffffff82111561334f5761334f6132db565b8160051b61335e8282016132f1565b928352848101820192828101908785111561337857600080fd5b83870192505b848310156133975782358252918301919083019061337e565b979650505050505050565b6000602082840312156133b457600080fd5b813567ffffffffffffffff8111156133cb57600080fd5b611ce884828501613322565b6000806000806000608086880312156133ef57600080fd5b85356133fa8161329a565b9450602086013561340a8161329a565b935060408601359250606086013567ffffffffffffffff8082111561342e57600080fd5b818801915088601f83011261344257600080fd5b81358181111561345157600080fd5b89602082850101111561346357600080fd5b9699959850939650602001949392505050565b60008060006060848603121561348b57600080fd5b83356134968161329a565b925060208401356134a68161329a565b929592945050506040919091013590565b600080604083850312156134ca57600080fd5b50508035926020909101359150565b600080604083850312156134ec57600080fd5b8235915060208301356134fe8161329a565b809150509250929050565b6000806040838503121561351c57600080fd5b823567ffffffffffffffff81111561353357600080fd5b61353f85828601613322565b95602094909401359450505050565b8381526060602082015260006135676060830185613242565b90508215156040830152949350505050565b60006020828403121561358b57600080fd5b81356131438161329a565b6020808252825182820181905260009190848201906040850190845b818110156135ce578351835292840192918401916001016135b2565b50909695505050505050565b600080604083850312156135ed57600080fd5b82356135f88161329a565b9150602083013580151581146134fe57600080fd5b600067ffffffffffffffff831115613627576136276132db565b61363a601f8401601f19166020016132f1565b905082815283838301111561364e57600080fd5b828260208301376000602084830101529392505050565b6000806040838503121561367857600080fd5b82359150602083013567ffffffffffffffff81111561369657600080fd5b8301601f810185136136a757600080fd5b6136b68582356020840161360d565b9150509250929050565b600080600080608085870312156136d657600080fd5b84356136e18161329a565b935060208501356136f18161329a565b925060408501359150606085013567ffffffffffffffff81111561371457600080fd5b8501601f8101871361372557600080fd5b6137348782356020840161360d565b91505092959194509250565b6000806040838503121561375357600080fd5b82359150602083013565ffffffffffff811681146134fe57600080fd5b6000806040838503121561378357600080fd5b823561378e8161329a565b915060208301356134fe8161329a565b600181811c908216806137b257607f821691505b602082108114156137d357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613819576138196137ef565b5060010190565b600082821015613832576138326137ef565b500390565b6000816000190483118215151615613851576138516137ef565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261387b5761387b613856565b500490565b60006001600160a01b038087168352808616602084015250836040830152608060608301526138b26080830184613242565b9695505050505050565b600083516138ce818460208801613216565b8351908301906138e2818360208801613216565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60006020828403121561392557600080fd5b81516131438161329a565b60008219821115613943576139436137ef565b500190565b60008261395757613957613856565b500690565b60006020828403121561396e57600080fd5b8151613143816131e3565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516139b1816017850160208801613216565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516139ee816028840160208801613216565b01602801949350505050565b600081613a0957613a096137ef565b50600019019056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122053ffbfabf663a48213fabcf5fa769ebfef4de9a14e46042edaad47f43c0a401064736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002bbcc181225648abe328ec3a79ff4cb126d3d96600000000000000000000000000000000000000000000000000000000000002ee000000000000000000000000000000000000000000000000000000000000003768747470733a2f2f706f7274616c2d6d657461646174612d6170692e63727970746f6f6e676f6f6e7a2e636f6d2f6d657461646174612f000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103415760003560e01c80636c529a26116101bd578063b1b06fca116100f9578063dc95c4a7116100a2578063e985e9c51161007c578063e985e9c514610766578063e9ffa61e14610779578063f22e9e4b146107a7578063f2fde38b146107ba57600080fd5b8063dc95c4a714610738578063e4435e131461074b578063e52a8a211461075e57600080fd5b8063c87b56dd116100d3578063c87b56dd146106ff578063caed914314610712578063d547741f1461072557600080fd5b8063b1b06fca146106c5578063b88d4fde146106d8578063bef97c87146106eb57600080fd5b806395d89b4111610166578063a53a84b611610140578063a53a84b614610667578063a6c5e2d714610670578063a9c1c57014610683578063af436af31461069657600080fd5b806395d89b4114610644578063a217fddf1461064c578063a22cb4651461065457600080fd5b80638da5cb5b116101975780638da5cb5b146105e75780638dbea3ba146105f857806391d148541461060b57600080fd5b80636c529a26146105b857806370a08231146105cc578063715018a6146105df57600080fd5b80632d47167f1161028c57806342842e0e116102355780634f558e791161020f5780634f558e791461056b57806355e740761461057e5780636352211e14610592578063640909c3146105a557600080fd5b806342842e0e14610511578063438b6300146105245780634711a5731461054457600080fd5b8063328825351161026657806332882535146104c957806336568abe146104dc5780633a1956ce146104ef57600080fd5b80632d47167f1461049b5780632f2ff15d146104a35780632fe9fd4d146104b657600080fd5b8063150b7a02116102ee57806323b872dd116102c857806323b872dd14610433578063248a9ca3146104465780632a55205a1461046957600080fd5b8063150b7a02146103e957806318160ddd14610415578063238e5ad11461042b57600080fd5b8063095ea7b31161031f578063095ea7b3146103ae5780630e414e0d146103c357806312ca9d41146103d657600080fd5b806301ffc9a71461034657806306fdde031461036e578063081812fc14610383575b600080fd5b6103596103543660046131f9565b6107cd565b60405190151581526020015b60405180910390f35b6103766107f8565b604051610365919061326e565b610396610391366004613281565b61088a565b6040516001600160a01b039091168152602001610365565b6103c16103bc3660046132af565b610924565b005b6103c16103d13660046133a2565b610a3a565b6103c16103e43660046133a2565b610b20565b6103fc6103f73660046133d7565b610b72565b6040516001600160e01b03199091168152602001610365565b61041d610f46565b604051908152602001610365565b6103c1610f5c565b6103c1610441366004613476565b610fe0565b61041d610454366004613281565b60009081526008602052604090206001015490565b61047c6104773660046134b7565b611067565b604080516001600160a01b039093168352602083019190915201610365565b6103c1611102565b6103c16104b13660046134d9565b611186565b6103c16104c4366004613509565b6111ab565b600a54610396906001600160a01b031681565b6103c16104ea3660046134d9565b611288565b6105026104fd366004613281565b611310565b6040516103659392919061354e565b6103c161051f366004613476565b6113e2565b610537610532366004613579565b6113fd565b6040516103659190613596565b61041d7f1b78be8aa59116bcb86ee79690db21659faf7abcb7507943f2407e659c5cd46381565b610359610579366004613281565b6114f9565b600c5461035990600160b01b900460ff1681565b6103966105a0366004613281565b611518565b6103c16105b3366004613281565b6115a3565b600c5461035990600160a01b900460ff1681565b61041d6105da366004613579565b611641565b6103c16116db565b6006546001600160a01b0316610396565b610502610606366004613281565b61172f565b6103596106193660046134d9565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6103766117c8565b61041d600081565b6103c16106623660046135da565b6117d7565b61041d600b5481565b6103c161067e366004613476565b6117e2565b6103c1610691366004613509565b611855565b61041d6106a4366004613281565b6000908152600f6020526040902054600160c01b900465ffffffffffff1690565b6103c16106d3366004613665565b611a46565b6103c16106e63660046136c0565b611aad565b600c5461035990600160a81b900460ff1681565b61037661070d366004613281565b611b3b565b6103c1610720366004613740565b611cf0565b6103c16107333660046134d9565b611d68565b6103c1610746366004613579565b611d8d565b6103c1610759366004613281565b611df7565b6103c1611e15565b610359610774366004613770565b611e99565b61078c610787366004613281565b611f81565b60408051938452602084019290925290820152606001610365565b6103c16107b5366004613281565b6120e3565b6103c16107c8366004613579565b6121b6565b60006001600160e01b0319821663152a902d60e11b14806107f257506107f282612283565b92915050565b6060600080546108079061379e565b80601f01602080910402602001604051908101604052809291908181526020018280546108339061379e565b80156108805780601f1061085557610100808354040283529160200191610880565b820191906000526020600020905b81548152906001019060200180831161086357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109085760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061092f82611518565b9050806001600160a01b0316836001600160a01b0316141561099d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108ff565b336001600160a01b03821614806109b957506109b98133611e99565b610a2b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108ff565b610a3583836122a8565b505050565b60005b8151811015610b1c577f0000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a6001600160a01b031663b88d4fde3330858581518110610a8957610a896137d9565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152608060648201526000608482015260a401600060405180830381600087803b158015610af157600080fd5b505af1158015610b05573d6000803e3d6000fd5b505050508080610b1490613805565b915050610a3d565b5050565b60005b8151811015610b1c57610b603330848481518110610b4357610b436137d9565b602002602001015160405180602001604052806000815250612316565b80610b6a81613805565b915050610b23565b600060026007541415610bc75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ff565b6002600755336001600160a01b037f0000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a161480610c0257503330145b610c745760405162461bcd60e51b815260206004820152603460248201527f4f70657261746f72206e6f742043727970746f6f6e20476f6f6e7a206f72204760448201527f6f6f6e7a20506f7274616c20636f6e747261637400000000000000000000000060648201526084016108ff565b336001600160a01b037f0000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a16148015610e1357600083610cb4576000610cc0565b610cc084860186613281565b6000818152600e602052604090206001015490915060ff16610d245760405162461bcd60e51b815260206004820152601b60248201527f776f726c64206973206e6f74206f70656e2063757272656e746c79000000000060448201526064016108ff565b6000868152600f6020526040902054600160f01b900461ffff168114610d83576000868152600f6020526040902080547dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160f01b61ffff8416021790555b6000868152600260205260409020546001600160a01b031615610dc057610dbb30888860405180602001604052806000815250612316565b610de0565b610dca8787612394565b60098054906000610dda83613805565b91905055505b604051819087907fe60fbf276e9e41cf33520ad8e6b947f131d9dc501a3b1b18840d43bb1e5b04ee90600090a350610f2e565b600c54600160b01b900460ff16610e6c5760405162461bcd60e51b815260206004820152601d60248201527f65786974696e67206e6f7420616c6c6f776564207269676874206e6f7700000060448201526064016108ff565b604051635c46a7ef60e11b81523060048201526001600160a01b0387811660248301526044820187905260806064830152600060848301527f0000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a169063b88d4fde9060a401600060405180830381600087803b158015610eea57600080fd5b505af1158015610efe573d6000803e3d6000fd5b50506040518792507fee32000080c2ea75fdca738974237a621eccab6378b2ea07bce8ad1c2d0c45339150600090a25b5050600160075550630a85bd0160e11b949350505050565b60006001600954610f579190613820565b905090565b6006546001600160a01b03163314610fa45760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b610fea33826123ae565b61105c5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108ff565b610a35838383612484565b60008281526002602052604081205481906001600160a01b03166110cd5760405162461bcd60e51b815260206004820152601260248201527f4e6f6e2d6578697374656e7420746f6b656e000000000000000000000000000060448201526064016108ff565b600a54600b546001600160a01b0390911690612710906110ed9086613837565b6110f7919061386c565b915091509250929050565b6006546001600160a01b0316331461114a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600c80547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff8116600160b01b9182900460ff1615909102179055565b6000828152600860205260409020600101546111a181612643565b610a35838361264d565b60005b8251811015610a35577f0000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a6001600160a01b031663b88d4fde33308685815181106111fa576111fa6137d9565b60200260200101518660405160200161121591815260200190565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016112439493929190613880565b600060405180830381600087803b15801561125d57600080fd5b505af1158015611271573d6000803e3d6000fd5b50505050808061128090613805565b9150506111ae565b6001600160a01b03811633146113065760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108ff565b610b1c82826126ef565b6000818152600e6020526040808220815180830190925280548493606093909283928290829061133f9061379e565b80601f016020809104026020016040519081016040528092919081815260200182805461136b9061379e565b80156113b85780601f1061138d576101008083540402835291602001916113b8565b820191906000526020600020905b81548152906001019060200180831161139b57829003601f168201915b50505091835250506001919091015460ff1615156020918201528151910151949690955092505050565b610a3583838360405180602001604052806000815250611aad565b6060600061140a83611641565b905060008167ffffffffffffffff811115611427576114276132db565b604051908082528060200260200182016040528015611450578160200160208202803683370190505b509050600060015b611b3981116114ef576000818152600260205260409020546001600160a01b0316611482576114dd565b8184141561148f576114ef565b856001600160a01b03166114a282611518565b6001600160a01b031614156114dd57808383815181106114c4576114c46137d9565b6020908102919091010152816114d981613805565b9250505b806114e781613805565b915050611458565b5090949350505050565b6000818152600260205260408120546001600160a01b031615156107f2565b6000818152600260205260408120546001600160a01b0316806107f25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016108ff565b6006546001600160a01b031633146115eb5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600b54811061163c5760405162461bcd60e51b815260206004820181905260248201527f4e657720726f79616c747920616d6f756e74206d757374206265206c6f77657260448201526064016108ff565b600b55565b60006001600160a01b0382166116bf5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016108ff565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146117235760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b61172d6000612772565b565b60008181526002602052604081205460609082906001600160a01b03166117985760405162461bcd60e51b815260206004820152601460248201527f6e6f6e6578697374656e7420746f6b656e20696400000000000000000000000060448201526064016108ff565b6000848152600f60205260409020546117bb90600160f01b900461ffff16611310565b9250925092509193909250565b6060600180546108079061379e565b610b1c3383836127c4565b6001600160a01b03821630141561183b5760405162461bcd60e51b815260206004820152601560248201527f63616e277420657869742074686520706f7274616c000000000000000000000060448201526064016108ff565b6002600d5561184b8383836113e2565b50506001600d5550565b6000818152600e602052604090206001015460ff166118b65760405162461bcd60e51b815260206004820152601b60248201527f776f726c64206973206e6f74206f70656e2063757272656e746c79000000000060448201526064016108ff565b60005b8251811015610a355781600f60008584815181106118d9576118d96137d9565b602090810291909101810151825281019190915260400160002054600160f01b900461ffff16141561194d5760405162461bcd60e51b815260206004820152601560248201527f616c726561647920696e207468697320776f726c64000000000000000000000060448201526064016108ff565b81600f6000858481518110611964576119646137d9565b60200260200101518152602001908152602001600020600001601e6101000a81548161ffff021916908361ffff16021790555042600f60008584815181106119ae576119ae6137d9565b6020026020010151815260200190815260200160002060000160106101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081838281518110611a0057611a006137d9565b60200260200101517fe60fbf276e9e41cf33520ad8e6b947f131d9dc501a3b1b18840d43bb1e5b04ee60405160405180910390a380611a3e81613805565b9150506118b9565b6006546001600160a01b03163314611a8e5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b6000828152600e602090815260409091208251610a359284019061314a565b611ab733836123ae565b611b295760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108ff565b611b3584848484612316565b50505050565b6000818152600260205260409020546060906001600160a01b0316611bc85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016108ff565b6000828152600f6020908152604080832054600160f01b900461ffff16808452600e9092528083208151808301909252805492939282908290611c0a9061379e565b80601f0160208091040260200160405190810160405280929190818152602001828054611c369061379e565b8015611c835780601f10611c5857610100808354040283529160200191611c83565b820191906000526020600020905b815481529060010190602001808311611c6657829003601f168201915b50505091835250506001919091015460ff161515602090910152805151909150611cbc5760405180602001604052806000815250611ce8565b8051611cc785612893565b604051602001611cd89291906138bc565b6040516020818303038152906040525b949350505050565b7f1b78be8aa59116bcb86ee79690db21659faf7abcb7507943f2407e659c5cd463611d1a81612643565b506000918252600f6020526040909120805465ffffffffffff909216600160c01b027fffff000000000000ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b600082815260086020526040902060010154611d8381612643565b610a3583836126ef565b6006546001600160a01b03163314611dd55760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b611e1233308360405180602001604052806000815250612316565b50565b6006546001600160a01b03163314611e5d5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b600c80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b600c546000906001600160a01b03811690600160a01b900460ff168015611f44575060405163c455279160e01b81526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b158015611f0157600080fd5b505afa158015611f15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f399190613913565b6001600160a01b0316145b15611f535760019150506107f2565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff16611ce8565b600081815260026020526040812054819081906001600160a01b0316611fe95760405162461bcd60e51b815260206004820152601460248201527f6e6f6e6578697374656e7420746f6b656e20696400000000000000000000000060448201526064016108ff565b6000848152600f6020908152604091829020825160a081018452905467ffffffffffffffff8082168352680100000000000000008204811693830193909352600160801b8104909216928101839052600160c01b820465ffffffffffff166060820152600160f01b90910461ffff166080820152906001101561208457604081015161207f9067ffffffffffffffff1642613820565b612087565b60005b93506001816000015167ffffffffffffffff1611156120bb5780516120b69067ffffffffffffffff1642613820565b6120be565b60005b9250806020015167ffffffffffffffff16836120da9190613930565b93959294505050565b6006546001600160a01b0316331461212b5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b6000818152600e6020526040812080546121449061379e565b9050116121935760405162461bcd60e51b815260206004820152601d60248201527f576f726c64206861736e2774206265656e20637265617465642079657400000060448201526064016108ff565b6000908152600e60205260409020600101805460ff19811660ff90911615179055565b6006546001600160a01b031633146121fe5760405162461bcd60e51b81526020600482018190526024820152600080516020613a1283398151915260448201526064016108ff565b6001600160a01b03811661227a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108ff565b611e1281612772565b60006001600160e01b03198216637965db0b60e01b14806107f257506107f282612991565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122dd82611518565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612321848484612484565b61232d848484846129e1565b611b355760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108ff565b610b1c828260405180602001604052806000815250612b39565b6000818152600260205260408120546001600160a01b03166124275760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108ff565b600061243283611518565b9050806001600160a01b0316846001600160a01b0316148061245957506124598185611e99565b80611ce85750836001600160a01b03166124728461088a565b6001600160a01b031614949350505050565b826001600160a01b031661249782611518565b6001600160a01b0316146125135760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016108ff565b6001600160a01b0382166125755760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108ff565b612580838383612bb7565b61258b6000826122a8565b6001600160a01b03831660009081526003602052604081208054600192906125b4908490613820565b90915550506001600160a01b03821660009081526003602052604081208054600192906125e2908490613930565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611e128133612dcc565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16610b1c5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556126ab3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff1615610b1c5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156128265760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108ff565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6060816128b75750506040805180820190915260018152600360fc1b602082015290565b8160005b81156128e157806128cb81613805565b91506128da9050600a8361386c565b91506128bb565b60008167ffffffffffffffff8111156128fc576128fc6132db565b6040519080825280601f01601f191660200182016040528015612926576020820181803683370190505b5090505b8415611ce85761293b600183613820565b9150612948600a86613948565b612953906030613930565b60f81b818381518110612968576129686137d9565b60200101906001600160f81b031916908160001a90535061298a600a8661386c565b945061292a565b60006001600160e01b031982166380ac58cd60e01b14806129c257506001600160e01b03198216635b5e139f60e01b145b806107f257506301ffc9a760e01b6001600160e01b03198316146107f2565b60006001600160a01b0384163b15612b2e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612a25903390899088908890600401613880565b602060405180830381600087803b158015612a3f57600080fd5b505af1925050508015612a6f575060408051601f3d908101601f19168201909252612a6c9181019061395c565b60015b612b14573d808015612a9d576040519150601f19603f3d011682016040523d82523d6000602084013e612aa2565b606091505b508051612b0c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108ff565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611ce8565b506001949350505050565b612b438383612e4c565b612b5060008484846129e1565b610a355760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108ff565b6001600160a01b038316301480612bd557506001600160a01b038316155b15612c35576000908152600f6020526040902080547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b4267ffffffffffffffff1690810267ffffffffffffffff1916919091171790555050565b6001600160a01b038216301415612cc6576000908152600f602052604090208054600177ffffffffffffffffffffffffffffffff000000000000000019821667ffffffffffffffff808416420368010000000000000000600160801b67ffffffffffffffff60801b199096168617819004831691909101909116021790911767ffffffffffffffff19161790555050565b600d5460011415610a3557600c54600160a81b900460ff16612d2a5760405162461bcd60e51b815260206004820152601860248201527f54726176656c696e672074686520676f6f6e697665727365000000000000000060448201526064016108ff565b6000818152600f60205260409020805467ffffffffffffffff196801000000000000000067ffffffffffffffff42818116600160801b810267ffffffffffffffff60801b1987168117859004841681851685891617909303929092019092169092026fffffffffffffffff00000000000000001990921677ffffffffffffffffffffffffffffffff000000000000000019909416939093171716179055505050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16610b1c57612e0a816001600160a01b03166014612f9a565b612e15836020612f9a565b604051602001612e26929190613979565b60408051601f198184030181529082905262461bcd60e51b82526108ff9160040161326e565b6001600160a01b038216612ea25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108ff565b6000818152600260205260409020546001600160a01b031615612f075760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108ff565b612f1360008383612bb7565b6001600160a01b0382166000908152600360205260408120805460019290612f3c908490613930565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606000612fa9836002613837565b612fb4906002613930565b67ffffffffffffffff811115612fcc57612fcc6132db565b6040519080825280601f01601f191660200182016040528015612ff6576020820181803683370190505b509050600360fc1b81600081518110613011576130116137d9565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613040576130406137d9565b60200101906001600160f81b031916908160001a9053506000613064846002613837565b61306f906001613930565b90505b60018111156130f4577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106130b0576130b06137d9565b1a60f81b8282815181106130c6576130c66137d9565b60200101906001600160f81b031916908160001a90535060049490941c936130ed816139fa565b9050613072565b5083156131435760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108ff565b9392505050565b8280546131569061379e565b90600052602060002090601f01602090048101928261317857600085556131be565b82601f1061319157805160ff19168380011785556131be565b828001600101855582156131be579182015b828111156131be5782518255916020019190600101906131a3565b506131ca9291506131ce565b5090565b5b808211156131ca57600081556001016131cf565b6001600160e01b031981168114611e1257600080fd5b60006020828403121561320b57600080fd5b8135613143816131e3565b60005b83811015613231578181015183820152602001613219565b83811115611b355750506000910152565b6000815180845261325a816020860160208601613216565b601f01601f19169290920160200192915050565b6020815260006131436020830184613242565b60006020828403121561329357600080fd5b5035919050565b6001600160a01b0381168114611e1257600080fd5b600080604083850312156132c257600080fd5b82356132cd8161329a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561331a5761331a6132db565b604052919050565b600082601f83011261333357600080fd5b8135602067ffffffffffffffff82111561334f5761334f6132db565b8160051b61335e8282016132f1565b928352848101820192828101908785111561337857600080fd5b83870192505b848310156133975782358252918301919083019061337e565b979650505050505050565b6000602082840312156133b457600080fd5b813567ffffffffffffffff8111156133cb57600080fd5b611ce884828501613322565b6000806000806000608086880312156133ef57600080fd5b85356133fa8161329a565b9450602086013561340a8161329a565b935060408601359250606086013567ffffffffffffffff8082111561342e57600080fd5b818801915088601f83011261344257600080fd5b81358181111561345157600080fd5b89602082850101111561346357600080fd5b9699959850939650602001949392505050565b60008060006060848603121561348b57600080fd5b83356134968161329a565b925060208401356134a68161329a565b929592945050506040919091013590565b600080604083850312156134ca57600080fd5b50508035926020909101359150565b600080604083850312156134ec57600080fd5b8235915060208301356134fe8161329a565b809150509250929050565b6000806040838503121561351c57600080fd5b823567ffffffffffffffff81111561353357600080fd5b61353f85828601613322565b95602094909401359450505050565b8381526060602082015260006135676060830185613242565b90508215156040830152949350505050565b60006020828403121561358b57600080fd5b81356131438161329a565b6020808252825182820181905260009190848201906040850190845b818110156135ce578351835292840192918401916001016135b2565b50909695505050505050565b600080604083850312156135ed57600080fd5b82356135f88161329a565b9150602083013580151581146134fe57600080fd5b600067ffffffffffffffff831115613627576136276132db565b61363a601f8401601f19166020016132f1565b905082815283838301111561364e57600080fd5b828260208301376000602084830101529392505050565b6000806040838503121561367857600080fd5b82359150602083013567ffffffffffffffff81111561369657600080fd5b8301601f810185136136a757600080fd5b6136b68582356020840161360d565b9150509250929050565b600080600080608085870312156136d657600080fd5b84356136e18161329a565b935060208501356136f18161329a565b925060408501359150606085013567ffffffffffffffff81111561371457600080fd5b8501601f8101871361372557600080fd5b6137348782356020840161360d565b91505092959194509250565b6000806040838503121561375357600080fd5b82359150602083013565ffffffffffff811681146134fe57600080fd5b6000806040838503121561378357600080fd5b823561378e8161329a565b915060208301356134fe8161329a565b600181811c908216806137b257607f821691505b602082108114156137d357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613819576138196137ef565b5060010190565b600082821015613832576138326137ef565b500390565b6000816000190483118215151615613851576138516137ef565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261387b5761387b613856565b500490565b60006001600160a01b038087168352808616602084015250836040830152608060608301526138b26080830184613242565b9695505050505050565b600083516138ce818460208801613216565b8351908301906138e2818360208801613216565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60006020828403121561392557600080fd5b81516131438161329a565b60008219821115613943576139436137ef565b500190565b60008261395757613957613856565b500690565b60006020828403121561396e57600080fd5b8151613143816131e3565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516139b1816017850160208801613216565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516139ee816028840160208801613216565b01602801949350505050565b600081613a0957613a096137ef565b50600019019056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122053ffbfabf663a48213fabcf5fa769ebfef4de9a14e46042edaad47f43c0a401064736f6c63430008090033

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

00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c10000000000000000000000002bbcc181225648abe328ec3a79ff4cb126d3d96600000000000000000000000000000000000000000000000000000000000002ee000000000000000000000000000000000000000000000000000000000000003768747470733a2f2f706f7274616c2d6d657461646174612d6170692e63727970746f6f6e676f6f6e7a2e636f6d2f6d657461646174612f000000000000000000

-----Decoded View---------------
Arg [0] : _initBaseURI (string): https://portal-metadata-api.cryptoongoonz.com/metadata/
Arg [1] : _cryptoonGoonzContract (address): 0x0322F6f11A94CFB1b5B6E95E059d8DEB2bf17D6A
Arg [2] : proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [3] : royaltiesAddress_ (address): 0x2BbCC181225648AbE328EC3A79fF4cb126d3D966
Arg [4] : royaltiesBasisPoints_ (uint256): 750

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 0000000000000000000000000322f6f11a94cfb1b5b6e95e059d8deb2bf17d6a
Arg [2] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [3] : 0000000000000000000000002bbcc181225648abe328ec3a79ff4cb126d3d966
Arg [4] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000037
Arg [6] : 68747470733a2f2f706f7274616c2d6d657461646174612d6170692e63727970
Arg [7] : 746f6f6e676f6f6e7a2e636f6d2f6d657461646174612f000000000000000000


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.