ETH Price: $3,154.20 (+1.10%)
Gas: 2 Gwei

Token

 

Overview

Max Total Supply

68

Holders

45

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
0x11a04750983e4a0a6c5df5c0fa349890a08f9001
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
MultiToken

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 5 runs

Other Settings:
default evmVersion
File 1 of 37 : MultiToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/proxy/utils/Initializable.sol";

// the erc1155 base contract - the openzeppelin erc1155
import "../token/ERC1155.sol";
import "../royalties/ERC2981.sol";
import "../utils/AddressSet.sol";
import "../utils/UInt256Set.sol";

import "./ProxyRegistry.sol";
import "./ERC1155Owners.sol";
import "./ERC1155Owned.sol";
import "./ERC1155TotalBalance.sol";
import "./ERC1155CommonUri.sol";

import "../access/Controllable.sol";

import "../interfaces/IMultiToken.sol";
import "../interfaces/IERC1155Mint.sol";
import "../interfaces/IERC1155Burn.sol";
import "../interfaces/IERC1155Multinetwork.sol";
import "../interfaces/IERC1155Bridge.sol";

import "../service/Service.sol";

import "../utils/Strings.sol";

/**
 * @title MultiToken
 * @notice the multitoken contract. All tokens are printed on this contract. The token has all the capabilities
 * of an erc1155 contract, plus network transfer, royallty tracking and assignment and other features.
 */
contract MultiToken is
ERC1155,
ProxyRegistryManager,
ERC1155Owners,
ERC1155Owned,
ERC1155TotalBalance,
IERC1155Multinetwork,
ERC1155CommonUri,
IMultiToken,
ERC2981,
Service,
Controllable
{

    // to work with token holder and held token lists
    using AddressSet for AddressSet.Set;
    using UInt256Set for UInt256Set.Set;

    address internal masterMinter;

    function initialize(address registry) public initializer {
        _serviceRegistry = registry;
    }

    function setMasterController(address _masterMinter) public {
        require(masterMinter == address(0), "master minter must not be set");
        masterMinter = _masterMinter;
        _addController(_masterMinter);
    }

    function addDirectMinter(address directMinter) public {
        require(msg.sender == masterMinter, "only master minter can add direct minters");
        _addController(directMinter);
    }

    /// @notice only allow owner of the contract
    modifier onlyOwner() {
        require(_isController(msg.sender), "You shall not pass");
        _;
    }
    /// @notice only allow owner of the contract
    modifier onlyMinter() {
        require(_isController(msg.sender) || masterMinter == msg.sender, "You shall not pass");
        _;
    }

    /// @notice Mint a specified amount the specified token hash to the specified receiver
    /// @param recipient the address of the receiver
    /// @param tokenHash the token id to mint
    /// @param amount the amount to mint
    function mint(
        address recipient,
        uint256 tokenHash,
        uint256 amount
    ) external override onlyMinter {

        _mint(recipient, tokenHash, amount, "");

    }

    /// @notice mint tokens of specified amount to the specified address
    /// @param recipient the mint target
    /// @param tokenHash the token hash to mint
    /// @param amount the amount to mint
    function mintWithCommonUri(
        address recipient,
        uint256 tokenHash,
        uint256 amount,
        uint256 uriId
    ) external override onlyMinter {

        _mint(recipient, tokenHash, amount, "");
        _setCommonUriOf(tokenHash, uriId);

    }

    function setCommonUri(uint256 uriId, string memory value) external override onlyMinter {

        require(commonURIOwners[uriId] == address(0)
            || commonURIOwners[uriId] == msg.sender
            || _isController(msg.sender), "Only the owner can set the URI");
        _setCommonUri(uriId, value);

    }

    function setCommonUriOf(uint256 uriId, uint256 value) external override onlyMinter {

        require(commonURIOwners[uriId] == address(0)
            || commonURIOwners[uriId] == msg.sender
            || _isController(msg.sender), "Only the owner can set the URI");
        _setCommonUriOf(uriId, value);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256 tokenHash) public view virtual override returns (string memory) {

        string memory curi = _commonUriOf(tokenHash);
        string memory _uriOf = uriOf[tokenHash];

        if(bytes(_uriOf).length > 0) {
            return Strings.strConcat(_uriOf, Strings.uint2str(tokenHash));
        }
        if(bytes(curi).length > 0) {
            return Strings.strConcat(curi, Strings.uint2str(tokenHash));
        }
        return _uri;

    }

    function setUri(uint256 tokenHash, string memory value) external onlyMinter {

        require(uriOwners[tokenHash] == address(0)
            || uriOwners[tokenHash] == msg.sender
            || _isController(msg.sender), "Only the owner can set the URI");
        _setUri(tokenHash, value);

    }

    mapping(uint256 => string) internal uriOf;
    mapping(uint256 => address) internal uriOwners;
    function _setUri(uint256 tokenHash, string memory value) internal {

        uriOf[tokenHash] = value;
        uriOwners[tokenHash] = msg.sender;

    }

    /// @notice burn a specified amount of the specified token hash from the specified target
    /// @param target the address of the target
    /// @param tokenHash the token id to burn
    /// @param amount the amount to burn
    function burn(
        address target,
        uint256 tokenHash,
        uint256 amount
    ) external override onlyMinter {
        _burn(target, tokenHash, amount);
    }

    /// @notice override base functionality to check proxy registries for approvers
    /// @param _owner the owner address
    /// @param _operator the operator address
    /// @return isOperator true if the owner is an approver for the operator
    function isApprovedForAll(address _owner, address _operator)
    public
    view
    override
    returns (bool isOperator) {
        // check proxy whitelist
        bool _approved = _isApprovedForAll(_owner, _operator);
        return _approved || ERC1155.isApprovedForAll(_owner, _operator);
    }

    /// @notice See {IERC165-supportsInterface}. ERC165 implementor. identifies this contract as an ERC1155
    /// @param interfaceId the interface id to check
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) {
        return
            interfaceId == type(IERC1155Multinetwork).interfaceId ||
            interfaceId == type(IERC1155Owners).interfaceId ||
            interfaceId == type(IERC1155Owned).interfaceId ||
            interfaceId == type(IERC1155TotalBalance).interfaceId ||
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /// @notice perform a network token transfer. Transfer the specified quantity of the specified token hash to the destination address on the destination network.
    function networkTransferFrom(
        address from,
        address to,
        uint256 network,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external virtual override {

        address _bridge = IJanusRegistry(_serviceRegistry).get("MultiToken", "NetworkBridge");
        require(_bridge != address(0), "No network bridge found");

        // call the network transfer on the bridge
        IERC1155Multinetwork(_bridge).networkTransferFrom(from, to, network, id, amount, data);

    }

    /// @notice override base functionality to process token transfers so as to populate token holders and held tokens lists
    /// @param operator the operator address
    /// @param from the address of the sender
    /// @param to the address of the receiver
    /// @param ids the token ids
    /// @param amounts the token amounts
    /// @param data the data
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        // let super process this first
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
        //address royaltyPayee = _serviceRegistry.get("MultiToken", "RoyaltyPayee");

        // iterate through all ids in this transfer
        for (uint256 i = 0; i < ids.length; i++) {

            // if this is not a mint then remove the held token id from lists if
            // this is the last token if this type the sender owns
            if (from != address(0) && balanceOf(from, ids[i]) == amounts[i]) {
                // find and delete the token id from the token holders held tokens
                _owned[from].remove(ids[i]);
                _owners[ids[i]].remove(from);
            }

            // if this is not a burn and receiver does not yet own token then
            // add that account to the token for that id
            if (to != address(0) && balanceOf(to, ids[i]) == 0) {
                // insert the token id from the token holders held tokens\
                _owned[to].insert(ids[i]);
                _owners[ids[i]].insert(to);
            }

            // when a mint occurs, increment the total balance for that token id
            if (from == address(0)) {
                _totalBalances[uint256(ids[i])] =
                    _totalBalances[uint256(ids[i])] +
                    (amounts[i]);
            }
            // when a burn occurs, decrement the total balance for that token id
            if (to == address(0)) {
                _totalBalances[uint256(ids[i])] =
                    _totalBalances[uint256(ids[i])] -
                    (amounts[i]);
            }
        }
    }

    mapping(uint256 => string) internal symbolsOf;
    mapping(uint256 => string) internal namesOf;

    function symbolOf(uint256 _tokenId) external view override returns (string memory out) {
        return symbolsOf[_tokenId];
    }

    function nameOf(uint256 _tokenId) external view override returns (string memory out) {
        return namesOf[_tokenId];
    }

    function setSymbolOf(uint256 _tokenId, string memory _symbolOf) external onlyMinter {
        symbolsOf[_tokenId] = _symbolOf;
    }

    function setNameOf(uint256 _tokenId, string memory _nameOf) external onlyMinter {
        namesOf[_tokenId] = _nameOf;
    }

    function setRoyalty(uint256 tokenId, address receiver, uint256 amount) external onlyOwner {
        royaltyReceiversByHash[tokenId] = receiver;
        royaltyFeesByHash[tokenId] = amount;
    }

}

File 2 of 37 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/Address.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !Address.isContract(address(this));
    }
}

File 3 of 37 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, Initializable {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) internal _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) internal _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string internal _uri;

    /**
     * @dev {_setURI} has been moved into {initialize_ERC1155} to support CREATE2 deploys
     */
    constructor() {}

    /**
     * @dev See {_setURI}.
     */
    function initialize_ERC1155(string memory uri_) public {
        require(bytes(uri_).length == 0, "URI already initialized");
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }
    function setURI(string memory newuri) public {
        setURI(newuri);
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][account] += amount;
        emit TransferSingle(operator, address(0), account, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `account`
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 accountBalance = _balances[id][account];
        require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][account] = accountBalance - amount;
        }

        emit TransferSingle(operator, account, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 accountBalance = _balances[id][account];
            require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][account] = accountBalance - amount;
            }
        }

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 4 of 37 : ERC2981.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

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

import "../interfaces/IERC2981Holder.sol";
import "../interfaces/IERC2981.sol";

///
/// @dev An implementor for the NFT Royalty Standard. Provides interface
/// response to erc2981 as well as a way to modify the royalty fees
/// per token and a way to transfer ownership of a token.
///
abstract contract ERC2981 is ERC165, IERC2981, IERC2981Holder {

    // royalty receivers by token hash
    mapping(uint256 => address) internal royaltyReceiversByHash;

    // royalties for each token hash - expressed as permilliage of total supply
    mapping(uint256 => uint256) internal royaltyFeesByHash;

    bytes4 internal constant _INTERFACE_ID_ERC2981 = 0x2a55205a;

    /// @dev only the royalty owner shall pass
    modifier onlyRoyaltyOwner(uint256 _id) {
        require(royaltyReceiversByHash[_id] == msg.sender,
        "Only the owner can modify the royalty fees");
        _;
    }

    /**
     * @dev ERC2981 - return the receiver and royalty payment given the id and sale price
     * @param _tokenId the id of the token
     * @param _salePrice the price of the token
     * @return receiver the receiver
     * @return royaltyAmount the royalty payment
     */
    function royaltyInfo(
        uint256 _tokenId,
        uint256 _salePrice
    ) external view override returns (
        address receiver,
        uint256 royaltyAmount
    ) {
        require(_salePrice > 0, "Sale price must be greater than 0");
        require(_tokenId > 0, "Token Id must be valid");

        // get the receiver of the royalty
        receiver = royaltyReceiversByHash[_tokenId];

        // calculate the royalty amount. royalty is expressed as permilliage of total supply
        royaltyAmount = royaltyFeesByHash[_tokenId] / 1000000 * _salePrice;
    }

    /// @notice ERC165 interface responder for this contract
    /// @param interfaceId - the interface id to check
    /// @return supportsIface - whether the interface is supported
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override returns (bool supportsIface) {
        supportsIface = interfaceId == type(IERC2981).interfaceId
        || super.supportsInterface(interfaceId);
    }

    /// @notice set the fee permilliage for a token hash
    /// @param _id - id of the token hash
    /// @param _fee - the fee permilliage to set
    function setFee(uint256 _id, uint256 _fee) onlyRoyaltyOwner(_id) external override {
        require(_id != 0, "Fee cannot be zero");
        royaltyFeesByHash[_id] = _fee;
    }

    /// @notice get the fee permilliage for a token hash
    /// @param _id - id of the token hash
    /// @return fee - the fee
    function getFee(uint256 _id) external view override returns (uint256 fee) {
        fee = royaltyFeesByHash[_id];
    }

    /// @notice get the royalty receiver for a token hash
    /// @param _id - id of the token hash
    /// @return owner - the royalty owner
    function royaltyOwner(uint256 _id) external view override returns (address owner) {
        owner = royaltyReceiversByHash[_id];
    }

    /// @notice get the royalty receiver for a token hash
    /// @param _id - id of the token hash
    /// @param _newOwner - address of the new owners
    function transferOwnership(uint256 _id, address _newOwner) onlyRoyaltyOwner(_id) external override {
        require(_id != 0 && _newOwner != address(0), "Invalid token id or new owner");
        royaltyReceiversByHash[_id] = _newOwner;
    }
}

