Token

Micro3 GENE (GENE)

Overview

Max Total Supply

65 GENE

Holders

65

Market

Onchain Market Cap

-

Circulating Supply Market Cap

-
Balance
1 GENE
0xfbd5e370579a1d87fd2a0ddd71ed05be70021215
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
GENE

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : GENE.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

contract GENE is ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    /* ============ State Variables ============ */

    struct Info {
        bytes32 id;
        uint160 owner;
        uint256 value;
        uint8 types;
        uint256 bornTime;
    }

    // Owner
    address public owner;

    // Token name
    string private _name = "Micro3 GENE";

    // Token symbol
    string private _symbol = "GENE";

    // Total number of tokens burned
    uint256 private _burnCount;

    // Version of GENE contract
    uint8 private _version = 1;

    // Max Supply
    uint256 private _maxSupply = type(uint256).max;

    // Array of all tokens storing the owner's address and the campaign id
    Info[] private _tokens;

    // Mapping owner address to credential count
    mapping(bytes32 => uint256) private _credentials;

    // Mapping owner address to credential count
    mapping(uint256 => string) private _tokenURIs;

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

    // Mint and burn Info.
    mapping(address => bool) private _minters;

    //Whitelist transfer
    mapping(address => bool) private _whitelists;

    // Edit Info.
    mapping(address => bool) private _editors;

    // Default allow transfer
    bool private _transferable;

    // Default one URI
    string private _baseURI = "";

    bool private _initialized;

    /* ============ Events ============ */
    // Add new minter
    event EventMinterAdded(address indexed newMinter);

    // Remove old minter
    event EventMinterRemoved(address indexed oldMinter);

    // Add new whitelister
    event EventWhitelisterAdded(address indexed newMinter);

    // Remove old whitelister
    event EventWhitelisterRemoved(address indexed oldMinter);

    // Add new whitelister
    event EventEditorAdded(address indexed newAddress);

    // Remove old whitelister
    event EventEditorRemoved(address indexed newAddress);

    /* ============ Custom Error ============ */
    error OnlyMinter();
    error OnlyEditor();
    error OnlyTransferable();
    error IsExists();
    error OutBoundIndex();
    error IsZeroAddress();
    error IsApproved();
    error IsOwner();
    error IsAdded();
    error IsNotAdded();
    error IsERC721Received();
    error Unauthorized();
    /* ============ Modifiers ============ */

    /**
     * Only minter.
     */
    modifier onlyMinter() {
        if (!_minters[msg.sender]) {
            revert OnlyMinter();
        }
        _;
    }

    /**
     * Only editor.
     */
    modifier onlyEditor() {
        if (!_editors[msg.sender]) {
            revert OnlyEditor();
        }
        _;
    }

    /**
     * Only allow transfer.
     */
    modifier onlyTransferable(address from, address to) {
        if (!_transferable && !_whitelists[to]) {
            revert OnlyTransferable();
        }
        _;
    }

    /**
     * Only Exists .
     */
    modifier onlyExists(uint256 tokenId) {
        if (!_exists(tokenId)) {
            revert IsExists();
        }
        _;
    }

    /**
     * Only Exists .
     */
    modifier onlyIsApproved(address sender, uint256 tokenId) {
        if (!_isApprovedOrOwner(sender, tokenId)) {
            revert IsApproved();
        }
        _;
    }

    /**
     * Only Owner .
     */
    modifier onlyIsOwner(address sender, uint256 tokenId) {
        if (!isOwnerOf(sender, tokenId)) {
            revert IsOwner();
        }
        _;
    }

    /**
     * Only Zero Address .
     */
    modifier onlyZeroAddress(address sender) {
        if (sender == address(0)) {
            revert IsZeroAddress();
        }
        _;
    }

    /**
     * Only Owner .
     */
    modifier onlyOwner() {
        require(owner == msg.sender);
        _;
    }

    /**
     * @dev Initializes the contract
     */
    function init(bytes memory initPayload) external returns (bool) {
        if (_initialized) {
            revert Unauthorized();
        }
        address _owner = abi.decode(initPayload, (address));
        // Initialize zero index value
        Info memory _nft = Info(0, 0, 0, 0, 0);
        _tokens.push(_nft);
        owner = _owner;
        _minters[_owner] = true;
        _whitelists[_owner] = true;
        _editors[_owner] = true;
        _transferable = false;
        _initialized = true;
        return true;
    }

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

    /**
     * @dev Is this address a minters.
     */
    function minters(address account) external view returns (bool) {
        return _minters[account];
    }

    /**
     * @dev Is this contract allow nft transfer.
     */
    function transferable() external view returns (bool) {
        return _transferable;
    }

    /**
     * @dev Returns the base URI for nft.
     */
    function baseURI() external view returns (string memory) {
        return _baseURI;
    }

    /**
     * @dev Get mintingTime.
     */
    function getInfo(uint256 tokenId)
        external
        view
        onlyExists(tokenId)
        returns (Info memory)
    {
        return _tokens[tokenId];
    }

    /**
     * @dev Get mintingTime.
     */
    function getCredentials(bytes32 _id) external view returns (uint256) {
        return _credentials[_id];
    }

    /**
     * @dev Get Info NFT owner
     */
    function getNumMinted() public view returns (uint256) {
        return _tokens.length - 1;
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() external view returns (uint256) {
        return getNumMinted() - _burnCount;
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     * This is implementation is O(n) and should not be
     * called by other contracts.
     */
    function tokenOfOwnerByIndex(address _owner, uint256 index)
        public
        view
        returns (uint256)
    {
        uint256 currentIndex = 0;
        for (uint256 i = 1; i < _tokens.length; ) {
            if (isOwnerOf(_owner, i)) {
                if (currentIndex == index) {
                    return i;
                }
                currentIndex += 1;
            }
            unchecked {
                ++i;
            }
        }
        revert OutBoundIndex();
    }

    function tokensOfOwner(address _owner)
        external
        view
        returns (uint256[] memory)
    {
        uint256 tokenIdsIdx;
        uint256 tokenIdsLength = balanceOf(_owner);
        uint256[] memory tokenIds = new uint256[](tokenIdsLength);
        for (uint256 i = 0; tokenIdsIdx != tokenIdsLength; ) {
            tokenIds[tokenIdsIdx++] = tokenOfOwnerByIndex(_owner, i);
            unchecked {
                ++i;
            }
        }
        return tokenIds;
    }

    function tokensOfOwnerByCursor(
        address _owner,
        uint256 cursor,
        uint256 size
    ) external view returns (uint256[] memory) {
        uint256 tokenIdsIdx;
        uint256 tokenIdsLength = balanceOf(_owner);
        uint256 length = size;

        if (length > tokenIdsLength - cursor) {
            length = tokenIdsLength - cursor;
        }

        uint256[] memory tokenIds = new uint256[](length);
        for (uint256 i = 0; tokenIdsIdx != length; ) {
            tokenIds[tokenIdsIdx++] = tokenOfOwnerByIndex(_owner, i);
            unchecked {
                ++i;
            }
        }
        return tokenIds;
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address _owner)
        public
        view
        override
        onlyZeroAddress(_owner)
        returns (uint256)
    {
        return _balances[_owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId)
        public
        view
        override
        onlyExists(tokenId)
        returns (address)
    {
        return address(_tokens[tokenId].owner);
    }

    /**
     * @dev See {isOwnerOf}.
     */
    function isOwnerOf(address account, uint256 id) public view returns (bool) {
        address _owner = ownerOf(id);
        return _owner == account;
    }

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

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

    /**
     * @dev See {GENE-version}.
     */
    function version() external view returns (uint8) {
        return _version;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId)
        external
        view
        override
        onlyExists(tokenId)
        returns (string memory)
    {
        if (bytes(_baseURI).length > 0) {
            return _baseURI;
        }

        return _tokenURIs[tokenId];
    }

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

        require(
            msg.sender == _owner || isApprovedForAll(_owner, msg.sender),
            "not owner for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId)
        public 
        view
        override
        onlyExists(tokenId)
        returns (address)
    {
        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved)
        public
        override
    {
        require(operator != msg.sender, "approve to caller");

        _operatorApprovals[msg.sender][operator] = approved;
        emit ApprovalForAll(msg.sender, operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address _owner, address _operator)
        public
        view
        override
        returns (bool)
    {
        if (_minters[_operator]) return true;
        return _operatorApprovals[_owner][_operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    )
        external 
        override
        onlyTransferable(from, to)
        onlyIsApproved(msg.sender, tokenId)
    {
        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    )
        public
        override
        onlyTransferable(from, to)
        onlyIsApproved(msg.sender, tokenId)
    {
        _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 {
        _transfer(from, to, tokenId);
        if (!_checkOnERC721Received(from, to, tokenId, _data)) {
            revert IsERC721Received();
        }
    }

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

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId)
        internal
        view
        returns (bool)
    {
        address _owner = ownerOf(tokenId);
        return (spender == _owner ||
            getApproved(tokenId) == spender ||
            isApprovedForAll(_owner, spender) ||
            _whitelists[spender]);
    }

    function editInfo(
        address _owner,
        uint256 _tokenId,
        uint256 _value
    )
        external
        onlyEditor
        onlyExists(_tokenId)
        onlyIsOwner(_owner, _tokenId)
        returns (uint256)
    {
        _tokens[_tokenId].value = _value;
        return _tokenId;
    }

    function mint(
        address _account,
        uint256 _value,
        bytes32 _id,
        uint8 _types,
        string calldata _tokenURI
    ) external onlyMinter onlyZeroAddress(_account) returns (uint256) {
        bytes32 hashKey = generateHashKey(_account, _id, _types);

        if (_credentials[hashKey] > 0) {
            revert IsExists();
        }

        uint256 tokenId = _tokens.length;

        Info memory _nft = Info(
            _id,
            uint160(_account),
            _value,
            _types,
            block.timestamp
        );

        _balances[_account] += 1;
        _tokens.push(_nft);
        _credentials[hashKey] = tokenId;
        _tokenURIs[tokenId] = _tokenURI;

        if (!_checkOnERC721Received(address(0), _account, tokenId, "")) {
            revert IsERC721Received();
        }

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

        return tokenId;
    }

    function burn(address account, uint256 id)
        external
        onlyMinter
        onlyIsApproved(msg.sender, id)
        onlyIsOwner(account, id)
    {
        // Clear approvals
        _approve(address(0), id);
        _burnCount++;
        _balances[account] -= 1;
        bytes32 hashKey = generateHashKey(
            account,
            _tokens[id].id,
            _tokens[id].types
        );
        _credentials[hashKey] = 0;
        _tokens[id].id = 0;
        _tokens[id].owner = 0;
        _tokens[id].value = 0;
        _tokens[id].types = 0;
        _tokens[id].bornTime = 0;
        _tokenURIs[id] = "";

        emit Transfer(account, address(0), id);
    }

    function generateHashKey(
        address account,
        bytes32 id,
        uint8 types
    ) internal pure returns (bytes32) {
        return keccak256(abi.encode(account, id, types));
    }

    /**
     * @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 onlyIsOwner(from, tokenId) onlyZeroAddress(to) {
        // Clear approvals from the previous owner
        _approve(address(0), tokenId);
        _balances[from] -= 1;
        _balances[to] += 1;
        _tokens[tokenId].owner = uint160(to);

        emit Transfer(from, to, tokenId);
    }

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

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

    /* ============ Util Functions ============ */
    /**
     * @dev Sets a new revealedURI for all token types.
     */
    function setBaseURI(string memory _uri) external onlyOwner {
        _baseURI = _uri;
    }

    /**
     * @dev Sets a new transferable for all token types.
     */
    function setTransferable(bool _trans) external onlyOwner {
        _transferable = _trans;
    }

    /**
     * @dev Sets a new name for all token types.
     */
    function setName(string calldata newName) external onlyOwner {
        _name = newName;
    }

    /**
     * @dev Sets a new symbol for all token types.
     */
    function setSymbol(string calldata newSymbol) external onlyOwner {
        _symbol = newSymbol;
    }

    /**
     * @dev Add a new minter.
     */
    function addMinter(address minter)
        external
        onlyOwner
        onlyZeroAddress(minter)
    {
        if (_minters[minter]) {
            revert IsAdded();
        }
        _minters[minter] = true;
        emit EventMinterAdded(minter);
    }

    /**
     * @dev Remove a old minter.
     */
    function removeMinter(address minter) external onlyOwner {
        if (!_minters[minter]) {
            revert IsNotAdded();
        }
        delete _minters[minter];
        emit EventMinterRemoved(minter);
    }

    /**
     * @dev Add a new minter.
     */
    function addWhitelist(address whitelist)
        external
        onlyOwner
        onlyZeroAddress(whitelist)
    {
        if (_whitelists[whitelist]) {
            revert IsAdded();
        }
        _whitelists[whitelist] = true;
        emit EventWhitelisterAdded(whitelist);
    }

    /**
     * @dev Remove a old minter.
     */
    function removeWhitelist(address whitelist) external onlyOwner {
        if (!_whitelists[whitelist]) {
            revert IsNotAdded();
        }
        delete _whitelists[whitelist];
        emit EventWhitelisterRemoved(whitelist);
    }

    /**
     * @dev Add a new minter.
     */
    function addEditor(address editor)
        external
        onlyOwner
        onlyZeroAddress(editor)
    {
        if (_editors[editor]) {
            revert IsAdded();
        }
        _editors[editor] = true;
        emit EventEditorAdded(editor);
    }

    /**
     * @dev Remove a old minter.
     */
    function removeEditor(address editor) external onlyOwner {
        if (!_editors[editor]) {
            revert IsNotAdded();
        }
        delete _editors[editor];
        emit EventEditorRemoved(editor);
    }
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 3 of 8 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 8 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 5 of 8 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private 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 6 of 8 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"IsAdded","type":"error"},{"inputs":[],"name":"IsApproved","type":"error"},{"inputs":[],"name":"IsERC721Received","type":"error"},{"inputs":[],"name":"IsExists","type":"error"},{"inputs":[],"name":"IsNotAdded","type":"error"},{"inputs":[],"name":"IsOwner","type":"error"},{"inputs":[],"name":"IsZeroAddress","type":"error"},{"inputs":[],"name":"OnlyEditor","type":"error"},{"inputs":[],"name":"OnlyMinter","type":"error"},{"inputs":[],"name":"OnlyTransferable","type":"error"},{"inputs":[],"name":"OutBoundIndex","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"EventEditorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"EventEditorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newMinter","type":"address"}],"name":"EventMinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldMinter","type":"address"}],"name":"EventMinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newMinter","type":"address"}],"name":"EventWhitelisterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldMinter","type":"address"}],"name":"EventWhitelisterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"editor","type":"address"}],"name":"addEditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"whitelist","type":"address"}],"name":"addWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"editInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_id","type":"bytes32"}],"name":"getCredentials","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getInfo","outputs":[{"components":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint160","name":"owner","type":"uint160"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint8","name":"types","type":"uint8"},{"internalType":"uint256","name":"bornTime","type":"uint256"}],"internalType":"struct GENE.Info","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"initPayload","type":"bytes"}],"name":"init","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes32","name":"_id","type":"bytes32"},{"internalType":"uint8","name":"_types","type":"uint8"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"minters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"editor","type":"address"}],"name":"removeEditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"whitelist","type":"address"}],"name":"removeWhitelist","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newName","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_trans","type":"bool"}],"name":"setTransferable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"tokensOfOwnerByCursor","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"}]

