ETH Price: $3,381.87 (+1.09%)

Contract

0x29502a2626F799fB5D5aeae61916B616751d6BdE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...211683322024-11-12 1:29:5946 days ago1731374999IN
0x29502a26...6751d6BdE
0 ETH0.0011165724.19394304
Transfer From204796942024-08-07 22:30:23142 days ago1723069823IN
0x29502a26...6751d6BdE
0 ETH0.000161193.97198561
Transfer From204796882024-08-07 22:29:11142 days ago1723069751IN
0x29502a26...6751d6BdE
0 ETH0.000247653.96357482
Safe Transfer Fr...203984792024-07-27 14:27:35154 days ago1722090455IN
0x29502a26...6751d6BdE
0 ETH0.000292454.82479329
Set Approval For...203935102024-07-26 21:48:35154 days ago1722030515IN
0x29502a26...6751d6BdE
0 ETH0.000083141.80157571
Set Approval For...201701832024-06-25 17:27:11185 days ago1719336431IN
0x29502a26...6751d6BdE
0 ETH0.00041128.91006801
Transfer From198852392024-05-16 21:32:11225 days ago1715895131IN
0x29502a26...6751d6BdE
0 ETH0.000230784.00098727
Set Approval For...198562412024-05-12 20:11:35229 days ago1715544695IN
0x29502a26...6751d6BdE
0 ETH0.000166313.60374309
Set Approval For...193574482024-03-03 21:53:35299 days ago1709502815IN
0x29502a26...6751d6BdE
0 ETH0.0022554648.87145623
Set Approval For...193364542024-02-29 23:29:23302 days ago1709249363IN
0x29502a26...6751d6BdE
0 ETH0.0014920661.55649371
Safe Transfer Fr...193211052024-02-27 19:54:23304 days ago1709063663IN
0x29502a26...6751d6BdE
0 ETH0.0034888553.33329331
Set Approval For...191982622024-02-10 14:22:11322 days ago1707574931IN
0x29502a26...6751d6BdE
0 ETH0.0013728729.74751254
Safe Transfer Fr...191982542024-02-10 14:20:11322 days ago1707574811IN
0x29502a26...6751d6BdE
0 ETH0.0017854529.18941949
Set Approval For...186538612023-11-26 5:48:11398 days ago1700977691IN
0x29502a26...6751d6BdE
0 ETH0.0009259120.06278805
Set Approval For...186295502023-11-22 20:05:47401 days ago1700683547IN
0x29502a26...6751d6BdE
0 ETH0.0024280552.61119554
Safe Transfer Fr...186035332023-11-19 4:40:11405 days ago1700368811IN
0x29502a26...6751d6BdE
0 ETH0.0010133415.49073713
Set Approval For...184882982023-11-03 1:35:47421 days ago1698975347IN
0x29502a26...6751d6BdE
0 ETH0.0007987917.30822454
Set Approval For...180225692023-08-29 20:11:23486 days ago1693339883IN
0x29502a26...6751d6BdE
0 ETH0.0023998552
Set Approval For...175660992023-06-26 20:55:35550 days ago1687812935IN
0x29502a26...6751d6BdE
0 ETH0.0005833212.63959023
Set Approval For...175122652023-06-19 7:19:47558 days ago1687159187IN
0x29502a26...6751d6BdE
0 ETH0.0006245713.5333561
Set Approval For...174984612023-06-17 8:53:23560 days ago1686992003IN
0x29502a26...6751d6BdE
0 ETH0.0007135915.4621865
Set Approval For...174684332023-06-13 3:33:23564 days ago1686627203IN
0x29502a26...6751d6BdE
0 ETH0.0003566814.71526463
Transfer From173452702023-05-26 19:13:23581 days ago1685128403IN
0x29502a26...6751d6BdE
0 ETH0.0017781430.82675346
Set Approval For...173451102023-05-26 18:41:23581 days ago1685126483IN
0x29502a26...6751d6BdE
0 ETH0.0019051241.28031385
Transfer From172681692023-05-15 22:35:59592 days ago1684190159IN
0x29502a26...6751d6BdE
0 ETH0.0049708186.17616915
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LGNDv3

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 300 runs

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

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

import "./access/AdminControl.sol";
import "./core/CreatorCore.sol";

contract OwnableDelegateProxy {}

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

/**
 * @dev LGNDMagic implementation
 */