File 5 of 37 : AddressSet.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

/**
 * @notice Key sets with enumeration and delete. Uses mappings for random
 * and existence checks and dynamic arrays for enumeration. Key uniqueness is enforced.
 * @dev Sets are unordered. Delete operations reorder keys. All operations have a
 * fixed gas cost at any scale, O(1).
 * author: Rob Hitchens
 */

library AddressSet {
    struct Set {
        mapping(address => uint256) keyPointers;
        address[] keyList;
    }

    /**
     * @notice insert a key.
     * @dev duplicate keys are not permitted.
     * @param self storage pointer to a Set.
     * @param key value to insert.
     */
    function insert(Set storage self, address key) public {
        require(
            !exists(self, key),
            "AddressSet: key already exists in the set."
        );
        self.keyList.push(key);
        self.keyPointers[key] = self.keyList.length - 1;
    }

    /**
     * @notice remove a key.
     * @dev key to remove must exist.
     * @param self storage pointer to a Set.
     * @param key value to remove.
     */
    function remove(Set storage self, address key) public {
        // TODO: I commented this out do get a test to pass - need to figure out what is up here
        require(
            exists(self, key),
            "AddressSet: key does not exist in the set."
        );
        if (!exists(self, key)) return;
        uint256 last = count(self) - 1;
        uint256 rowToReplace = self.keyPointers[key];
        if (rowToReplace != last) {
            address keyToMove = self.keyList[last];
            self.keyPointers[keyToMove] = rowToReplace;
            self.keyList[rowToReplace] = keyToMove;
        }
        delete self.keyPointers[key];
        self.keyList.pop();
    }

    /**
     * @notice count the keys.
     * @param self storage pointer to a Set.
     */
    function count(Set storage self) public view returns (uint256) {
        return (self.keyList.length);
    }

    /**
     * @notice check if a key is in the Set.
     * @param self storage pointer to a Set.
     * @param key value to check.
     * @return bool true: Set member, false: not a Set member.
     */
    function exists(Set storage self, address key)
        public
        view
        returns (bool)
    {
        if (self.keyList.length == 0) return false;
        return self.keyList[self.keyPointers[key]] == key;
    }

    /**
     * @notice fetch a key by row (enumerate).
     * @param self storage pointer to a Set.
     * @param index row to enumerate. Must be < count() - 1.
     */
    function keyAtIndex(Set storage self, uint256 index)
        public
        view
        returns (address)
    {
        return self.keyList[index];
    }
}

File 6 of 37 : UInt256Set.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

/**
 * @notice Key sets with enumeration and delete. Uses mappings for random
 * and existence checks and dynamic arrays for enumeration. Key uniqueness is enforced.
 * @dev Sets are unordered. Delete operations reorder keys. All operations have a
 * fixed gas cost at any scale, O(1).
 * author: Rob Hitchens
 */

library UInt256Set {
    struct Set {
        mapping(uint256 => uint256) keyPointers;
        uint256[] keyList;
    }

    /**
     * @notice insert a key.
     * @dev duplicate keys are not permitted.
     * @param self storage pointer to a Set.
     * @param key value to insert.
     */
    function insert(Set storage self, uint256 key) public {
        require(
            !exists(self, key),
            "UInt256Set: key already exists in the set."
        );
        self.keyList.push(key);
        self.keyPointers[key] = self.keyList.length - 1;
    }

    /**
     * @notice remove a key.
     * @dev key to remove must exist.
     * @param self storage pointer to a Set.
     * @param key value to remove.
     */
    function remove(Set storage self, uint256 key) public {
        // TODO: I commented this out do get a test to pass - need to figure out what is up here
        // require(
        //     exists(self, key),
        //     "UInt256Set: key does not exist in the set."
        // );
        if (!exists(self, key)) return;
        uint256 last = count(self) - 1;
        uint256 rowToReplace = self.keyPointers[key];
        if (rowToReplace != last) {
            uint256 keyToMove = self.keyList[last];
            self.keyPointers[keyToMove] = rowToReplace;
            self.keyList[rowToReplace] = keyToMove;
        }
        delete self.keyPointers[key];
        delete self.keyList[self.keyList.length - 1];
    }

    /**
     * @notice count the keys.
     * @param self storage pointer to a Set.
     */
    function count(Set storage self) public view returns (uint256) {
        return (self.keyList.length);
    }

    /**
     * @notice check if a key is in the Set.
     * @param self storage pointer to a Set.
     * @param key value to check.
     * @return bool true: Set member, false: not a Set member.
     */
    function exists(Set storage self, uint256 key)
        public
        view
        returns (bool)
    {
        if (self.keyList.length == 0) return false;
        return self.keyList[self.keyPointers[key]] == key;
    }

    /**
     * @notice fetch a key by row (enumerate).
     * @param self storage pointer to a Set.
     * @param index row to enumerate. Must be < count() - 1.
     */
    function keyAtIndex(Set storage self, uint256 index)
        public
        view
        returns (uint256)
    {
        return self.keyList[index];
    }
}

File 7 of 37 : ProxyRegistry.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "../interfaces/IProxyRegistry.sol";
import "../utils/AddressSet.sol";

/// @title ProxyRegistryManager
/// @notice a proxy registry is a registry of delegate proxies which have the ability to autoapprove transactions for some address / contract. Used by OpenSEA to enable feeless trades by a proxy account
contract ProxyRegistryManager is IProxyRegistryManager {

    // using the addressset library to store the addresses of the proxies
    using AddressSet for AddressSet.Set;

    // the set of registry managers able to manage this registry
    mapping(address => bool) internal registryManagers;

    // the set of proxy addresses
    AddressSet.Set private _proxyAddresses;

    /// @notice add a new registry manager to the registry
    /// @param newManager the address of the registry manager to add
    function addRegistryManager(address newManager) external virtual override {
        registryManagers[newManager] = true;
    }

    /// @notice remove a registry manager from the registry
    /// @param oldManager the address of the registry manager to remove
    function removeRegistryManager(address oldManager) external virtual override {
        registryManagers[oldManager] = false;
    }

    /// @notice check if an address is a registry manager
    /// @param _addr the address of the registry manager to check
    /// @return _isManager true if the address is a registry manager, false otherwise
    function isRegistryManager(address _addr)
    external
    virtual
    view
    override
    returns (bool _isManager) {
        return registryManagers[_addr];
    }

    /// @notice add a new proxy address to the registry
    /// @param newProxy the address of the proxy to add
    function addProxy(address newProxy) external virtual override {
        _proxyAddresses.insert(newProxy);
    }

    /// @notice remove a proxy address from the registry
    /// @param oldProxy the address of the proxy to remove
    function removeProxy(address oldProxy) external virtual override {
        _proxyAddresses.remove(oldProxy);
    }

    /// @notice check if an address is a proxy address
    /// @param proxy the address of the proxy to check
    /// @return _isProxy true if the address is a proxy address, false otherwise
    function isProxy(address proxy)
    external
    virtual
    view
    override
    returns (bool _isProxy) {
        _isProxy = _proxyAddresses.exists(proxy);
    }

    /// @notice get the count of proxy addresses
    /// @return _count the count of proxy addresses
    function allProxiesCount()
    external
    virtual
    view
    override
    returns (uint256 _count) {
        _count = _proxyAddresses.count();
    }

    /// @notice get the nth proxy address
    /// @param _index the index of the proxy address to get
    /// @return the nth proxy address
    function proxyAt(uint256 _index)
    external
    virtual
    view
    override
    returns (address) {
        return _proxyAddresses.keyAtIndex(_index);
    }

    /// @notice check if the proxy approves this request
    function _isApprovedForAll(address _owner, address _operator)
    internal
    view
    returns (bool isOperator)
    {
        // Whitelist OpenSea proxy contract for easy trading.
        for (uint256 i = 0; i < _proxyAddresses.keyList.length; i++) {
            IProxyRegistry proxyRegistry = IProxyRegistry(
                _proxyAddresses.keyList[i]
            );
            try proxyRegistry.proxies(_owner) returns (
                OwnableDelegateProxy thePr
            ) {
                if (address(thePr) == _operator) {
                    return true;
                }
            } catch {}
        }
        return false;
    }

}

File 8 of 37 : ERC1155Owners.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "../utils/AddressSet.sol";

import "../interfaces/IERC1155Owners.sol";

// TODO write tests

/// @title ERC1155Owners
/// @notice a list of token holders for a given token
contract ERC1155Owners is IERC1155Owners {

    // the uint set used to store the held tokens
    using AddressSet for AddressSet.Set;

    // lists of held tokens by user
    mapping(uint256 => AddressSet.Set) internal _owners;

    /// @notice Get  all token holderd for a token id
    /// @param id the token id
    /// @return ownersList all token holders for id
    function ownersOf(uint256 id)
    external
    virtual
    view
    override
    returns (address[] memory ownersList) {
        ownersList = _owners[id].keyList;
    }

    /// @notice returns whether the address is in the list
    /// @return isOwner whether the address is in the list
    function isOwnedBy(uint256 id, address toCheck)
    external
    virtual
    view
    override
    returns (bool isOwner) {
        return _owners[id].exists(toCheck);
    }

    /// @notice add a token to an accound's owned list
    /// @param id address
    /// @param owner id of the token
    function _addOwner(uint256 id, address owner)
    internal {
        _owners[id].insert(owner);
    }

}

File 9 of 37 : ERC1155Owned.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "../utils/UInt256Set.sol";

import "../interfaces/IERC1155Owned.sol";

// TODO write tests

/// @title ERC1155Owned
/// @notice a list of held tokens for a given token
contract ERC1155Owned is IERC1155Owned {

    // the uint set used to store the held tokens
    using UInt256Set for UInt256Set.Set;

    // lists of held tokens by user
    mapping(address => UInt256Set.Set) internal _owned;

    /// @notice Get all owned tokens
    /// @param account the owner
    /// @return ownedList all tokens for owner
    function owned(address account)
    external
    virtual
    view
    override
    returns (uint256[] memory ownedList) {
        ownedList = _owned[account].keyList;
    }

    /// @notice returns whether the address is in the list
    /// @param account address
    /// @param toCheck id of the token
    /// @return isOwned whether the address is in the list
    function isOwnerOf(address account, uint256 toCheck)
    external
    virtual
    view
    override
    returns (bool isOwned) {
        isOwned = _owned[account].exists(toCheck);
    }

    /// @notice add a token to an accound's owned list
    /// @param account address
    /// @param token id of the token
    function _addOwned(address account, uint256 token)
    internal {
        _owned[account].insert(token);
    }

}

File 10 of 37 : ERC1155TotalBalance.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "../interfaces/IERC1155TotalBalance.sol";

/// @title ERC1155TotalBalance
/// @notice the total balance of a token type
contract ERC1155TotalBalance is IERC1155TotalBalance {

    // total balance per token id
    mapping(uint256 => uint256) internal _totalBalances;

    /// @notice get the total balance for the given token id
    /// @param id the token id
    /// @return the total balance for the given token id
    function totalBalanceOf(uint256 id) external virtual view override returns (uint256) {
        return _totalBalances[id];
    }

}

File 11 of 37 : ERC1155CommonUri.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interfaces/IERC1155CommonUri.sol";