60c0604052600b60808190526a4d6963726f332047454e4560a81b60a09081526200002e9160019190620000a5565b506040805180820190915260048082526347454e4560e01b60209092019182526200005c91600291620000a5565b506004805460ff191660011790556000196005556040805160208101918290526000908190526200009091601091620000a5565b503480156200009e57600080fd5b5062000187565b828054620000b3906200014b565b90600052602060002090601f016020900481019282620000d7576000855562000122565b82601f10620000f257805160ff191683800117855562000122565b8280016001018555821562000122579182015b828111156200012257825182559160200191906001019062000105565b506200013092915062000134565b5090565b5b8082111562000130576000815560010162000135565b600181811c908216806200016057607f821691505b6020821081036200018157634e487b7160e01b600052602260045260246000fd5b50919050565b61275880620001976000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c806378c8cda71161013b578063b84c8246116100b8578063d96a3be61161007c578063d96a3be614610556578063e5975bdc14610569578063e985e9c51461057c578063f46eccc41461058f578063f80f5dd5146105bb57600080fd5b8063b84c8246146104f7578063b88d4fde1461050a578063c47f00271461051d578063c5b8f77214610530578063c87b56dd1461054357600080fd5b806398046448116100ff5780639804644814610498578063983b2d56146104ab5780639cd23707146104be5780639dc29fac146104d1578063a22cb465146104e457600080fd5b806378c8cda71461043f5780638462151c146104525780638da5cb5b1461047257806392ff0d311461048557806395d89b411461049057600080fd5b806334a77b47116101c957806354fd4d501161018d57806354fd4d50146103e957806355f804b3146103fe5780636352211e146104115780636c0360eb1461042457806370a082311461042c57600080fd5b806334a77b47146103885780633726230a146103a85780634076da8b146103b057806342842e0e146103c35780634ddf47d4146103d657600080fd5b80631a3cd59a116102105780631a3cd59a146102e057806323b872dd1461033c5780632d55feaf1461034f5780632f745c59146103625780633092afd51461037557600080fd5b806301ffc9a71461024d57806306fdde0314610275578063081812fc1461028a578063095ea7b3146102b557806318160ddd146102ca575b600080fd5b61026061025b36600461210d565b6105ce565b60405190151581526020015b60405180910390f35b61027d610620565b60405161026c919061217e565b61029d610298366004612191565b6106b2565b6040516001600160a01b03909116815260200161026c565b6102c86102c33660046121bf565b6106fc565b005b6102d26107ca565b60405190815260200161026c565b6102f36102ee366004612191565b6107e6565b60405161026c9190815181526020808301516001600160a01b0316908201526040808301519082015260608083015160ff16908201526080918201519181019190915260a00190565b6102c861034a3660046121eb565b6108aa565b6102c861035d36600461222c565b610934565b6102d26103703660046121bf565b6109cd565b6102c861038336600461222c565b610a2c565b6102d2610396366004612191565b60009081526007602052604090205490565b6102d2610ac5565b6102d26103be366004612292565b610ad7565b6102c86103d13660046121eb565b610d78565b6102606103e43660046123c0565b610de7565b60045460405160ff909116815260200161026c565b6102c861040c3660046123f5565b610fa7565b61029d61041f366004612191565b610fd5565b61027d611035565b6102d261043a36600461222c565b611044565b6102c861044d36600461222c565b61108b565b61046561046036600461222c565b611124565b60405161026c919061243e565b60005461029d906001600160a01b031681565b600f5460ff16610260565b61027d6111c8565b6104656104a6366004612482565b6111d7565b6102c86104b936600461222c565b61129d565b6102c86104cc3660046124cc565b611363565b6102c86104df3660046121bf565b61138d565b6102c86104f23660046124e7565b61163e565b6102c861050536600461251c565b6116f6565b6102c861051836600461255e565b611719565b6102c861052b36600461251c565b6117a5565b61026061053e3660046121bf565b6117c8565b61027d610551366004612191565b6117ec565b6102d2610564366004612482565b61195d565b6102c861057736600461222c565b611a10565b61026061058a3660046125ca565b611ad6565b61026061059d36600461222c565b6001600160a01b03166000908152600c602052604090205460ff1690565b6102c86105c936600461222c565b611b2e565b60006001600160e01b031982166380ac58cd60e01b14806105ff57506001600160e01b03198216635b5e139f60e01b145b8061061a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461062f90612603565b80601f016020809104026020016040519081016040528092919081815260200182805461065b90612603565b80156106a85780601f1061067d576101008083540402835291602001916106a8565b820191906000526020600020905b81548152906001019060200180831161068b57829003601f168201915b5050505050905090565b6000816106be81611bf4565b6106db57604051630763427760e31b815260040160405180910390fd5b6000838152600a60205260409020546001600160a01b031691505b50919050565b600061070782610fd5565b9050806001600160a01b0316836001600160a01b03160361075f5760405162461bcd60e51b815260206004820152600d60248201526c31bab93932b73a1037bbb732b960991b60448201526064015b60405180910390fd5b336001600160a01b038216148061077b575061077b8133611ad6565b6107bb5760405162461bcd60e51b81526020600482015260116024820152701b9bdd081bdddb995c88199bdc88185b1b607a1b6044820152606401610756565b6107c58383611c11565b505050565b60006003546107d7610ac5565b6107e1919061264d565b905090565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091528161081b81611bf4565b61083857604051630763427760e31b815260040160405180910390fd5b6006838154811061084b5761084b612664565b60009182526020918290206040805160a08101825260059093029091018054835260018101546001600160a01b031693830193909352600283015490820152600382015460ff1660608201526004909101546080820152915050919050565b600f548390839060ff161580156108da57506001600160a01b0381166000908152600d602052604090205460ff16155b156108f757604051624bb9bd60e81b815260040160405180910390fd5b33836109038282611c7f565b61092057604051637af579ff60e11b815260040160405180910390fd5b61092b878787611d01565b50505050505050565b6000546001600160a01b0316331461094b57600080fd5b6001600160a01b0381166000908152600e602052604090205460ff166109845760405163e877d8af60e01b815260040160405180910390fd5b6001600160a01b0381166000818152600e6020526040808220805460ff19169055517f1a5f623a6d378ca0c4eb2b445c0a7d4e3308079ad91f0aa105625fc3cbe026439190a250565b60008060015b600654811015610a12576109e785826117c8565b15610a0a578382036109fc57915061061a9050565b610a0760018361267a565b91505b6001016109d3565b506040516304149ae760e21b815260040160405180910390fd5b6000546001600160a01b03163314610a4357600080fd5b6001600160a01b0381166000908152600c602052604090205460ff16610a7c5760405163e877d8af60e01b815260040160405180910390fd5b6001600160a01b0381166000818152600c6020526040808220805460ff19169055517f7df677640dd30a79584f8ecea06aeea15d215b861c5d3b5f8c26962d691f820e9190a250565b6006546000906107e19060019061264d565b336000908152600c602052604081205460ff16610b0757604051639cdc2ed560e01b815260040160405180910390fd5b866001600160a01b038116610b2f57604051631326d6d560e01b815260040160405180910390fd5b6000610b3c898888611e35565b60008181526007602052604090205490915015610b6c57604051630763427760e31b815260040160405180910390fd5b6006546040805160a0810182528981526001600160a01b038c1660208083018290528284018d905260ff8b16606084015242608084015260009182526009905291822080549192600192610bc190849061267a565b909155505060068054600181018255600091825282517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f6005909202918201556020808401517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40830180546001600160a01b0319166001600160a01b039092169190911790556040808501517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4184015560608501517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d428401805460ff191660ff90921691909117905560808501517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d439093019290925585835260078152818320859055848352600890529020610cf8908888611fe7565b50610d1560008c8460405180602001604052806000815250611e7c565b610d32576040516335a53cbf60e01b815260040160405180910390fd5b60405182906001600160a01b038d16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4509998505050505050505050565b600f548390839060ff16158015610da857506001600160a01b0381166000908152600d602052604090205460ff16155b15610dc557604051624bb9bd60e81b815260040160405180910390fd5b610de085858560405180602001604052806000815250611719565b5050505050565b60115460009060ff1615610e0d576040516282b42960e81b815260040160405180910390fd5b600082806020019051810190610e239190612692565b6040805160a0810182526000808252602080830182815283850183815260608501848152608086018581526006805460018181018355918852975160059098027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f81019890985593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40880180546001600160a01b039283166001600160a01b03199182161790915593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4189015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d428801805460ff9290921660ff1992831617905590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d439097019690965584549716961686178355948252600c81528382208054841686179055600d81528382208054841686179055600e9052919091208054821683179055600f80548216905560118054909116821790559392505050565b6000546001600160a01b03163314610fbe57600080fd5b8051610fd190601090602084019061206b565b5050565b600081610fe181611bf4565b610ffe57604051630763427760e31b815260040160405180910390fd5b6006838154811061101157611011612664565b60009182526020909120600590910201600101546001600160a01b03169392505050565b60606010805461062f90612603565b6000816001600160a01b03811661106e57604051631326d6d560e01b815260040160405180910390fd5b50506001600160a01b031660009081526009602052604090205490565b6000546001600160a01b031633146110a257600080fd5b6001600160a01b0381166000908152600d602052604090205460ff166110db5760405163e877d8af60e01b815260040160405180910390fd5b6001600160a01b0381166000818152600d6020526040808220805460ff19169055517f0423520a38e0d406cd52b8e93c1ff3fbafacf751f19b5888825e8ad196a40c539190a250565b606060008061113284611044565b905060008167ffffffffffffffff81111561114f5761114f612314565b604051908082528060200260200182016040528015611178578160200160208202803683370190505b50905060005b8284146111bf5761118f86826109cd565b828561119a816126af565b9650815181106111ac576111ac612664565b602090810291909101015260010161117e565b50949350505050565b60606002805461062f90612603565b60606000806111e586611044565b9050836111f2868361264d565b81111561120657611203868361264d565b90505b60008167ffffffffffffffff81111561122157611221612314565b60405190808252806020026020018201604052801561124a578160200160208202803683370190505b50905060005b8285146112915761126189826109cd565b828661126c816126af565b97508151811061127e5761127e612664565b6020908102919091010152600101611250565b50979650505050505050565b6000546001600160a01b031633146112b457600080fd5b806001600160a01b0381166112dc57604051631326d6d560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205460ff161561131657604051634460b10160e01b815260040160405180910390fd5b6001600160a01b0382166000818152600c6020526040808220805460ff19166001179055517f3a159411d00fa06a3ec11d4578931f1b7f877cceadb1e083929d74ec020cb2439190a25050565b6000546001600160a01b0316331461137a57600080fd5b600f805460ff1916911515919091179055565b336000908152600c602052604090205460ff166113bd57604051639cdc2ed560e01b815260040160405180910390fd5b33816113c98282611c7f565b6113e657604051637af579ff60e11b815260040160405180910390fd5b83836113f282826117c8565b61140f5760405163e4183cb160e01b815260040160405180910390fd5b61141a600086611c11565b6003805490600061142a836126af565b90915550506001600160a01b038616600090815260096020526040812080546001929061145890849061264d565b9250508190555060006114b9876006888154811061147857611478612664565b9060005260206000209060050201600001546006898154811061149d5761149d612664565b600091825260209091206003600590920201015460ff16611e35565b6000818152600760205260408120819055600680549293509091889081106114e3576114e3612664565b90600052602060002090600502016000018190555060006006878154811061150d5761150d612664565b906000526020600020906005020160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060006006878154811061155757611557612664565b90600052602060002090600502016002018190555060006006878154811061158157611581612664565b906000526020600020906005020160030160006101000a81548160ff021916908360ff1602179055506000600687815481106115bf576115bf612664565b6000918252602080832060046005909302019190910192909255604080518084018083528382528a84526008909452912090516115fc929061206b565b5060405186906000906001600160a01b038a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450505050505050565b336001600160a01b0383160361168a5760405162461bcd60e51b815260206004820152601160248201527030b8383937bb32903a379031b0b63632b960791b6044820152606401610756565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b0316331461170d57600080fd5b6107c560028383611fe7565b600f548490849060ff1615801561174957506001600160a01b0381166000908152600d602052604090205460ff16155b1561176657604051624bb9bd60e81b815260040160405180910390fd5b33846117728282611c7f565b61178f57604051637af579ff60e11b815260040160405180910390fd5b61179b88888888611fad565b5050505050505050565b6000546001600160a01b031633146117bc57600080fd5b6107c560018383611fe7565b6000806117d483610fd5565b6001600160a01b039081169085161491505092915050565b6060816117f881611bf4565b61181557604051630763427760e31b815260040160405180910390fd5b60006010805461182490612603565b905011156118be576010805461183990612603565b80601f016020809104026020016040519081016040528092919081815260200182805461186590612603565b80156118b25780601f10611887576101008083540402835291602001916118b2565b820191906000526020600020905b81548152906001019060200180831161189557829003601f168201915b505050505091506106f6565b600083815260086020526040902080546118d790612603565b80601f016020809104026020016040519081016040528092919081815260200182805461190390612603565b80156119505780601f1061192557610100808354040283529160200191611950565b820191906000526020600020905b81548152906001019060200180831161193357829003601f168201915b5050505050915050919050565b336000908152600e602052604081205460ff1661198d5760405163df68a6eb60e01b815260040160405180910390fd5b8261199781611bf4565b6119b457604051630763427760e31b815260040160405180910390fd5b84846119c082826117c8565b6119dd5760405163e4183cb160e01b815260040160405180910390fd5b84600687815481106119f1576119f1612664565b6000918252602090912060026005909202010155509395945050505050565b6000546001600160a01b03163314611a2757600080fd5b806001600160a01b038116611a4f57604051631326d6d560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600e602052604090205460ff1615611a8957604051634460b10160e01b815260040160405180910390fd5b6001600160a01b0382166000818152600e6020526040808220805460ff19166001179055517f03e1ff6b04d4b611e9942362dd202685d1f9b91cf5f91d7b04f57b273a1229f99190a25050565b6001600160a01b0381166000908152600c602052604081205460ff1615611aff5750600161061a565b506001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b6000546001600160a01b03163314611b4557600080fd5b806001600160a01b038116611b6d57604051631326d6d560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600d602052604090205460ff1615611ba757604051634460b10160e01b815260040160405180910390fd5b6001600160a01b0382166000818152600d6020526040808220805460ff19166001179055517f837fb0ca7b1f0774baf7d94b6860790f75e44697462f6c20542db7cfdbeca1b29190a25050565b6000808211801561061a5750611c08610ac5565b82111592915050565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c4682610fd5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611c8b83610fd5565b9050806001600160a01b0316846001600160a01b03161480611cc65750836001600160a01b0316611cbb846106b2565b6001600160a01b0316145b80611cd65750611cd68185611ad6565b80611cf957506001600160a01b0384166000908152600d602052604090205460ff165b949350505050565b8281611d0d82826117c8565b611d2a5760405163e4183cb160e01b815260040160405180910390fd5b836001600160a01b038116611d5257604051631326d6d560e01b815260040160405180910390fd5b611d5d600085611c11565b6001600160a01b0386166000908152600960205260408120805460019290611d8690849061264d565b90915550506001600160a01b0385166000908152600960205260408120805460019290611db490849061267a565b925050819055508460068581548110611dcf57611dcf612664565b6000918252602082206005919091020160010180546001600160a01b0319166001600160a01b03938416179055604051869288811692908a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050505050565b604080516001600160a01b038516602082015290810183905260ff821660608201526000906080016040516020818303038152906040528051906020012090509392505050565b60006001600160a01b0384163b15611fa257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ec09033908990889088906004016126c8565b6020604051808303816000875af1925050508015611efb575060408051601f3d908101601f19168201909252611ef891810190612705565b60015b611f88573d808015611f29576040519150601f19603f3d011682016040523d82523d6000602084013e611f2e565b606091505b508051600003611f805760405162461bcd60e51b815260206004820152601a60248201527f455243373231526563656976657220696d706c656d656e7465720000000000006044820152606401610756565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cf9565b506001949350505050565b611fb8848484611d01565b611fc484848484611e7c565b611fe1576040516335a53cbf60e01b815260040160405180910390fd5b50505050565b828054611ff390612603565b90600052602060002090601f016020900481019282612015576000855561205b565b82601f1061202e5782800160ff1982351617855561205b565b8280016001018555821561205b579182015b8281111561205b578235825591602001919060010190612040565b506120679291506120df565b5090565b82805461207790612603565b90600052602060002090601f016020900481019282612099576000855561205b565b82601f106120b257805160ff191683800117855561205b565b8280016001018555821561205b579182015b8281111561205b5782518255916020019190600101906120c4565b5b8082111561206757600081556001016120e0565b6001600160e01b03198116811461210a57600080fd5b50565b60006020828403121561211f57600080fd5b813561212a816120f4565b9392505050565b6000815180845260005b818110156121575760208185018101518683018201520161213b565b81811115612169576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061212a6020830184612131565b6000602082840312156121a357600080fd5b5035919050565b6001600160a01b038116811461210a57600080fd5b600080604083850312156121d257600080fd5b82356121dd816121aa565b946020939093013593505050565b60008060006060848603121561220057600080fd5b833561220b816121aa565b9250602084013561221b816121aa565b929592945050506040919091013590565b60006020828403121561223e57600080fd5b813561212a816121aa565b60008083601f84011261225b57600080fd5b50813567ffffffffffffffff81111561227357600080fd5b60208301915083602082850101111561228b57600080fd5b9250929050565b60008060008060008060a087890312156122ab57600080fd5b86356122b6816121aa565b95506020870135945060408701359350606087013560ff811681146122da57600080fd5b9250608087013567ffffffffffffffff8111156122f657600080fd5b61230289828a01612249565b979a9699509497509295939492505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561234557612345612314565b604051601f8501601f19908116603f0116810190828211818310171561236d5761236d612314565b8160405280935085815286868601111561238657600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126123b157600080fd5b61212a8383356020850161232a565b6000602082840312156123d257600080fd5b813567ffffffffffffffff8111156123e957600080fd5b611cf9848285016123a0565b60006020828403121561240757600080fd5b813567ffffffffffffffff81111561241e57600080fd5b8201601f8101841361242f57600080fd5b611cf98482356020840161232a565b6020808252825182820181905260009190848201906040850190845b818110156124765783518352928401929184019160010161245a565b50909695505050505050565b60008060006060848603121561249757600080fd5b83356124a2816121aa565b95602085013595506040909401359392505050565b803580151581146124c757600080fd5b919050565b6000602082840312156124de57600080fd5b61212a826124b7565b600080604083850312156124fa57600080fd5b8235612505816121aa565b9150612513602084016124b7565b90509250929050565b6000806020838503121561252f57600080fd5b823567ffffffffffffffff81111561254657600080fd5b61255285828601612249565b90969095509350505050565b6000806000806080858703121561257457600080fd5b843561257f816121aa565b9350602085013561258f816121aa565b925060408501359150606085013567ffffffffffffffff8111156125b257600080fd5b6125be878288016123a0565b91505092959194509250565b600080604083850312156125dd57600080fd5b82356125e8816121aa565b915060208301356125f8816121aa565b809150509250929050565b600181811c9082168061261757607f821691505b6020821081036106f657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561265f5761265f612637565b500390565b634e487b7160e01b600052603260045260246000fd5b6000821982111561268d5761268d612637565b500190565b6000602082840312156126a457600080fd5b815161212a816121aa565b6000600182016126c1576126c1612637565b5060010190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906126fb90830184612131565b9695505050505050565b60006020828403121561271757600080fd5b815161212a816120f456fea26469706673582212201aa8ef7af70668256c9fc40a4a0ae1f7677b9695a7a74120ac04acbb1171fa2e64736f6c634300080d0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102485760003560e01c806378c8cda71161013b578063b84c8246116100b8578063d96a3be61161007c578063d96a3be614610556578063e5975bdc14610569578063e985e9c51461057c578063f46eccc41461058f578063f80f5dd5146105bb57600080fd5b8063b84c8246146104f7578063b88d4fde1461050a578063c47f00271461051d578063c5b8f77214610530578063c87b56dd1461054357600080fd5b806398046448116100ff5780639804644814610498578063983b2d56146104ab5780639cd23707146104be5780639dc29fac146104d1578063a22cb465146104e457600080fd5b806378c8cda71461043f5780638462151c146104525780638da5cb5b1461047257806392ff0d311461048557806395d89b411461049057600080fd5b806334a77b47116101c957806354fd4d501161018d57806354fd4d50146103e957806355f804b3146103fe5780636352211e146104115780636c0360eb1461042457806370a082311461042c57600080fd5b806334a77b47146103885780633726230a146103a85780634076da8b146103b057806342842e0e146103c35780634ddf47d4146103d657600080fd5b80631a3cd59a116102105780631a3cd59a146102e057806323b872dd1461033c5780632d55feaf1461034f5780632f745c59146103625780633092afd51461037557600080fd5b806301ffc9a71461024d57806306fdde0314610275578063081812fc1461028a578063095ea7b3146102b557806318160ddd146102ca575b600080fd5b61026061025b36600461210d565b6105ce565b60405190151581526020015b60405180910390f35b61027d610620565b60405161026c919061217e565b61029d610298366004612191565b6106b2565b6040516001600160a01b03909116815260200161026c565b6102c86102c33660046121bf565b6106fc565b005b6102d26107ca565b60405190815260200161026c565b6102f36102ee366004612191565b6107e6565b60405161026c9190815181526020808301516001600160a01b0316908201526040808301519082015260608083015160ff16908201526080918201519181019190915260a00190565b6102c861034a3660046121eb565b6108aa565b6102c861035d36600461222c565b610934565b6102d26103703660046121bf565b6109cd565b6102c861038336600461222c565b610a2c565b6102d2610396366004612191565b60009081526007602052604090205490565b6102d2610ac5565b6102d26103be366004612292565b610ad7565b6102c86103d13660046121eb565b610d78565b6102606103e43660046123c0565b610de7565b60045460405160ff909116815260200161026c565b6102c861040c3660046123f5565b610fa7565b61029d61041f366004612191565b610fd5565b61027d611035565b6102d261043a36600461222c565b611044565b6102c861044d36600461222c565b61108b565b61046561046036600461222c565b611124565b60405161026c919061243e565b60005461029d906001600160a01b031681565b600f5460ff16610260565b61027d6111c8565b6104656104a6366004612482565b6111d7565b6102c86104b936600461222c565b61129d565b6102c86104cc3660046124cc565b611363565b6102c86104df3660046121bf565b61138d565b6102c86104f23660046124e7565b61163e565b6102c861050536600461251c565b6116f6565b6102c861051836600461255e565b611719565b6102c861052b36600461251c565b6117a5565b61026061053e3660046121bf565b6117c8565b61027d610551366004612191565b6117ec565b6102d2610564366004612482565b61195d565b6102c861057736600461222c565b611a10565b61026061058a3660046125ca565b611ad6565b61026061059d36600461222c565b6001600160a01b03166000908152600c602052604090205460ff1690565b6102c86105c936600461222c565b611b2e565b60006001600160e01b031982166380ac58cd60e01b14806105ff57506001600160e01b03198216635b5e139f60e01b145b8061061a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461062f90612603565b80601f016020809104026020016040519081016040528092919081815260200182805461065b90612603565b80156106a85780601f1061067d576101008083540402835291602001916106a8565b820191906000526020600020905b81548152906001019060200180831161068b57829003601f168201915b5050505050905090565b6000816106be81611bf4565b6106db57604051630763427760e31b815260040160405180910390fd5b6000838152600a60205260409020546001600160a01b031691505b50919050565b600061070782610fd5565b9050806001600160a01b0316836001600160a01b03160361075f5760405162461bcd60e51b815260206004820152600d60248201526c31bab93932b73a1037bbb732b960991b60448201526064015b60405180910390fd5b336001600160a01b038216148061077b575061077b8133611ad6565b6107bb5760405162461bcd60e51b81526020600482015260116024820152701b9bdd081bdddb995c88199bdc88185b1b607a1b6044820152606401610756565b6107c58383611c11565b505050565b60006003546107d7610ac5565b6107e1919061264d565b905090565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091528161081b81611bf4565b61083857604051630763427760e31b815260040160405180910390fd5b6006838154811061084b5761084b612664565b60009182526020918290206040805160a08101825260059093029091018054835260018101546001600160a01b031693830193909352600283015490820152600382015460ff1660608201526004909101546080820152915050919050565b600f548390839060ff161580156108da57506001600160a01b0381166000908152600d602052604090205460ff16155b156108f757604051624bb9bd60e81b815260040160405180910390fd5b33836109038282611c7f565b61092057604051637af579ff60e11b815260040160405180910390fd5b61092b878787611d01565b50505050505050565b6000546001600160a01b0316331461094b57600080fd5b6001600160a01b0381166000908152600e602052604090205460ff166109845760405163e877d8af60e01b815260040160405180910390fd5b6001600160a01b0381166000818152600e6020526040808220805460ff19169055517f1a5f623a6d378ca0c4eb2b445c0a7d4e3308079ad91f0aa105625fc3cbe026439190a250565b60008060015b600654811015610a12576109e785826117c8565b15610a0a578382036109fc57915061061a9050565b610a0760018361267a565b91505b6001016109d3565b506040516304149ae760e21b815260040160405180910390fd5b6000546001600160a01b03163314610a4357600080fd5b6001600160a01b0381166000908152600c602052604090205460ff16610a7c5760405163e877d8af60e01b815260040160405180910390fd5b6001600160a01b0381166000818152600c6020526040808220805460ff19169055517f7df677640dd30a79584f8ecea06aeea15d215b861c5d3b5f8c26962d691f820e9190a250565b6006546000906107e19060019061264d565b336000908152600c602052604081205460ff16610b0757604051639cdc2ed560e01b815260040160405180910390fd5b866001600160a01b038116610b2f57604051631326d6d560e01b815260040160405180910390fd5b6000610b3c898888611e35565b60008181526007602052604090205490915015610b6c57604051630763427760e31b815260040160405180910390fd5b6006546040805160a0810182528981526001600160a01b038c1660208083018290528284018d905260ff8b16606084015242608084015260009182526009905291822080549192600192610bc190849061267a565b909155505060068054600181018255600091825282517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f6005909202918201556020808401517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40830180546001600160a01b0319166001600160a01b039092169190911790556040808501517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4184015560608501517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d428401805460ff191660ff90921691909117905560808501517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d439093019290925585835260078152818320859055848352600890529020610cf8908888611fe7565b50610d1560008c8460405180602001604052806000815250611e7c565b610d32576040516335a53cbf60e01b815260040160405180910390fd5b60405182906001600160a01b038d16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4509998505050505050505050565b600f548390839060ff16158015610da857506001600160a01b0381166000908152600d602052604090205460ff16155b15610dc557604051624bb9bd60e81b815260040160405180910390fd5b610de085858560405180602001604052806000815250611719565b5050505050565b60115460009060ff1615610e0d576040516282b42960e81b815260040160405180910390fd5b600082806020019051810190610e239190612692565b6040805160a0810182526000808252602080830182815283850183815260608501848152608086018581526006805460018181018355918852975160059098027ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f81019890985593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40880180546001600160a01b039283166001600160a01b03199182161790915593517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d4189015591517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d428801805460ff9290921660ff1992831617905590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d439097019690965584549716961686178355948252600c81528382208054841686179055600d81528382208054841686179055600e9052919091208054821683179055600f80548216905560118054909116821790559392505050565b6000546001600160a01b03163314610fbe57600080fd5b8051610fd190601090602084019061206b565b5050565b600081610fe181611bf4565b610ffe57604051630763427760e31b815260040160405180910390fd5b6006838154811061101157611011612664565b60009182526020909120600590910201600101546001600160a01b03169392505050565b60606010805461062f90612603565b6000816001600160a01b03811661106e57604051631326d6d560e01b815260040160405180910390fd5b50506001600160a01b031660009081526009602052604090205490565b6000546001600160a01b031633146110a257600080fd5b6001600160a01b0381166000908152600d602052604090205460ff166110db5760405163e877d8af60e01b815260040160405180910390fd5b6001600160a01b0381166000818152600d6020526040808220805460ff19169055517f0423520a38e0d406cd52b8e93c1ff3fbafacf751f19b5888825e8ad196a40c539190a250565b606060008061113284611044565b905060008167ffffffffffffffff81111561114f5761114f612314565b604051908082528060200260200182016040528015611178578160200160208202803683370190505b50905060005b8284146111bf5761118f86826109cd565b828561119a816126af565b9650815181106111ac576111ac612664565b602090810291909101015260010161117e565b50949350505050565b60606002805461062f90612603565b60606000806111e586611044565b9050836111f2868361264d565b81111561120657611203868361264d565b90505b60008167ffffffffffffffff81111561122157611221612314565b60405190808252806020026020018201604052801561124a578160200160208202803683370190505b50905060005b8285146112915761126189826109cd565b828661126c816126af565b97508151811061127e5761127e612664565b6020908102919091010152600101611250565b50979650505050505050565b6000546001600160a01b031633146112b457600080fd5b806001600160a01b0381166112dc57604051631326d6d560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205460ff161561131657604051634460b10160e01b815260040160405180910390fd5b6001600160a01b0382166000818152600c6020526040808220805460ff19166001179055517f3a159411d00fa06a3ec11d4578931f1b7f877cceadb1e083929d74ec020cb2439190a25050565b6000546001600160a01b0316331461137a57600080fd5b600f805460ff1916911515919091179055565b336000908152600c602052604090205460ff166113bd57604051639cdc2ed560e01b815260040160405180910390fd5b33816113c98282611c7f565b6113e657604051637af579ff60e11b815260040160405180910390fd5b83836113f282826117c8565b61140f5760405163e4183cb160e01b815260040160405180910390fd5b61141a600086611c11565b6003805490600061142a836126af565b90915550506001600160a01b038616600090815260096020526040812080546001929061145890849061264d565b9250508190555060006114b9876006888154811061147857611478612664565b9060005260206000209060050201600001546006898154811061149d5761149d612664565b600091825260209091206003600590920201015460ff16611e35565b6000818152600760205260408120819055600680549293509091889081106114e3576114e3612664565b90600052602060002090600502016000018190555060006006878154811061150d5761150d612664565b906000526020600020906005020160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060006006878154811061155757611557612664565b90600052602060002090600502016002018190555060006006878154811061158157611581612664565b906000526020600020906005020160030160006101000a81548160ff021916908360ff1602179055506000600687815481106115bf576115bf612664565b6000918252602080832060046005909302019190910192909255604080518084018083528382528a84526008909452912090516115fc929061206b565b5060405186906000906001600160a01b038a16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450505050505050565b336001600160a01b0383160361168a5760405162461bcd60e51b815260206004820152601160248201527030b8383937bb32903a379031b0b63632b960791b6044820152606401610756565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000546001600160a01b0316331461170d57600080fd5b6107c560028383611fe7565b600f548490849060ff1615801561174957506001600160a01b0381166000908152600d602052604090205460ff16155b1561176657604051624bb9bd60e81b815260040160405180910390fd5b33846117728282611c7f565b61178f57604051637af579ff60e11b815260040160405180910390fd5b61179b88888888611fad565b5050505050505050565b6000546001600160a01b031633146117bc57600080fd5b6107c560018383611fe7565b6000806117d483610fd5565b6001600160a01b039081169085161491505092915050565b6060816117f881611bf4565b61181557604051630763427760e31b815260040160405180910390fd5b60006010805461182490612603565b905011156118be576010805461183990612603565b80601f016020809104026020016040519081016040528092919081815260200182805461186590612603565b80156118b25780601f10611887576101008083540402835291602001916118b2565b820191906000526020600020905b81548152906001019060200180831161189557829003601f168201915b505050505091506106f6565b600083815260086020526040902080546118d790612603565b80601f016020809104026020016040519081016040528092919081815260200182805461190390612603565b80156119505780601f1061192557610100808354040283529160200191611950565b820191906000526020600020905b81548152906001019060200180831161193357829003601f168201915b5050505050915050919050565b336000908152600e602052604081205460ff1661198d5760405163df68a6eb60e01b815260040160405180910390fd5b8261199781611bf4565b6119b457604051630763427760e31b815260040160405180910390fd5b84846119c082826117c8565b6119dd5760405163e4183cb160e01b815260040160405180910390fd5b84600687815481106119f1576119f1612664565b6000918252602090912060026005909202010155509395945050505050565b6000546001600160a01b03163314611a2757600080fd5b806001600160a01b038116611a4f57604051631326d6d560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600e602052604090205460ff1615611a8957604051634460b10160e01b815260040160405180910390fd5b6001600160a01b0382166000818152600e6020526040808220805460ff19166001179055517f03e1ff6b04d4b611e9942362dd202685d1f9b91cf5f91d7b04f57b273a1229f99190a25050565b6001600160a01b0381166000908152600c602052604081205460ff1615611aff5750600161061a565b506001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b6000546001600160a01b03163314611b4557600080fd5b806001600160a01b038116611b6d57604051631326d6d560e01b815260040160405180910390fd5b6001600160a01b0382166000908152600d602052604090205460ff1615611ba757604051634460b10160e01b815260040160405180910390fd5b6001600160a01b0382166000818152600d6020526040808220805460ff19166001179055517f837fb0ca7b1f0774baf7d94b6860790f75e44697462f6c20542db7cfdbeca1b29190a25050565b6000808211801561061a5750611c08610ac5565b82111592915050565b6000818152600a6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c4682610fd5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611c8b83610fd5565b9050806001600160a01b0316846001600160a01b03161480611cc65750836001600160a01b0316611cbb846106b2565b6001600160a01b0316145b80611cd65750611cd68185611ad6565b80611cf957506001600160a01b0384166000908152600d602052604090205460ff165b949350505050565b8281611d0d82826117c8565b611d2a5760405163e4183cb160e01b815260040160405180910390fd5b836001600160a01b038116611d5257604051631326d6d560e01b815260040160405180910390fd5b611d5d600085611c11565b6001600160a01b0386166000908152600960205260408120805460019290611d8690849061264d565b90915550506001600160a01b0385166000908152600960205260408120805460019290611db490849061267a565b925050819055508460068581548110611dcf57611dcf612664565b6000918252602082206005919091020160010180546001600160a01b0319166001600160a01b03938416179055604051869288811692908a16917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050505050565b604080516001600160a01b038516602082015290810183905260ff821660608201526000906080016040516020818303038152906040528051906020012090509392505050565b60006001600160a01b0384163b15611fa257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611ec09033908990889088906004016126c8565b6020604051808303816000875af1925050508015611efb575060408051601f3d908101601f19168201909252611ef891810190612705565b60015b611f88573d808015611f29576040519150601f19603f3d011682016040523d82523d6000602084013e611f2e565b606091505b508051600003611f805760405162461bcd60e51b815260206004820152601a60248201527f455243373231526563656976657220696d706c656d656e7465720000000000006044820152606401610756565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cf9565b506001949350505050565b611fb8848484611d01565b611fc484848484611e7c565b611fe1576040516335a53cbf60e01b815260040160405180910390fd5b50505050565b828054611ff390612603565b90600052602060002090601f016020900481019282612015576000855561205b565b82601f1061202e5782800160ff1982351617855561205b565b8280016001018555821561205b579182015b8281111561205b578235825591602001919060010190612040565b506120679291506120df565b5090565b82805461207790612603565b90600052602060002090601f016020900481019282612099576000855561205b565b82601f106120b257805160ff191683800117855561205b565b8280016001018555821561205b579182015b8281111561205b5782518255916020019190600101906120c4565b5b8082111561206757600081556001016120e0565b6001600160e01b03198116811461210a57600080fd5b50565b60006020828403121561211f57600080fd5b813561212a816120f4565b9392505050565b6000815180845260005b818110156121575760208185018101518683018201520161213b565b81811115612169576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061212a6020830184612131565b6000602082840312156121a357600080fd5b5035919050565b6001600160a01b038116811461210a57600080fd5b600080604083850312156121d257600080fd5b82356121dd816121aa565b946020939093013593505050565b60008060006060848603121561220057600080fd5b833561220b816121aa565b9250602084013561221b816121aa565b929592945050506040919091013590565b60006020828403121561223e57600080fd5b813561212a816121aa565b60008083601f84011261225b57600080fd5b50813567ffffffffffffffff81111561227357600080fd5b60208301915083602082850101111561228b57600080fd5b9250929050565b60008060008060008060a087890312156122ab57600080fd5b86356122b6816121aa565b95506020870135945060408701359350606087013560ff811681146122da57600080fd5b9250608087013567ffffffffffffffff8111156122f657600080fd5b61230289828a01612249565b979a9699509497509295939492505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561234557612345612314565b604051601f8501601f19908116603f0116810190828211818310171561236d5761236d612314565b8160405280935085815286868601111561238657600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126123b157600080fd5b61212a8383356020850161232a565b6000602082840312156123d257600080fd5b813567ffffffffffffffff8111156123e957600080fd5b611cf9848285016123a0565b60006020828403121561240757600080fd5b813567ffffffffffffffff81111561241e57600080fd5b8201601f8101841361242f57600080fd5b611cf98482356020840161232a565b6020808252825182820181905260009190848201906040850190845b818110156124765783518352928401929184019160010161245a565b50909695505050505050565b60008060006060848603121561249757600080fd5b83356124a2816121aa565b95602085013595506040909401359392505050565b803580151581146124c757600080fd5b919050565b6000602082840312156124de57600080fd5b61212a826124b7565b600080604083850312156124fa57600080fd5b8235612505816121aa565b9150612513602084016124b7565b90509250929050565b6000806020838503121561252f57600080fd5b823567ffffffffffffffff81111561254657600080fd5b61255285828601612249565b90969095509350505050565b6000806000806080858703121561257457600080fd5b843561257f816121aa565b9350602085013561258f816121aa565b925060408501359150606085013567ffffffffffffffff8111156125b257600080fd5b6125be878288016123a0565b91505092959194509250565b600080604083850312156125dd57600080fd5b82356125e8816121aa565b915060208301356125f8816121aa565b809150509250929050565b600181811c9082168061261757607f821691505b6020821081036106f657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561265f5761265f612637565b500390565b634e487b7160e01b600052603260045260246000fd5b6000821982111561268d5761268d612637565b500190565b6000602082840312156126a457600080fd5b815161212a816121aa565b6000600182016126c1576126c1612637565b5060010190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906126fb90830184612131565b9695505050505050565b60006020828403121561271757600080fd5b815161212a816120f456fea26469706673582212201aa8ef7af70668256c9fc40a4a0ae1f7677b9695a7a74120ac04acbb1171fa2e64736f6c634300080d0033

[ 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.