contract LGNDv3 is AdminControl, ERC721, CreatorCore {
    address private _proxyRegistryAddress;
    bool private _bridgeEnabled;
    string private _contractURI;

    uint256 private _supply;
    uint256 public imports;
    uint256 public exports;

    mapping(address => string) private _linkedAccounts;
    mapping(uint256 => bool) private _creatorBridgeEnabled;

    constructor (string memory _name, string memory _symbol) ERC721(_name, _symbol) {
    }

    function setProxy(address proxyRegistryAddress) external adminRequired {
        _proxyRegistryAddress = proxyRegistryAddress;
    }

    function setCreator(uint256 creatorId, address creator) external adminRequired {
        _setCreator(creatorId, creator);
    }

    function setBridge(bool enabled) external adminRequired {
        _bridgeEnabled = enabled;
    }

    function getBridge() public view returns (bool enabled) {
        return _bridgeEnabled;
    }

    function setCreatorBridge(uint256 creatorId, bool enabled) external adminRequired {
        _creatorBridgeEnabled[creatorId] = enabled;
    }

    function getCreatorBridge(uint256 creatorId) public view returns (bool enabled) {
        return _creatorBridgeEnabled[creatorId];
    }

    function getCreator(uint256 creatorId) public view returns (address creator) {
        return _creatorAddresses[creatorId];
    }

    function getTokenCreator(uint256 tokenId) public view returns (address creator) {
        require(_exists(tokenId), "Nonexistent token");
        uint256 creatorId;
        if(tokenId > MAX_TOKEN_ID) {
            creatorId = _creatorTokens[tokenId];
        } else {
            creatorId = tokenId / CREATOR_SCALE;
        }
        return _creatorAddresses[creatorId];
    }

    function setContractURI(string memory uri) external adminRequired {        
        _contractURI = uri;
    }

    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    function setLinkedAccount(string memory account) external {
        _linkedAccounts[msg.sender] = account;
    }

    function getLinkedAccount(address owner) public view returns (string memory account) {
        return _linkedAccounts[owner];
    }

    function totalSupply() public view returns (uint256 supply) {
        return _supply;
    }

    function creatorSupply(uint256 creatorId, uint256 templateId) public view returns (uint256 supply) {
        return _creatorTokenCount[creatorId][templateId];
    }

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

    /**
     * @dev See {ICreatorCore-setBaseTokenURICreator}.
     */
    function setBaseTokenURICreator(uint256 creatorId, string calldata uri) external override adminRequired {
        _setBaseTokenURICreator(creatorId, uri);
    }

    /**
     * @dev See {ICreatorCore-setBaseTokenURI}.
     */
    function setBaseTokenURI(string calldata uri) external override adminRequired {
        _setBaseTokenURI(uri);
    }

    /**
     * @dev See {ICreatorCore-setTokenURI}.
     */
    function setTokenURI(uint256 tokenId, string calldata uri) external override adminRequired {
        _setTokenURI(tokenId, uri);
    }

    /**
     * @dev See {ICreatorCore-setTokenURI}.
     */
    function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external override adminRequired {
        require(tokenIds.length == uris.length, "LGND: Invalid input");
        for (uint i = 0; i < tokenIds.length; i++) {
            _setTokenURI(tokenIds[i], uris[i]);            
        }
    }


    function mintCreator(address to, uint256 creatorId, uint256 templateId) external override adminRequired returns (uint256) {
        return _mintCreator(to,creatorId,templateId,"");
    }
    function mintCreatorURI(address to, uint256 creatorId, uint256 templateId, string calldata uri ) external override adminRequired returns (uint256) {
        return _mintCreator(to,creatorId,templateId,uri);
    }
    function mintBridge(address to, uint256 creatorId, uint256 tokenId, string calldata linkedAccount) external override adminRequired returns (uint256) {
        return _mintBridge(to, creatorId, tokenId, linkedAccount, "");
    }
    function mintBridgeURI(address to, uint256 creatorId, uint256 tokenId, string calldata linkedAccount, string calldata uri) external override adminRequired returns (uint256) {
        return _mintBridge(to, creatorId, tokenId, linkedAccount, uri);
    }

    function mintCreatorBatch(address to, uint256 creatorId, uint256 templateId, uint256 count) external override adminRequired returns (uint256[] memory tokenIds) {
        tokenIds = new uint256[](count);
        for (uint256 i = 0; i < count; i++) {
            tokenIds[i] = _mintCreator(to,creatorId,templateId,"");
        }
        return tokenIds;
    }
    function mintCreatorBatchURI(address to, uint256 creatorId, uint256 templateId, string[] calldata uris) external override adminRequired returns (uint256[] memory tokenIds) {
        tokenIds = new uint256[](uris.length);
        for (uint256 i = 0; i < uris.length; i++) {
            tokenIds[i] = _mintCreator(to,creatorId,templateId,uris[i]);
        }
        return tokenIds;
    }
    function mintBridgeBatch(address to, uint256 creatorId, uint256[] memory tokenIds, string calldata linkedAccount) external override adminRequired returns (uint256[] memory) {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _mintBridge(to,creatorId,tokenIds[i],linkedAccount,"");
        }
        return tokenIds;

    }
    function mintBridgeBatchURI(address to, uint256 creatorId, uint256[] memory tokenIds, string calldata linkedAccount, string[] calldata uris) external override adminRequired returns (uint256[] memory) {
        require(tokenIds.length == uris.length, "LGND: Invalid Input");
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _mintBridge(to,creatorId,tokenIds[i],linkedAccount,uris[i]);
        }
        return tokenIds;
    }

    /**
     * @dev Mint token
     */
    function _mintCreator(address to, uint256 creatorId, uint256 templateId, string memory uri) internal virtual returns(uint256 tokenId) {
        require(templateId <= MAX_TEMPLATE_ID, "LGND: templateId exceeds maximum");

        uint256 mintId = _creatorTokenCount[creatorId][templateId] + 1;
        require(mintId <= MAX_MINT_ID, "LGND: no remaining mints available");
        _creatorTokenCount[creatorId][templateId] = mintId;

        tokenId = (creatorId * CREATOR_SCALE) + (templateId * TEMPLATE_SCALE) + mintId;

        _supply++;
        _mint(_creatorAddresses[creatorId], tokenId);
        if(_creatorAddresses[creatorId] != to) {
            _safeTransfer(_creatorAddresses[creatorId], to, tokenId, "");
        }        

        if (bytes(uri).length > 0) {
            _tokenURIs[tokenId] = uri;
        }

        return tokenId;
    }

    /**
     * @dev Mint token
     */
    function _mintBridge(address to, uint256 creatorId, uint256 tokenId, string memory linkedAccount, string memory uri) internal virtual returns(uint256) {
        require(!_exists(tokenId), "Pre-existing token");

        if(tokenId > MAX_TOKEN_ID) {
            _creatorTokens[tokenId] = creatorId;
            _supply++;
        }
        
        _mint(_creatorAddresses[creatorId], tokenId);
        if(_creatorAddresses[creatorId] != to) {
            _safeTransfer(_creatorAddresses[creatorId], to, tokenId, "");
        }  

        if (bytes(uri).length > 0) {
            _tokenURIs[tokenId] = uri;
        }

        emit ImportedToken(to, imports++, tokenId, linkedAccount);

        return tokenId;
    }

    /**
     * @dev See {IERC721CreatorCore-burn}.
     */
    function burn(uint256 tokenId) external override {
        require(_isApprovedOrOwner(msg.sender, tokenId), "LGND: caller is not owner nor approved");
        address owner = ERC721.ownerOf(tokenId);
        require(bytes(_linkedAccounts[owner]).length != 0, "LGND: Must link account with setLinkedAccount");

        if(tokenId > MAX_TOKEN_ID) {
            require(_bridgeEnabled, "LGND: Bridge has not been enabled for this token");    
            _supply--;        
            // Delete token origin extension tracking
            delete _creatorTokens[tokenId]; 
        } else {
            require(_creatorBridgeEnabled[tokenId / CREATOR_SCALE], "LGND: Bridge has not been enabled for this token");
        }

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }    

        emit ExportedToken(owner, exports++, tokenId, _linkedAccounts[owner]);

        _burn(tokenId);
    }

    /**
     * @dev See {ICreatorCore-setRoyalties}.
     */
    function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired {
        _setRoyaltiesCreator(0, receivers, basisPoints);
    }

    /**
     * @dev See {ICreatorCore-setRoyalties}.
     */
    function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired {
        require(_exists(tokenId), "Nonexistent token");
        _setRoyalties(tokenId, receivers, basisPoints);
    }

    /**
     * @dev See {ICreatorCore-setRoyaltiesExtension}.
     */
    function setRoyaltiesCreator(uint256 creatorId, address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired {
        _setRoyaltiesCreator(creatorId, receivers, basisPoints);
    }

    /**
     * @dev {See ICreatorCore-getRoyalties}.
     */
    function getRoyalties(uint256 tokenId) external view virtual override returns (address payable[] memory, uint256[] memory) {
        require(_exists(tokenId), "Nonexistent token");
        return _getRoyalties(tokenId);
    }

    /**
     * @dev {See ICreatorCore-getFees}.
     */
    function getFees(uint256 tokenId) external view virtual override returns (address payable[] memory, uint256[] memory) {
        require(_exists(tokenId), "Nonexistent token");
        return _getRoyalties(tokenId);
    }

    /**
     * @dev {See ICreatorCore-getFeeRecipients}.
     */
    function getFeeRecipients(uint256 tokenId) external view virtual override returns (address payable[] memory) {
        require(_exists(tokenId), "Nonexistent token");
        return _getRoyaltyReceivers(tokenId);
    }

    /**
     * @dev {See ICreatorCore-getFeeBps}.
     */
    function getFeeBps(uint256 tokenId) external view virtual override returns (uint[] memory) {
        require(_exists(tokenId), "Nonexistent token");
        return _getRoyaltyBPS(tokenId);
    }
    
    /**
     * @dev {See ICreatorCore-royaltyInfo}.
     */
    function royaltyInfo(uint256 tokenId, uint256 value, bytes calldata) external view virtual override returns (address, uint256, bytes memory) {
        require(_exists(tokenId), "Nonexistent token");
        return _getRoyaltyInfo(tokenId, value);
    } 

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

    /**
     * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
     */
    function isApprovedForAll(address owner, address operator)
        override
        public
        view
        returns (bool)
    {
        // Whitelist OpenSea proxy contract for easy trading.
        if(_proxyRegistryAddress != address(0)) {
            ProxyRegistry proxyRegistry = ProxyRegistry(_proxyRegistryAddress);
            if (address(proxyRegistry.proxies(owner)) == operator) {
                return true;
            }
        }

        return super.isApprovedForAll(owner, operator);
    }
    
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

File 3 of 17 : AdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IAdminControl.sol";

abstract contract AdminControl is Ownable, IAdminControl, ERC165 {
    using EnumerableSet for EnumerableSet.AddressSet;

    // Track registered admins
    EnumerableSet.AddressSet private _admins;

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

    /**
     * @dev Only allows approved admins to call the specified function
     */
    modifier adminRequired() {
        require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin");
        _;
    }   

    /**
     * @dev See {IAdminControl-getAdmins}.
     */
    function getAdmins() external view override returns (address[] memory admins) {
        admins = new address[](_admins.length());
        for (uint i = 0; i < _admins.length(); i++) {
            admins[i] = _admins.at(i);
        }
        return admins;
    }

    /**
     * @dev See {IAdminControl-approveAdmin}.
     */
    function approveAdmin(address admin) external override onlyOwner {
        if (!_admins.contains(admin)) {
            emit AdminApproved(admin, msg.sender);
            _admins.add(admin);
        }
    }

    /**
     * @dev See {IAdminControl-revokeAdmin}.
     */
    function revokeAdmin(address admin) external override onlyOwner {
        if (_admins.contains(admin)) {
            emit AdminRevoked(admin, msg.sender);
            _admins.remove(admin);
        }
    }

    /**
     * @dev See {IAdminControl-isAdmin}.
     */
    function isAdmin(address admin) public override view returns (bool) {
        return (owner() == admin || _admins.contains(admin));
    }

}

File 4 of 17 : CreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";

import "./ICreatorCore.sol";

/**
 * @dev Core creator implementation
 */
abstract contract CreatorCore is ICreatorCore, ERC165 {
    using Strings for uint256;

    uint256 internal constant CREATOR_SCALE = 1e6;
    uint256 internal constant TEMPLATE_SCALE = 1e4;
    uint256 internal constant MAX_MINT_ID = 9999;
    uint256 internal constant MAX_TEMPLATE_ID = 99;
    uint256 internal constant MAX_TOKEN_ID = 1e10;

    // For tracking bridged tokenids to a creator
    mapping (uint256 => uint256) internal _creatorTokens;

    // For tracking which address mints for a creator
    mapping (uint256 => address) internal _creatorAddresses;

    // Mapping from creator ID to template ID to mint number
    mapping(uint256 => mapping(uint256 => uint256)) internal _creatorTokenCount;

    // Mapping for creator token URIs
    mapping (uint256 => string) internal _creatorURIs;
    
    // Creator royalty configurations
    mapping (uint256 => address payable[]) internal _creatorRoyaltyReceivers;
    mapping (uint256 => uint256[]) internal _creatorRoyaltyBPS;

    // Mapping for individual token URIs
    mapping (uint256 => string) internal _tokenURIs;

    // Token royalty configurations
    mapping (uint256 => address payable[]) internal _tokenRoyaltyReceivers;
    mapping (uint256 => uint256[]) internal _tokenRoyaltyBPS;

    /**
     * External interface identifiers for royalties
     */

    /**
     *  @dev CreatorCore
     *
     *  bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6
     *
     *  => 0xbb3bafd6 = 0xbb3bafd6
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6;

    /**
     *  @dev Rarible: RoyaltiesV1
     *
     *  bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb
     *  bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f
     *
     *  => 0xb9c4d9fb ^ 0x0ebd4c7f = 0xb7799584
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584;

    /**
     *  @dev Foundation
     *
     *  bytes4(keccak256('getFees(uint256)')) == 0xd5a06d4c
     *
     *  => 0xd5a06d4c = 0xd5a06d4c
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_FOUNDATION = 0xd5a06d4c;

    /**
     *  @dev EIP-2981
     *
     * bytes4(keccak256("royaltyInfo(uint256,uint256,bytes)")) == 0x6057361d
     *
     * => 0x6057361d = 0x6057361d
     */
    bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x6057361d;

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

    /**
     * @dev Set address for creator id
     */
    function _setCreator(uint256 creatorId, address creator) internal {
        _creatorAddresses[creatorId] = creator;
        emit CreatorUpdated(creatorId, creator);
    }
    
    /**
     * @dev Set base token uri for a creator
     */
    function _setBaseTokenURICreator(uint256 creatorId, string calldata uri) internal {
        _creatorURIs[creatorId] = uri;
    }
    
    /**
     * @dev Set base token uri for tokens with no creator
     */
    function _setBaseTokenURI(string calldata uri) internal {
        _creatorURIs[0] = uri;
    }

    /**
     * @dev Set token uri for a token with no creator
     */
    function _setTokenURI(uint256 tokenId, string calldata uri) internal {
        _tokenURIs[tokenId] = uri;
    }

    /**
     * @dev Retrieve a token's URI
     */
    function _tokenURI(uint256 tokenId) internal view returns (string memory) {
        if (bytes(_tokenURIs[tokenId]).length != 0) {
            return _tokenURIs[tokenId];
        }

        uint256 creatorId;
        if(tokenId > MAX_TOKEN_ID) {
            creatorId = _creatorTokens[tokenId];
        } else {
            creatorId = tokenId / CREATOR_SCALE;
        } 
        if (bytes(_creatorURIs[creatorId]).length != 0) {
            return string(abi.encodePacked(_creatorURIs[creatorId], tokenId.toString()));
        }
            
        return string(abi.encodePacked(_creatorURIs[0], tokenId.toString()));
    }

    /**
     * Helper to get royalties for a token
     */
    function _getRoyalties(uint256 tokenId) view internal returns (address payable[] storage, uint256[] storage) {
        return (_getRoyaltyReceivers(tokenId), _getRoyaltyBPS(tokenId));
    }

    /**
     * Helper to get royalty receivers for a token
     */
    function _getRoyaltyReceivers(uint256 tokenId) view internal returns (address payable[] storage) {
        uint256 creatorId;
        if(tokenId > MAX_TOKEN_ID) {
            creatorId = _creatorTokens[tokenId];
        } else {
            creatorId = tokenId / CREATOR_SCALE;
        }         

        if (_tokenRoyaltyReceivers[tokenId].length > 0) {
            return _tokenRoyaltyReceivers[tokenId];
        } else if (_creatorRoyaltyReceivers[creatorId].length > 0) {
            return _creatorRoyaltyReceivers[creatorId];
        }
        return _creatorRoyaltyReceivers[0];        
    }

    /**
     * Helper to get royalty basis points for a token
     */
    function _getRoyaltyBPS(uint256 tokenId) view internal returns (uint256[] storage) {
        uint256 creatorId;
        if(tokenId > MAX_TOKEN_ID) {
            creatorId = _creatorTokens[tokenId];
        } else {
            creatorId = tokenId / CREATOR_SCALE;
        }   

        if (_tokenRoyaltyBPS[tokenId].length > 0) {
            return _tokenRoyaltyBPS[tokenId];
        } else if (_creatorRoyaltyBPS[creatorId].length > 0) {
            return _creatorRoyaltyBPS[creatorId];
        }
        return _creatorRoyaltyBPS[0];        
    }

    function _getRoyaltyInfo(uint256 tokenId, uint256 value) view internal returns (address receiver, uint256 amount, bytes memory data){
        address payable[] storage receivers = _getRoyaltyReceivers(tokenId);
        require(receivers.length <= 1, "CreatorCore: Only works if there are at most 1 royalty receivers");
        
        if (receivers.length == 0) {
            return (address(this), 0, data);
        }
        return (receivers[0], _getRoyaltyBPS(tokenId)[0]*value/10000, data);
    }


    /**
     * Helper to shorten royalties arrays if it is too long
     */
    function _shortenRoyalties(address payable[] storage receivers, uint256[] storage basisPoints, uint256 targetLength) internal {
        require(receivers.length == basisPoints.length, "CreatorCore: Invalid input");
        if (targetLength < receivers.length) {
            for (uint i = receivers.length; i > targetLength; i--) {
                receivers.pop();
                basisPoints.pop();
            }
        }
    }

    /**
     * Helper to update royalites
     */
    function _updateRoyalties(address payable[] storage receivers, uint256[] storage basisPoints, address payable[] calldata newReceivers, uint256[] calldata newBPS) internal {
        require(receivers.length == basisPoints.length, "CreatorCore: Invalid input");
        require(newReceivers.length == newBPS.length, "CreatorCore: Invalid input");
        uint256 totalRoyalties;
        for (uint i = 0; i < newReceivers.length; i++) {
            if (i < receivers.length) {
                receivers[i] = newReceivers[i];
                basisPoints[i] = newBPS[i];
            } else {
                receivers.push(newReceivers[i]);
                basisPoints.push(newBPS[i]);
            }
            totalRoyalties += newBPS[i];
        }
        require(totalRoyalties < 10000, "CreatorCore: Invalid total royalties");
    }

    /**
     * Set royalties for a token
     */
    function _setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) internal {
        require(receivers.length == basisPoints.length, "CreatorCore: Invalid input");
        _shortenRoyalties(_tokenRoyaltyReceivers[tokenId], _tokenRoyaltyBPS[tokenId], receivers.length);
        _updateRoyalties(_tokenRoyaltyReceivers[tokenId], _tokenRoyaltyBPS[tokenId], receivers, basisPoints);
        emit RoyaltiesUpdated(tokenId, receivers, basisPoints);
    }

    /**
     * Set royalties for all tokens of an extension
     */
    function _setRoyaltiesCreator(uint256 creatorId, address payable[] calldata receivers, uint256[] calldata basisPoints) internal {
        require(receivers.length == basisPoints.length, "CreatorCore: Invalid input");
        _shortenRoyalties(_creatorRoyaltyReceivers[creatorId], _creatorRoyaltyBPS[creatorId], receivers.length);
        _updateRoyalties(_creatorRoyaltyReceivers[creatorId], _creatorRoyaltyBPS[creatorId], receivers, basisPoints);
        if (creatorId == 0) {
            emit DefaultRoyaltiesUpdated(receivers, basisPoints);
        } else {
            emit CreatorRoyaltiesUpdated(creatorId, receivers, basisPoints);
        }
    }


}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 17 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 11 of 17 : 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 12 of 17 : 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 13 of 17 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 14 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 15 of 17 : IAdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Interface for admin control
 */