abstract contract ERC1155CommonUri is IERC1155CommonUri {

    mapping (uint256 => string) internal commonURIs;
    mapping (uint256 => address) internal commonURIOwners;
    mapping (uint256 => uint256) internal tokenHashtoUriMap;

    function getCommonUri(uint256 uriId) external view override returns (string memory result) {

        return commonURIs[uriId];

    }
    function _setCommonUri(uint256 uriId, string memory value) internal {

        commonURIs[uriId] = value;
        commonURIOwners[uriId] = msg.sender;

    }
    function _setCommonUriOf(uint256 uriId, uint256 tokenHash) internal {

        tokenHashtoUriMap[tokenHash] = uriId;

    }

    function _commonUriOf(uint256 tokenHash) internal view returns (string memory result) {

        return commonURIs[tokenHashtoUriMap[tokenHash]];

    }
    function commonUriOf(uint256 tokenHash) external view override returns (string memory result) {

        return _commonUriOf(tokenHash);

    }

    /// @notice mint tokens of specified amount to the specified address
    /// @param recipient the mint target
    /// @param tokenHash the token hash to mint
    /// @param amount the amount to mint
    function mintWithCommonUri(
        address recipient,
        uint256 tokenHash,
        uint256 amount,
        uint256 uriId
    ) virtual external override {
        // does nothing
    }

}

File 12 of 37 : Controllable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import "../interfaces/IControllable.sol";

abstract contract Controllable is IControllable {
    mapping(address => bool) internal _controllers;

    /**
     * @dev Throws if called by any account not in authorized list
     */
    modifier onlyController() {
        require(
            _controllers[msg.sender] == true || address(this) == msg.sender,
            "Controllable: caller is not a controller"
        );
        _;
    }

    /**
     * @dev Add an address allowed to control this contract
     */
    function addController(address _controller)
        external
        override
        onlyController
    {
        _addController(_controller);
    }
    function _addController(address _controller) internal {
        _controllers[_controller] = true;
    }

    /**
     * @dev Check if this address is a controller
     */
    function isController(address _address)
        external
        view
        override
        returns (bool allowed)
    {
        allowed = _isController(_address);
    }
    function _isController(address _address)
        internal view
        returns (bool allowed)
    {
        allowed = _controllers[_address];
    }

    /**
     * @dev Remove the sender address from the list of controllers
     */
    function relinquishControl() external override onlyController {
        _relinquishControl();
    }
    function _relinquishControl() internal onlyController{
        delete _controllers[msg.sender];
    }
}

File 13 of 37 : IMultiToken.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "./IERC1155Mint.sol";
import "./IERC1155Burn.sol";

/// @dev extended by the multitoken
interface IMultiToken is IERC1155Mint, IERC1155Burn {

    function symbolOf(uint256 _tokenId) external view returns (string memory);
    function nameOf(uint256 _tokenId) external view returns (string memory);

}

File 14 of 37 : IERC1155Mint.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// implemented by erc1155 tokens to allow mminting
interface IERC1155Mint {

    /// @notice event emitted when tokens are minted
    event MinterMinted(
        address target,
        uint256 tokenHash,
        uint256 amount
    );

    /// @notice mint tokens of specified amount to the specified address
    /// @param recipient the mint target
    /// @param tokenHash the token hash to mint
    /// @param amount the amount to mint
    function mint(
        address recipient,
        uint256 tokenHash,
        uint256 amount
    ) external;

}

File 15 of 37 : IERC1155Burn.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// implemented by erc1155 tokens to allow burning
interface IERC1155Burn {

    /// @notice event emitted when tokens are burned
    event MinterBurned(
        address target,
        uint256 tokenHash,
        uint256 amount
    );

    /// @notice burn tokens of specified amount from the specified address
    /// @param target the burn target
    /// @param tokenHash the token hash to burn
    /// @param amount the amount to burn
    function burn(
        address target,
        uint256 tokenHash,
        uint256 amount
    ) external;


}

File 16 of 37 : IERC1155Multinetwork.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// implemented by erc1155 tokens to allow the bridge to mint and burn tokens
/// bridge must be able to mint and burn tokens on the multitoken contract
interface IERC1155Multinetwork {

    // transfer token to a different address
    function networkTransferFrom(
        address from,
        address to,
        uint256 network,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferNetworkERC1155(
        uint256 networkFrom,
        uint256 networkTo,
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256 id,
        uint256 value
    );

}

File 17 of 37 : IERC1155Bridge.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "./IERC1155Multinetwork.sol";

/// @notice defines the interface for the bridge contract. This contract implements a decentralized
/// bridge for an erc1155 token which enables users to transfer erc1155 tokens between supported networks.
/// users request a transfer in one network, which registers the transfer in the bridge contract, and generates
/// an event. This event is seen by a validator, who validates the transfer by calling the validate method on
/// the target network. Once a majority of validators have validated the transfer, the transfer is executed on the
/// target network by minting the approriate token type and burning the appropriate amount of the source token,
/// which is held in custody by the bridge contract until the transaction is confirmed. In order to participate,
/// validators must register with the bridge contract and put up a deposit as collateral.  The deposit is returned
/// to the validator when the validator self-removes from the validator set. If the validator acts in a way that
/// violates the rules of the bridge contract - namely the validator fails to validate a number of transfers,
/// or the validator posts some number of transfers which remain unconfirmed, then the validator is removed from the
/// validator set and their bond is distributed to other validators. The validator will then need to re-bond and
/// re-register. Repeated violations of the rules of the bridge contract will result in the validator being removed
/// from the validator set permanently via a ban.
interface IERC1155Bridge is IERC1155Multinetwork {

    /// @notice the network transfer status
    /// pending = on its way to the target network
    /// confirmed = target network received the transfer
    enum NetworkTransferStatus {
        Started,
        Confirmed,
        Failed
    }

    /// @notice the network transfer request structure. contains all the expected params of a transfer plus one addition nwtwork id param
    struct NetworkTransferRequest {
        uint256 id;
        address from;
        address to;
        uint32 network;
        uint256 token;
        uint256 amount;
        bytes data;
        NetworkTransferStatus status;
    }

    /// @notice emitted when a transfer is started
    event NetworkTransferStarted(
        uint256 indexed id,
        NetworkTransferRequest data
    );

    /// @notice emitted when a transfer is confirmed
    event NetworkTransferConfirmed(
        uint256 indexed id,
        NetworkTransferRequest data
    );

    /// @notice emitted when a transfer is cancelled
    event NetworkTransferCancelled(
        uint256 indexed id,
        NetworkTransferRequest data
    );

    /// @notice the token this bridge works with
    function token() external view returns (address);

    /// @notice start the network transfer
    function transfer(
        uint256 id,
        NetworkTransferRequest memory request
    ) external;

    /// @notice confirm the transfer. called by the target-side bridge
    /// @param id the id of the transfer
    function confirm(uint256 id) external;

    /// @notice fail  the transfer. called by the target-side bridge
    /// @param id the id of the transfer
    function cancel(uint256 id) external;

    /// @notice get the transfer request struct
    /// @param id the id of the transfer
    /// @return the transfer request struct
    function get(uint256 id)
    external view returns (NetworkTransferRequest memory);


}

File 18 of 37 : Service.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "../interfaces/IJanusRegistry.sol";
import "../interfaces/IFactory.sol";

/// @title NextgemStakingPool
/// @notice implements a staking pool for nextgem. Intakes a token and issues another token over time
contract Service {

    address internal _serviceOwner;

    // the service registry controls everything. It tells all objects
    // what service address they are registered to, who the owner is,
    // and all other things that are good in the world.
    address internal _serviceRegistry;

    function _setRegistry(address registry) internal {

        _serviceRegistry = registry;

    }

}

File 19 of 37 : Strings.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

library Strings {
    function strConcat(
        string memory _a,
        string memory _b,
        string memory _c,
        string memory _d,
        string memory _e
    ) internal pure returns (string memory) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory _bc = bytes(_c);
        bytes memory _bd = bytes(_d);
        bytes memory _be = bytes(_e);
        string memory abcde = new string(
            _ba.length + _bb.length + _bc.length + _bd.length + _be.length
        );
        bytes memory babcde = bytes(abcde);
        uint256 k = 0;
        for (uint256 i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
        for (uint256 i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
        for (uint256 i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
        for (uint256 i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
        for (uint256 i = 0; i < _be.length; i++) babcde[k++] = _be[i];
        return string(babcde);
    }

    function strConcat(
        string memory _a,
        string memory _b,
        string memory _c,
        string memory _d
    ) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, _d, "");
    }

    function strConcat(
        string memory _a,
        string memory _b,
        string memory _c
    ) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, "", "");
    }

    function strConcat(string memory _a, string memory _b)
        internal
        pure
        returns (string memory)
    {
        return strConcat(_a, _b, "", "", "");
    }