interface IAdminControl is IERC165 {

    event AdminApproved(address indexed account, address indexed sender);
    event AdminRevoked(address indexed account, address indexed sender);

    /**
     * @dev gets address of all admins
     */
    function getAdmins() external view returns (address[] memory);

    /**
     * @dev add an admin.  Can only be called by contract owner.
     */
    function approveAdmin(address admin) external;

    /**
     * @dev remove an admin.  Can only be called by contract owner.
     */
    function revokeAdmin(address admin) external;

    /**
     * @dev checks whether or not given address is an admin
     * Returns True if they are
     */
    function isAdmin(address admin) external view returns (bool);

}

File 16 of 17 : ERC165Checker.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165Checker {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface,
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            _supportsERC165Interface(account, type(IERC165).interfaceId) &&
            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)
        internal
        view
        returns (bool[] memory)
    {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in _interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!_supportsERC165Interface(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     * Interface identification is specified in ERC-165.
     */
    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);
        (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
        if (result.length < 32) return false;
        return success && abi.decode(result, (bool));
    }
}

File 17 of 17 : ICreatorCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;


import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Core creator interface
 */
interface ICreatorCore is IERC165 {    
    event CreatorUpdated(uint256 indexed creatorId, address indexed creator);
    event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints);
    event CreatorRoyaltiesUpdated(uint256 indexed creatorId, address payable[] receivers, uint256[] basisPoints);
    event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints);
    event ImportedToken(address indexed to, uint256 indexed eventId, uint256 indexed tokenId, string linkedAccount);
    event ExportedToken(address indexed to, uint256 indexed eventId, uint256 indexed tokenId, string linkedAccount);
    
    function mintCreator(address to, uint256 creatorId, uint256 templateId) external returns (uint256);
    function mintCreatorURI(address to, uint256 creatorId, uint256 templateId, string calldata uri ) external returns (uint256);
    function mintBridge(address to, uint256 creatorId, uint256 tokenId, string calldata linkedAccount) external returns (uint256);
    function mintBridgeURI(address to, uint256 creatorId, uint256 tokenId, string calldata linkedAccount, string calldata uri) external returns (uint256);

    function mintCreatorBatch(address to, uint256 creatorId, uint256 templateId, uint256 count) external returns (uint256[] memory);
    function mintCreatorBatchURI(address to, uint256 creatorId, uint256 templateId, string[] calldata uris) external returns (uint256[] memory);
    function mintBridgeBatch(address to, uint256 creatorId, uint256[] memory tokenIds, string calldata linkedAccount) external returns (uint256[] memory);
    function mintBridgeBatchURI(address to, uint256 creatorId, uint256[] memory tokenIds, string calldata linkedAccount, string[] calldata uris) external returns (uint256[] memory);

    /**
     * @dev burn a token. Can only be called by token owner or approved address.
     * On burn, calls back to the registered extension's onBurn method
     */
    function burn(uint256 tokenId) external;

    /**
     * @dev set the baseTokenURI for tokens.  Can only be called by owner/admin.
     * For tokens with no uri configured, tokenURI will return "uri+tokenId"
     */
    function setBaseTokenURI(string calldata uri) external;

    /**
     * @dev set the common uri for tokens with a creator.  Can only be called by owner/admin.
     * For tokens with no uri configured, tokenURI will return "commonURI+tokenId"
     */
    function setBaseTokenURICreator(uint256 creatorId, string calldata uri) external;

    /**
     * @dev set the tokenURI of a token.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256 tokenId, string calldata uri) external;

    /**
     * @dev set the tokenURI of multiple tokens.  Can only be called by owner/admin.
     */
    function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external;    

    /**
     * @dev Set default royalties
     */
    function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of a token
     */
    function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external;

    /**
     * @dev Set royalties of an creator
     */
    function setRoyaltiesCreator(uint256 creatorId, address payable[] calldata receivers, uint256[] calldata basisPoints) external;
    
    /**
     * @dev Get royalites of a token.  Returns list of receivers and basisPoints
     */
    function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    
    // Royalty support for various other standards
    function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory);
    function getFeeBps(uint256 tokenId) external view returns (uint[] memory);
    function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory);
    function royaltyInfo(uint256 tokenId, uint256 value, bytes calldata data) external view returns (address, uint256, bytes memory);

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"creatorId","type":"uint256"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"CreatorRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"creatorId","type":"uint256"},{"indexed":true,"internalType":"address","name":"creator","type":"address"}],"name":"CreatorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"DefaultRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"eventId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"linkedAccount","type":"string"}],"name":"ExportedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"eventId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"linkedAccount","type":"string"}],"name":"ImportedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"RoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256","name":"templateId","type":"uint256"}],"name":"creatorSupply","outputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exports","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBridge","outputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"creatorId","type":"uint256"}],"name":"getCreator","outputs":[{"internalType":"address","name":"creator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"creatorId","type":"uint256"}],"name":"getCreatorBridge","outputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFees","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getLinkedAccount","outputs":[{"internalType":"string","name":"account","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenCreator","outputs":[{"internalType":"address","name":"creator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"imports","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"linkedAccount","type":"string"}],"name":"mintBridge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string","name":"linkedAccount","type":"string"}],"name":"mintBridgeBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string","name":"linkedAccount","type":"string"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintBridgeBatchURI","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"linkedAccount","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"name":"mintBridgeURI","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256","name":"templateId","type":"uint256"}],"name":"mintCreator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256","name":"templateId","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mintCreatorBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256","name":"templateId","type":"uint256"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintCreatorBatchURI","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"uint256","name":"templateId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"mintCreatorURI","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseTokenURICreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"address","name":"creator","type":"address"}],"name":"setCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setCreatorBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"account","type":"string"}],"name":"setLinkedAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyRegistryAddress","type":"address"}],"name":"setProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"creatorId","type":"uint256"},{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyaltiesCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162004fd738038062004fd7833981016040819052620000349162000220565b8181620000413362000077565b815162000056906003906020850190620000c7565b5080516200006c906004906020840190620000c7565b5050505050620002da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620000d59062000287565b90600052602060002090601f016020900481019282620000f9576000855562000144565b82601f106200011457805160ff191683800117855562000144565b8280016001018555821562000144579182015b828111156200014457825182559160200191906001019062000127565b506200015292915062000156565b5090565b5b8082111562000152576000815560010162000157565b600082601f8301126200017e578081fd5b81516001600160401b03808211156200019b576200019b620002c4565b604051601f8301601f19908116603f01168101908282118183101715620001c657620001c6620002c4565b81604052838152602092508683858801011115620001e2578485fd5b8491505b83821015620002055785820183015181830184015290820190620001e6565b838211156200021657848385830101525b9695505050505050565b6000806040838503121562000233578182fd5b82516001600160401b03808211156200024a578384fd5b62000258868387016200016d565b935060208501519150808211156200026e578283fd5b506200027d858286016200016d565b9150509250929050565b600181811c908216806200029c57607f821691505b60208210811415620002be57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b614ced80620002ea6000396000f3fe608060405234801561001057600080fd5b50600436106103835760003560e01c8063715018a6116101de578063abd44cda1161010f578063d48e638a116100ad578063e8a3d4851161007c578063e8a3d485146107e8578063e985e9c5146107f0578063f274290b14610803578063f2fde38b1461080c57600080fd5b8063d48e638a14610789578063d5516105146107b2578063d5a06d4c14610733578063deec5f42146107c557600080fd5b8063b9c4d9fb116100e9578063b9c4d9fb14610713578063bb3bafd614610733578063c155531d14610754578063c87b56dd1461077657600080fd5b8063abd44cda146106c2578063aeab688a146106ed578063b88d4fde1461070057600080fd5b806395d89b411161017c5780639df32e26116101565780639df32e26146106765780639f64822214610689578063a22cb4651461069c578063aafb2d44146106af57600080fd5b806395d89b411461064857806397107d6d146106505780639974df221461066357600080fd5b80638da5cb5b116101b85780638da5cb5b146105fe57806391686f531461060f578063934689a914610622578063938e3d7b1461063557600080fd5b8063715018a6146105d0578063770b894b146105d85780638d70ea48146105eb57600080fd5b80632d345670116102b85780634857578e1161025657806360a95ad91161023057806360a95ad9146105845780636352211e146105975780636d73e669146105aa57806370a08231146105bd57600080fd5b80634857578e146105555780635681e217146105685780635c2973251461057b57600080fd5b806332dac3dc1161029257806332dac3dc14610509578063332dd1ae1461051c57806342842e0e1461052f57806342966c681461054257600080fd5b80632d345670146104ce57806330176e13146104e157806331ae450b146104f457600080fd5b8063162094c41161032557806320e4afe2116102ff57806320e4afe21461048257806323b872dd1461049557806324d7806c146104a85780632962cfbd146104bb57600080fd5b8063162094c41461044a57806318160ddd1461045d57806319201a8c1461046f57600080fd5b8063095ea7b311610361578063095ea7b3146103f05780630ebd4c7f146104055780630fffbaf3146104255780631453fff11461043757600080fd5b806301ffc9a71461038857806306fdde03146103b0578063081812fc146103c5575b600080fd5b61039b6103963660046143dd565b61081f565b60405190151581526020015b60405180910390f35b6103b861084e565b6040516103a791906148b1565b6103d86103d33660046144b5565b6108e0565b6040516001600160a01b0390911681526020016103a7565b6104036103fe366004614003565b61097a565b005b6104186104133660046144b5565b610a90565b6040516103a7919061489e565b601254600160a01b900460ff1661039b565b6104036104453660046144f1565b610b26565b610403610458366004614578565b610b84565b6014545b6040519081526020016103a7565b61046161047d3660046141e7565b610bd9565b6104036104903660046144f1565b610c7f565b6104036104a3366004613f13565b610d0a565b61039b6104b6366004613ebf565b610d3b565b6103b86104c9366004613ebf565b610d74565b6104036104dc366004613ebf565b610e16565b6104036104ef366004614431565b610ec6565b6104fc610f1a565b6040516103a7919061479a565b61046161051736600461423d565b610fe4565b61040361052a3660046142f6565b6110b2565b61040361053d366004613f13565b611110565b6104036105503660046144b5565b61112b565b610403610563366004614578565b61136c565b6104186105763660046140b1565b6113c1565b61046160155481565b610403610592366004614470565b611551565b6103d86105a53660046144b5565b611571565b6104036105b8366004613ebf565b6115e8565b6104616105cb366004613ebf565b611692565b610403611719565b6104616105e636600461415d565b61177f565b6104616105f93660046141e7565b6117ee565b6000546001600160a01b03166103d8565b61040361061d3660046144cd565b61187c565b6103d86106303660046144b5565b6118d0565b610403610643366004614470565b611956565b6103b86119b3565b61040361065e366004613ebf565b6119c2565b6104036106713660046143c3565b611a2e565b61041861068436600461402e565b611a96565b610403610697366004614556565b611b83565b6104036106aa366004613fcf565b611bed565b6104036106bd36600461435e565b611cb2565b6104616106d03660046145b4565b6000918252600b6020908152604080842092845291905290205490565b6104186106fb366004614191565b611dc2565b61040361070e366004613f53565b611f24565b6107266107213660046144b5565b611f56565b6040516103a79190614866565b6107466107413660046144b5565b611ff5565b6040516103a7929190614879565b6107676107623660046145d5565b6120f1565b6040516103a793929190614769565b6103b86107843660046144b5565b612144565b6103d86107973660046144b5565b6000908152600a60205260409020546001600160a01b031690565b6104186107c03660046142bc565b612184565b61039b6107d33660046144b5565b60009081526018602052604090205460ff1690565b6103b861228e565b61039b6107fe366004613edb565b61229d565b61046160165481565b61040361081a366004613ebf565b61237f565b600061082a82612447565b806108395750610839826124dd565b80610848575061084882612518565b92915050565b60606003805461085d90614bc0565b80601f016020809104026020016040519081016040528092919081815260200182805461088990614bc0565b80156108d65780601f106108ab576101008083540402835291602001916108d6565b820191906000526020600020905b8154815290600101906020018083116108b957829003601f168201915b5050505050905090565b6000818152600560205260408120546001600160a01b031661095e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600760205260409020546001600160a01b031690565b600061098582611571565b9050806001600160a01b0316836001600160a01b031614156109f35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610955565b336001600160a01b0382161480610a0f5750610a0f813361229d565b610a815760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610955565b610a8b838361254d565b505050565b6000818152600560205260409020546060906001600160a01b0316610ac75760405162461bcd60e51b815260040161095590614997565b610ad0826125bb565b805480602002602001604051908101604052809291908181526020018280548015610b1a57602002820191906000526020600020905b815481526020019060010190808311610b06575b50505050509050919050565b33610b396000546001600160a01b031690565b6001600160a01b03161480610b545750610b5460013361266f565b610b705760405162461bcd60e51b815260040161095590614a63565b610b7d8585858585612691565b5050505050565b33610b976000546001600160a01b031690565b6001600160a01b03161480610bb25750610bb260013361266f565b610bce5760405162461bcd60e51b815260040161095590614a63565b610a8b8383836127a5565b600033610bee6000546001600160a01b031690565b6001600160a01b03161480610c095750610c0960013361266f565b610c255760405162461bcd60e51b815260040161095590614a63565b610c7586868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604080516020810190915290815292506127be915050565b9695505050505050565b33610c926000546001600160a01b031690565b6001600160a01b03161480610cad5750610cad60013361266f565b610cc95760405162461bcd60e51b815260040161095590614a63565b6000858152600560205260409020546001600160a01b0316610cfd5760405162461bcd60e51b815260040161095590614997565b610b7d8585858585612949565b610d143382612a07565b610d305760405162461bcd60e51b815260040161095590614a12565b610a8b838383612ad6565b6000816001600160a01b0316610d596000546001600160a01b031690565b6001600160a01b03161480610848575061084860018361266f565b6001600160a01b0381166000908152601760205260409020805460609190610d9b90614bc0565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc790614bc0565b8015610b1a5780601f10610de957610100808354040283529160200191610b1a565b820191906000526020600020905b815481529060010190602001808311610df75750939695505050505050565b6000546001600160a01b03163314610e705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b610e7b60018261266f565b15610ec35760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610ec1600182612c76565b505b50565b33610ed96000546001600160a01b031690565b6001600160a01b03161480610ef45750610ef460013361266f565b610f105760405162461bcd60e51b815260040161095590614a63565b610ec18282612c8b565b6060610f266001612cbf565b6001600160401b03811115610f4b57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f74578160200160208202803683370190505b50905060005b610f846001612cbf565b811015610fe057610f96600182612cc9565b828281518110610fb657634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280610fd881614bfb565b915050610f7a565b5090565b600033610ff96000546001600160a01b031690565b6001600160a01b03161480611014575061101460013361266f565b6110305760405162461bcd60e51b815260040161095590614a63565b6110a688888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506127be92505050565b98975050505050505050565b336110c56000546001600160a01b031690565b6001600160a01b031614806110e057506110e060013361266f565b6110fc5760405162461bcd60e51b815260040161095590614a63565b61110a600085858585612691565b50505050565b610a8b83838360405180602001604052806000815250611f24565b6111353382612a07565b6111905760405162461bcd60e51b815260206004820152602660248201527f4c474e443a2063616c6c6572206973206e6f74206f776e6572206e6f722061706044820152651c1c9bdd995960d21b6064820152608401610955565b600061119b82611571565b6001600160a01b03811660009081526017602052604090208054919250906111c290614bc0565b151590506112285760405162461bcd60e51b815260206004820152602d60248201527f4c474e443a204d757374206c696e6b206163636f756e7420776974682073657460448201526c131a5b9ad9591058d8dbdd5b9d609a1b6064820152608401610955565b6402540be40082111561128757601254600160a01b900460ff1661125e5760405162461bcd60e51b8152600401610955906149c2565b6014805490600061126e83614ba9565b90915550506000828152600960205260408120556112c8565b60186000611298620f424085614b33565b815260208101919091526040016000205460ff166112c85760405162461bcd60e51b8152600401610955906149c2565b6000828152600f6020526040902080546112e190614bc0565b1590506112ff576000828152600f602052604081206112ff91613c06565b601680548391600061131083614bfb565b909155506001600160a01b0383166000818152601760205260409081902090517f4638ef7a3a1c6f71c431bae6fcd8153597010b8f6f9764b2b17e3f756e55f3e09161135b916148c4565b60405180910390a4610ec182612cd5565b3361137f6000546001600160a01b031690565b6001600160a01b0316148061139a575061139a60013361266f565b6113b65760405162461bcd60e51b815260040161095590614a63565b610a8b838383612d70565b6060336113d66000546001600160a01b031690565b6001600160a01b031614806113f157506113f160013361266f565b61140d5760405162461bcd60e51b815260040161095590614a63565b855182146114535760405162461bcd60e51b81526020600482015260136024820152721311d3910e88125b9d985b1a5908125b9c1d5d606a1b6044820152606401610955565b60005b865181101561154457611531898989848151811061148457634e487b7160e01b600052603260045260246000fd5b602002602001015189898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a91508890508181106114e557634e487b7160e01b600052603260045260246000fd5b90506020028101906114f79190614aa7565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127be92505050565b508061153c81614bfb565b915050611456565b5094979650505050505050565b3360009081526017602090815260409091208251610ec192840190613c40565b6000818152600560205260408120546001600160a01b0316806108485760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610955565b6000546001600160a01b031633146116425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b61164d60018261266f565b610ec35760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610ec1600182612d89565b60006001600160a01b0382166116fd5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610955565b506001600160a01b031660009081526006602052604090205490565b6000546001600160a01b031633146117735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b61177d6000612d9e565b565b6000336117946000546001600160a01b031690565b6001600160a01b031614806117af57506117af60013361266f565b6117cb5760405162461bcd60e51b815260040161095590614a63565b6117e684848460405180602001604052806000815250612dee565b949350505050565b6000336118036000546001600160a01b031690565b6001600160a01b0316148061181e575061181e60013361266f565b61183a5760405162461bcd60e51b815260040161095590614a63565b610c7586868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612dee92505050565b3361188f6000546001600160a01b031690565b6001600160a01b031614806118aa57506118aa60013361266f565b6118c65760405162461bcd60e51b815260040161095590614a63565b610ec18282612fcd565b6000818152600560205260408120546001600160a01b03166119045760405162461bcd60e51b815260040161095590614997565b60006402540be4008311156119285750600082815260096020526040902054611938565b611935620f424084614b33565b90505b6000908152600a60205260409020546001600160a01b031692915050565b336119696000546001600160a01b031690565b6001600160a01b03161480611984575061198460013361266f565b6119a05760405162461bcd60e51b815260040161095590614a63565b8051610ec1906013906020840190613c40565b60606004805461085d90614bc0565b336119d56000546001600160a01b031690565b6001600160a01b031614806119f057506119f060013361266f565b611a0c5760405162461bcd60e51b815260040161095590614a63565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b33611a416000546001600160a01b031690565b6001600160a01b03161480611a5c5750611a5c60013361266f565b611a785760405162461bcd60e51b815260040161095590614a63565b60128054911515600160a01b0260ff60a01b19909216919091179055565b606033611aab6000546001600160a01b031690565b6001600160a01b03161480611ac65750611ac660013361266f565b611ae25760405162461bcd60e51b815260040161095590614a63565b60005b8451811015611b7857611b658787878481518110611b1357634e487b7160e01b600052603260045260246000fd5b602002602001015187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604080516020810190915290815292506127be915050565b5080611b7081614bfb565b915050611ae5565b509295945050505050565b33611b966000546001600160a01b031690565b6001600160a01b03161480611bb15750611bb160013361266f565b611bcd5760405162461bcd60e51b815260040161095590614a63565b600091825260186020526040909120805460ff1916911515919091179055565b6001600160a01b038216331415611c465760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610955565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b33611cc56000546001600160a01b031690565b6001600160a01b03161480611ce05750611ce060013361266f565b611cfc5760405162461bcd60e51b815260040161095590614a63565b82518114611d425760405162461bcd60e51b81526020600482015260136024820152721311d3910e88125b9d985b1a59081a5b9c1d5d606a1b6044820152606401610955565b60005b835181101561110a57611db0848281518110611d7157634e487b7160e01b600052603260045260246000fd5b6020026020010151848484818110611d9957634e487b7160e01b600052603260045260246000fd5b9050602002810190611dab9190614aa7565b6127a5565b80611dba81614bfb565b915050611d45565b606033611dd76000546001600160a01b031690565b6001600160a01b03161480611df25750611df260013361266f565b611e0e5760405162461bcd60e51b815260040161095590614a63565b816001600160401b03811115611e3457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e5d578160200160208202803683370190505b50905060005b82811015611f1a57611edd878787878786818110611e9157634e487b7160e01b600052603260045260246000fd5b9050602002810190611ea39190614aa7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612dee92505050565b828281518110611efd57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611f1281614bfb565b915050611e63565b5095945050505050565b611f2e3383612a07565b611f4a5760405162461bcd60e51b815260040161095590614a12565b61110a84848484613026565b6000818152600560205260409020546060906001600160a01b0316611f8d5760405162461bcd60e51b815260040161095590614997565b611f9682613059565b805480602002602001604051908101604052809291908181526020018280548015610b1a57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fcc5750505050509050919050565b606080612019836000908152600560205260409020546001600160a01b0316151590565b6120355760405162461bcd60e51b815260040161095590614997565b61203e8361310d565b81546040805160208084028201810190925282815291849183018282801561208f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612071575b50505050509150808054806020026020016040519081016040528092919081815260200182805480156120e157602002820191906000526020600020905b8154815260200190600101908083116120cd575b5050505050905091509150915091565b60008481526005602052604081205481906060906001600160a01b031661212a5760405162461bcd60e51b815260040161095590614997565b612134878761312b565b9250925092509450945094915050565b6000818152600560205260409020546060906001600160a01b031661217b5760405162461bcd60e51b815260040161095590614997565b6108488261325a565b6060336121996000546001600160a01b031690565b6001600160a01b031614806121b457506121b460013361266f565b6121d05760405162461bcd60e51b815260040161095590614a63565b816001600160401b038111156121f657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561221f578160200160208202803683370190505b50905060005b828110156122855761224886868660405180602001604052806000815250612dee565b82828151811061226857634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061227d81614bfb565b915050612225565b50949350505050565b60606013805461085d90614bc0565b6012546000906001600160a01b03161561234e5760125460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c45527919060240160206040518083038186803b1580156122fb57600080fd5b505afa15801561230f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123339190614415565b6001600160a01b0316141561234c576001915050610848565b505b6001600160a01b0380841660009081526008602090815260408083209386168352929052205460ff165b9392505050565b6000546001600160a01b031633146123d95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b6001600160a01b03811661243e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610955565b610ec381612d9e565b60006001600160e01b03198216637c148b1360e11b148061246c575061246c826124dd565b8061248757506001600160e01b03198216635d9dd7eb60e11b145b806124a257506001600160e01b03198216636057361d60e01b145b806124bd57506001600160e01b031982166335681b5360e21b145b8061084857506001600160e01b03198216636057361d60e01b1492915050565b60006001600160e01b031982166380ac58cd60e01b148061083957506001600160e01b03198216635b5e139f60e01b14806108485750610848825b60006001600160e01b03198216632a9f3abf60e11b148061084857506301ffc9a760e01b6001600160e01b0319831614610848565b600081815260076020526040902080546001600160a01b0319166001600160a01b038416908117909155819061258282611571565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806402540be4008311156125e057506000828152600960205260409020546125f0565b6125ed620f424084614b33565b90505b60008381526011602052604090205415612617575050600090815260116020526040902090565b6000818152600e60205260409020541561263f576000908152600e6020526040902092915050565b50506000805250600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c90565b6001600160a01b03811660009081526001830160205260408120541515612378565b8281146126ce5760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b6000858152600d60209081526040808320600e9092529091206126f291908561335d565b6000858152600d60209081526040808320600e909252909120612719919086868686613438565b84612760577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b8484848460405161275394939291906147e7565b60405180910390a1610b7d565b847f87cff20dc7bc4caef76dcedb28343154605e5f94c08921eff30e5b34f081e2938585858560405161279694939291906147e7565b60405180910390a25050505050565b6000838152600f6020526040902061110a908383613cc0565b6000838152600560205260408120546001600160a01b0316156128185760405162461bcd60e51b815260206004820152601260248201527128393296b2bc34b9ba34b733903a37b5b2b760711b6044820152606401610955565b6402540be40084111561284a576000848152600960205260408120869055601480549161284483614bfb565b91905055505b6000858152600a602052604090205461286c906001600160a01b0316856136fd565b6000858152600a60205260409020546001600160a01b038781169116146128c1576000858152600a602090815260408083205481519283019091529181526128c1916001600160a01b03169088908790613026565b8151156128e9576000848152600f6020908152604090912083516128e792850190613c40565b505b60158054859160006128fa83614bfb565b91905055876001600160a01b03167fa7141af30fcc82b884950f8dc4ad98f44473a51f9edd7b0c9ce9cfd17560b3578660405161293791906148b1565b60405180910390a45091949350505050565b8281146129865760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b600085815260106020908152604080832060119092529091206129aa91908561335d565b600085815260106020908152604080832060119092529091206129d1919086868686613438565b847fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee8585858560405161279694939291906147e7565b6000818152600560205260408120546001600160a01b0316612a805760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610955565b6000612a8b83611571565b9050806001600160a01b0316846001600160a01b03161480612ac65750836001600160a01b0316612abb846108e0565b6001600160a01b0316145b806117e657506117e6818561229d565b826001600160a01b0316612ae982611571565b6001600160a01b031614612b515760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610955565b6001600160a01b038216612bb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610955565b612bbe60008261254d565b6001600160a01b0383166000908152600660205260408120805460019290612be7908490614b66565b90915550506001600160a01b0382166000908152600660205260408120805460019290612c15908490614b1b565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612378836001600160a01b03841661383f565b60008052600c602052610a8b7f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e88383613cc0565b6000610848825490565b6000612378838361395c565b6000612ce082611571565b9050612ced60008361254d565b6001600160a01b0381166000908152600660205260408120805460019290612d16908490614b66565b909155505060008281526005602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000838152600c6020526040902061110a908383613cc0565b6000612378836001600160a01b038416613994565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006063831115612e415760405162461bcd60e51b815260206004820181905260248201527f4c474e443a2074656d706c61746549642065786365656473206d6178696d756d6044820152606401610955565b6000848152600b60209081526040808320868452909152812054612e66906001614b1b565b905061270f811115612ec55760405162461bcd60e51b815260206004820152602260248201527f4c474e443a206e6f2072656d61696e696e67206d696e747320617661696c61626044820152616c6560f01b6064820152608401610955565b6000858152600b60209081526040808320878452909152902081905580612eee61271086614b47565b612efb620f424088614b47565b612f059190614b1b565b612f0f9190614b1b565b601480549193506000612f2183614bfb565b90915550506000858152600a6020526040902054612f48906001600160a01b0316836136fd565b6000858152600a60205260409020546001600160a01b03878116911614612f9d576000858152600a60209081526040808320548151928301909152918152612f9d916001600160a01b03169088908590613026565b825115612285576000828152600f602090815260409091208451612fc392860190613c40565b5050949350505050565b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0385169081179091559051909184917fc0186d9ba7364ebd80a7010121367f481af81e1028bf368b2172fedf2c6fc7de9190a35050565b613031848484612ad6565b61303d848484846139e3565b61110a5760405162461bcd60e51b815260040161095590614945565b6000806402540be40083111561307e575060008281526009602052604090205461308e565b61308b620f424084614b33565b90505b600083815260106020526040902054156130b5575050600090815260106020526040902090565b6000818152600d6020526040902054156130dd576000908152600d6020526040902092915050565b50506000805250600d6020527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee90565b60008061311983613059565b613122846125bb565b91509150915091565b6000806060600061313b86613059565b8054909150600110156131b8576040805162461bcd60e51b81526020600482015260248101919091527f43726561746f72436f72653a204f6e6c7920776f726b7320696620746865726560448201527f20617265206174206d6f7374203120726f79616c7479207265636569766572736064820152608401610955565b80546131cb573060009350935050613253565b806000815481106131ec57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03166127108661320e896125bb565b60008154811061322e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001546132439190614b47565b61324d9190614b33565b93509350505b9250925092565b6000818152600f6020526040902080546060919061327790614bc0565b159050613297576000828152600f602052604090208054610d9b90614bc0565b60006402540be4008311156132bb57506000828152600960205260409020546132cb565b6132c8620f424084614b33565b90505b6000818152600c6020526040902080546132e490614bc0565b15905061332a576000818152600c6020526040902061330284613aed565b6040516020016133139291906146b7565b604051602081830303815290604052915050919050565b60008052600c6020527f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e861330284613aed565b815483541461339c5760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b8254811015610a8b5782545b8181111561110a57838054806133ce57634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b0319169055019055825483908061340f57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055808061343090614ba9565b9150506133a8565b84548654146134775760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b8281146134b45760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b6000805b848110156136965787548110156135a4578585828181106134e957634e487b7160e01b600052603260045260246000fd5b90506020020160208101906134fe9190613ebf565b88828154811061351e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555083838281811061356c57634e487b7160e01b600052603260045260246000fd5b9050602002013587828154811061359357634e487b7160e01b600052603260045260246000fd5b600091825260209091200155613650565b878686838181106135c557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906135da9190613ebf565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790558684848381811061362d57634e487b7160e01b600052603260045260246000fd5b835460018101855560009485526020948590209190940292909201359190920155505b83838281811061367057634e487b7160e01b600052603260045260246000fd5b90506020020135826136829190614b1b565b91508061368e81614bfb565b9150506134b8565b5061271081106136f45760405162461bcd60e51b8152602060048201526024808201527f43726561746f72436f72653a20496e76616c696420746f74616c20726f79616c6044820152637469657360e01b6064820152608401610955565b50505050505050565b6001600160a01b0382166137535760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610955565b6000818152600560205260409020546001600160a01b0316156137b85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610955565b6001600160a01b03821660009081526006602052604081208054600192906137e1908490614b1b565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008181526001830160205260408120548015613952576000613863600183614b66565b855490915060009061387790600190614b66565b90508181146138f85760008660000182815481106138a557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106138d657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061391757634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610848565b6000915050610848565b600082600001828154811061398157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60008181526001830160205260408120546139db57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610848565b506000610848565b60006001600160a01b0384163b15613ae557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613a27903390899088908890600401614737565b602060405180830381600087803b158015613a4157600080fd5b505af1925050508015613a71575060408051601f3d908101601f19168201909252613a6e918101906143f9565b60015b613acb573d808015613a9f576040519150601f19603f3d011682016040523d82523d6000602084013e613aa4565b606091505b508051613ac35760405162461bcd60e51b815260040161095590614945565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117e6565b5060016117e6565b606081613b115750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613b3b5780613b2581614bfb565b9150613b349050600a83614b33565b9150613b15565b6000816001600160401b03811115613b6357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613b8d576020820181803683370190505b5090505b84156117e657613ba2600183614b66565b9150613baf600a86614c16565b613bba906030614b1b565b60f81b818381518110613bdd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613bff600a86614b33565b9450613b91565b508054613c1290614bc0565b6000825580601f10613c22575050565b601f016020900490600052602060002090810190610ec39190613d34565b828054613c4c90614bc0565b90600052602060002090601f016020900481019282613c6e5760008555613cb4565b82601f10613c8757805160ff1916838001178555613cb4565b82800160010185558215613cb4579182015b82811115613cb4578251825591602001919060010190613c99565b50610fe0929150613d34565b828054613ccc90614bc0565b90600052602060002090601f016020900481019282613cee5760008555613cb4565b82601f10613d075782800160ff19823516178555613cb4565b82800160010185558215613cb4579182015b82811115613cb4578235825591602001919060010190613d19565b5b80821115610fe05760008155600101613d35565b60006001600160401b03831115613d6257613d62614c56565b613d75601f8401601f1916602001614aeb565b9050828152838383011115613d8957600080fd5b828260208301376000602084830101529392505050565b60008083601f840112613db1578182fd5b5081356001600160401b03811115613dc7578182fd5b6020830191508360208260051b8501011115613de257600080fd5b9250929050565b600082601f830112613df9578081fd5b813560206001600160401b03821115613e1457613e14614c56565b8160051b613e23828201614aeb565b838152828101908684018388018501891015613e3d578687fd5b8693505b85841015613e5f578035835260019390930192918401918401613e41565b50979650505050505050565b80358015158114613e7b57600080fd5b919050565b60008083601f840112613e91578182fd5b5081356001600160401b03811115613ea7578182fd5b602083019150836020828501011115613de257600080fd5b600060208284031215613ed0578081fd5b813561237881614c6c565b60008060408385031215613eed578081fd5b8235613ef881614c6c565b91506020830135613f0881614c6c565b809150509250929050565b600080600060608486031215613f27578081fd5b8335613f3281614c6c565b92506020840135613f4281614c6c565b929592945050506040919091013590565b60008060008060808587031215613f68578081fd5b8435613f7381614c6c565b93506020850135613f8381614c6c565b92506040850135915060608501356001600160401b03811115613fa4578182fd5b8501601f81018713613fb4578182fd5b613fc387823560208401613d49565b91505092959194509250565b60008060408385031215613fe1578182fd5b8235613fec81614c6c565b9150613ffa60208401613e6b565b90509250929050565b60008060408385031215614015578182fd5b823561402081614c6c565b946020939093013593505050565b600080600080600060808688031215614045578283fd5b853561405081614c6c565b94506020860135935060408601356001600160401b0380821115614072578485fd5b61407e89838a01613de9565b94506060880135915080821115614093578283fd5b506140a088828901613e80565b969995985093965092949392505050565b600080600080600080600060a0888a0312156140cb578485fd5b87356140d681614c6c565b96506020880135955060408801356001600160401b03808211156140f8578687fd5b6141048b838c01613de9565b965060608a0135915080821115614119578384fd5b6141258b838c01613e80565b909650945060808a013591508082111561413d578384fd5b5061414a8a828b01613da0565b989b979a50959850939692959293505050565b600080600060608486031215614171578081fd5b833561417c81614c6c565b95602085013595506040909401359392505050565b6000806000806000608086880312156141a8578283fd5b85356141b381614c6c565b9450602086013593506040860135925060608601356001600160401b038111156141db578182fd5b6140a088828901613da0565b6000806000806000608086880312156141fe578283fd5b853561420981614c6c565b9450602086013593506040860135925060608601356001600160401b03811115614231578182fd5b6140a088828901613e80565b600080600080600080600060a0888a031215614257578081fd5b873561426281614c6c565b9650602088013595506040880135945060608801356001600160401b038082111561428b578283fd5b6142978b838c01613e80565b909650945060808a01359150808211156142af578283fd5b5061414a8a828b01613e80565b600080600080608085870312156142d1578182fd5b84356142dc81614c6c565b966020860135965060408601359560600135945092505050565b6000806000806040858703121561430b578182fd5b84356001600160401b0380821115614321578384fd5b61432d88838901613da0565b90965094506020870135915080821115614345578384fd5b5061435287828801613da0565b95989497509550505050565b600080600060408486031215614372578081fd5b83356001600160401b0380821115614388578283fd5b61439487838801613de9565b945060208601359150808211156143a9578283fd5b506143b686828701613da0565b9497909650939450505050565b6000602082840312156143d4578081fd5b61237882613e6b565b6000602082840312156143ee578081fd5b813561237881614c81565b60006020828403121561440a578081fd5b815161237881614c81565b600060208284031215614426578081fd5b815161237881614c6c565b60008060208385031215614443578182fd5b82356001600160401b03811115614458578283fd5b61446485828601613e80565b90969095509350505050565b600060208284031215614481578081fd5b81356001600160401b03811115614496578182fd5b8201601f810184136144a6578182fd5b6117e684823560208401613d49565b6000602082840312156144c6578081fd5b5035919050565b600080604083850312156144df578182fd5b823591506020830135613f0881614c6c565b600080600080600060608688031215614508578283fd5b8535945060208601356001600160401b0380821115614525578485fd5b61453189838a01613da0565b90965094506040880135915080821115614549578283fd5b506140a088828901613da0565b60008060408385031215614568578182fd5b82359150613ffa60208401613e6b565b60008060006040848603121561458c578081fd5b8335925060208401356001600160401b038111156145a8578182fd5b6143b686828701613e80565b600080604083850312156145c6578182fd5b50508035926020909101359150565b600080600080606085870312156145ea578182fd5b843593506020850135925060408501356001600160401b0381111561460d578283fd5b61435287828801613e80565b6000815180845260208085019450808401835b838110156146515781516001600160a01b03168752958201959082019060010161462c565b509495945050505050565b6000815180845260208085019450808401835b838110156146515781518752958201959082019060010161466f565b600081518084526146a3816020860160208601614b7d565b601f01601f19169290920160200192915050565b60008084546146c581614bc0565b600182811680156146dd57600181146146ee5761471a565b60ff1984168752828701945061471a565b8886526020808720875b858110156147115781548a8201529084019082016146f8565b50505082870194505b50505050835161472e818360208801614b7d565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152610c75608083018461468b565b6001600160a01b0384168152826020820152606060408201526000614791606083018461468b565b95945050505050565b6020808252825182820181905260009190848201906040850190845b818110156147db5783516001600160a01b0316835292840192918401916001016147b6565b50909695505050505050565b6040808252810184905260008560608301825b8781101561482a57823561480d81614c6c565b6001600160a01b03168252602092830192909101906001016147fa565b5083810360208501528481526001600160fb1b03851115614849578283fd5b8460051b9150818660208301370160200190815295945050505050565b6020815260006123786020830184614619565b60408152600061488c6040830185614619565b8281036020840152614791818561465c565b602081526000612378602083018461465c565b602081526000612378602083018461468b565b600060208083528184546148d781614bc0565b808487015260406001808416600081146148f8576001811461490c57614937565b60ff19851689840152606089019550614937565b898852868820885b8581101561492f5781548b8201860152908301908801614914565b8a0184019650505b509398975050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601190820152702737b732bc34b9ba32b73a103a37b5b2b760791b604082015260600190565b60208082526030908201527f4c474e443a2042726964676520686173206e6f74206265656e20656e61626c6560408201526f32103337b9103a3434b9903a37b5b2b760811b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6000808335601e19843603018112614abd578283fd5b8301803591506001600160401b03821115614ad6578283fd5b602001915036819003821315613de257600080fd5b604051601f8201601f191681016001600160401b0381118282101715614b1357614b13614c56565b604052919050565b60008219821115614b2e57614b2e614c2a565b500190565b600082614b4257614b42614c40565b500490565b6000816000190483118215151615614b6157614b61614c2a565b500290565b600082821015614b7857614b78614c2a565b500390565b60005b83811015614b98578181015183820152602001614b80565b8381111561110a5750506000910152565b600081614bb857614bb8614c2a565b506000190190565b600181811c90821680614bd457607f821691505b60208210811415614bf557634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614c0f57614c0f614c2a565b5060010190565b600082614c2557614c25614c40565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ec357600080fd5b6001600160e01b031981168114610ec357600080fdfe43726561746f72436f72653a20496e76616c696420696e707574000000000000a26469706673582212207ffecb62d4b9fa5077e57ad2ad6d215a51eabe5743f65c29a96d88dfbd76478f64736f6c634300080400330000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000084c474e442e61727400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034152540000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103835760003560e01c8063715018a6116101de578063abd44cda1161010f578063d48e638a116100ad578063e8a3d4851161007c578063e8a3d485146107e8578063e985e9c5146107f0578063f274290b14610803578063f2fde38b1461080c57600080fd5b8063d48e638a14610789578063d5516105146107b2578063d5a06d4c14610733578063deec5f42146107c557600080fd5b8063b9c4d9fb116100e9578063b9c4d9fb14610713578063bb3bafd614610733578063c155531d14610754578063c87b56dd1461077657600080fd5b8063abd44cda146106c2578063aeab688a146106ed578063b88d4fde1461070057600080fd5b806395d89b411161017c5780639df32e26116101565780639df32e26146106765780639f64822214610689578063a22cb4651461069c578063aafb2d44146106af57600080fd5b806395d89b411461064857806397107d6d146106505780639974df221461066357600080fd5b80638da5cb5b116101b85780638da5cb5b146105fe57806391686f531461060f578063934689a914610622578063938e3d7b1461063557600080fd5b8063715018a6146105d0578063770b894b146105d85780638d70ea48146105eb57600080fd5b80632d345670116102b85780634857578e1161025657806360a95ad91161023057806360a95ad9146105845780636352211e146105975780636d73e669146105aa57806370a08231146105bd57600080fd5b80634857578e146105555780635681e217146105685780635c2973251461057b57600080fd5b806332dac3dc1161029257806332dac3dc14610509578063332dd1ae1461051c57806342842e0e1461052f57806342966c681461054257600080fd5b80632d345670146104ce57806330176e13146104e157806331ae450b146104f457600080fd5b8063162094c41161032557806320e4afe2116102ff57806320e4afe21461048257806323b872dd1461049557806324d7806c146104a85780632962cfbd146104bb57600080fd5b8063162094c41461044a57806318160ddd1461045d57806319201a8c1461046f57600080fd5b8063095ea7b311610361578063095ea7b3146103f05780630ebd4c7f146104055780630fffbaf3146104255780631453fff11461043757600080fd5b806301ffc9a71461038857806306fdde03146103b0578063081812fc146103c5575b600080fd5b61039b6103963660046143dd565b61081f565b60405190151581526020015b60405180910390f35b6103b861084e565b6040516103a791906148b1565b6103d86103d33660046144b5565b6108e0565b6040516001600160a01b0390911681526020016103a7565b6104036103fe366004614003565b61097a565b005b6104186104133660046144b5565b610a90565b6040516103a7919061489e565b601254600160a01b900460ff1661039b565b6104036104453660046144f1565b610b26565b610403610458366004614578565b610b84565b6014545b6040519081526020016103a7565b61046161047d3660046141e7565b610bd9565b6104036104903660046144f1565b610c7f565b6104036104a3366004613f13565b610d0a565b61039b6104b6366004613ebf565b610d3b565b6103b86104c9366004613ebf565b610d74565b6104036104dc366004613ebf565b610e16565b6104036104ef366004614431565b610ec6565b6104fc610f1a565b6040516103a7919061479a565b61046161051736600461423d565b610fe4565b61040361052a3660046142f6565b6110b2565b61040361053d366004613f13565b611110565b6104036105503660046144b5565b61112b565b610403610563366004614578565b61136c565b6104186105763660046140b1565b6113c1565b61046160155481565b610403610592366004614470565b611551565b6103d86105a53660046144b5565b611571565b6104036105b8366004613ebf565b6115e8565b6104616105cb366004613ebf565b611692565b610403611719565b6104616105e636600461415d565b61177f565b6104616105f93660046141e7565b6117ee565b6000546001600160a01b03166103d8565b61040361061d3660046144cd565b61187c565b6103d86106303660046144b5565b6118d0565b610403610643366004614470565b611956565b6103b86119b3565b61040361065e366004613ebf565b6119c2565b6104036106713660046143c3565b611a2e565b61041861068436600461402e565b611a96565b610403610697366004614556565b611b83565b6104036106aa366004613fcf565b611bed565b6104036106bd36600461435e565b611cb2565b6104616106d03660046145b4565b6000918252600b6020908152604080842092845291905290205490565b6104186106fb366004614191565b611dc2565b61040361070e366004613f53565b611f24565b6107266107213660046144b5565b611f56565b6040516103a79190614866565b6107466107413660046144b5565b611ff5565b6040516103a7929190614879565b6107676107623660046145d5565b6120f1565b6040516103a793929190614769565b6103b86107843660046144b5565b612144565b6103d86107973660046144b5565b6000908152600a60205260409020546001600160a01b031690565b6104186107c03660046142bc565b612184565b61039b6107d33660046144b5565b60009081526018602052604090205460ff1690565b6103b861228e565b61039b6107fe366004613edb565b61229d565b61046160165481565b61040361081a366004613ebf565b61237f565b600061082a82612447565b806108395750610839826124dd565b80610848575061084882612518565b92915050565b60606003805461085d90614bc0565b80601f016020809104026020016040519081016040528092919081815260200182805461088990614bc0565b80156108d65780601f106108ab576101008083540402835291602001916108d6565b820191906000526020600020905b8154815290600101906020018083116108b957829003601f168201915b5050505050905090565b6000818152600560205260408120546001600160a01b031661095e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600760205260409020546001600160a01b031690565b600061098582611571565b9050806001600160a01b0316836001600160a01b031614156109f35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610955565b336001600160a01b0382161480610a0f5750610a0f813361229d565b610a815760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610955565b610a8b838361254d565b505050565b6000818152600560205260409020546060906001600160a01b0316610ac75760405162461bcd60e51b815260040161095590614997565b610ad0826125bb565b805480602002602001604051908101604052809291908181526020018280548015610b1a57602002820191906000526020600020905b815481526020019060010190808311610b06575b50505050509050919050565b33610b396000546001600160a01b031690565b6001600160a01b03161480610b545750610b5460013361266f565b610b705760405162461bcd60e51b815260040161095590614a63565b610b7d8585858585612691565b5050505050565b33610b976000546001600160a01b031690565b6001600160a01b03161480610bb25750610bb260013361266f565b610bce5760405162461bcd60e51b815260040161095590614a63565b610a8b8383836127a5565b600033610bee6000546001600160a01b031690565b6001600160a01b03161480610c095750610c0960013361266f565b610c255760405162461bcd60e51b815260040161095590614a63565b610c7586868686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604080516020810190915290815292506127be915050565b9695505050505050565b33610c926000546001600160a01b031690565b6001600160a01b03161480610cad5750610cad60013361266f565b610cc95760405162461bcd60e51b815260040161095590614a63565b6000858152600560205260409020546001600160a01b0316610cfd5760405162461bcd60e51b815260040161095590614997565b610b7d8585858585612949565b610d143382612a07565b610d305760405162461bcd60e51b815260040161095590614a12565b610a8b838383612ad6565b6000816001600160a01b0316610d596000546001600160a01b031690565b6001600160a01b03161480610848575061084860018361266f565b6001600160a01b0381166000908152601760205260409020805460609190610d9b90614bc0565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc790614bc0565b8015610b1a5780601f10610de957610100808354040283529160200191610b1a565b820191906000526020600020905b815481529060010190602001808311610df75750939695505050505050565b6000546001600160a01b03163314610e705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b610e7b60018261266f565b15610ec35760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610ec1600182612c76565b505b50565b33610ed96000546001600160a01b031690565b6001600160a01b03161480610ef45750610ef460013361266f565b610f105760405162461bcd60e51b815260040161095590614a63565b610ec18282612c8b565b6060610f266001612cbf565b6001600160401b03811115610f4b57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f74578160200160208202803683370190505b50905060005b610f846001612cbf565b811015610fe057610f96600182612cc9565b828281518110610fb657634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280610fd881614bfb565b915050610f7a565b5090565b600033610ff96000546001600160a01b031690565b6001600160a01b03161480611014575061101460013361266f565b6110305760405162461bcd60e51b815260040161095590614a63565b6110a688888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506127be92505050565b98975050505050505050565b336110c56000546001600160a01b031690565b6001600160a01b031614806110e057506110e060013361266f565b6110fc5760405162461bcd60e51b815260040161095590614a63565b61110a600085858585612691565b50505050565b610a8b83838360405180602001604052806000815250611f24565b6111353382612a07565b6111905760405162461bcd60e51b815260206004820152602660248201527f4c474e443a2063616c6c6572206973206e6f74206f776e6572206e6f722061706044820152651c1c9bdd995960d21b6064820152608401610955565b600061119b82611571565b6001600160a01b03811660009081526017602052604090208054919250906111c290614bc0565b151590506112285760405162461bcd60e51b815260206004820152602d60248201527f4c474e443a204d757374206c696e6b206163636f756e7420776974682073657460448201526c131a5b9ad9591058d8dbdd5b9d609a1b6064820152608401610955565b6402540be40082111561128757601254600160a01b900460ff1661125e5760405162461bcd60e51b8152600401610955906149c2565b6014805490600061126e83614ba9565b90915550506000828152600960205260408120556112c8565b60186000611298620f424085614b33565b815260208101919091526040016000205460ff166112c85760405162461bcd60e51b8152600401610955906149c2565b6000828152600f6020526040902080546112e190614bc0565b1590506112ff576000828152600f602052604081206112ff91613c06565b601680548391600061131083614bfb565b909155506001600160a01b0383166000818152601760205260409081902090517f4638ef7a3a1c6f71c431bae6fcd8153597010b8f6f9764b2b17e3f756e55f3e09161135b916148c4565b60405180910390a4610ec182612cd5565b3361137f6000546001600160a01b031690565b6001600160a01b0316148061139a575061139a60013361266f565b6113b65760405162461bcd60e51b815260040161095590614a63565b610a8b838383612d70565b6060336113d66000546001600160a01b031690565b6001600160a01b031614806113f157506113f160013361266f565b61140d5760405162461bcd60e51b815260040161095590614a63565b855182146114535760405162461bcd60e51b81526020600482015260136024820152721311d3910e88125b9d985b1a5908125b9c1d5d606a1b6044820152606401610955565b60005b865181101561154457611531898989848151811061148457634e487b7160e01b600052603260045260246000fd5b602002602001015189898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508b92508a91508890508181106114e557634e487b7160e01b600052603260045260246000fd5b90506020028101906114f79190614aa7565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127be92505050565b508061153c81614bfb565b915050611456565b5094979650505050505050565b3360009081526017602090815260409091208251610ec192840190613c40565b6000818152600560205260408120546001600160a01b0316806108485760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610955565b6000546001600160a01b031633146116425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b61164d60018261266f565b610ec35760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610ec1600182612d89565b60006001600160a01b0382166116fd5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610955565b506001600160a01b031660009081526006602052604090205490565b6000546001600160a01b031633146117735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b61177d6000612d9e565b565b6000336117946000546001600160a01b031690565b6001600160a01b031614806117af57506117af60013361266f565b6117cb5760405162461bcd60e51b815260040161095590614a63565b6117e684848460405180602001604052806000815250612dee565b949350505050565b6000336118036000546001600160a01b031690565b6001600160a01b0316148061181e575061181e60013361266f565b61183a5760405162461bcd60e51b815260040161095590614a63565b610c7586868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612dee92505050565b3361188f6000546001600160a01b031690565b6001600160a01b031614806118aa57506118aa60013361266f565b6118c65760405162461bcd60e51b815260040161095590614a63565b610ec18282612fcd565b6000818152600560205260408120546001600160a01b03166119045760405162461bcd60e51b815260040161095590614997565b60006402540be4008311156119285750600082815260096020526040902054611938565b611935620f424084614b33565b90505b6000908152600a60205260409020546001600160a01b031692915050565b336119696000546001600160a01b031690565b6001600160a01b03161480611984575061198460013361266f565b6119a05760405162461bcd60e51b815260040161095590614a63565b8051610ec1906013906020840190613c40565b60606004805461085d90614bc0565b336119d56000546001600160a01b031690565b6001600160a01b031614806119f057506119f060013361266f565b611a0c5760405162461bcd60e51b815260040161095590614a63565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b33611a416000546001600160a01b031690565b6001600160a01b03161480611a5c5750611a5c60013361266f565b611a785760405162461bcd60e51b815260040161095590614a63565b60128054911515600160a01b0260ff60a01b19909216919091179055565b606033611aab6000546001600160a01b031690565b6001600160a01b03161480611ac65750611ac660013361266f565b611ae25760405162461bcd60e51b815260040161095590614a63565b60005b8451811015611b7857611b658787878481518110611b1357634e487b7160e01b600052603260045260246000fd5b602002602001015187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604080516020810190915290815292506127be915050565b5080611b7081614bfb565b915050611ae5565b509295945050505050565b33611b966000546001600160a01b031690565b6001600160a01b03161480611bb15750611bb160013361266f565b611bcd5760405162461bcd60e51b815260040161095590614a63565b600091825260186020526040909120805460ff1916911515919091179055565b6001600160a01b038216331415611c465760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610955565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b33611cc56000546001600160a01b031690565b6001600160a01b03161480611ce05750611ce060013361266f565b611cfc5760405162461bcd60e51b815260040161095590614a63565b82518114611d425760405162461bcd60e51b81526020600482015260136024820152721311d3910e88125b9d985b1a59081a5b9c1d5d606a1b6044820152606401610955565b60005b835181101561110a57611db0848281518110611d7157634e487b7160e01b600052603260045260246000fd5b6020026020010151848484818110611d9957634e487b7160e01b600052603260045260246000fd5b9050602002810190611dab9190614aa7565b6127a5565b80611dba81614bfb565b915050611d45565b606033611dd76000546001600160a01b031690565b6001600160a01b03161480611df25750611df260013361266f565b611e0e5760405162461bcd60e51b815260040161095590614a63565b816001600160401b03811115611e3457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e5d578160200160208202803683370190505b50905060005b82811015611f1a57611edd878787878786818110611e9157634e487b7160e01b600052603260045260246000fd5b9050602002810190611ea39190614aa7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612dee92505050565b828281518110611efd57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611f1281614bfb565b915050611e63565b5095945050505050565b611f2e3383612a07565b611f4a5760405162461bcd60e51b815260040161095590614a12565b61110a84848484613026565b6000818152600560205260409020546060906001600160a01b0316611f8d5760405162461bcd60e51b815260040161095590614997565b611f9682613059565b805480602002602001604051908101604052809291908181526020018280548015610b1a57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fcc5750505050509050919050565b606080612019836000908152600560205260409020546001600160a01b0316151590565b6120355760405162461bcd60e51b815260040161095590614997565b61203e8361310d565b81546040805160208084028201810190925282815291849183018282801561208f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612071575b50505050509150808054806020026020016040519081016040528092919081815260200182805480156120e157602002820191906000526020600020905b8154815260200190600101908083116120cd575b5050505050905091509150915091565b60008481526005602052604081205481906060906001600160a01b031661212a5760405162461bcd60e51b815260040161095590614997565b612134878761312b565b9250925092509450945094915050565b6000818152600560205260409020546060906001600160a01b031661217b5760405162461bcd60e51b815260040161095590614997565b6108488261325a565b6060336121996000546001600160a01b031690565b6001600160a01b031614806121b457506121b460013361266f565b6121d05760405162461bcd60e51b815260040161095590614a63565b816001600160401b038111156121f657634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561221f578160200160208202803683370190505b50905060005b828110156122855761224886868660405180602001604052806000815250612dee565b82828151811061226857634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061227d81614bfb565b915050612225565b50949350505050565b60606013805461085d90614bc0565b6012546000906001600160a01b03161561234e5760125460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c45527919060240160206040518083038186803b1580156122fb57600080fd5b505afa15801561230f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123339190614415565b6001600160a01b0316141561234c576001915050610848565b505b6001600160a01b0380841660009081526008602090815260408083209386168352929052205460ff165b9392505050565b6000546001600160a01b031633146123d95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610955565b6001600160a01b03811661243e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610955565b610ec381612d9e565b60006001600160e01b03198216637c148b1360e11b148061246c575061246c826124dd565b8061248757506001600160e01b03198216635d9dd7eb60e11b145b806124a257506001600160e01b03198216636057361d60e01b145b806124bd57506001600160e01b031982166335681b5360e21b145b8061084857506001600160e01b03198216636057361d60e01b1492915050565b60006001600160e01b031982166380ac58cd60e01b148061083957506001600160e01b03198216635b5e139f60e01b14806108485750610848825b60006001600160e01b03198216632a9f3abf60e11b148061084857506301ffc9a760e01b6001600160e01b0319831614610848565b600081815260076020526040902080546001600160a01b0319166001600160a01b038416908117909155819061258282611571565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806402540be4008311156125e057506000828152600960205260409020546125f0565b6125ed620f424084614b33565b90505b60008381526011602052604090205415612617575050600090815260116020526040902090565b6000818152600e60205260409020541561263f576000908152600e6020526040902092915050565b50506000805250600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c90565b6001600160a01b03811660009081526001830160205260408120541515612378565b8281146126ce5760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b6000858152600d60209081526040808320600e9092529091206126f291908561335d565b6000858152600d60209081526040808320600e909252909120612719919086868686613438565b84612760577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b8484848460405161275394939291906147e7565b60405180910390a1610b7d565b847f87cff20dc7bc4caef76dcedb28343154605e5f94c08921eff30e5b34f081e2938585858560405161279694939291906147e7565b60405180910390a25050505050565b6000838152600f6020526040902061110a908383613cc0565b6000838152600560205260408120546001600160a01b0316156128185760405162461bcd60e51b815260206004820152601260248201527128393296b2bc34b9ba34b733903a37b5b2b760711b6044820152606401610955565b6402540be40084111561284a576000848152600960205260408120869055601480549161284483614bfb565b91905055505b6000858152600a602052604090205461286c906001600160a01b0316856136fd565b6000858152600a60205260409020546001600160a01b038781169116146128c1576000858152600a602090815260408083205481519283019091529181526128c1916001600160a01b03169088908790613026565b8151156128e9576000848152600f6020908152604090912083516128e792850190613c40565b505b60158054859160006128fa83614bfb565b91905055876001600160a01b03167fa7141af30fcc82b884950f8dc4ad98f44473a51f9edd7b0c9ce9cfd17560b3578660405161293791906148b1565b60405180910390a45091949350505050565b8281146129865760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b600085815260106020908152604080832060119092529091206129aa91908561335d565b600085815260106020908152604080832060119092529091206129d1919086868686613438565b847fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee8585858560405161279694939291906147e7565b6000818152600560205260408120546001600160a01b0316612a805760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610955565b6000612a8b83611571565b9050806001600160a01b0316846001600160a01b03161480612ac65750836001600160a01b0316612abb846108e0565b6001600160a01b0316145b806117e657506117e6818561229d565b826001600160a01b0316612ae982611571565b6001600160a01b031614612b515760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610955565b6001600160a01b038216612bb35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610955565b612bbe60008261254d565b6001600160a01b0383166000908152600660205260408120805460019290612be7908490614b66565b90915550506001600160a01b0382166000908152600660205260408120805460019290612c15908490614b1b565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612378836001600160a01b03841661383f565b60008052600c602052610a8b7f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e88383613cc0565b6000610848825490565b6000612378838361395c565b6000612ce082611571565b9050612ced60008361254d565b6001600160a01b0381166000908152600660205260408120805460019290612d16908490614b66565b909155505060008281526005602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000838152600c6020526040902061110a908383613cc0565b6000612378836001600160a01b038416613994565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006063831115612e415760405162461bcd60e51b815260206004820181905260248201527f4c474e443a2074656d706c61746549642065786365656473206d6178696d756d6044820152606401610955565b6000848152600b60209081526040808320868452909152812054612e66906001614b1b565b905061270f811115612ec55760405162461bcd60e51b815260206004820152602260248201527f4c474e443a206e6f2072656d61696e696e67206d696e747320617661696c61626044820152616c6560f01b6064820152608401610955565b6000858152600b60209081526040808320878452909152902081905580612eee61271086614b47565b612efb620f424088614b47565b612f059190614b1b565b612f0f9190614b1b565b601480549193506000612f2183614bfb565b90915550506000858152600a6020526040902054612f48906001600160a01b0316836136fd565b6000858152600a60205260409020546001600160a01b03878116911614612f9d576000858152600a60209081526040808320548151928301909152918152612f9d916001600160a01b03169088908590613026565b825115612285576000828152600f602090815260409091208451612fc392860190613c40565b5050949350505050565b6000828152600a602052604080822080546001600160a01b0319166001600160a01b0385169081179091559051909184917fc0186d9ba7364ebd80a7010121367f481af81e1028bf368b2172fedf2c6fc7de9190a35050565b613031848484612ad6565b61303d848484846139e3565b61110a5760405162461bcd60e51b815260040161095590614945565b6000806402540be40083111561307e575060008281526009602052604090205461308e565b61308b620f424084614b33565b90505b600083815260106020526040902054156130b5575050600090815260106020526040902090565b6000818152600d6020526040902054156130dd576000908152600d6020526040902092915050565b50506000805250600d6020527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee90565b60008061311983613059565b613122846125bb565b91509150915091565b6000806060600061313b86613059565b8054909150600110156131b8576040805162461bcd60e51b81526020600482015260248101919091527f43726561746f72436f72653a204f6e6c7920776f726b7320696620746865726560448201527f20617265206174206d6f7374203120726f79616c7479207265636569766572736064820152608401610955565b80546131cb573060009350935050613253565b806000815481106131ec57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03166127108661320e896125bb565b60008154811061322e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001546132439190614b47565b61324d9190614b33565b93509350505b9250925092565b6000818152600f6020526040902080546060919061327790614bc0565b159050613297576000828152600f602052604090208054610d9b90614bc0565b60006402540be4008311156132bb57506000828152600960205260409020546132cb565b6132c8620f424084614b33565b90505b6000818152600c6020526040902080546132e490614bc0565b15905061332a576000818152600c6020526040902061330284613aed565b6040516020016133139291906146b7565b604051602081830303815290604052915050919050565b60008052600c6020527f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e861330284613aed565b815483541461339c5760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b8254811015610a8b5782545b8181111561110a57838054806133ce57634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b0319169055019055825483908061340f57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055808061343090614ba9565b9150506133a8565b84548654146134775760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b8281146134b45760405162461bcd60e51b815260206004820152601a6024820152600080516020614c988339815191526044820152606401610955565b6000805b848110156136965787548110156135a4578585828181106134e957634e487b7160e01b600052603260045260246000fd5b90506020020160208101906134fe9190613ebf565b88828154811061351e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555083838281811061356c57634e487b7160e01b600052603260045260246000fd5b9050602002013587828154811061359357634e487b7160e01b600052603260045260246000fd5b600091825260209091200155613650565b878686838181106135c557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906135da9190613ebf565b81546001810183556000928352602090922090910180546001600160a01b0319166001600160a01b039092169190911790558684848381811061362d57634e487b7160e01b600052603260045260246000fd5b835460018101855560009485526020948590209190940292909201359190920155505b83838281811061367057634e487b7160e01b600052603260045260246000fd5b90506020020135826136829190614b1b565b91508061368e81614bfb565b9150506134b8565b5061271081106136f45760405162461bcd60e51b8152602060048201526024808201527f43726561746f72436f72653a20496e76616c696420746f74616c20726f79616c6044820152637469657360e01b6064820152608401610955565b50505050505050565b6001600160a01b0382166137535760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610955565b6000818152600560205260409020546001600160a01b0316156137b85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610955565b6001600160a01b03821660009081526006602052604081208054600192906137e1908490614b1b565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008181526001830160205260408120548015613952576000613863600183614b66565b855490915060009061387790600190614b66565b90508181146138f85760008660000182815481106138a557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106138d657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061391757634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610848565b6000915050610848565b600082600001828154811061398157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60008181526001830160205260408120546139db57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610848565b506000610848565b60006001600160a01b0384163b15613ae557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613a27903390899088908890600401614737565b602060405180830381600087803b158015613a4157600080fd5b505af1925050508015613a71575060408051601f3d908101601f19168201909252613a6e918101906143f9565b60015b613acb573d808015613a9f576040519150601f19603f3d011682016040523d82523d6000602084013e613aa4565b606091505b508051613ac35760405162461bcd60e51b815260040161095590614945565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506117e6565b5060016117e6565b606081613b115750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613b3b5780613b2581614bfb565b9150613b349050600a83614b33565b9150613b15565b6000816001600160401b03811115613b6357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613b8d576020820181803683370190505b5090505b84156117e657613ba2600183614b66565b9150613baf600a86614c16565b613bba906030614b1b565b60f81b818381518110613bdd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613bff600a86614b33565b9450613b91565b508054613c1290614bc0565b6000825580601f10613c22575050565b601f016020900490600052602060002090810190610ec39190613d34565b828054613c4c90614bc0565b90600052602060002090601f016020900481019282613c6e5760008555613cb4565b82601f10613c8757805160ff1916838001178555613cb4565b82800160010185558215613cb4579182015b82811115613cb4578251825591602001919060010190613c99565b50610fe0929150613d34565b828054613ccc90614bc0565b90600052602060002090601f016020900481019282613cee5760008555613cb4565b82601f10613d075782800160ff19823516178555613cb4565b82800160010185558215613cb4579182015b82811115613cb4578235825591602001919060010190613d19565b5b80821115610fe05760008155600101613d35565b60006001600160401b03831115613d6257613d62614c56565b613d75601f8401601f1916602001614aeb565b9050828152838383011115613d8957600080fd5b828260208301376000602084830101529392505050565b60008083601f840112613db1578182fd5b5081356001600160401b03811115613dc7578182fd5b6020830191508360208260051b8501011115613de257600080fd5b9250929050565b600082601f830112613df9578081fd5b813560206001600160401b03821115613e1457613e14614c56565b8160051b613e23828201614aeb565b838152828101908684018388018501891015613e3d578687fd5b8693505b85841015613e5f578035835260019390930192918401918401613e41565b50979650505050505050565b80358015158114613e7b57600080fd5b919050565b60008083601f840112613e91578182fd5b5081356001600160401b03811115613ea7578182fd5b602083019150836020828501011115613de257600080fd5b600060208284031215613ed0578081fd5b813561237881614c6c565b60008060408385031215613eed578081fd5b8235613ef881614c6c565b91506020830135613f0881614c6c565b809150509250929050565b600080600060608486031215613f27578081fd5b8335613f3281614c6c565b92506020840135613f4281614c6c565b929592945050506040919091013590565b60008060008060808587031215613f68578081fd5b8435613f7381614c6c565b93506020850135613f8381614c6c565b92506040850135915060608501356001600160401b03811115613fa4578182fd5b8501601f81018713613fb4578182fd5b613fc387823560208401613d49565b91505092959194509250565b60008060408385031215613fe1578182fd5b8235613fec81614c6c565b9150613ffa60208401613e6b565b90509250929050565b60008060408385031215614015578182fd5b823561402081614c6c565b946020939093013593505050565b600080600080600060808688031215614045578283fd5b853561405081614c6c565b94506020860135935060408601356001600160401b0380821115614072578485fd5b61407e89838a01613de9565b94506060880135915080821115614093578283fd5b506140a088828901613e80565b969995985093965092949392505050565b600080600080600080600060a0888a0312156140cb578485fd5b87356140d681614c6c565b96506020880135955060408801356001600160401b03808211156140f8578687fd5b6141048b838c01613de9565b965060608a0135915080821115614119578384fd5b6141258b838c01613e80565b909650945060808a013591508082111561413d578384fd5b5061414a8a828b01613da0565b989b979a50959850939692959293505050565b600080600060608486031215614171578081fd5b833561417c81614c6c565b95602085013595506040909401359392505050565b6000806000806000608086880312156141a8578283fd5b85356141b381614c6c565b9450602086013593506040860135925060608601356001600160401b038111156141db578182fd5b6140a088828901613da0565b6000806000806000608086880312156141fe578283fd5b853561420981614c6c565b9450602086013593506040860135925060608601356001600160401b03811115614231578182fd5b6140a088828901613e80565b600080600080600080600060a0888a031215614257578081fd5b873561426281614c6c565b9650602088013595506040880135945060608801356001600160401b038082111561428b578283fd5b6142978b838c01613e80565b909650945060808a01359150808211156142af578283fd5b5061414a8a828b01613e80565b600080600080608085870312156142d1578182fd5b84356142dc81614c6c565b966020860135965060408601359560600135945092505050565b6000806000806040858703121561430b578182fd5b84356001600160401b0380821115614321578384fd5b61432d88838901613da0565b90965094506020870135915080821115614345578384fd5b5061435287828801613da0565b95989497509550505050565b600080600060408486031215614372578081fd5b83356001600160401b0380821115614388578283fd5b61439487838801613de9565b945060208601359150808211156143a9578283fd5b506143b686828701613da0565b9497909650939450505050565b6000602082840312156143d4578081fd5b61237882613e6b565b6000602082840312156143ee578081fd5b813561237881614c81565b60006020828403121561440a578081fd5b815161237881614c81565b600060208284031215614426578081fd5b815161237881614c6c565b60008060208385031215614443578182fd5b82356001600160401b03811115614458578283fd5b61446485828601613e80565b90969095509350505050565b600060208284031215614481578081fd5b81356001600160401b03811115614496578182fd5b8201601f810184136144a6578182fd5b6117e684823560208401613d49565b6000602082840312156144c6578081fd5b5035919050565b600080604083850312156144df578182fd5b823591506020830135613f0881614c6c565b600080600080600060608688031215614508578283fd5b8535945060208601356001600160401b0380821115614525578485fd5b61453189838a01613da0565b90965094506040880135915080821115614549578283fd5b506140a088828901613da0565b60008060408385031215614568578182fd5b82359150613ffa60208401613e6b565b60008060006040848603121561458c578081fd5b8335925060208401356001600160401b038111156145a8578182fd5b6143b686828701613e80565b600080604083850312156145c6578182fd5b50508035926020909101359150565b600080600080606085870312156145ea578182fd5b843593506020850135925060408501356001600160401b0381111561460d578283fd5b61435287828801613e80565b6000815180845260208085019450808401835b838110156146515781516001600160a01b03168752958201959082019060010161462c565b509495945050505050565b6000815180845260208085019450808401835b838110156146515781518752958201959082019060010161466f565b600081518084526146a3816020860160208601614b7d565b601f01601f19169290920160200192915050565b60008084546146c581614bc0565b600182811680156146dd57600181146146ee5761471a565b60ff1984168752828701945061471a565b8886526020808720875b858110156147115781548a8201529084019082016146f8565b50505082870194505b50505050835161472e818360208801614b7d565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152610c75608083018461468b565b6001600160a01b0384168152826020820152606060408201526000614791606083018461468b565b95945050505050565b6020808252825182820181905260009190848201906040850190845b818110156147db5783516001600160a01b0316835292840192918401916001016147b6565b50909695505050505050565b6040808252810184905260008560608301825b8781101561482a57823561480d81614c6c565b6001600160a01b03168252602092830192909101906001016147fa565b5083810360208501528481526001600160fb1b03851115614849578283fd5b8460051b9150818660208301370160200190815295945050505050565b6020815260006123786020830184614619565b60408152600061488c6040830185614619565b8281036020840152614791818561465c565b602081526000612378602083018461465c565b602081526000612378602083018461468b565b600060208083528184546148d781614bc0565b808487015260406001808416600081146148f8576001811461490c57614937565b60ff19851689840152606089019550614937565b898852868820885b8581101561492f5781548b8201860152908301908801614914565b8a0184019650505b509398975050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601190820152702737b732bc34b9ba32b73a103a37b5b2b760791b604082015260600190565b60208082526030908201527f4c474e443a2042726964676520686173206e6f74206265656e20656e61626c6560408201526f32103337b9103a3434b9903a37b5b2b760811b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6000808335601e19843603018112614abd578283fd5b8301803591506001600160401b03821115614ad6578283fd5b602001915036819003821315613de257600080fd5b604051601f8201601f191681016001600160401b0381118282101715614b1357614b13614c56565b604052919050565b60008219821115614b2e57614b2e614c2a565b500190565b600082614b4257614b42614c40565b500490565b6000816000190483118215151615614b6157614b61614c2a565b500290565b600082821015614b7857614b78614c2a565b500390565b60005b83811015614b98578181015183820152602001614b80565b8381111561110a5750506000910152565b600081614bb857614bb8614c2a565b506000190190565b600181811c90821680614bd457607f821691505b60208210811415614bf557634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614c0f57614c0f614c2a565b5060010190565b600082614c2557614c25614c40565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ec357600080fd5b6001600160e01b031981168114610ec357600080fdfe43726561746f72436f72653a20496e76616c696420696e707574000000000000a26469706673582212207ffecb62d4b9fa5077e57ad2ad6d215a51eabe5743f65c29a96d88dfbd76478f64736f6c63430008040033

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

0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000084c474e442e61727400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034152540000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): LGND.art
Arg [1] : _symbol (string): ART

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [3] : 4c474e442e617274000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 4152540000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.