    function uint2str(uint256 _i)
        internal
        pure
        returns (string memory _uintAsString)
    {
        if (_i == 0) {
            return "0";
        }
        uint256 j = _i;
        uint256 len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint256 k = len - 1;
        unchecked {
            while (_i != 0) {
                bstr[k--] = bytes1(uint8(48 + (_i % 10)));
                _i /= 10;
            }
        }
        return string(bstr);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 21 of 37 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

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

pragma solidity ^0.8.0;

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

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

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

File 23 of 37 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 27 of 37 : IERC2981Holder.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/interfaces/IERC165.sol";

///
/// @dev interface for a holder (owner) of an ERC2981-enabled token
/// @dev to modify the fee amount as well as transfer ownership of
/// @dev royalty to someone else.
///
interface IERC2981Holder {

    /// @dev emitted when the roalty has changed
    event RoyaltyFeeChanged(
        address indexed operator,
        uint256 indexed _id,
        uint256 _fee
    );

    /// @dev emitted when the roalty ownership has been transferred
    event RoyaltyOwnershipTransferred(
        uint256 indexed _id,
        address indexed oldOwner,
        address indexed newOwner
    );

    /// @notice set the fee amount for the fee id
    /// @param _id  the fee id
    /// @param _fee the fee amount
    function setFee(uint256 _id, uint256 _fee) external;

    /// @notice get the fee amount for the fee id
    /// @param _id  the fee id
    /// @return the fee amount
    function getFee(uint256 _id) external returns (uint256);

    /// @notice get the owner address of the royalty
    /// @param _id  the fee id
    /// @return the owner address
    function royaltyOwner(uint256 _id) external returns (address);


    /// @notice transfer ownership of the royalty to someone else
    /// @param _id  the fee id
    /// @param _newOwner  the new owner address
    function transferOwnership(uint256 _id, address _newOwner) external;

}

File 28 of 37 : IERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

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

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

pragma solidity ^0.8.0;

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

File 30 of 37 : IProxyRegistry.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

interface OwnableDelegateProxy {}

/**
 * @dev a registry of proxies
 */
interface IProxyRegistry {

    function proxies(address _owner) external view returns (OwnableDelegateProxy);

}

/// @notice a proxy registry is a registry of delegate proxies which have the ability to autoapprove transactions for some address / contract. Used by OpenSEA to enable feeless trades by a proxy account
interface IProxyRegistryManager {

    /// @notice add a new registry manager to the registry
    /// @param newManager the address of the registry manager to add
    function addRegistryManager(address newManager) external;

   /// @notice remove a registry manager from the registry
    /// @param oldManager the address of the registry manager to remove
    function removeRegistryManager(address oldManager) external;

    /// @notice check if an address is a registry manager
    /// @param _addr the address of the registry manager to check
    /// @return _isRegistryManager true if the address is a registry manager, false otherwise
    function isRegistryManager(address _addr)
        external
        view
        returns (bool _isRegistryManager);

    /// @notice add a new proxy address to the registry
    /// @param newProxy the address of the proxy to add
    function addProxy(address newProxy) external;

    /// @notice remove a proxy address from the registry
    /// @param oldProxy the address of the proxy to remove
    function removeProxy(address oldProxy) external;

    /// @notice check if an address is a proxy address
    /// @param _addr the address of the proxy to check
    /// @return _is true if the address is a proxy address, false otherwise
    function isProxy(address _addr)
        external
        view
        returns (bool _is);

    /// @notice get count of proxies
    /// @return _allCount the number of proxies
    function allProxiesCount()
        external
        view
        returns (uint256 _allCount);

    /// @notice get the address of a proxy at a given index
    /// @param _index the index of the proxy to get
    /// @return _proxy the address of the proxy at the given index
    function proxyAt(uint256 _index)
        external
        view
        returns (address _proxy);

}

File 31 of 37 : IERC1155Owners.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// implemented by erc1155 tokens to allow mminting
interface IERC1155Owners {

    /// @notice returns the owners of the token
    /// @param tokenId the token id
    /// @param owners the owner addresses of the token id
    function ownersOf(uint256 tokenId) external view returns (address[] memory owners);

    /// @notice returns whether given address owns given id
    /// @param tokenId the token id
    /// @param toCheck the address to check
    /// @param isOwner whether the given address is owner of the token id
    function isOwnedBy(uint256 tokenId, address toCheck) external view returns (bool isOwner);

}

File 32 of 37 : IERC1155Owned.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// implemented by erc1155 tokens to allow mminting
interface IERC1155Owned {

    /// @notice returns the owned tokens of the account
    /// @param owner the owner address
    /// @param ids owned token ids
    function owned(address owner) external view returns (uint256[] memory ids);

    /// @notice returns whether given id is owned by the account
    /// @param account tthe account
    /// @param toCheck the token id to check
    /// @param isOwner whether the given address is owner of the token id
    function isOwnerOf(address account, uint256 toCheck) external view returns (bool isOwner);

}

File 33 of 37 : IERC1155TotalBalance.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

/// @notice a contract that can be withdrawn from by some user
interface IERC1155TotalBalance {

    /// @notice get the total balance for the given token id
    /// @param id the token id
    /// @return the total balance for the given token id
    function totalBalanceOf(uint256 id) external view returns (uint256);

}

File 34 of 37 : IERC1155CommonUri.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// implemented by erc1155 tokens to allow burning
interface IERC1155CommonUri {

    function setCommonUri(uint256 uriId, string memory value) external;

    function setCommonUriOf(uint256 uriId, uint256 value) external;

    function getCommonUri(uint256 uriId) external view returns (string memory result);

    function commonUriOf(uint256 tokenHash) external view returns (string memory result);

    /// @notice mint tokens of specified amount to the specified address
    /// @param recipient the mint target
    /// @param tokenHash the token hash to mint
    /// @param amount the amount to mint
    function mintWithCommonUri(
        address recipient,
        uint256 tokenHash,
        uint256 amount,
        uint256 uriId
    ) external;

}

File 35 of 37 : IControllable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @notice a controllable contract interface. allows for controllers to perform privileged actions. controllera can other controllers and remove themselves.
interface IControllable {

    /// @notice emitted when a controller is added.
    event ControllerAdded(
        address indexed contractAddress,
        address indexed controllerAddress
    );

    /// @notice emitted when a controller is removed.
    event ControllerRemoved(
        address indexed contractAddress,
        address indexed controllerAddress
    );

    /// @notice adds a controller.
    /// @param controller the controller to add.
    function addController(address controller) external;

    /// @notice removes a controller.
    /// @param controller the address to check
    /// @return true if the address is a controller
    function isController(address controller) external view returns (bool);

    /// @notice remove ourselves from the list of controllers.
    function relinquishControl() external;
}

File 36 of 37 : IJanusRegistry.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

/// @notice implements a Janus (multifaced) registry. GLobal registry items can be set by specifying 0 for the registry face. Those global items are then available to all faces, and individual faces can override the global items for
interface IJanusRegistry {

    /// @notice Get the registro address given the face name. If the face is 0, the global registry is returned.
    /// @param face the face name or 0 for the global registry
    /// @param name uint256 of the token index
    /// @return item the service token record
    function get(string memory face, string memory name)
    external
    view
    returns (address item);

    /// @notice returns whether the service is in the list
    /// @param item uint256 of the token index
    function member(address item)
    external
    view
    returns (string memory face, string memory name);

}

File 37 of 37 : IFactory.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

interface IFactoryElement {
    function factoryCreated(address _factory, address _owner) external;
    function factory() external returns(address);
    function owner() external returns(address);
}

/// @title A title that should describe the contract/interface
/// @author The name of the author
/// @notice Explain to an end user what this does
/// @dev Explain to a developer any extra details
/// @notice a contract factory. Can create an instance of a new contract and return elements from that list to callers
interface IFactory {

    /// @notice a contract instance.
    struct Instance {
        address factory;
        address contractAddress;
    }

    /// @dev emitted when a new contract instance has been craeted
    event InstanceCreated(
        address factory,
        address contractAddress,
        Instance data
    );

    /// @notice a set of requirements. used for random access
    struct FactoryInstanceSet {
        mapping(uint256 => uint256) keyPointers;
        uint256[] keyList;
        Instance[] valueList;
    }

    struct FactoryData {
        FactoryInstanceSet instances;
    }

    struct FactorySettings {
        FactoryData data;
    }

    /// @notice returns the contract bytecode
    /// @return _instances the contract bytecode
    function contractBytes() external view returns (bytes memory _instances);

    /// @notice returns the contract instances as a list of instances
    /// @return _instances the contract instances
    function instances() external view returns (Instance[] memory _instances);

    /// @notice returns the contract instance at the given index
    /// @param idx the index of the instance to return
    /// @return instance the instance at the given index
    function at(uint256 idx) external view returns (Instance memory instance);

    /// @notice returns the length of the already-created contracts list
    /// @return _length the length of the list
    function count() external view returns (uint256 _length);

    /// @notice creates a new contract instance
    /// @param owner the owner of the new contract
    /// @param salt the salt to use for the new contract
    /// @return instanceOut the address of the new contract
    function create(address owner, uint256 salt)
        external
        returns (Instance memory instanceOut);

}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 5
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {
    "contracts/utils/AddressSet.sol": {
      "AddressSet": "0xae09d7b704281cf10e7bb1776b68fca3d8c94e7c"
    },
    "contracts/utils/UInt256Set.sol": {
      "UInt256Set": "0x3a5107297dc01bab0d18a987a47de8befbcf6eed"
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":true,"internalType":"address","name":"controllerAddress","type":"address"}],"name":"ControllerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":true,"internalType":"address","name":"controllerAddress","type":"address"}],"name":"ControllerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenHash","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MinterBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenHash","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MinterMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"RoyaltyFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"RoyaltyOwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"networkFrom","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"networkTo","type":"uint256"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferNetworkERC1155","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"addController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"directMinter","type":"address"}],"name":"addDirectMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newProxy","type":"address"}],"name":"addProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newManager","type":"address"}],"name":"addRegistryManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allProxiesCount","outputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"tokenHash","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenHash","type":"uint256"}],"name":"commonUriOf","outputs":[{"internalType":"string","name":"result","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"uriId","type":"uint256"}],"name":"getCommonUri","outputs":[{"internalType":"string","name":"result","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getFee","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"registry","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"initialize_ERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"toCheck","type":"address"}],"name":"isOwnedBy","outputs":[{"internalType":"bool","name":"isOwner","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"toCheck","type":"uint256"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"isOwned","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxy","type":"address"}],"name":"isProxy","outputs":[{"internalType":"bool","name":"_isProxy","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"isRegistryManager","outputs":[{"internalType":"bool","name":"_isManager","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"tokenHash","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"tokenHash","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"uriId","type":"uint256"}],"name":"mintWithCommonUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"nameOf","outputs":[{"internalType":"string","name":"out","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"network","type":"uint256"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"networkTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"owned","outputs":[{"internalType":"uint256[]","name":"ownedList","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownersOf","outputs":[{"internalType":"address[]","name":"ownersList","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"proxyAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"relinquishControl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oldProxy","type":"address"}],"name":"removeProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oldManager","type":"address"}],"name":"removeRegistryManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"royaltyOwner","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","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":"uint256","name":"uriId","type":"uint256"},{"internalType":"string","name":"value","type":"string"}],"name":"setCommonUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"uriId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setCommonUriOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_masterMinter","type":"address"}],"name":"setMasterController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_nameOf","type":"string"}],"name":"setNameOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_symbolOf","type":"string"}],"name":"setSymbolOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenHash","type":"uint256"},{"internalType":"string","name":"value","type":"string"}],"name":"setUri","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":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"symbolOf","outputs":[{"internalType":"string","name":"out","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenHash","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50613d01806100206000396000f3fe608060405234801561001057600080fd5b506004361061022f5760003560e01c8062fdd58e1461023457806301ffc9a71461025a57806302fe53051461027d578063051a2664146102925780630e89341c146102b2578063148d6d85146102c5578063156e29f6146102d857806323b11d8d146102eb57806324ed0b9f146102fe57806326fc02091461031157806329507f7314610347578063297103881461035a57806329779ee91461036d5780632a55205a146103805780632eb2c2d6146103b25780632ec37933146103c5578063351e093c146103f45780634048d909146104075780634e1273f41461043357806352f7c98814610453578063602b1b16146104665780636663b4a414610479578063672cb1a81461049957806375cfbe6c146104cb578063782f08ae146104de5780637db3c828146104f157806399c95d0514610504578063a22cb46514610517578063a307a4e31461052a578063a584ab291461053d578063a7f80cb41461055d578063a7fc7a0714610570578063a92f2bdb14610583578063ae1e4df114610596578063b1ab9317146105a9578063b429afeb146105bc578063be116c3b146105cf578063bfe7418c146105e2578063c4d66de8146105ea578063c5b8f772146105fd578063dbedf57314610610578063e1c28bef14610623578063e985e9c51461062b578063f03594a01461063e578063f242432a14610651578063f3c4a41414610664578063f5298aca14610677578063fcee45f41461068a575b600080fd5b61024761024236600461335b565b6106aa565b6040519081526020015b60405180910390f35b61026d6102683660046134e6565b610746565b6040519015158152602001610251565b61029061028b366004613520565b6107f2565b005b6102a56102a0366004613554565b6107fe565b6040516102519190613872565b6102a56102c0366004613554565b6108a0565b6102906102d33660046133bc565b610a17565b6102906102e6366004613387565b610a88565b6102906102f93660046130f1565b610ae2565b61029061030c3660046135e3565b610b4f565b61033a61031f366004613554565b6000908152600d60205260409020546001600160a01b031690565b60405161025191906136c9565b610290610355366004613586565b610ba8565b61026d6103683660046130f1565b610c72565b61029061037b36600461361f565b610cff565b61039361038e36600461361f565b610db8565b604080516001600160a01b039093168352602083019190915201610251565b6102906103c0366004613164565b610ea9565b6102906103d33660046130f1565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6102a5610402366004613554565b610f39565b61026d6104153660046130f1565b6001600160a01b031660009081526004602052604090205460ff1690565b6104466104413660046133f7565b610f56565b6040516102519190613831565b61029061046136600461361f565b61107f565b610290610474366004613520565b61110c565b610247610487366004613554565b60009081526009602052604090205490565b6102906104a73660046130f1565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6102a56104d9366004613554565b61115e565b6102906104ec3660046135e3565b61117b565b6102906104ff3660046135ab565b611224565b6102a5610512366004613554565b611282565b61029061052536600461332d565b61128d565b6102906105383660046130f1565b611364565b61055061054b366004613554565b6113d9565b60405161025191906137e4565b61029061056b3660046130f1565b611447565b61029061057e3660046130f1565b6114c4565b6102906105913660046135e3565b611502565b61026d6105a4366004613586565b6115ab565b6104466105b73660046130f1565b611648565b61026d6105ca3660046130f1565b6116b6565b6102906105dd3660046130f1565b6116c1565b6102476116fb565b6102906105f83660046130f1565b611786565b61026d61060b36600461335b565b61185a565b61029061061e3660046135e3565b6118aa565b610290611903565b61026d61063936600461312b565b61194b565b61029061064c366004613279565b61198f565b61029061065f366004613211565b611b12565b61033a610672366004613554565b611b99565b610290610685366004613387565b611c26565b610247610698366004613554565b6000908152600e602052604090205490565b60006001600160a01b03831661071b5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216630781aca560e51b148061077757506001600160e01b031982166301735cdb60e31b145b8061079257506001600160e01b03198216637413646560e01b145b806107ad57506001600160e01b03198216631998ed2960e21b145b806107c857506001600160e01b03198216636cdb3d1360e11b145b806107e357506001600160e01b031982166303a24d0760e21b145b80610740575061074082611c6b565b6107fb816107f2565b50565b600081815260166020526040902080546060919061081b90613b09565b80601f016020809104026020016040519081016040528092919081815260200182805461084790613b09565b80156108945780601f1061086957610100808354040283529160200191610894565b820191906000526020600020905b81548152906001019060200180831161087757829003601f168201915b50505050509050919050565b606060006108ad83611c90565b6000848152601360205260408120805492935090916108cb90613b09565b80601f01602080910402602001604051908101604052809291908181526020018280546108f790613b09565b80156109445780601f1061091957610100808354040283529160200191610944565b820191906000526020600020905b81548152906001019060200180831161092757829003601f168201915b5050505050905060008151111561096f576109678161096286611cba565b611db3565b949350505050565b815115610983576109678261096286611cba565b6003805461099090613b09565b80601f01602080910402602001604051908101604052809291908181526020018280546109bc90613b09565b8015610a095780601f106109de57610100808354040283529160200191610a09565b820191906000526020600020905b8154815290600101906020018083116109ec57829003601f168201915b505050505092505050919050565b610a2033611def565b80610a3557506012546001600160a01b031633145b610a515760405162461bcd60e51b8152600401610712906138cd565b610a6c84848460405180602001604052806000815250611e0d565b610a8283826000908152600c6020526040902055565b50505050565b610a9133611def565b80610aa657506012546001600160a01b031633145b610ac25760405162461bcd60e51b8152600401610712906138cd565b610add83838360405180602001604052806000815250611e0d565b505050565b60405163989779e960e01b815273ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063989779e990610b1c906005908590600401613a51565b60006040518083038186803b158015610b3457600080fd5b505af4158015610b48573d6000803e3d6000fd5b5050505050565b610b5833611def565b80610b6d57506012546001600160a01b031633145b610b895760405162461bcd60e51b8152600401610712906138cd565b60008281526016602090815260409091208251610add92840190612f6e565b6000828152600d602052604090205482906001600160a01b03163314610be05760405162461bcd60e51b815260040161071290613a07565b8215801590610bf757506001600160a01b03821615155b610c435760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420746f6b656e206964206f72206e6577206f776e65720000006044820152606401610712565b506000918252600d602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b60405163a8a37bd360e01b815260009073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063a8a37bd390610caf906005908690600401613a51565b60206040518083038186803b158015610cc757600080fd5b505af4158015610cdb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074091906134c9565b610d0833611def565b80610d1d57506012546001600160a01b031633145b610d395760405162461bcd60e51b8152600401610712906138cd565b6000828152600b60205260409020546001600160a01b03161580610d7357506000828152600b60205260409020546001600160a01b031633145b80610d825750610d8233611def565b610d9e5760405162461bcd60e51b81526004016107129061393e565b610db482826000908152600c6020526040902055565b5050565b60008060008311610e155760405162461bcd60e51b815260206004820152602160248201527f53616c65207072696365206d7573742062652067726561746572207468616e206044820152600360fc1b6064820152608401610712565b60008411610e5e5760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881259081b5d5cdd081899481d985b1a5960521b6044820152606401610712565b6000848152600d6020908152604080832054600e909252909120546001600160a01b0390911692508390610e9690620f424090613ab1565b610ea09190613ad3565b90509250929050565b6001600160a01b038516331480610ec55750610ec5853361194b565b610f2c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610712565b610b488585858585611f1b565b6000818152600a6020526040902080546060919061081b90613b09565b60608151835114610fbb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610712565b600083516001600160401b03811115610fd657610fd6613bb7565b604051908082528060200260200182016040528015610fff578160200160208202803683370190505b50905060005b84518110156110775761104a85828151811061102357611023613ba1565b602002602001015185838151811061103d5761103d613ba1565b60200260200101516106aa565b82828151811061105c5761105c613ba1565b602090810291909101015261107081613b70565b9050611005565b509392505050565b6000828152600d602052604090205482906001600160a01b031633146110b75760405162461bcd60e51b815260040161071290613a07565b826110f95760405162461bcd60e51b81526020600482015260126024820152714665652063616e6e6f74206265207a65726f60701b6044820152606401610712565b506000918252600e602052604090912055565b8051156111555760405162461bcd60e51b815260206004820152601760248201527615549248185b1c9958591e481a5b9a5d1a585b1a5e9959604a1b6044820152606401610712565b6107fb81612109565b600081815260156020526040902080546060919061081b90613b09565b61118433611def565b8061119957506012546001600160a01b031633145b6111b55760405162461bcd60e51b8152600401610712906138cd565b6000828152601460205260409020546001600160a01b031615806111ef57506000828152601460205260409020546001600160a01b031633145b806111fe57506111fe33611def565b61121a5760405162461bcd60e51b81526004016107129061393e565b610db4828261211c565b61122d33611def565b6112495760405162461bcd60e51b8152600401610712906138cd565b6000928352600d6020908152604080852080546001600160a01b0319166001600160a01b039590951694909417909355600e9052912055565b606061074082611c90565b336001600160a01b03831614156112f85760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610712565b3360008181526002602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6012546001600160a01b031633146113d05760405162461bcd60e51b815260206004820152602960248201527f6f6e6c79206d6173746572206d696e7465722063616e2061646420646972656360448201526874206d696e7465727360b81b6064820152608401610712565b6107fb8161215d565b60008181526007602090815260409182902060010180548351818402810184019094528084526060939283018282801561089457602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161141e5750505050509050919050565b6012546001600160a01b0316156114a05760405162461bcd60e51b815260206004820152601d60248201527f6d6173746572206d696e746572206d757374206e6f74206265207365740000006044820152606401610712565b601280546001600160a01b0319166001600160a01b0383161790556107fb8161215d565b3360009081526011602052604090205460ff161515600114806114e657503033145b6113d05760405162461bcd60e51b8152600401610712906139bf565b61150b33611def565b8061152057506012546001600160a01b031633145b61153c5760405162461bcd60e51b8152600401610712906138cd565b6000828152600b60205260409020546001600160a01b0316158061157657506000828152600b60205260409020546001600160a01b031633145b80611585575061158533611def565b6115a15760405162461bcd60e51b81526004016107129061393e565b610db48282612181565b600082815260076020526040808220905163a8a37bd360e01b815273ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9163a8a37bd3916115f191908690600401613a51565b60206040518083038186803b15801561160957600080fd5b505af415801561161d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164191906134c9565b9392505050565b6001600160a01b03811660009081526008602090815260409182902060010180548351818402810184019094528084526060939283018282801561089457602002820191906000526020600020905b8154815260200190600101908083116116975750505050509050919050565b600061074082611def565b604051638c9d1e4160e01b815273ae09d7b704281cf10e7bb1776b68fca3d8c94e7c90638c9d1e4190610b1c906005908590600401613a51565b60405163300f372b60e11b81526005600482015260009073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063601e6e569060240160206040518083038186803b15801561174957600080fd5b505af415801561175d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611781919061356d565b905090565b600054610100900460ff166117a15760005460ff16156117a5565b303b155b6118085760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610712565b600054610100900460ff1615801561182a576000805461ffff19166101011790555b601080546001600160a01b0319166001600160a01b0384161790558015610db4576000805461ff00191690555050565b6001600160a01b0382166000908152600860205260408082209051631bf945d160e21b8152733a5107297dc01bab0d18a987a47de8befbcf6eed91636fe51744916115f191908690600401613a68565b6118b333611def565b806118c857506012546001600160a01b031633145b6118e45760405162461bcd60e51b8152600401610712906138cd565b60008281526015602090815260409091208251610add92840190612f6e565b3360009081526011602052604090205460ff1615156001148061192557503033145b6119415760405162461bcd60e51b8152600401610712906139bf565b6119496121c2565b565b6000806119588484612219565b9050808061096757506001600160a01b0380851660009081526002602090815260408083209387168352929052205460ff16610967565b60105460408051633e10510b60e01b81526004810191909152600a60448201526926bab63a34aa37b5b2b760b11b606482015260806024820152600d60848201526c4e6574776f726b42726964676560981b60a48201526000916001600160a01b031690633e10510b9060c40160206040518083038186803b158015611a1457600080fd5b505afa158015611a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4c919061310e565b90506001600160a01b038116611a9e5760405162461bcd60e51b8152602060048201526017602482015276139bc81b995d1ddbdc9ac8189c9a5919d948199bdd5b99604a1b6044820152606401610712565b604051630781aca560e51b81526001600160a01b0382169063f03594a090611ad6908b908b908b908b908b908b908b90600401613780565b600060405180830381600087803b158015611af057600080fd5b505af1158015611b04573d6000803e3d6000fd5b505050505050505050505050565b6001600160a01b038516331480611b2e5750611b2e853361194b565b611b8c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610712565b610b488585858585612311565b604051636f911ea160e11b815260009073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063df223d4290611bd6906005908690600401613a68565b60206040518083038186803b158015611bee57600080fd5b505af4158015611c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610740919061310e565b611c2f33611def565b80611c4457506012546001600160a01b031633145b611c605760405162461bcd60e51b8152600401610712906138cd565b610add83838361242c565b60006001600160e01b0319821663152a902d60e11b148061074057506107408261259a565b6000818152600c60209081526040808320548352600a909152902080546060919061081b90613b09565b606081611cde5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611d085780611cf281613b70565b9150611d019050600a83613ab1565b9150611ce2565b6000816001600160401b03811115611d2257611d22613bb7565b6040519080825280601f01601f191660200182016040528015611d4c576020820181803683370190505b5090506000611d5c600184613af2565b90505b8515611daa57600a860660300160f81b82828060019003935081518110611d8857611d88613ba1565b60200101906001600160f81b031916908160001a905350600a86049550611d5f565b50949350505050565b606061164183836040518060200160405280600081525060405180602001604052806000815250604051806020016040528060008152506125ea565b6001600160a01b031660009081526011602052604090205460ff1690565b6001600160a01b038416611e6d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610712565b33611e8d81600087611e7e886128ce565b611e87886128ce565b87612919565b60008481526001602090815260408083206001600160a01b038916845290915281208054859290611ebf908490613a99565b92505081905550846001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020613cac8339815191528787604051611f04929190613a68565b60405180910390a4610b4881600087878787612d39565b8151835114611f7d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610712565b6001600160a01b038416611fa35760405162461bcd60e51b8152600401610712906138f9565b33611fb2818787878787612919565b60005b845181101561209b576000858281518110611fd257611fd2613ba1565b602002602001015190506000858381518110611ff057611ff0613ba1565b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156120415760405162461bcd60e51b815260040161071290613975565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612080908490613a99565b925050819055505050508061209490613b70565b9050611fb5565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516120eb929190613844565b60405180910390a4612101818787878787612ea4565b505050505050565b8051610db4906003906020840190612f6e565b6000828152601360209081526040909120825161213b92840190612f6e565b5050600090815260146020526040902080546001600160a01b03191633179055565b6001600160a01b03166000908152601160205260409020805460ff19166001179055565b6000828152600a6020908152604090912082516121a092840190612f6e565b50506000908152600b6020526040902080546001600160a01b03191633179055565b3360009081526011602052604090205460ff161515600114806121e457503033145b6122005760405162461bcd60e51b8152600401610712906139bf565b336000908152601160205260409020805460ff19169055565b6000805b6006548110156123075760006005600101828154811061223f5761223f613ba1565b60009182526020909120015460405163c455279160e01b81526001600160a01b039091169150819063c45527919061227b9088906004016136c9565b60206040518083038186803b15801561229357600080fd5b505afa9250505080156122c3575060408051601f3d908101601f191682019092526122c09181019061310e565b60015b6122cc576122f4565b846001600160a01b0316816001600160a01b031614156122f25760019350505050610740565b505b50806122ff81613b70565b91505061221d565b5060009392505050565b6001600160a01b0384166123375760405162461bcd60e51b8152600401610712906138f9565b33612347818787611e7e886128ce565b60008481526001602090815260408083206001600160a01b038a1684529091529020548381101561238a5760405162461bcd60e51b815260040161071290613975565b60008581526001602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906123c9908490613a99565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b0316600080516020613cac833981519152888860405161240d929190613a68565b60405180910390a4612423828888888888612d39565b50505050505050565b6001600160a01b03831661248e5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610712565b336124bd8185600061249f876128ce565b6124a8876128ce565b60405180602001604052806000815250612919565b60008381526001602090815260408083206001600160a01b03881684529091529020548281101561253c5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610712565b60008481526001602090815260408083206001600160a01b03808a1680865291909352818420878603905590519091851690600080516020613cac8339815191529061258b9089908990613a68565b60405180910390a45050505050565b60006001600160e01b03198216636cdb3d1360e11b14806125cb57506001600160e01b031982166303a24d0760e21b145b8061074057506301ffc9a760e01b6001600160e01b0319831614610740565b805182518451865188516060948a948a948a948a948a946000949093909290916126149190613a99565b61261e9190613a99565b6126289190613a99565b6126329190613a99565b6001600160401b0381111561264957612649613bb7565b6040519080825280601f01601f191660200182016040528015612673576020820181803683370190505b509050806000805b88518110156126eb5788818151811061269657612696613ba1565b01602001516001600160f81b03191683836126b081613b70565b9450815181106126c2576126c2613ba1565b60200101906001600160f81b031916908160001a905350806126e381613b70565b91505061267b565b5060005b875181101561275f5787818151811061270a5761270a613ba1565b01602001516001600160f81b031916838361272481613b70565b94508151811061273657612736613ba1565b60200101906001600160f81b031916908160001a9053508061275781613b70565b9150506126ef565b5060005b86518110156127d35786818151811061277e5761277e613ba1565b01602001516001600160f81b031916838361279881613b70565b9450815181106127aa576127aa613ba1565b60200101906001600160f81b031916908160001a905350806127cb81613b70565b915050612763565b5060005b8551811015612847578581815181106127f2576127f2613ba1565b01602001516001600160f81b031916838361280c81613b70565b94508151811061281e5761281e613ba1565b60200101906001600160f81b031916908160001a9053508061283f81613b70565b9150506127d7565b5060005b84518110156128bb5784818151811061286657612866613ba1565b01602001516001600160f81b031916838361288081613b70565b94508151811061289257612892613ba1565b60200101906001600160f81b031916908160001a905350806128b381613b70565b91505061284b565b50909d9c50505050505050505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061290857612908613ba1565b602090810291909101015292915050565b60005b8351811015612423576001600160a01b0386161580159061296a575082818151811061294a5761294a613ba1565b60200260200101516129688786848151811061103d5761103d613ba1565b145b15612aa3576001600160a01b03861660009081526008602052604090208451733a5107297dc01bab0d18a987a47de8befbcf6eed91639ca409ed918790859081106129b7576129b7613ba1565b60200260200101516040518363ffffffff1660e01b81526004016129dc929190613a68565b60006040518083038186803b1580156129f457600080fd5b505af4158015612a08573d6000803e3d6000fd5b5050505060076000858381518110612a2257612a22613ba1565b6020026020010151815260200190815260200160002073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c638c9d1e419091886040518363ffffffff1660e01b8152600401612a72929190613a51565b60006040518083038186803b158015612a8a57600080fd5b505af4158015612a9e573d6000803e3d6000fd5b505050505b6001600160a01b03851615801590612ace5750612acc8585838151811061103d5761103d613ba1565b155b15612c07576001600160a01b03851660009081526008602052604090208451733a5107297dc01bab0d18a987a47de8befbcf6eed916313431abe91879085908110612b1b57612b1b613ba1565b60200260200101516040518363ffffffff1660e01b8152600401612b40929190613a68565b60006040518083038186803b158015612b5857600080fd5b505af4158015612b6c573d6000803e3d6000fd5b5050505060076000858381518110612b8657612b86613ba1565b6020026020010151815260200190815260200160002073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c63989779e99091876040518363ffffffff1660e01b8152600401612bd6929190613a51565b60006040518083038186803b158015612bee57600080fd5b505af4158015612c02573d6000803e3d6000fd5b505050505b6001600160a01b038616612c9757828181518110612c2757612c27613ba1565b602002602001015160096000868481518110612c4557612c45613ba1565b6020026020010151815260200190815260200160002054612c669190613a99565b60096000868481518110612c7c57612c7c613ba1565b60200260200101518152602001908152602001600020819055505b6001600160a01b038516612d2757828181518110612cb757612cb7613ba1565b602002602001015160096000868481518110612cd557612cd5613ba1565b6020026020010151815260200190815260200160002054612cf69190613af2565b60096000868481518110612d0c57612d0c613ba1565b60200260200101518152602001908152602001600020819055505b80612d3181613b70565b91505061291c565b6001600160a01b0384163b156121015760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612d7d908990899088908890889060040161373b565b602060405180830381600087803b158015612d9757600080fd5b505af1925050508015612dc7575060408051601f3d908101601f19168201909252612dc491810190613503565b60015b612e7457612dd3613bcd565b806308c379a01415612e0d5750612de8613be9565b80612df35750612e0f565b8060405162461bcd60e51b81526004016107129190613872565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610712565b6001600160e01b0319811663f23a6e6160e01b146124235760405162461bcd60e51b815260040161071290613885565b6001600160a01b0384163b156121015760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612ee890899089908890889088906004016136dd565b602060405180830381600087803b158015612f0257600080fd5b505af1925050508015612f32575060408051601f3d908101601f19168201909252612f2f91810190613503565b60015b612f3e57612dd3613bcd565b6001600160e01b0319811663bc197c8160e01b146124235760405162461bcd60e51b815260040161071290613885565b828054612f7a90613b09565b90600052602060002090601f016020900481019282612f9c5760008555612fe2565b82601f10612fb557805160ff1916838001178555612fe2565b82800160010185558215612fe2579182015b82811115612fe2578251825591602001919060010190612fc7565b50612fee929150612ff2565b5090565b5b80821115612fee5760008155600101612ff3565b600082601f83011261301857600080fd5b8135602061302582613a76565b6040516130328282613b44565b8381528281019150858301600585901b8701840188101561305257600080fd5b60005b8581101561307157813584529284019290840190600101613055565b5090979650505050505050565b600082601f83011261308f57600080fd5b81356001600160401b038111156130a8576130a8613bb7565b6040516130bf601f8301601f191660200182613b44565b8181528460208386010111156130d457600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561310357600080fd5b813561164181613c72565b60006020828403121561312057600080fd5b815161164181613c72565b6000806040838503121561313e57600080fd5b823561314981613c72565b9150602083013561315981613c72565b809150509250929050565b600080600080600060a0868803121561317c57600080fd5b853561318781613c72565b9450602086013561319781613c72565b935060408601356001600160401b03808211156131b357600080fd5b6131bf89838a01613007565b945060608801359150808211156131d557600080fd5b6131e189838a01613007565b935060808801359150808211156131f757600080fd5b506132048882890161307e565b9150509295509295909350565b600080600080600060a0868803121561322957600080fd5b853561323481613c72565b9450602086013561324481613c72565b9350604086013592506060860135915060808601356001600160401b0381111561326d57600080fd5b6132048882890161307e565b600080600080600080600060c0888a03121561329457600080fd5b873561329f81613c72565b965060208801356132af81613c72565b955060408801359450606088013593506080880135925060a08801356001600160401b03808211156132e057600080fd5b818a0191508a601f8301126132f457600080fd5b81358181111561330357600080fd5b8b602082850101111561331557600080fd5b60208301945080935050505092959891949750929550565b6000806040838503121561334057600080fd5b823561334b81613c72565b9150602083013561315981613c87565b6000806040838503121561336e57600080fd5b823561337981613c72565b946020939093013593505050565b60008060006060848603121561339c57600080fd5b83356133a781613c72565b95602085013595506040909401359392505050565b600080600080608085870312156133d257600080fd5b84356133dd81613c72565b966020860135965060408601359560600135945092505050565b6000806040838503121561340a57600080fd5b82356001600160401b038082111561342157600080fd5b818501915085601f83011261343557600080fd5b8135602061344282613a76565b60405161344f8282613b44565b8381528281019150858301600585901b870184018b101561346f57600080fd5b600096505b8487101561349b57803561348781613c72565b835260019690960195918301918301613474565b50965050860135925050808211156134b257600080fd5b506134bf85828601613007565b9150509250929050565b6000602082840312156134db57600080fd5b815161164181613c87565b6000602082840312156134f857600080fd5b813561164181613c95565b60006020828403121561351557600080fd5b815161164181613c95565b60006020828403121561353257600080fd5b81356001600160401b0381111561354857600080fd5b6109678482850161307e565b60006020828403121561356657600080fd5b5035919050565b60006020828403121561357f57600080fd5b5051919050565b6000806040838503121561359957600080fd5b82359150602083013561315981613c72565b6000806000606084860312156135c057600080fd5b8335925060208401356135d281613c72565b929592945050506040919091013590565b600080604083850312156135f657600080fd5b8235915060208301356001600160401b0381111561361357600080fd5b6134bf8582860161307e565b6000806040838503121561363257600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561367157815187529582019590820190600101613655565b509495945050505050565b6000815180845260005b818110156136a257602081850181015186830182015201613686565b818111156136b4576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061370990830186613641565b828103606084015261371b8186613641565b9050828103608084015261372f818561367c565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906137759083018461367c565b979650505050505050565b6001600160a01b0388811682528716602082015260408101869052606081018590526080810184905260c060a0820181905281018290526000828460e0840137600060e0848401015260e0601f19601f850116830101905098975050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138255783516001600160a01b031683529284019291840191600101613800565b50909695505050505050565b6020815260006116416020830184613641565b6040815260006138576040830185613641565b82810360208401526138698185613641565b95945050505050565b602081526000611641602083018461367c565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b602080825260129082015271596f75207368616c6c206e6f74207061737360701b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252601e908201527f4f6e6c7920746865206f776e65722063616e2073657420746865205552490000604082015260600190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74206120636f604082015267373a3937b63632b960c11b606082015260800190565b6020808252602a908201527f4f6e6c7920746865206f776e65722063616e206d6f646966792074686520726f60408201526979616c7479206665657360b01b606082015260800190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b60006001600160401b03821115613a8f57613a8f613bb7565b5060051b60200190565b60008219821115613aac57613aac613b8b565b500190565b600082613ace57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613aed57613aed613b8b565b500290565b600082821015613b0457613b04613b8b565b500390565b600181811c90821680613b1d57607f821691505b60208210811415613b3e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b0381118282101715613b6957613b69613bb7565b6040525050565b6000600019821415613b8457613b84613b8b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115613be65760046000803e5060005160e01c5b90565b600060443d1015613bf75790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715613c2657505050505090565b8285019150815181811115613c3e5750505050505090565b843d8701016020828501011115613c585750505050505090565b613c6760208286010187613b44565b509095945050505050565b6001600160a01b03811681146107fb57600080fd5b80151581146107fb57600080fd5b6001600160e01b0319811681146107fb57600080fdfec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a2646970667358221220eef38ae91a242e657d76b93dd9805b223bfb512d1c39227e2f666a38360b8fc964736f6c63430008060033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061022f5760003560e01c8062fdd58e1461023457806301ffc9a71461025a57806302fe53051461027d578063051a2664146102925780630e89341c146102b2578063148d6d85146102c5578063156e29f6146102d857806323b11d8d146102eb57806324ed0b9f146102fe57806326fc02091461031157806329507f7314610347578063297103881461035a57806329779ee91461036d5780632a55205a146103805780632eb2c2d6146103b25780632ec37933146103c5578063351e093c146103f45780634048d909146104075780634e1273f41461043357806352f7c98814610453578063602b1b16146104665780636663b4a414610479578063672cb1a81461049957806375cfbe6c146104cb578063782f08ae146104de5780637db3c828146104f157806399c95d0514610504578063a22cb46514610517578063a307a4e31461052a578063a584ab291461053d578063a7f80cb41461055d578063a7fc7a0714610570578063a92f2bdb14610583578063ae1e4df114610596578063b1ab9317146105a9578063b429afeb146105bc578063be116c3b146105cf578063bfe7418c146105e2578063c4d66de8146105ea578063c5b8f772146105fd578063dbedf57314610610578063e1c28bef14610623578063e985e9c51461062b578063f03594a01461063e578063f242432a14610651578063f3c4a41414610664578063f5298aca14610677578063fcee45f41461068a575b600080fd5b61024761024236600461335b565b6106aa565b6040519081526020015b60405180910390f35b61026d6102683660046134e6565b610746565b6040519015158152602001610251565b61029061028b366004613520565b6107f2565b005b6102a56102a0366004613554565b6107fe565b6040516102519190613872565b6102a56102c0366004613554565b6108a0565b6102906102d33660046133bc565b610a17565b6102906102e6366004613387565b610a88565b6102906102f93660046130f1565b610ae2565b61029061030c3660046135e3565b610b4f565b61033a61031f366004613554565b6000908152600d60205260409020546001600160a01b031690565b60405161025191906136c9565b610290610355366004613586565b610ba8565b61026d6103683660046130f1565b610c72565b61029061037b36600461361f565b610cff565b61039361038e36600461361f565b610db8565b604080516001600160a01b039093168352602083019190915201610251565b6102906103c0366004613164565b610ea9565b6102906103d33660046130f1565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6102a5610402366004613554565b610f39565b61026d6104153660046130f1565b6001600160a01b031660009081526004602052604090205460ff1690565b6104466104413660046133f7565b610f56565b6040516102519190613831565b61029061046136600461361f565b61107f565b610290610474366004613520565b61110c565b610247610487366004613554565b60009081526009602052604090205490565b6102906104a73660046130f1565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6102a56104d9366004613554565b61115e565b6102906104ec3660046135e3565b61117b565b6102906104ff3660046135ab565b611224565b6102a5610512366004613554565b611282565b61029061052536600461332d565b61128d565b6102906105383660046130f1565b611364565b61055061054b366004613554565b6113d9565b60405161025191906137e4565b61029061056b3660046130f1565b611447565b61029061057e3660046130f1565b6114c4565b6102906105913660046135e3565b611502565b61026d6105a4366004613586565b6115ab565b6104466105b73660046130f1565b611648565b61026d6105ca3660046130f1565b6116b6565b6102906105dd3660046130f1565b6116c1565b6102476116fb565b6102906105f83660046130f1565b611786565b61026d61060b36600461335b565b61185a565b61029061061e3660046135e3565b6118aa565b610290611903565b61026d61063936600461312b565b61194b565b61029061064c366004613279565b61198f565b61029061065f366004613211565b611b12565b61033a610672366004613554565b611b99565b610290610685366004613387565b611c26565b610247610698366004613554565b6000908152600e602052604090205490565b60006001600160a01b03831661071b5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526001602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216630781aca560e51b148061077757506001600160e01b031982166301735cdb60e31b145b8061079257506001600160e01b03198216637413646560e01b145b806107ad57506001600160e01b03198216631998ed2960e21b145b806107c857506001600160e01b03198216636cdb3d1360e11b145b806107e357506001600160e01b031982166303a24d0760e21b145b80610740575061074082611c6b565b6107fb816107f2565b50565b600081815260166020526040902080546060919061081b90613b09565b80601f016020809104026020016040519081016040528092919081815260200182805461084790613b09565b80156108945780601f1061086957610100808354040283529160200191610894565b820191906000526020600020905b81548152906001019060200180831161087757829003601f168201915b50505050509050919050565b606060006108ad83611c90565b6000848152601360205260408120805492935090916108cb90613b09565b80601f01602080910402602001604051908101604052809291908181526020018280546108f790613b09565b80156109445780601f1061091957610100808354040283529160200191610944565b820191906000526020600020905b81548152906001019060200180831161092757829003601f168201915b5050505050905060008151111561096f576109678161096286611cba565b611db3565b949350505050565b815115610983576109678261096286611cba565b6003805461099090613b09565b80601f01602080910402602001604051908101604052809291908181526020018280546109bc90613b09565b8015610a095780601f106109de57610100808354040283529160200191610a09565b820191906000526020600020905b8154815290600101906020018083116109ec57829003601f168201915b505050505092505050919050565b610a2033611def565b80610a3557506012546001600160a01b031633145b610a515760405162461bcd60e51b8152600401610712906138cd565b610a6c84848460405180602001604052806000815250611e0d565b610a8283826000908152600c6020526040902055565b50505050565b610a9133611def565b80610aa657506012546001600160a01b031633145b610ac25760405162461bcd60e51b8152600401610712906138cd565b610add83838360405180602001604052806000815250611e0d565b505050565b60405163989779e960e01b815273ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063989779e990610b1c906005908590600401613a51565b60006040518083038186803b158015610b3457600080fd5b505af4158015610b48573d6000803e3d6000fd5b5050505050565b610b5833611def565b80610b6d57506012546001600160a01b031633145b610b895760405162461bcd60e51b8152600401610712906138cd565b60008281526016602090815260409091208251610add92840190612f6e565b6000828152600d602052604090205482906001600160a01b03163314610be05760405162461bcd60e51b815260040161071290613a07565b8215801590610bf757506001600160a01b03821615155b610c435760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420746f6b656e206964206f72206e6577206f776e65720000006044820152606401610712565b506000918252600d602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b60405163a8a37bd360e01b815260009073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063a8a37bd390610caf906005908690600401613a51565b60206040518083038186803b158015610cc757600080fd5b505af4158015610cdb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074091906134c9565b610d0833611def565b80610d1d57506012546001600160a01b031633145b610d395760405162461bcd60e51b8152600401610712906138cd565b6000828152600b60205260409020546001600160a01b03161580610d7357506000828152600b60205260409020546001600160a01b031633145b80610d825750610d8233611def565b610d9e5760405162461bcd60e51b81526004016107129061393e565b610db482826000908152600c6020526040902055565b5050565b60008060008311610e155760405162461bcd60e51b815260206004820152602160248201527f53616c65207072696365206d7573742062652067726561746572207468616e206044820152600360fc1b6064820152608401610712565b60008411610e5e5760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881259081b5d5cdd081899481d985b1a5960521b6044820152606401610712565b6000848152600d6020908152604080832054600e909252909120546001600160a01b0390911692508390610e9690620f424090613ab1565b610ea09190613ad3565b90509250929050565b6001600160a01b038516331480610ec55750610ec5853361194b565b610f2c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610712565b610b488585858585611f1b565b6000818152600a6020526040902080546060919061081b90613b09565b60608151835114610fbb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610712565b600083516001600160401b03811115610fd657610fd6613bb7565b604051908082528060200260200182016040528015610fff578160200160208202803683370190505b50905060005b84518110156110775761104a85828151811061102357611023613ba1565b602002602001015185838151811061103d5761103d613ba1565b60200260200101516106aa565b82828151811061105c5761105c613ba1565b602090810291909101015261107081613b70565b9050611005565b509392505050565b6000828152600d602052604090205482906001600160a01b031633146110b75760405162461bcd60e51b815260040161071290613a07565b826110f95760405162461bcd60e51b81526020600482015260126024820152714665652063616e6e6f74206265207a65726f60701b6044820152606401610712565b506000918252600e602052604090912055565b8051156111555760405162461bcd60e51b815260206004820152601760248201527615549248185b1c9958591e481a5b9a5d1a585b1a5e9959604a1b6044820152606401610712565b6107fb81612109565b600081815260156020526040902080546060919061081b90613b09565b61118433611def565b8061119957506012546001600160a01b031633145b6111b55760405162461bcd60e51b8152600401610712906138cd565b6000828152601460205260409020546001600160a01b031615806111ef57506000828152601460205260409020546001600160a01b031633145b806111fe57506111fe33611def565b61121a5760405162461bcd60e51b81526004016107129061393e565b610db4828261211c565b61122d33611def565b6112495760405162461bcd60e51b8152600401610712906138cd565b6000928352600d6020908152604080852080546001600160a01b0319166001600160a01b039590951694909417909355600e9052912055565b606061074082611c90565b336001600160a01b03831614156112f85760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610712565b3360008181526002602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6012546001600160a01b031633146113d05760405162461bcd60e51b815260206004820152602960248201527f6f6e6c79206d6173746572206d696e7465722063616e2061646420646972656360448201526874206d696e7465727360b81b6064820152608401610712565b6107fb8161215d565b60008181526007602090815260409182902060010180548351818402810184019094528084526060939283018282801561089457602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161141e5750505050509050919050565b6012546001600160a01b0316156114a05760405162461bcd60e51b815260206004820152601d60248201527f6d6173746572206d696e746572206d757374206e6f74206265207365740000006044820152606401610712565b601280546001600160a01b0319166001600160a01b0383161790556107fb8161215d565b3360009081526011602052604090205460ff161515600114806114e657503033145b6113d05760405162461bcd60e51b8152600401610712906139bf565b61150b33611def565b8061152057506012546001600160a01b031633145b61153c5760405162461bcd60e51b8152600401610712906138cd565b6000828152600b60205260409020546001600160a01b0316158061157657506000828152600b60205260409020546001600160a01b031633145b80611585575061158533611def565b6115a15760405162461bcd60e51b81526004016107129061393e565b610db48282612181565b600082815260076020526040808220905163a8a37bd360e01b815273ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9163a8a37bd3916115f191908690600401613a51565b60206040518083038186803b15801561160957600080fd5b505af415801561161d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164191906134c9565b9392505050565b6001600160a01b03811660009081526008602090815260409182902060010180548351818402810184019094528084526060939283018282801561089457602002820191906000526020600020905b8154815260200190600101908083116116975750505050509050919050565b600061074082611def565b604051638c9d1e4160e01b815273ae09d7b704281cf10e7bb1776b68fca3d8c94e7c90638c9d1e4190610b1c906005908590600401613a51565b60405163300f372b60e11b81526005600482015260009073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063601e6e569060240160206040518083038186803b15801561174957600080fd5b505af415801561175d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611781919061356d565b905090565b600054610100900460ff166117a15760005460ff16156117a5565b303b155b6118085760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610712565b600054610100900460ff1615801561182a576000805461ffff19166101011790555b601080546001600160a01b0319166001600160a01b0384161790558015610db4576000805461ff00191690555050565b6001600160a01b0382166000908152600860205260408082209051631bf945d160e21b8152733a5107297dc01bab0d18a987a47de8befbcf6eed91636fe51744916115f191908690600401613a68565b6118b333611def565b806118c857506012546001600160a01b031633145b6118e45760405162461bcd60e51b8152600401610712906138cd565b60008281526015602090815260409091208251610add92840190612f6e565b3360009081526011602052604090205460ff1615156001148061192557503033145b6119415760405162461bcd60e51b8152600401610712906139bf565b6119496121c2565b565b6000806119588484612219565b9050808061096757506001600160a01b0380851660009081526002602090815260408083209387168352929052205460ff16610967565b60105460408051633e10510b60e01b81526004810191909152600a60448201526926bab63a34aa37b5b2b760b11b606482015260806024820152600d60848201526c4e6574776f726b42726964676560981b60a48201526000916001600160a01b031690633e10510b9060c40160206040518083038186803b158015611a1457600080fd5b505afa158015611a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4c919061310e565b90506001600160a01b038116611a9e5760405162461bcd60e51b8152602060048201526017602482015276139bc81b995d1ddbdc9ac8189c9a5919d948199bdd5b99604a1b6044820152606401610712565b604051630781aca560e51b81526001600160a01b0382169063f03594a090611ad6908b908b908b908b908b908b908b90600401613780565b600060405180830381600087803b158015611af057600080fd5b505af1158015611b04573d6000803e3d6000fd5b505050505050505050505050565b6001600160a01b038516331480611b2e5750611b2e853361194b565b611b8c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610712565b610b488585858585612311565b604051636f911ea160e11b815260009073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c9063df223d4290611bd6906005908690600401613a68565b60206040518083038186803b158015611bee57600080fd5b505af4158015611c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610740919061310e565b611c2f33611def565b80611c4457506012546001600160a01b031633145b611c605760405162461bcd60e51b8152600401610712906138cd565b610add83838361242c565b60006001600160e01b0319821663152a902d60e11b148061074057506107408261259a565b6000818152600c60209081526040808320548352600a909152902080546060919061081b90613b09565b606081611cde5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611d085780611cf281613b70565b9150611d019050600a83613ab1565b9150611ce2565b6000816001600160401b03811115611d2257611d22613bb7565b6040519080825280601f01601f191660200182016040528015611d4c576020820181803683370190505b5090506000611d5c600184613af2565b90505b8515611daa57600a860660300160f81b82828060019003935081518110611d8857611d88613ba1565b60200101906001600160f81b031916908160001a905350600a86049550611d5f565b50949350505050565b606061164183836040518060200160405280600081525060405180602001604052806000815250604051806020016040528060008152506125ea565b6001600160a01b031660009081526011602052604090205460ff1690565b6001600160a01b038416611e6d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610712565b33611e8d81600087611e7e886128ce565b611e87886128ce565b87612919565b60008481526001602090815260408083206001600160a01b038916845290915281208054859290611ebf908490613a99565b92505081905550846001600160a01b031660006001600160a01b0316826001600160a01b0316600080516020613cac8339815191528787604051611f04929190613a68565b60405180910390a4610b4881600087878787612d39565b8151835114611f7d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610712565b6001600160a01b038416611fa35760405162461bcd60e51b8152600401610712906138f9565b33611fb2818787878787612919565b60005b845181101561209b576000858281518110611fd257611fd2613ba1565b602002602001015190506000858381518110611ff057611ff0613ba1565b60209081029190910181015160008481526001835260408082206001600160a01b038e1683529093529190912054909150818110156120415760405162461bcd60e51b815260040161071290613975565b60008381526001602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612080908490613a99565b925050819055505050508061209490613b70565b9050611fb5565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516120eb929190613844565b60405180910390a4612101818787878787612ea4565b505050505050565b8051610db4906003906020840190612f6e565b6000828152601360209081526040909120825161213b92840190612f6e565b5050600090815260146020526040902080546001600160a01b03191633179055565b6001600160a01b03166000908152601160205260409020805460ff19166001179055565b6000828152600a6020908152604090912082516121a092840190612f6e565b50506000908152600b6020526040902080546001600160a01b03191633179055565b3360009081526011602052604090205460ff161515600114806121e457503033145b6122005760405162461bcd60e51b8152600401610712906139bf565b336000908152601160205260409020805460ff19169055565b6000805b6006548110156123075760006005600101828154811061223f5761223f613ba1565b60009182526020909120015460405163c455279160e01b81526001600160a01b039091169150819063c45527919061227b9088906004016136c9565b60206040518083038186803b15801561229357600080fd5b505afa9250505080156122c3575060408051601f3d908101601f191682019092526122c09181019061310e565b60015b6122cc576122f4565b846001600160a01b0316816001600160a01b031614156122f25760019350505050610740565b505b50806122ff81613b70565b91505061221d565b5060009392505050565b6001600160a01b0384166123375760405162461bcd60e51b8152600401610712906138f9565b33612347818787611e7e886128ce565b60008481526001602090815260408083206001600160a01b038a1684529091529020548381101561238a5760405162461bcd60e51b815260040161071290613975565b60008581526001602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906123c9908490613a99565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b0316600080516020613cac833981519152888860405161240d929190613a68565b60405180910390a4612423828888888888612d39565b50505050505050565b6001600160a01b03831661248e5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610712565b336124bd8185600061249f876128ce565b6124a8876128ce565b60405180602001604052806000815250612919565b60008381526001602090815260408083206001600160a01b03881684529091529020548281101561253c5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610712565b60008481526001602090815260408083206001600160a01b03808a1680865291909352818420878603905590519091851690600080516020613cac8339815191529061258b9089908990613a68565b60405180910390a45050505050565b60006001600160e01b03198216636cdb3d1360e11b14806125cb57506001600160e01b031982166303a24d0760e21b145b8061074057506301ffc9a760e01b6001600160e01b0319831614610740565b805182518451865188516060948a948a948a948a948a946000949093909290916126149190613a99565b61261e9190613a99565b6126289190613a99565b6126329190613a99565b6001600160401b0381111561264957612649613bb7565b6040519080825280601f01601f191660200182016040528015612673576020820181803683370190505b509050806000805b88518110156126eb5788818151811061269657612696613ba1565b01602001516001600160f81b03191683836126b081613b70565b9450815181106126c2576126c2613ba1565b60200101906001600160f81b031916908160001a905350806126e381613b70565b91505061267b565b5060005b875181101561275f5787818151811061270a5761270a613ba1565b01602001516001600160f81b031916838361272481613b70565b94508151811061273657612736613ba1565b60200101906001600160f81b031916908160001a9053508061275781613b70565b9150506126ef565b5060005b86518110156127d35786818151811061277e5761277e613ba1565b01602001516001600160f81b031916838361279881613b70565b9450815181106127aa576127aa613ba1565b60200101906001600160f81b031916908160001a905350806127cb81613b70565b915050612763565b5060005b8551811015612847578581815181106127f2576127f2613ba1565b01602001516001600160f81b031916838361280c81613b70565b94508151811061281e5761281e613ba1565b60200101906001600160f81b031916908160001a9053508061283f81613b70565b9150506127d7565b5060005b84518110156128bb5784818151811061286657612866613ba1565b01602001516001600160f81b031916838361288081613b70565b94508151811061289257612892613ba1565b60200101906001600160f81b031916908160001a905350806128b381613b70565b91505061284b565b50909d9c50505050505050505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061290857612908613ba1565b602090810291909101015292915050565b60005b8351811015612423576001600160a01b0386161580159061296a575082818151811061294a5761294a613ba1565b60200260200101516129688786848151811061103d5761103d613ba1565b145b15612aa3576001600160a01b03861660009081526008602052604090208451733a5107297dc01bab0d18a987a47de8befbcf6eed91639ca409ed918790859081106129b7576129b7613ba1565b60200260200101516040518363ffffffff1660e01b81526004016129dc929190613a68565b60006040518083038186803b1580156129f457600080fd5b505af4158015612a08573d6000803e3d6000fd5b5050505060076000858381518110612a2257612a22613ba1565b6020026020010151815260200190815260200160002073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c638c9d1e419091886040518363ffffffff1660e01b8152600401612a72929190613a51565b60006040518083038186803b158015612a8a57600080fd5b505af4158015612a9e573d6000803e3d6000fd5b505050505b6001600160a01b03851615801590612ace5750612acc8585838151811061103d5761103d613ba1565b155b15612c07576001600160a01b03851660009081526008602052604090208451733a5107297dc01bab0d18a987a47de8befbcf6eed916313431abe91879085908110612b1b57612b1b613ba1565b60200260200101516040518363ffffffff1660e01b8152600401612b40929190613a68565b60006040518083038186803b158015612b5857600080fd5b505af4158015612b6c573d6000803e3d6000fd5b5050505060076000858381518110612b8657612b86613ba1565b6020026020010151815260200190815260200160002073ae09d7b704281cf10e7bb1776b68fca3d8c94e7c63989779e99091876040518363ffffffff1660e01b8152600401612bd6929190613a51565b60006040518083038186803b158015612bee57600080fd5b505af4158015612c02573d6000803e3d6000fd5b505050505b6001600160a01b038616612c9757828181518110612c2757612c27613ba1565b602002602001015160096000868481518110612c4557612c45613ba1565b6020026020010151815260200190815260200160002054612c669190613a99565b60096000868481518110612c7c57612c7c613ba1565b60200260200101518152602001908152602001600020819055505b6001600160a01b038516612d2757828181518110612cb757612cb7613ba1565b602002602001015160096000868481518110612cd557612cd5613ba1565b6020026020010151815260200190815260200160002054612cf69190613af2565b60096000868481518110612d0c57612d0c613ba1565b60200260200101518152602001908152602001600020819055505b80612d3181613b70565b91505061291c565b6001600160a01b0384163b156121015760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612d7d908990899088908890889060040161373b565b602060405180830381600087803b158015612d9757600080fd5b505af1925050508015612dc7575060408051601f3d908101601f19168201909252612dc491810190613503565b60015b612e7457612dd3613bcd565b806308c379a01415612e0d5750612de8613be9565b80612df35750612e0f565b8060405162461bcd60e51b81526004016107129190613872565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610712565b6001600160e01b0319811663f23a6e6160e01b146124235760405162461bcd60e51b815260040161071290613885565b6001600160a01b0384163b156121015760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190612ee890899089908890889088906004016136dd565b602060405180830381600087803b158015612f0257600080fd5b505af1925050508015612f32575060408051601f3d908101601f19168201909252612f2f91810190613503565b60015b612f3e57612dd3613bcd565b6001600160e01b0319811663bc197c8160e01b146124235760405162461bcd60e51b815260040161071290613885565b828054612f7a90613b09565b90600052602060002090601f016020900481019282612f9c5760008555612fe2565b82601f10612fb557805160ff1916838001178555612fe2565b82800160010185558215612fe2579182015b82811115612fe2578251825591602001919060010190612fc7565b50612fee929150612ff2565b5090565b5b80821115612fee5760008155600101612ff3565b600082601f83011261301857600080fd5b8135602061302582613a76565b6040516130328282613b44565b8381528281019150858301600585901b8701840188101561305257600080fd5b60005b8581101561307157813584529284019290840190600101613055565b5090979650505050505050565b600082601f83011261308f57600080fd5b81356001600160401b038111156130a8576130a8613bb7565b6040516130bf601f8301601f191660200182613b44565b8181528460208386010111156130d457600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561310357600080fd5b813561164181613c72565b60006020828403121561312057600080fd5b815161164181613c72565b6000806040838503121561313e57600080fd5b823561314981613c72565b9150602083013561315981613c72565b809150509250929050565b600080600080600060a0868803121561317c57600080fd5b853561318781613c72565b9450602086013561319781613c72565b935060408601356001600160401b03808211156131b357600080fd5b6131bf89838a01613007565b945060608801359150808211156131d557600080fd5b6131e189838a01613007565b935060808801359150808211156131f757600080fd5b506132048882890161307e565b9150509295509295909350565b600080600080600060a0868803121561322957600080fd5b853561323481613c72565b9450602086013561324481613c72565b9350604086013592506060860135915060808601356001600160401b0381111561326d57600080fd5b6132048882890161307e565b600080600080600080600060c0888a03121561329457600080fd5b873561329f81613c72565b965060208801356132af81613c72565b955060408801359450606088013593506080880135925060a08801356001600160401b03808211156132e057600080fd5b818a0191508a601f8301126132f457600080fd5b81358181111561330357600080fd5b8b602082850101111561331557600080fd5b60208301945080935050505092959891949750929550565b6000806040838503121561334057600080fd5b823561334b81613c72565b9150602083013561315981613c87565b6000806040838503121561336e57600080fd5b823561337981613c72565b946020939093013593505050565b60008060006060848603121561339c57600080fd5b83356133a781613c72565b95602085013595506040909401359392505050565b600080600080608085870312156133d257600080fd5b84356133dd81613c72565b966020860135965060408601359560600135945092505050565b6000806040838503121561340a57600080fd5b82356001600160401b038082111561342157600080fd5b818501915085601f83011261343557600080fd5b8135602061344282613a76565b60405161344f8282613b44565b8381528281019150858301600585901b870184018b101561346f57600080fd5b600096505b8487101561349b57803561348781613c72565b835260019690960195918301918301613474565b50965050860135925050808211156134b257600080fd5b506134bf85828601613007565b9150509250929050565b6000602082840312156134db57600080fd5b815161164181613c87565b6000602082840312156134f857600080fd5b813561164181613c95565b60006020828403121561351557600080fd5b815161164181613c95565b60006020828403121561353257600080fd5b81356001600160401b0381111561354857600080fd5b6109678482850161307e565b60006020828403121561356657600080fd5b5035919050565b60006020828403121561357f57600080fd5b5051919050565b6000806040838503121561359957600080fd5b82359150602083013561315981613c72565b6000806000606084860312156135c057600080fd5b8335925060208401356135d281613c72565b929592945050506040919091013590565b600080604083850312156135f657600080fd5b8235915060208301356001600160401b0381111561361357600080fd5b6134bf8582860161307e565b6000806040838503121561363257600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561367157815187529582019590820190600101613655565b509495945050505050565b6000815180845260005b818110156136a257602081850181015186830182015201613686565b818111156136b4576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061370990830186613641565b828103606084015261371b8186613641565b9050828103608084015261372f818561367c565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906137759083018461367c565b979650505050505050565b6001600160a01b0388811682528716602082015260408101869052606081018590526080810184905260c060a0820181905281018290526000828460e0840137600060e0848401015260e0601f19601f850116830101905098975050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138255783516001600160a01b031683529284019291840191600101613800565b50909695505050505050565b6020815260006116416020830184613641565b6040815260006138576040830185613641565b82810360208401526138698185613641565b95945050505050565b602081526000611641602083018461367c565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b602080825260129082015271596f75207368616c6c206e6f74207061737360701b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252601e908201527f4f6e6c7920746865206f776e65722063616e2073657420746865205552490000604082015260600190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f436f6e74726f6c6c61626c653a2063616c6c6572206973206e6f74206120636f604082015267373a3937b63632b960c11b606082015260800190565b6020808252602a908201527f4f6e6c7920746865206f776e65722063616e206d6f646966792074686520726f60408201526979616c7479206665657360b01b606082015260800190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b60006001600160401b03821115613a8f57613a8f613bb7565b5060051b60200190565b60008219821115613aac57613aac613b8b565b500190565b600082613ace57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613aed57613aed613b8b565b500290565b600082821015613b0457613b04613b8b565b500390565b600181811c90821680613b1d57607f821691505b60208210811415613b3e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b0381118282101715613b6957613b69613bb7565b6040525050565b6000600019821415613b8457613b84613b8b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115613be65760046000803e5060005160e01c5b90565b600060443d1015613bf75790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715613c2657505050505090565b8285019150815181811115613c3e5750505050505090565b843d8701016020828501011115613c585750505050505090565b613c6760208286010187613b44565b509095945050505050565b6001600160a01b03811681146107fb57600080fd5b80151581146107fb57600080fd5b6001600160e01b0319811681146107fb57600080fdfec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a2646970667358221220eef38ae91a242e657d76b93dd9805b223bfb512d1c39227e2f666a38360b8fc964736f6c63430008060033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.