ETH Price: $3,260.74 (+0.55%)
Gas: 1 Gwei

Token

DigiColMT (DIGIMT)
 

Overview

Max Total Supply

0 DIGIMT

Holders

53

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
elixd.eth
0x1732fdc4b72083815f181aae616944c8edd82e11
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
MultiToken

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 13 of 15: MultiToken.sol
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

import "./ERC1155.sol";

/// @title MultiToken
/// @notice ERC1155 token contract with the support of secondary fees.
contract MultiToken is Ownable, SignerRole, ERC1155Base {
    /// @notice Tokens name;
    string public name;
    /// @notice Tokens symbol.
    string public symbol;

    /// @notice The contract constructor.
    /// @param _name - The value for the `name`.
    /// @param _symbol - The value for the `symbol`.
    /// @param signer - The address of the initial signer.
    /// @param contractURI - The URI with contract metadata.
    ///        The metadata should be a JSON object with fields: `id, name, description, image, external_link`.
    ///        If the URI containts `{address}` template in its body, then the template must be substituted with the contract address.
    /// @param tokenURIPrefix - The URI prefix for all the tokens. Usually set to ipfs gateway.
    constructor(string memory _name, string memory _symbol, address signer, string memory contractURI, string memory tokenURIPrefix) ERC1155Base(contractURI, tokenURIPrefix) public {
        name = _name;
        symbol = _symbol;

        _addSigner(signer);
        _registerInterface(bytes4(keccak256('MINT_WITH_ADDRESS')));
    }

    /// @notice This function can be called by the contract owner and it adds an address as a new signer.
    ///         The signer will authorize token minting by signing token ids.
    /// @param account - The address of a new signer.
    function addSigner(address account) public onlyOwner {
        _addSigner(account);
    }

    /// @notice This function can be called by the contract owner and it removes an address from signers pool.
    /// @param account - The address of a signer to remove.
    function removeSigner(address account) public onlyOwner {
        _removeSigner(account);
    }

    /// @notice The function for token minting. It creates a new token.
    ///         Must contain the signature of the format: `sha3(tokenContract.address.toLowerCase() + tokenId)`.
    ///         Where `tokenContract.address` is the address of the contract and tokenId is the id in uint256 hex format.
    ///         0 as uint256 must look like this: `0000000000000000000000000000000000000000000000000000000000000000`.
    ///         The message **must not contain** the standard prefix.
    /// @param id - The id of a new token (`tokenId`).
    /// @param v - v parameter of the ECDSA signature.
    /// @param r - r parameter of the ECDSA signature.
    /// @param s - s parameter of the ECDSA signature.
    /// @param fees - An array of the secondary fees for this token.
    /// @param supply - The supply amount for the token.
    /// @param uri - The URI suffix for the token. The suffix with `tokenURIPrefix` usually complements ipfs link to metadata object.
    ///        The URI must link to JSON object with various fields: `name, description, image, external_url, attributes`.
    ///        Can also contain another various fields.
    function mint(uint256 id, uint8 v, bytes32 r, bytes32 s, Fee[] memory fees, uint256 supply, string memory uri) public {
        require(isSigner(ecrecover(keccak256(abi.encodePacked(this, id)), v, r, s)), "signer should sign tokenId");
        _mint(id, fees, supply, uri);
    }
}

/**
 * @title MultiUserToken
 * @dev Only owner can mint tokens.
 */
contract MultiUserToken is MultiToken {
    /// @notice Token minting event.
    event CreateERC1155_v1(address indexed creator, string name, string symbol);

    /// @notice The contract constructor.
    /// @param name - The value for the `name`.
    /// @param symbol - The value for the `symbol`.
    /// @param contractURI - The URI with contract metadata.
    ///        The metadata should be a JSON object with fields: `id, name, description, image, external_link`.
    ///        If the URI containts `{address}` template in its body, then the template must be substituted with the contract address.
    /// @param tokenURIPrefix - The URI prefix for all the tokens. Usually set to ipfs gateway.
    /// @param signer - The address of the initial signer.
    constructor(string memory name, string memory symbol, string memory contractURI, string memory tokenURIPrefix, address signer) MultiToken(name, symbol, signer, contractURI, tokenURIPrefix) public {
        emit CreateERC1155_v1(msg.sender, name, symbol);
    }

    /// @notice The function for token minting. It creates a new token. Can be called only by the contract owner.
    ///         Must contain the signature of the format: `sha3(tokenContract.address.toLowerCase() + tokenId)`.
    ///         Where `tokenContract.address` is the address of the contract and tokenId is the id in uint256 hex format.
    ///         0 as uint256 must look like this: `0000000000000000000000000000000000000000000000000000000000000000`.
    ///         The message **must not contain** the standard prefix.
    /// @param id - The id of a new token (`tokenId`).
    /// @param v - v parameter of the ECDSA signature.
    /// @param r - r parameter of the ECDSA signature.
    /// @param s - s parameter of the ECDSA signature.
    /// @param fees - An array of the secondary fees for this token.
    /// @param supply - The supply amount for the token.
    /// @param uri - The URI suffix for the token. The suffix with `tokenURIPrefix` usually complements ipfs link to metadata object.
    ///        The URI must link to JSON object with various fields: `name, description, image, external_url, attributes`.
    ///        Can also contain another various fields.
    function mint(uint256 id, uint8 v, bytes32 r, bytes32 s, Fee[] memory fees, uint256 supply, string memory uri) onlyOwner public {
        super.mint(id, v, r, s, fees, supply, uri);
    }
}

File 1 of 15: AbstractSale.sol
pragma solidity ^0.5.0;

import "./libs.sol";
import "./Roles.sol";
import "./ERC165.sol";

/// @title AbstractSale
/// @notice Base contract for `ERC721Sale` and `ERC1155Sale`.
contract AbstractSale is Ownable {
    using UintLibrary for uint256;
    using AddressLibrary for address;
    using StringLibrary for string;
    using SafeMath for uint256;

    bytes4 private constant _INTERFACE_ID_FEES = 0xb7799584;

    /// @notice The amount of buyer's fee. Represented as percents * 100 (100% - 10000. 1% - 100).
    uint public buyerFee = 0;
    /// @notice The address to which all the fees are transfered.
    address payable public beneficiary;

    /* An ECDSA signature. */
    struct Sig {
        /* v parameter */
        uint8 v;
        /* r parameter */
        bytes32 r;
        /* s parameter */
        bytes32 s;
    }

    /// @notice The contract constructor.
    /// @param _beneficiary - The value for `beneficiary`.
    constructor(address payable _beneficiary) public {
        beneficiary = _beneficiary;
    }

    /// @notice Set new buyer fee value. Can only be called by the contract owner.
    ///         Fee value is represented as percents * 100 (100% - 10000. 1% - 100).
    /// @param _buyerFee - New fee value percents times 100 format.
    function setBuyerFee(uint256 _buyerFee) public onlyOwner {
        buyerFee = _buyerFee;
    }

    /// @notice Set new address as fee recipient. Can only be called by the contract owner.
    /// @param _beneficiary - New `beneficiary` address.
    function setBeneficiary(address payable _beneficiary) public onlyOwner {
        beneficiary = _beneficiary;
    }

    function prepareMessage(address token, uint256 tokenId, uint256 price, uint256 fee, uint256 nonce) internal pure returns (string memory) {
        string memory result = string(strConcat(
                bytes(token.toString()),
                bytes(". tokenId: "),
                bytes(tokenId.toString()),
                bytes(". price: "),
                bytes(price.toString()),
                bytes(". nonce: "),
                bytes(nonce.toString())
            ));
        if (fee != 0) {
            return result.append(". fee: ", fee.toString());
        } else {
            return result;
        }
    }

    function strConcat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
        bytes memory resultBytes = new bytes(_ba.length + _bb.length + _bc.length + _bd.length + _be.length + _bf.length + _bg.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) resultBytes[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) resultBytes[k++] = _bb[i];
        for (uint i = 0; i < _bc.length; i++) resultBytes[k++] = _bc[i];
        for (uint i = 0; i < _bd.length; i++) resultBytes[k++] = _bd[i];
        for (uint i = 0; i < _be.length; i++) resultBytes[k++] = _be[i];
        for (uint i = 0; i < _bf.length; i++) resultBytes[k++] = _bf[i];
        for (uint i = 0; i < _bg.length; i++) resultBytes[k++] = _bg[i];
        return resultBytes;
    }

    function transferEther(IERC165 token, uint256 tokenId, address payable owner, uint256 total, uint256 sellerFee) internal {
        uint value = transferFeeToBeneficiary(total, sellerFee);
        if (token.supportsInterface(_INTERFACE_ID_FEES)) {
            HasSecondarySaleFees withFees = HasSecondarySaleFees(address(token));
            address payable[] memory recipients = withFees.getFeeRecipients(tokenId);
            uint[] memory fees = withFees.getFeeBps(tokenId);
            require(fees.length == recipients.length);
            for (uint256 i = 0; i < fees.length; i++) {
                (uint newValue, uint current) = subFee(value, total.mul(fees[i]).div(10000));
                value = newValue;
                recipients[i].transfer(current);
            }
        }
        owner.transfer(value);
    }

    function transferFeeToBeneficiary(uint total, uint sellerFee) internal returns (uint) {
        (uint value, uint sellerFeeValue) = subFee(total, total.mul(sellerFee).div(10000));
        uint buyerFeeValue = total.mul(buyerFee).div(10000);
        uint beneficiaryFee = buyerFeeValue.add(sellerFeeValue);
        if (beneficiaryFee > 0) {
            beneficiary.transfer(beneficiaryFee);
        }
        return value;
    }

    function subFee(uint value, uint fee) internal pure returns (uint newValue, uint realFee) {
        if (value > fee) {
            newValue = value - fee;
            realFee = fee;
        } else {
            newValue = 0;
            realFee = value;
        }
    }
}


File 2 of 15: ERC1155.sol
pragma solidity ^0.5.0;

import "./ERC165.sol";
import "./Roles.sol";
import "./HasTokenURI.sol";

/**
    @title ERC-1155 Multi Token Standard
    @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md
    Note: The ERC-165 identifier for this interface is 0xd9b67a26.
 */
contract IERC1155 is IERC165 {
    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be msg.sender.
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_id` argument MUST be the token type being transferred.
        The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);

    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be msg.sender.
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_ids` argument MUST be the list of tokens being transferred.
        The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);

    /**
        @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absense of an event assumes disabled).
    */
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /**
        @dev MUST emit when the URI is updated for a token ID.
        URIs are defined in RFC 3986.
        The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
    */
    event URI(string _value, uint256 indexed _id);

    /**
        @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
        MUST revert on any other error.
        MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
        After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _id      ID of the token type
        @param _value   Transfer amount
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
    */
    function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external;

    /**
        @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if length of `_ids` is not the same as length of `_values`.
        MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
        MUST revert on any other error.
        MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
        Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
        After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _ids     IDs of each token type (order and length must match _values array)
        @param _values  Transfer amounts per token type (order and length must match _ids array)
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
    */
    function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external;

    /**
        @notice Get the balance of an account's Tokens.
        @param _owner  The address of the token holder
        @param _id     ID of the Token
        @return        The _owner's balance of the Token type requested
     */
    function balanceOf(address _owner, uint256 _id) external view returns (uint256);

    /**
        @notice Get the balance of multiple account/token pairs
        @param _owners The addresses of the token holders
        @param _ids    ID of the Tokens
        @return        The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair)
     */
    function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);

    /**
        @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
        @dev MUST emit the ApprovalForAll event on success.
        @param _operator  Address to add to the set of authorized operators
        @param _approved  True if the operator is approved, false to revoke approval
    */
    function setApprovalForAll(address _operator, bool _approved) external;

    /**
        @notice Queries the approval status of an operator for a given owner.
        @param _owner     The owner of the Tokens
        @param _operator  Address of authorized operator
        @return           True if the operator is approved, false if not
    */
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}
/**
    Note: Simple contract to use as base for const vals
*/
contract CommonConstants {

    bytes4 constant internal ERC1155_ACCEPTED = 0xf23a6e61; // bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))
    bytes4 constant internal ERC1155_BATCH_ACCEPTED = 0xbc197c81; // bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))
}

/**
    Note: The ERC-165 identifier for this interface is 0x4e2312e0.
*/
interface ERC1155TokenReceiver {
    /**
        @notice Handle the receipt of a single ERC1155 token type.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.
        This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61) if it accepts the transfer.
        This function MUST revert if it rejects the transfer.
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @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)"))`
    */
    function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);

    /**
        @notice Handle the receipt of multiple ERC1155 token types.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.
        This function MUST return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81) if it accepts the transfer(s).
        This function MUST revert if it rejects the transfer(s).
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @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)"))`
    */
    function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external returns(bytes4);
}

/**
    Note: The ERC-165 identifier for this interface is 0x0e89341c.
*/
interface IERC1155Metadata_URI {
    /**
        @notice A distinct Uniform Resource Identifier (URI) for a given token.
        @dev URIs are defined in RFC 3986.
        The URI may point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
        @return URI string
    */
    function uri(uint256 _id) external view returns (string memory);
}

/**
    Note: The ERC-165 identifier for this interface is 0x0e89341c.
*/
contract ERC1155Metadata_URI is IERC1155Metadata_URI, HasTokenURI {

    constructor(string memory _tokenURIPrefix) HasTokenURI(_tokenURIPrefix) public {

    }

    function uri(uint256 _id) external view returns (string memory) {
        return _tokenURI(_id);
    }
}

contract ERC1155 is IERC1155, ERC165, CommonConstants
{
    using SafeMath for uint256;
    using Address for address;

    // id => (owner => balance)
    mapping (uint256 => mapping(address => uint256)) internal balances;

    // owner => (operator => approved)
    mapping (address => mapping(address => bool)) internal operatorApproval;

/////////////////////////////////////////// ERC165 //////////////////////////////////////////////

    /*
        bytes4(keccak256("safeTransferFrom(address,address,uint256,uint256,bytes)")) ^
        bytes4(keccak256("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)")) ^
        bytes4(keccak256("balanceOf(address,uint256)")) ^
        bytes4(keccak256("balanceOfBatch(address[],uint256[])")) ^
        bytes4(keccak256("setApprovalForAll(address,bool)")) ^
        bytes4(keccak256("isApprovedForAll(address,address)"));
    */
    bytes4 constant private INTERFACE_SIGNATURE_ERC1155 = 0xd9b67a26;

/////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////

    constructor() public {
        _registerInterface(INTERFACE_SIGNATURE_ERC1155);
    }

/////////////////////////////////////////// ERC1155 //////////////////////////////////////////////

    /**
        @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
        MUST revert on any other error.
        MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
        After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _id      ID of the token type
        @param _value   Transfer amount
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
    */
    function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external {

        require(_to != address(0x0), "_to must be non-zero.");
        require(_from == msg.sender || operatorApproval[_from][msg.sender] == true, "Need operator approval for 3rd party transfers.");

        // SafeMath will throw with insuficient funds _from
        // or if _id is not valid (balance will be 0)
        balances[_id][_from] = balances[_id][_from].sub(_value);
        balances[_id][_to]   = _value.add(balances[_id][_to]);

        // MUST emit event
        emit TransferSingle(msg.sender, _from, _to, _id, _value);

        // Now that the balance is updated and the event was emitted,
        // call onERC1155Received if the destination is a contract.
        if (_to.isContract()) {
            _doSafeTransferAcceptanceCheck(msg.sender, _from, _to, _id, _value, _data);
        }
    }

    /**
        @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
        @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
        MUST revert if `_to` is the zero address.
        MUST revert if length of `_ids` is not the same as length of `_values`.
        MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
        MUST revert on any other error.
        MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
        Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
        After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
        @param _from    Source address
        @param _to      Target address
        @param _ids     IDs of each token type (order and length must match _values array)
        @param _values  Transfer amounts per token type (order and length must match _ids array)
        @param _data    Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
    */
    function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external {

        // MUST Throw on errors
        require(_to != address(0x0), "destination address must be non-zero.");
        require(_ids.length == _values.length, "_ids and _values array lenght must match.");
        require(_from == msg.sender || operatorApproval[_from][msg.sender] == true, "Need operator approval for 3rd party transfers.");

        for (uint256 i = 0; i < _ids.length; ++i) {
            uint256 id = _ids[i];
            uint256 value = _values[i];

            // SafeMath will throw with insuficient funds _from
            // or if _id is not valid (balance will be 0)
            balances[id][_from] = balances[id][_from].sub(value);
            balances[id][_to]   = value.add(balances[id][_to]);
        }

        // Note: instead of the below batch versions of event and acceptance check you MAY have emitted a TransferSingle
        // event and a subsequent call to _doSafeTransferAcceptanceCheck in above loop for each balance change instead.
        // Or emitted a TransferSingle event for each in the loop and then the single _doSafeBatchTransferAcceptanceCheck below.
        // However it is implemented the balance changes and events MUST match when a check (i.e. calling an external contract) is done.

        // MUST emit event
        emit TransferBatch(msg.sender, _from, _to, _ids, _values);

        // Now that the balances are updated and the events are emitted,
        // call onERC1155BatchReceived if the destination is a contract.
        if (_to.isContract()) {
            _doSafeBatchTransferAcceptanceCheck(msg.sender, _from, _to, _ids, _values, _data);
        }
    }

    /**
        @notice Get the balance of an account's Tokens.
        @param _owner  The address of the token holder
        @param _id     ID of the Token
        @return        The _owner's balance of the Token type requested
     */
    function balanceOf(address _owner, uint256 _id) external view returns (uint256) {
        // The balance of any account can be calculated from the Transfer events history.
        // However, since we need to keep the balances to validate transfer request,
        // there is no extra cost to also privide a querry function.
        return balances[_id][_owner];
    }


    /**
        @notice Get the balance of multiple account/token pairs
        @param _owners The addresses of the token holders
        @param _ids    ID of the Tokens
        @return        The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair)
     */
    function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory) {

        require(_owners.length == _ids.length);

        uint256[] memory balances_ = new uint256[](_owners.length);

        for (uint256 i = 0; i < _owners.length; ++i) {
            balances_[i] = balances[_ids[i]][_owners[i]];
        }

        return balances_;
    }

    /**
        @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
        @dev MUST emit the ApprovalForAll event on success.
        @param _operator  Address to add to the set of authorized operators
        @param _approved  True if the operator is approved, false to revoke approval
    */
    function setApprovalForAll(address _operator, bool _approved) external {
        operatorApproval[msg.sender][_operator] = _approved;
        emit ApprovalForAll(msg.sender, _operator, _approved);
    }

    /**
        @notice Queries the approval status of an operator for a given owner.
        @param _owner     The owner of the Tokens
        @param _operator  Address of authorized operator
        @return           True if the operator is approved, false if not
    */
    function isApprovedForAll(address _owner, address _operator) external view returns (bool) {
        return operatorApproval[_owner][_operator];
    }

/////////////////////////////////////////// Internal //////////////////////////////////////////////

    function _doSafeTransferAcceptanceCheck(address _operator, address _from, address _to, uint256 _id, uint256 _value, bytes memory _data) internal {

        // If this was a hybrid standards solution you would have to check ERC165(_to).supportsInterface(0x4e2312e0) here but as this is a pure implementation of an ERC-1155 token set as recommended by
        // the standard, it is not necessary. The below should revert in all failure cases i.e. _to isn't a receiver, or it is and either returns an unknown value or it reverts in the call to indicate non-acceptance.


        // Note: if the below reverts in the onERC1155Received function of the _to address you will have an undefined revert reason returned rather than the one in the require test.
        // If you want predictable revert reasons consider using low level _to.call() style instead so the revert does not bubble up and you can revert yourself on the ERC1155_ACCEPTED test.
        require(ERC1155TokenReceiver(_to).onERC1155Received(_operator, _from, _id, _value, _data) == ERC1155_ACCEPTED, "contract returned an unknown value from onERC1155Received");
    }

    function _doSafeBatchTransferAcceptanceCheck(address _operator, address _from, address _to, uint256[] memory _ids, uint256[] memory _values, bytes memory _data) internal {

        // If this was a hybrid standards solution you would have to check ERC165(_to).supportsInterface(0x4e2312e0) here but as this is a pure implementation of an ERC-1155 token set as recommended by
        // the standard, it is not necessary. The below should revert in all failure cases i.e. _to isn't a receiver, or it is and either returns an unknown value or it reverts in the call to indicate non-acceptance.

        // Note: if the below reverts in the onERC1155BatchReceived function of the _to address you will have an undefined revert reason returned rather than the one in the require test.
        // If you want predictable revert reasons consider using low level _to.call() style instead so the revert does not bubble up and you can revert yourself on the ERC1155_BATCH_ACCEPTED test.
        require(ERC1155TokenReceiver(_to).onERC1155BatchReceived(_operator, _from, _ids, _values, _data) == ERC1155_BATCH_ACCEPTED, "contract returned an unknown value from onERC1155BatchReceived");
    }
}

contract ERC1155Base is HasSecondarySaleFees, Ownable, ERC1155Metadata_URI, HasContractURI, ERC1155 {

    struct Fee {
        address payable recipient;
        uint256 value;
    }

    /// @notice id => creator
    mapping (uint256 => address) public creators;
    /// @notice id => fees
    mapping (uint256 => Fee[]) public fees;

    constructor(string memory contractURI, string memory tokenURIPrefix) HasContractURI(contractURI) ERC1155Metadata_URI(tokenURIPrefix) public {

    }

    /**
        @notice     Get the secondary fee recipients of the token.
        @param id - The id of the token.
        @return     An array of fee recipient addresses.
    */
    function getFeeRecipients(uint256 id) public view returns (address payable[] memory) {
        Fee[] memory _fees = fees[id];
        address payable[] memory result = new address payable[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            result[i] = _fees[i].recipient;
        }
        return result;
    }

    /**
        @notice     Get the secondary fee amounts of the token.
        @param id - The id of the token.
        @return     An array of fee amount values.
    */
    function getFeeBps(uint256 id) public view returns (uint[] memory) {
        Fee[] memory _fees = fees[id];
        uint[] memory result = new uint[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            result[i] = _fees[i].value;
        }
        return result;
    }

    /// @notice Creates a new token type and assings _initialSupply to minter
    function _mint(uint256 _id, Fee[] memory _fees, uint256 _supply, string memory _uri) internal {
        require(creators[_id] == address(0x0), "Token is already minted");
        require(_supply != 0, "Supply should be positive");
        require(bytes(_uri).length > 0, "uri should be set");

        creators[_id] = msg.sender;
        address[] memory recipients = new address[](_fees.length);
        uint[] memory bps = new uint[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            require(_fees[i].recipient != address(0x0), "Recipient should be present");
            require(_fees[i].value != 0, "Fee value should be positive");
            fees[_id].push(_fees[i]);
            recipients[i] = _fees[i].recipient;
            bps[i] = _fees[i].value;
        }
        if (_fees.length > 0) {
            emit SecondarySaleFees(_id, recipients, bps);
        }
        balances[_id][msg.sender] = _supply;
        _setTokenURI(_id, _uri);

        // Transfer event with mint semantic
        emit TransferSingle(msg.sender, address(0x0), msg.sender, _id, _supply);
        emit URI(_uri, _id);
    }

    /// @notice Burns the token.
    function burn(address _owner, uint256 _id, uint256 _value) external {

        require(_owner == msg.sender || operatorApproval[_owner][msg.sender] == true, "Need operator approval for 3rd party burns.");

        // SafeMath will throw with insuficient funds _owner
        // or if _id is not valid (balance will be 0)
        balances[_id][_owner] = balances[_id][_owner].sub(_value);

        // MUST emit event
        emit TransferSingle(msg.sender, _owner, address(0x0), _id, _value);
    }

    /**
     * @dev Internal function to set the token URI for a given token.
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to set its URI
     * @param uri string URI to assign
     */
    function _setTokenURI(uint256 tokenId, string memory uri) internal {
        require(creators[tokenId] != address(0x0), "_setTokenURI: Token should exist");
        super._setTokenURI(tokenId, uri);
    }

    /// @notice Sets the URI prefix for all tokens.
    function setTokenURIPrefix(string memory tokenURIPrefix) public onlyOwner {
        _setTokenURIPrefix(tokenURIPrefix);
    }

    /// @notice Sets the URI of the contract metadata.
    function setContractURI(string memory contractURI) public onlyOwner {
        _setContractURI(contractURI);
    }
}


File 3 of 15: ERC1155Sale.sol
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

import "./Roles.sol";
import "./ERC1155.sol";
import "./AbstractSale.sol";
import "./TransferProxy.sol";

/// @title ERC1155SaleNonceHolder
/// @notice The contract manages nonce values for the sales.
contract ERC1155SaleNonceHolder is OwnableOperatorRole {
    /// @notice Token nonces.
    /// @dev keccak256(token, owner, tokenId) => nonce
    mapping(bytes32 => uint256) public nonces;

    /// @notice The amount of selled tokens for the tokenId.
    /// @dev keccak256(token, owner, tokenId, nonce) => completed amount
    mapping(bytes32 => uint256) public completed;

    /// @notice Get nonce value for the token.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @param owner - The address of the token owner.
    /// @return The nonce value.
    function getNonce(address token, uint256 tokenId, address owner) view public returns (uint256) {
        return nonces[getNonceKey(token, tokenId, owner)];
    }

    /// @notice Sets new nonce value for the token. Can only be called by the operator.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @param owner - The address of the token owner.
    /// @param nonce - The new value for the nonce.
    function setNonce(address token, uint256 tokenId, address owner, uint256 nonce) public onlyOperator {
        nonces[getNonceKey(token, tokenId, owner)] = nonce;
    }

    /// @notice Encode the token info to use as a key for `nonces` mapping.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @param owner - The address of the token owner.
    /// @return Encoded key for the token.
    function getNonceKey(address token, uint256 tokenId, address owner) pure public returns (bytes32) {
        return keccak256(abi.encodePacked(token, tokenId, owner));
    }

    /// @notice Get the amount of selled tokens.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @param owner - The address of the token owner.
    /// @param nonce - The nonce value of the sale.
    /// @return Selled tokens count for the sale with specific nonce.
    function getCompleted(address token, uint256 tokenId, address owner, uint256 nonce) view public returns (uint256) {
        return completed[getCompletedKey(token, tokenId, owner, nonce)];
    }

    /// @notice Sets the new amount of selled tokens. Can be called only by the contract operator.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @param owner - The address of the token owner.
    /// @param nonce - The nonce value of the sale.
    /// @param _completed - The new completed value to set.
    function setCompleted(address token, uint256 tokenId, address owner, uint256 nonce, uint256 _completed) public onlyOperator {
        completed[getCompletedKey(token, tokenId, owner, nonce)] = _completed;
    }

    /// @notice Encode order key to use as a key of `completed` mapping.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @param owner - The address of the token owner.
    /// @param nonce - The nonce value of the sale.
    /// @return Encoded key.
    function getCompletedKey(address token, uint256 tokenId, address owner, uint256 nonce) pure public returns (bytes32) {
        return keccak256(abi.encodePacked(token, tokenId, owner, nonce));
    }
}

/// @title ERC1155Sale
/// @notice Allows users to exchange ERC1155Sale tokens for the Ether.
contract ERC1155Sale is Ownable, AbstractSale {
    using StringLibrary for string;

    event CloseOrder(address indexed token, uint256 indexed tokenId, address owner, uint256 nonce);
    event Buy(address indexed token, uint256 indexed tokenId, address owner, uint256 price, address buyer, uint256 value);

    bytes constant EMPTY = "";

    /// @notice The address of a transfer proxy for ERC721 and ERC1155 tokens.
    TransferProxy public transferProxy;
    /// @notice The address of a nonce manager contract.
    ERC1155SaleNonceHolder public nonceHolder;

    /// @param _transferProxy - The address of a deployed TransferProxy contract.
    /// @param _nonceHolder - The address of a deployed ERC1155SaleNonceHolder contract.
    /// @param beneficiary - The address of a fee recipient.
    constructor(TransferProxy _transferProxy, ERC1155SaleNonceHolder _nonceHolder, address payable beneficiary) AbstractSale(beneficiary) public {
        transferProxy = _transferProxy;
        nonceHolder = _nonceHolder;
    }

    /// @notice This function is called to buy ERC1151 token in exchange for ETH.
    /// @notice ERC1155 token must be approved for this contract before calling this function.
    /// @notice To pay with ETH, transaction must send ether within the calling transaction.
    /// @notice Buyer's payment value is calculated as `price * buying + buyerFee%`. `buyerFee` can be obtaind by calling buyerFee() function of this contract (inherited from AbstractSale).
    /// @param token - ERC1151 token contracy address.
    /// @param tokenId - ERC1151 token id for sale.
    /// @param owner - The address of the ERC1151 token owner.
    /// @param selling - The total amount of ERC1155 token for sale.
    /// @param buying - The amount of ERC1155 tokens to buy in this function call.
    /// @param price - The price of ERC1151 token in WEI.
    /// @param sellerFee - Amount for seller's fee. Represented as percents * 100 (100% => 10000. 1% => 100).
    /// @param signature - Signed message with parameters of the format: `${token.address.toLowerCase()}. tokenId: ${tokenId}. price: ${price}. nonce: ${nonce}. fee: ${sellerFee}. value: ${selling}`
    ///        If sellerFee is zero, than the format is `${token.address.toLowerCase()}. tokenId: ${tokenId}. price: ${price}. nonce: ${nonce}. value: ${selling}`
    ///        Where token.address.toLowerCase() is the address of the ERC1151 token contract (parameter `value`).
    ///        The `nonce` can be obtained from the nonceHolder with `getNonce` function.
    ///        Message must be prefixed with: `"\x19Ethereum Signed Message:\n" + message.length`.
    ///        Some libraries, for example web3.accounts.sign, will automatically prefix the message.
    function buy(IERC1155 token, uint256 tokenId, address payable owner, uint256 selling, uint256 buying, uint256 price, uint256 sellerFee, Sig memory signature) public payable {
        uint256 nonce = verifySignature(address(token), tokenId, owner, selling, price, sellerFee, signature);
        uint256 total = price.mul(buying);
        uint256 buyerFeeValue = total.mul(buyerFee).div(10000);
        require(total + buyerFeeValue == msg.value, "msg.value is incorrect");
        bool closed = verifyOpenAndModifyState(address(token), tokenId, owner, nonce, selling, buying);

        transferProxy.erc1155safeTransferFrom(token, owner, msg.sender, tokenId, buying, EMPTY);

        transferEther(token, tokenId, owner, total, sellerFee);
        emit Buy(address(token), tokenId, owner, price, msg.sender, buying);
        if (closed) {
            emit CloseOrder(address(token), tokenId, owner, nonce + 1);
        }
    }

    /// @notice Cancel the token sale order. Can be called only by the token owner.
    ///         The function makes signed buy message invalid by increasing the nonce for the token.
    /// @param token - The address of the token contract.
    /// @param tokenId - The token id.
    function cancel(address token, uint256 tokenId) public payable {
        uint nonce = nonceHolder.getNonce(token, tokenId, msg.sender);
        nonceHolder.setNonce(token, tokenId, msg.sender, nonce + 1);

        emit CloseOrder(token, tokenId, msg.sender, nonce + 1);
    }

    function verifySignature(address token, uint256 tokenId, address payable owner, uint256 selling, uint256 price, uint256 sellerFee, Sig memory signature) view internal returns (uint256 nonce) {
        nonce = nonceHolder.getNonce(token, tokenId, owner);
        require(prepareMessage(token, tokenId, price, selling, sellerFee, nonce).recover(signature.v, signature.r, signature.s) == owner, "incorrect signature");
    }

    function verifyOpenAndModifyState(address token, uint256 tokenId, address payable owner, uint256 nonce, uint256 selling, uint256 buying) internal returns (bool) {
        uint comp = nonceHolder.getCompleted(token, tokenId, owner, nonce).add(buying);
        require(comp <= selling);
        nonceHolder.setCompleted(token, tokenId, owner, nonce, comp);

        if (comp == selling) {
            nonceHolder.setNonce(token, tokenId, owner, nonce + 1);
            return true;
        }
        return false;
    }

    function prepareMessage(address token, uint256 tokenId, uint256 price, uint256 value, uint256 fee, uint256 nonce) internal pure returns (string memory) {
        return prepareMessage(token, tokenId, price, fee, nonce).append(". value: ", value.toString());
    }
}

File 4 of 15: ERC165.sol
pragma solidity ^0.5.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);
}

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () internal {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}

contract HasContractURI is ERC165 {

    string public contractURI;

    /*
     * bytes4(keccak256('contractURI()')) == 0xe8a3d485
     */
    bytes4 private constant _INTERFACE_ID_CONTRACT_URI = 0xe8a3d485;

    constructor(string memory _contractURI) public {
        contractURI = _contractURI;
        _registerInterface(_INTERFACE_ID_CONTRACT_URI);
    }

    /**
     * @dev Internal function to set the contract URI
     * @param _contractURI string URI prefix to assign
     */
    function _setContractURI(string memory _contractURI) internal {
        contractURI = _contractURI;
    }
}

contract HasSecondarySaleFees is ERC165 {

    event SecondarySaleFees(uint256 tokenId, address[] recipients, uint[] bps);

    /*
     * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f
     * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb
     *
     * => 0x0ebd4c7f ^ 0xb9c4d9fb == 0xb7799584
     */
    bytes4 private constant _INTERFACE_ID_FEES = 0xb7799584;

    constructor() public {
        _registerInterface(_INTERFACE_ID_FEES);
    }

    function getFeeRecipients(uint256 id) public view returns (address payable[] memory);
    function getFeeBps(uint256 id) public view returns (uint[] memory);
}

File 5 of 15: ERC721.sol
pragma solidity ^0.5.0;

import "./libs.sol";
import "./ERC165.sol";
import "./Roles.sol";
import "./HasTokenURI.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
contract IERC721 is IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

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

    /**
     * @dev Returns the owner of the NFT specified by `tokenId`.
     */
    function ownerOf(uint256 tokenId) public view returns (address owner);

    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     *
     *
     * Requirements:
     * - `from`, `to` cannot be zero.
     * - `tokenId` must be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this
     * NFT by either {approve} or {setApprovalForAll}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public;
    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     * Requirements:
     * - If the caller is not `from`, it must be approved to move this NFT by
     * either {approve} or {setApprovalForAll}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public;
    function approve(address to, uint256 tokenId) public;
    function getApproved(uint256 tokenId) public view returns (address operator);

    function setApprovalForAll(address operator, bool _approved) public;
    function isApprovedForAll(address owner, address operator) public view returns (bool);


    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
contract IERC721Receiver {
    /**
     * @notice Handle the receipt of an NFT
     * @dev The ERC721 smart contract calls this function on the recipient
     * after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
     * otherwise the caller will revert the transaction. The selector to be
     * returned can be obtained as `this.onERC721Received.selector`. This
     * function MAY throw to revert and reject the transfer.
     * Note: the ERC721 contract address is always the message sender.
     * @param operator The address which called `safeTransferFrom` function
     * @param from The address which previously owned the token
     * @param tokenId The NFT identifier which is being transferred
     * @param data Additional data with no specified format
     * @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data)
    public returns (bytes4);
}

/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721 is Context, ERC165, IERC721 {
    using SafeMath for uint256;
    using Address for address;
    using Counters for Counters.Counter;

    // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
    bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;

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

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

    // Mapping from owner to number of owned token
    mapping (address => Counters.Counter) private _ownedTokensCount;

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

    /*
     *     bytes4(keccak256('balanceOf(address)')) == 0x70a08231
     *     bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
     *     bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
     *     bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
     *     bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
     *     bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
     *     bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
     *
     *     => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
     *        0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
     */
    bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;

    constructor () public {
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721);
    }

    /**
     * @dev Gets the balance of the specified address.
     * @param owner address to query the balance of
     * @return uint256 representing the amount owned by the passed address
     */
    function balanceOf(address owner) public view returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");

        return _ownedTokensCount[owner].current();
    }

    /**
     * @dev Gets the owner of the specified token ID.
     * @param tokenId uint256 ID of the token to query the owner of
     * @return address currently marked as the owner of the given token ID
     */
    function ownerOf(uint256 tokenId) public view returns (address) {
        address owner = _tokenOwner[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");

        return owner;
    }

    /**
     * @dev Approves another address to transfer the given token ID
     * The zero address indicates there is no approved address.
     * There can only be one approved address per token at a given time.
     * Can only be called by the token owner or an approved operator.
     * @param to address to be approved for the given token ID
     * @param tokenId uint256 ID of the token to be approved
     */
    function approve(address to, uint256 tokenId) public {
        address owner = ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Gets the approved address for a token ID, or zero if no address set
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to query the approval of
     * @return address currently approved for the given token ID
     */
    function getApproved(uint256 tokenId) public view returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Sets or unsets the approval of a given operator
     * An operator is allowed to transfer all tokens of the sender on their behalf.
     * @param to operator address to set the approval
     * @param approved representing the status of the approval to be set
     */
    function setApprovalForAll(address to, bool approved) public {
        require(to != _msgSender(), "ERC721: approve to caller");

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

    /**
     * @dev Tells whether an operator is approved by a given owner.
     * @param owner owner address which you want to query the approval of
     * @param operator operator address which you want to query the approval of
     * @return bool whether the given operator is approved by the given owner
     */
    function isApprovedForAll(address owner, address operator) public view returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev Transfers the ownership of a given token ID to another address.
     * Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     * Requires the msg.sender to be the owner, approved, or operator.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function transferFrom(address from, address to, uint256 tokenId) public {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transferFrom(from, to, tokenId);
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg.sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the _msgSender() to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransferFrom(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg.sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function _safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) internal {
        _transferFrom(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether the specified token exists.
     * @param tokenId uint256 ID of the token to query the existence of
     * @return bool whether the token exists
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        address owner = _tokenOwner[tokenId];
        return owner != address(0);
    }

    /**
     * @dev Returns whether the given spender can transfer a given token ID.
     * @param spender address of the spender to query
     * @param tokenId uint256 ID of the token to be transferred
     * @return bool whether the msg.sender is approved for the given token ID,
     * is an operator of the owner, or is the owner of the token
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Internal function to safely mint a new token.
     * Reverts if the given token ID already exists.
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _safeMint(address to, uint256 tokenId) internal {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Internal function to safely mint a new token.
     * Reverts if the given token ID already exists.
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     * @param _data bytes data to send along with a safe transfer check
     */
    function _safeMint(address to, uint256 tokenId, bytes memory _data) internal {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Internal function to mint a new token.
     * Reverts if the given token ID already exists.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _mint(address to, uint256 tokenId) internal {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _tokenOwner[tokenId] = to;
        _ownedTokensCount[to].increment();

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

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use {_burn} instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(address owner, uint256 tokenId) internal {
        require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");

        _clearApproval(tokenId);

        _ownedTokensCount[owner].decrement();
        _tokenOwner[tokenId] = address(0);

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

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(uint256 tokenId) internal {
        _burn(ownerOf(tokenId), tokenId);
    }

    /**
     * @dev Internal function to transfer ownership of a given token ID to another address.
     * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _transferFrom(address from, address to, uint256 tokenId) internal {
        require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _clearApproval(tokenId);

        _ownedTokensCount[from].decrement();
        _ownedTokensCount[to].increment();

        _tokenOwner[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * This is an internal detail of the `ERC721` contract and its use is deprecated.
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
        internal returns (bool)
    {
        if (!to.isContract()) {
            return true;
        }
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = to.call(abi.encodeWithSelector(
            IERC721Receiver(to).onERC721Received.selector,
            _msgSender(),
            from,
            tokenId,
            _data
        ));
        if (!success) {
            if (returndata.length > 0) {
                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert("ERC721: transfer to non ERC721Receiver implementer");
            }
        } else {
            bytes4 retval = abi.decode(returndata, (bytes4));
            return (retval == _ERC721_RECEIVED);
        }
    }

    /**
     * @dev Private function to clear current approval of a given token ID.
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _clearApproval(uint256 tokenId) private {
        if (_tokenApprovals[tokenId] != address(0)) {
            _tokenApprovals[tokenId] = address(0);
        }
    }
}

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Metadata is IERC721 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns a specific ERC721 token.
     * @param tokenId uint256 id of the ERC721 token to be burned.
     */
    function burn(uint256 tokenId) public {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Enumerable is IERC721 {
    function totalSupply() public view returns (uint256);
    function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256 tokenId);

    function tokenByIndex(uint256 index) public view returns (uint256);
}

/**
 * @title ERC-721 Non-Fungible Token with optional enumeration extension logic
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => uint256[]) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /*
     *     bytes4(keccak256('totalSupply()')) == 0x18160ddd
     *     bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
     *     bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
     *
     *     => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
     */
    bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;

    /**
     * @dev Constructor function.
     */
    constructor () public {
        // register the supported interface to conform to ERC721Enumerable via ERC165
        _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
    }

    /**
     * @dev Gets the token ID at a given index of the tokens list of the requested owner.
     * @param owner address owning the tokens list to be accessed
     * @param index uint256 representing the index to be accessed of the requested tokens list
     * @return uint256 token ID at the given index of the tokens list owned by the requested address
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {
        require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev Gets the total amount of tokens stored by the contract.
     * @return uint256 representing the total amount of tokens
     */
    function totalSupply() public view returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev Gets the token ID at a given index of all the tokens in this contract
     * Reverts if the index is greater or equal to the total number of tokens.
     * @param index uint256 representing the index to be accessed of the tokens list
     * @return uint256 token ID at the given index of the tokens list
     */
    function tokenByIndex(uint256 index) public view returns (uint256) {
        require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Internal function to transfer ownership of a given token ID to another address.
     * As opposed to transferFrom, this imposes no restrictions on msg.sender.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _transferFrom(address from, address to, uint256 tokenId) internal {
        super._transferFrom(from, to, tokenId);

        _removeTokenFromOwnerEnumeration(from, tokenId);

        _addTokenToOwnerEnumeration(to, tokenId);
    }

    /**
     * @dev Internal function to mint a new token.
     * Reverts if the given token ID already exists.
     * @param to address the beneficiary that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _mint(address to, uint256 tokenId) internal {
        super._mint(to, tokenId);

        _addTokenToOwnerEnumeration(to, tokenId);

        _addTokenToAllTokensEnumeration(tokenId);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use {ERC721-_burn} instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(address owner, uint256 tokenId) internal {
        super._burn(owner, tokenId);

        _removeTokenFromOwnerEnumeration(owner, tokenId);
        // Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund
        _ownedTokensIndex[tokenId] = 0;

        _removeTokenFromAllTokensEnumeration(tokenId);
    }

    /**
     * @dev Gets the list of token IDs of the requested owner.
     * @param owner address owning the tokens
     * @return uint256[] List of token IDs owned by the requested address
     */
    function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {
        return _ownedTokens[owner];
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        _ownedTokensIndex[tokenId] = _ownedTokens[to].length;
        _ownedTokens[to].push(tokenId);
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        _ownedTokens[from].length--;

        // Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occupied by
        // lastTokenId, or just over the end of the array if the token was the last one).
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length.sub(1);
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        _allTokens.length--;
        _allTokensIndex[tokenId] = 0;
    }
}

/**
 * @title Full ERC721 Token with support for tokenURIPrefix
 * This implementation includes all the required and some optional functionality of the ERC721 standard
 * Moreover, it includes approve all functionality using operator terminology
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721Base is HasSecondarySaleFees, ERC721, HasContractURI, HasTokenURI, ERC721Enumerable {
    // Token name
    string public name;

    // Token symbol
    string public symbol;

    /**
        @notice Describes a fee.
        @param recipient - Fee recipient address.
        @param value - Fee amount in percents * 100.
    */
    struct Fee {
        address payable recipient;
        uint256 value;
    }

    // id => fees
    mapping (uint256 => Fee[]) public fees;

    /*
     *     bytes4(keccak256('name()')) == 0x06fdde03
     *     bytes4(keccak256('symbol()')) == 0x95d89b41
     *     bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd
     *
     *     => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f
     */
    bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;

    /**
     * @dev Constructor function
     */
    constructor (string memory _name, string memory _symbol, string memory contractURI, string memory _tokenURIPrefix) HasContractURI(contractURI) HasTokenURI(_tokenURIPrefix) public {
        name = _name;
        symbol = _symbol;

        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721_METADATA);
    }

    /**
        @notice     Get the secondary fee recipients of the token.
        @param id - The id of the token.
        @return     An array of fee recipient addresses.
    */
    function getFeeRecipients(uint256 id) public view returns (address payable[] memory) {
        Fee[] memory _fees = fees[id];
        address payable[] memory result = new address payable[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            result[i] = _fees[i].recipient;
        }
        return result;
    }

    /**
        @notice     Get the secondary fee amounts of the token.
        @param id - The id of the token.
        @return     An array of fee amount values.
    */
    function getFeeBps(uint256 id) public view returns (uint[] memory) {
        Fee[] memory _fees = fees[id];
        uint[] memory result = new uint[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            result[i] = _fees[i].value;
        }
        return result;
    }

    function _mint(address to, uint256 tokenId, Fee[] memory _fees) internal {
        _mint(to, tokenId);
        address[] memory recipients = new address[](_fees.length);
        uint[] memory bps = new uint[](_fees.length);
        for (uint i = 0; i < _fees.length; i++) {
            require(_fees[i].recipient != address(0x0), "Recipient should be present");
            require(_fees[i].value != 0, "Fee value should be positive");
            fees[tokenId].push(_fees[i]);
            recipients[i] = _fees[i].recipient;
            bps[i] = _fees[i].value;
        }
        if (_fees.length > 0) {
            emit SecondarySaleFees(tokenId, recipients, bps);
        }
    }

    /**
     * @dev Returns an URI for a given token ID.
     * Throws if the token ID does not exist. May return an empty string.
     * @param tokenId uint256 ID of the token to query
     */
    function tokenURI(uint256 tokenId) external view returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        return super._tokenURI(tokenId);
    }

    /**
     * @dev Internal function to set the token URI for a given token.
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to set its URI
     * @param uri string URI to assign
     */
    function _setTokenURI(uint256 tokenId, string memory uri) internal {
        require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
        super._setTokenURI(tokenId, uri);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use _burn(uint256) instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned by the msg.sender
     */
    function _burn(address owner, uint256 tokenId) internal {
        super._burn(owner, tokenId);
        _clearTokenURI(tokenId);
    }
}

File 6 of 15: ERC721Sale.sol
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

import "./Roles.sol";
import "./ERC721.sol";
import "./ERC1155.sol";
import "./AbstractSale.sol";
import "./TransferProxy.sol";

/// @title IERC721Sale
contract IERC721Sale {
    function getNonce(IERC721 token, uint256 tokenId) view public returns (uint256);
}

/// @title ERC721SaleNonceHolder
/// @notice The contract manages nonce values for the sales.
contract ERC721SaleNonceHolder is OwnableOperatorRole {
    /// @notice token nonces
    mapping(bytes32 => uint256) public nonces;
    /// @notice Previous nonce manager contract address.
    IERC721Sale public previous;

    /// @notice The contract constructor.
    /// @param _previous - The value of the previous nonce manager contract.
    constructor(IERC721Sale _previous) public {
        previous = _previous;
    }

    /// @notice Get nonce value for the token.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @return The nonce value.
    function getNonce(IERC721 token, uint256 tokenId) view public returns (uint256) {
        uint256 newNonce = nonces[getPositionKey(token, tokenId)];
        if (newNonce != 0) {
            return newNonce;
        }
        if (address(previous) == address(0x0)) {
            return 0;
        }
        return previous.getNonce(token, tokenId);
    }

    /// @notice Sets new nonce value for the token. Can only be called by the operator.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @param nonce - The new value for the nonce.
    function setNonce(IERC721 token, uint256 tokenId, uint256 nonce) public onlyOperator {
        nonces[getPositionKey(token, tokenId)] = nonce;
    }

    /// @notice Encode the token info to use as a mapping key.
    /// @param token - Token's contract address.
    /// @param tokenId - Token id.
    /// @return Encoded key for the token.
    function getPositionKey(IERC721 token, uint256 tokenId) pure public returns (bytes32) {
        return keccak256(abi.encodePacked(token, tokenId));
    }
}

/// @title ERC721Sale
/// @notice Allows users to exchange ERC721 tokens for the Ether.
contract ERC721Sale is Ownable, IERC721Receiver, AbstractSale {
    using AddressLibrary for address;
    using UintLibrary for uint256;
    using StringLibrary for string;

    event Cancel(address indexed token, uint256 indexed tokenId, address owner, uint256 nonce);
    event Buy(address indexed token, uint256 indexed tokenId, address seller, address buyer, uint256 price, uint256 nonce);

    /// @notice The address of a transfer proxy for ERC721 and ERC1155 tokens.
    TransferProxy public transferProxy;
    /// @notice The address of a nonce manager contract.
    ERC721SaleNonceHolder public nonceHolder;

    /// @param _transferProxy - The address of a deployed TransferProxy contract.
    /// @param _nonceHolder - The address of a deployed ERC721SaleNonceHolder contract.
    /// @param beneficiary - The address of a fee recipient.
    constructor(TransferProxy _transferProxy, ERC721SaleNonceHolder _nonceHolder, address payable beneficiary) AbstractSale(beneficiary) public {
        transferProxy = _transferProxy;
        nonceHolder = _nonceHolder;
    }

    /// @notice Cancel the token sale order. Can be called only by the token owner.
    ///         The function makes signed buy message invalid by increasing the nonce for the token.
    /// @param token - The address of the token contract.
    /// @param tokenId - The token id.
    function cancel(IERC721 token, uint256 tokenId) public {
        address owner = token.ownerOf(tokenId);
        require(owner == msg.sender, "not an owner");
        uint256 nonce = nonceHolder.getNonce(token, tokenId) + 1;
        nonceHolder.setNonce(token, tokenId, nonce);
        emit Cancel(address(token), tokenId, owner, nonce);
    }

    /// @notice This function is called to buy ERC721 token in exchange for ETH.
    /// @notice ERC721 token must be approved for this contract before calling this function.
    /// @notice To pay with ETH, transaction must send ether within the calling transaction.
    /// @notice Buyer's payment value is calculated as `price + buyerFee%`. `buyerFee` can be obtaind by calling buyerFee() function of this contract (inherited from AbstractSale).
    /// @param token - ERC721 token contracy address.
    /// @param tokenId - ERC721 token id for sale.
    /// @param price - The price of ERC721 token in WEI.
    /// @param sellerFee - Amount for seller's fee. Represented as percents * 100 (100% => 10000. 1% => 100).
    /// @param signature - Signed message with parameters of the format: `${token.address.toLowerCase()}. tokenId: ${tokenId}. price: ${price}. nonce: ${nonce}. fee: ${sellerFee}`
    ///        If sellerFee is zero, than the format is `${token.address.toLowerCase()}. tokenId: ${tokenId}. price: ${price}. nonce: ${nonce}`
    ///        Where token.address.toLowerCase() is the address of the ERC721 token contract (parameter `value`).
    ///        The `nonce` can be obtained from the nonceHolder with `getNonce` function.
    ///        Message must be prefixed with: `"\x19Ethereum Signed Message:\n" + message.length`.
    ///        Some libraries, for example web3.accounts.sign, will automatically prefix the message.
    function buy(IERC721 token, uint256 tokenId, uint256 price, uint256 sellerFee, Sig memory signature) public payable {
        address payable owner = address(uint160(token.ownerOf(tokenId)));
        uint256 nonce = nonceHolder.getNonce(token, tokenId);
        uint256 buyerFeeValue = price.mul(buyerFee).div(10000);
        require(msg.value == price + buyerFeeValue, "msg.value is incorrect");
        require(owner == prepareMessage(address(token), tokenId, price, sellerFee, nonce).recover(signature.v, signature.r, signature.s), "owner should sign correct message");
        transferProxy.erc721safeTransferFrom(token, owner, msg.sender, tokenId);
        transferEther(token, tokenId, owner, price, sellerFee);
        nonceHolder.setNonce(token, tokenId, nonce + 1);
        emit Buy(address(token), tokenId, owner, msg.sender, price, nonce + 1);
    }

    /// @notice Standard ERC721 receiver function implementation.
    function onERC721Received(address, address, uint256, bytes memory) public returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 7 of 15: ExchangeV1.sol
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

import "./libs.sol";
import "./Roles.sol";
import "./ERC165.sol";
import "./IERC20.sol";
import "./TransferProxy.sol";

/// @title ExchangeDomainV1
/// @notice Describes all the structs that are used in exchnages.
contract ExchangeDomainV1 {

    enum AssetType {ETH, ERC20, ERC1155, ERC721, ERC721Deprecated}

    struct Asset {
        address token;
        uint tokenId;
        AssetType assetType;
    }

    struct OrderKey {
        /* who signed the order */
        address owner;
        /* random number */
        uint salt;

        /* what has owner */
        Asset sellAsset;

        /* what wants owner */
        Asset buyAsset;
    }

    struct Order {
        OrderKey key;

        /* how much has owner (in wei, or UINT256_MAX if ERC-721) */
        uint selling;
        /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */
        uint buying;

        /* fee for selling. Represented as percents * 100 (100% - 10000. 1% - 100)*/
        uint sellerFee;
    }

    /* An ECDSA signature. */
    struct Sig {
        /* v parameter */
        uint8 v;
        /* r parameter */
        bytes32 r;
        /* s parameter */
        bytes32 s;
    }
}

/// @title ExchangeStateV1
/// @notice Tracks the amount of selled tokens in the order.
contract ExchangeStateV1 is OwnableOperatorRole {

    // keccak256(OrderKey) => completed
    mapping(bytes32 => uint256) public completed;

    /// @notice Get the amount of selled tokens.
    /// @param key - the `OrderKey` struct.
    /// @return Selled tokens count for the order.
    function getCompleted(ExchangeDomainV1.OrderKey calldata key) view external returns (uint256) {
        return completed[getCompletedKey(key)];
    }

    /// @notice Sets the new amount of selled tokens. Can be called only by the contract operator.
    /// @param key - the `OrderKey` struct.
    /// @param newCompleted - The new value to set.
    function setCompleted(ExchangeDomainV1.OrderKey calldata key, uint256 newCompleted) external onlyOperator {
        completed[getCompletedKey(key)] = newCompleted;
    }

    /// @notice Encode order key to use as the mapping key.
    /// @param key - the `OrderKey` struct.
    /// @return Encoded order key.
    function getCompletedKey(ExchangeDomainV1.OrderKey memory key) pure public returns (bytes32) {
        return keccak256(abi.encodePacked(key.owner, key.sellAsset.token, key.sellAsset.tokenId, key.buyAsset.token, key.buyAsset.tokenId, key.salt));
    }
}

/// @title ExchangeOrdersHolderV1
/// @notice Optionally holds orders, which can be exchanged without order's holder signature.
contract ExchangeOrdersHolderV1 {

    mapping(bytes32 => OrderParams) internal orders;

    struct OrderParams {
        /* how much has owner (in wei, or UINT256_MAX if ERC-721) */
        uint selling;
        /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */
        uint buying;

        /* fee for selling */
        uint sellerFee;
    }

    /// @notice This function can be called to add the order to the contract, so it can be exchanged without signature.
    ///         Can be called only by the order owner.
    /// @param order - The order struct to add.
    function add(ExchangeDomainV1.Order calldata order) external {
        require(msg.sender == order.key.owner, "order could be added by owner only");
        bytes32 key = prepareKey(order);
        orders[key] = OrderParams(order.selling, order.buying, order.sellerFee);
    }

    /// @notice This function checks if order was added to the orders holder contract.
    /// @param order - The order struct to check.
    /// @return true if order is present in the contract's data.
    function exists(ExchangeDomainV1.Order calldata order) external view returns (bool) {
        bytes32 key = prepareKey(order);
        OrderParams memory params = orders[key];
        return params.buying == order.buying && params.selling == order.selling && params.sellerFee == order.sellerFee;
    }

    function prepareKey(ExchangeDomainV1.Order memory order) internal pure returns (bytes32) {
        return keccak256(abi.encode(
                order.key.sellAsset.token,
                order.key.sellAsset.tokenId,
                order.key.owner,
                order.key.buyAsset.token,
                order.key.buyAsset.tokenId,
                order.key.salt
            ));
    }
}

/// @title Token Exchange contract.
/// @notice Supports ETH, ERC20, ERC721 and ERC1155 tokens.
/// @notice This contracts relies on offchain signatures for order and fees verification.
contract ExchangeV1 is Ownable, ExchangeDomainV1 {
    using SafeMath for uint;
    using UintLibrary for uint;
    using StringLibrary for string;
    using BytesLibrary for bytes32;

    enum FeeSide {NONE, SELL, BUY}

    event Buy(
        address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue,
        address owner,
        address buyToken, uint256 buyTokenId, uint256 buyValue,
        address buyer,
        uint256 amount,
        uint256 salt
    );

    event Cancel(
        address indexed sellToken, uint256 indexed sellTokenId,
        address owner,
        address buyToken, uint256 buyTokenId,
        uint256 salt
    );

    bytes4 private constant _INTERFACE_ID_FEES = 0xb7799584;
    uint256 private constant UINT256_MAX = 2 ** 256 - 1;

    address payable public beneficiary;
    address public buyerFeeSigner;

    /// @notice The address of a transfer proxy for ERC721 and ERC1155 tokens.
    TransferProxy public transferProxy;
    /// @notice The address of a transfer proxy for deprecated ERC721 tokens. Does not use safe transfer.
    TransferProxyForDeprecated public transferProxyForDeprecated;
    /// @notice The address of a transfer proxy for ERC20 tokens.
    ERC20TransferProxy public erc20TransferProxy;
    /// @notice The address of a state contract, which counts the amount of selled tokens.
    ExchangeStateV1 public state;
    /// @notice The address of a orders holder contract, which can contain unsigned orders.
    ExchangeOrdersHolderV1 public ordersHolder;

    /// @notice Contract constructor.
    /// @param _transferProxy - The address of a deployed TransferProxy contract.
    /// @param _transferProxyForDeprecated - The address of a deployed TransferProxyForDeprecated contract.
    /// @param _erc20TransferProxy - The address of a deployed ERC20TransferProxy contract.
    /// @param _state - The address of a deployed ExchangeStateV1 contract.
    /// @param _ordersHolder - The address of a deployed ExchangeOrdersHolderV1 contract.
    /// @param _beneficiary - The address wich will receive collected fees.
    /// @param _buyerFeeSigner - The address to sign buyer's fees for orders.
    constructor(
        TransferProxy _transferProxy, TransferProxyForDeprecated _transferProxyForDeprecated, ERC20TransferProxy _erc20TransferProxy, ExchangeStateV1 _state,
        ExchangeOrdersHolderV1 _ordersHolder, address payable _beneficiary, address _buyerFeeSigner
    ) public {
        transferProxy = _transferProxy;
        transferProxyForDeprecated = _transferProxyForDeprecated;
        erc20TransferProxy = _erc20TransferProxy;
        state = _state;
        ordersHolder = _ordersHolder;
        beneficiary = _beneficiary;
        buyerFeeSigner = _buyerFeeSigner;
    }

    /// @notice This function is called by contract owner and sets fee receiver address.
    /// @param newBeneficiary - new address, who where all the fees will be transfered
    function setBeneficiary(address payable newBeneficiary) external onlyOwner {
        beneficiary = newBeneficiary;
    }

    /// @notice This function is called by contract owner and sets fee signer address.
    /// @param newBuyerFeeSigner - new address, which will sign buyer's fees for orders
    function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner {
        buyerFeeSigner = newBuyerFeeSigner;
    }

    /// @notice This function is called to execute the exchange.
    /// @notice ERC20, ERC721 or ERC1155 tokens from buyer's or seller's side must be approved for this contract before calling this function.
    /// @notice To pay with ETH, transaction must send ether within the calling transaction.
    /// @notice Buyer's payment value is calculated as `order.buying * amount / order.selling + buyerFee%`.
    /// @dev Emits Buy event.
    /// @param order - Order struct (see ExchangeDomainV1).
    /// @param sig - Signed order message. To generate the message call `prepareMessage` function.
    ///        Message must be prefixed with: `"\x19Ethereum Signed Message:\n" + message.length`.
    ///        For example, web3.accounts.sign will automatically prefix the message.
    ///        Also, the signature might be all zeroes, if specified order record was added to the ordersHolder.
    /// @param buyerFee - Amount for buyer's fee. Represented as percents * 100 (100% => 10000. 1% => 100).
    /// @param buyerFeeSig - Signed order + buyerFee message. To generate the message call prepareBuyerFeeMessage function.
    ///        Message must be prefixed with: `"\x19Ethereum Signed Message:\n" + message.length`.
    ///        For example, web3.accounts.sign will automatically prefix the message.
    /// @param amount - Amount of tokens to buy.
    /// @param buyer - The buyer's address.
    function exchange(
        Order calldata order,
        Sig calldata sig,
        uint buyerFee,
        Sig calldata buyerFeeSig,
        uint amount,
        address buyer
    ) payable external {
        validateOrderSig(order, sig);
        validateBuyerFeeSig(order, buyerFee, buyerFeeSig);
        uint paying = order.buying.mul(amount).div(order.selling);
        verifyOpenAndModifyOrderState(order.key, order.selling, amount);
        require(order.key.sellAsset.assetType != AssetType.ETH, "ETH is not supported on sell side");
        if (order.key.buyAsset.assetType == AssetType.ETH) {
            validateEthTransfer(paying, buyerFee);
        }
        FeeSide feeSide = getFeeSide(order.key.sellAsset.assetType, order.key.buyAsset.assetType);
        if (buyer == address(0x0)) {
            buyer = msg.sender;
        }
        transferWithFeesPossibility(order.key.sellAsset, amount, order.key.owner, buyer, feeSide == FeeSide.SELL, buyerFee, order.sellerFee, order.key.buyAsset);
        transferWithFeesPossibility(order.key.buyAsset, paying, msg.sender, order.key.owner, feeSide == FeeSide.BUY, order.sellerFee, buyerFee, order.key.sellAsset);
        emitBuy(order, amount, buyer);
    }

    function validateEthTransfer(uint value, uint buyerFee) internal view {
        uint256 buyerFeeValue = value.bp(buyerFee);
        require(msg.value == value + buyerFeeValue, "msg.value is incorrect");
    }

    /// @notice Cancel the token exchange order. Can be called only by the order owner.
    ///         The function makes all exchnage calls for this order revert with error.
    /// @param key - The OrderKey struct of the order.
    function cancel(OrderKey calldata key) external {
        require(key.owner == msg.sender, "not an owner");
        state.setCompleted(key, UINT256_MAX);
        emit Cancel(key.sellAsset.token, key.sellAsset.tokenId, msg.sender, key.buyAsset.token, key.buyAsset.tokenId, key.salt);
    }

    function validateOrderSig(
        Order memory order,
        Sig memory sig
    ) internal view {
        if (sig.v == 0 && sig.r == bytes32(0x0) && sig.s == bytes32(0x0)) {
            require(ordersHolder.exists(order), "incorrect signature");
        } else {
            require(prepareMessage(order).recover(sig.v, sig.r, sig.s) == order.key.owner, "incorrect signature");
        }
    }

    function validateBuyerFeeSig(
        Order memory order,
        uint buyerFee,
        Sig memory sig
    ) internal view {
        require(prepareBuyerFeeMessage(order, buyerFee).recover(sig.v, sig.r, sig.s) == buyerFeeSigner, "incorrect buyer fee signature");
    }

    /// @notice This function generates fee message to sign for exchange call.
    /// @param order - Order struct.
    /// @param fee - Fee amount.
    /// @return Encoded (order, fee) message, wich should be signed by the buyerFeeSigner. Does not contain standard prefix.
    function prepareBuyerFeeMessage(Order memory order, uint fee) public pure returns (string memory) {
        return keccak256(abi.encode(order, fee)).toString();
    }

    /// @notice This function generates order message to sign for exchange call.
    /// @param order - Order struct.
    /// @return Encoded order message, wich should be signed by the token owner. Does not contain standard prefix.
    function prepareMessage(Order memory order) public pure returns (string memory) {
        return keccak256(abi.encode(order)).toString();
    }

    function transferWithFeesPossibility(Asset memory firstType, uint value, address from, address to, bool hasFee, uint256 sellerFee, uint256 buyerFee, Asset memory secondType) internal {
        if (!hasFee) {
            transfer(firstType, value, from, to);
        } else {
            transferWithFees(firstType, value, from, to, sellerFee, buyerFee, secondType);
        }
    }

    function transfer(Asset memory asset, uint value, address from, address to) internal {
        if (asset.assetType == AssetType.ETH) {
            address payable toPayable = address(uint160(to));
            toPayable.transfer(value);
        } else if (asset.assetType == AssetType.ERC20) {
            require(asset.tokenId == 0, "tokenId should be 0");
            erc20TransferProxy.erc20safeTransferFrom(IERC20(asset.token), from, to, value);
        } else if (asset.assetType == AssetType.ERC721) {
            require(value == 1, "value should be 1 for ERC-721");
            transferProxy.erc721safeTransferFrom(IERC721(asset.token), from, to, asset.tokenId);
        } else if (asset.assetType == AssetType.ERC721Deprecated) {
            require(value == 1, "value should be 1 for ERC-721");
            transferProxyForDeprecated.erc721TransferFrom(IERC721(asset.token), from, to, asset.tokenId);
        } else {
            transferProxy.erc1155safeTransferFrom(IERC1155(asset.token), from, to, asset.tokenId, value, "");
        }
    }

    function transferWithFees(Asset memory firstType, uint value, address from, address to, uint256 sellerFee, uint256 buyerFee, Asset memory secondType) internal {
        uint restValue = transferFeeToBeneficiary(firstType, from, value, sellerFee, buyerFee);
        if (
            secondType.assetType == AssetType.ERC1155 && IERC1155(secondType.token).supportsInterface(_INTERFACE_ID_FEES) ||
            (secondType.assetType == AssetType.ERC721 || secondType.assetType == AssetType.ERC721Deprecated) && IERC721(secondType.token).supportsInterface(_INTERFACE_ID_FEES)
        ) {
            HasSecondarySaleFees withFees = HasSecondarySaleFees(secondType.token);
            address payable[] memory recipients = withFees.getFeeRecipients(secondType.tokenId);
            uint[] memory fees = withFees.getFeeBps(secondType.tokenId);
            require(fees.length == recipients.length);
            for (uint256 i = 0; i < fees.length; i++) {
                (uint newRestValue, uint current) = subFeeInBp(restValue, value, fees[i]);
                restValue = newRestValue;
                transfer(firstType, current, from, recipients[i]);
            }
        }
        address payable toPayable = address(uint160(to));
        transfer(firstType, restValue, from, toPayable);
    }

    function transferFeeToBeneficiary(Asset memory asset, address from, uint total, uint sellerFee, uint buyerFee) internal returns (uint) {
        (uint restValue, uint sellerFeeValue) = subFeeInBp(total, total, sellerFee);
        uint buyerFeeValue = total.bp(buyerFee);
        uint beneficiaryFee = buyerFeeValue.add(sellerFeeValue);
        if (beneficiaryFee > 0) {
            transfer(asset, beneficiaryFee, from, beneficiary);
        }
        return restValue;
    }

    function emitBuy(Order memory order, uint amount, address buyer) internal {
        emit Buy(order.key.sellAsset.token, order.key.sellAsset.tokenId, order.selling,
            order.key.owner,
            order.key.buyAsset.token, order.key.buyAsset.tokenId, order.buying,
            buyer,
            amount,
            order.key.salt
        );
    }

    function subFeeInBp(uint value, uint total, uint feeInBp) internal pure returns (uint newValue, uint realFee) {
        return subFee(value, total.bp(feeInBp));
    }

    function subFee(uint value, uint fee) internal pure returns (uint newValue, uint realFee) {
        if (value > fee) {
            newValue = value - fee;
            realFee = fee;
        } else {
            newValue = 0;
            realFee = value;
        }
    }

    function verifyOpenAndModifyOrderState(OrderKey memory key, uint selling, uint amount) internal {
        uint completed = state.getCompleted(key);
        uint newCompleted = completed.add(amount);
        require(newCompleted <= selling, "not enough stock of order for buying");
        state.setCompleted(key, newCompleted);
    }

    function getFeeSide(AssetType sellType, AssetType buyType) internal pure returns (FeeSide) {
        if ((sellType == AssetType.ERC721 || sellType == AssetType.ERC721Deprecated) &&
            (buyType == AssetType.ERC721 || buyType == AssetType.ERC721Deprecated)) {
            return FeeSide.NONE;
        }
        if (uint(sellType) > uint(buyType)) {
            return FeeSide.BUY;
        }
        return FeeSide.SELL;
    }
}

File 8 of 15: HasTokenURI.sol
pragma solidity ^0.5.0;

import "./libs.sol";

contract HasTokenURI {
    using StringLibrary for string;

    //Token URI prefix
    string public tokenURIPrefix;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    constructor(string memory _tokenURIPrefix) public {
        tokenURIPrefix = _tokenURIPrefix;
    }

    /**
     * @dev Returns an URI for a given token ID.
     * Throws if the token ID does not exist. May return an empty string.
     * @param tokenId uint256 ID of the token to query
     */
    function _tokenURI(uint256 tokenId) internal view returns (string memory) {
        return tokenURIPrefix.append(_tokenURIs[tokenId]);
    }

    /**
     * @dev Internal function to set the token URI for a given token.
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to set its URI
     * @param uri string URI to assign
     */
    function _setTokenURI(uint256 tokenId, string memory uri) internal {
        _tokenURIs[tokenId] = uri;
    }

    /**
     * @dev Internal function to set the token URI prefix.
     * @param _tokenURIPrefix string URI prefix to assign
     */
    function _setTokenURIPrefix(string memory _tokenURIPrefix) internal {
        tokenURIPrefix = _tokenURIPrefix;
    }

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

File 9 of 15: IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 10 of 15: libs.sol
pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}
 * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never
 * directly accessed.
 */
library Counters {
    using SafeMath for uint256;

    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        // The {SafeMath} overflow check can be skipped here, see the comment at the top
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

library UintLibrary {
    using SafeMath for uint;

    function toString(uint256 i) internal pure returns (string memory) {
        if (i == 0) {
            return "0";
        }
        uint j = i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (i != 0) {
            bstr[k--] = byte(uint8(48 + i % 10));
            i /= 10;
        }
        return string(bstr);
    }

    function bp(uint value, uint bpValue) internal pure returns (uint) {
        return value.mul(bpValue).div(10000);
    }
}

library StringLibrary {
    using UintLibrary for uint256;

    function append(string memory _a, string memory _b) internal pure returns (string memory) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory bab = new bytes(_ba.length + _bb.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) bab[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) bab[k++] = _bb[i];
        return string(bab);
    }

    function append(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
        bytes memory _ba = bytes(_a);
        bytes memory _bb = bytes(_b);
        bytes memory _bc = bytes(_c);
        bytes memory bbb = new bytes(_ba.length + _bb.length + _bc.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) bbb[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) bbb[k++] = _bb[i];
        for (uint i = 0; i < _bc.length; i++) bbb[k++] = _bc[i];
        return string(bbb);
    }

    function recover(string memory message, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        bytes memory msgBytes = bytes(message);
        bytes memory fullMessage = concat(
            bytes("\x19Ethereum Signed Message:\n"),
            bytes(msgBytes.length.toString()),
            msgBytes,
            new bytes(0), new bytes(0), new bytes(0), new bytes(0)
        );
        return ecrecover(keccak256(fullMessage), v, r, s);
    }

    function concat(bytes memory _ba, bytes memory _bb, bytes memory _bc, bytes memory _bd, bytes memory _be, bytes memory _bf, bytes memory _bg) internal pure returns (bytes memory) {
        bytes memory resultBytes = new bytes(_ba.length + _bb.length + _bc.length + _bd.length + _be.length + _bf.length + _bg.length);
        uint k = 0;
        for (uint i = 0; i < _ba.length; i++) resultBytes[k++] = _ba[i];
        for (uint i = 0; i < _bb.length; i++) resultBytes[k++] = _bb[i];
        for (uint i = 0; i < _bc.length; i++) resultBytes[k++] = _bc[i];
        for (uint i = 0; i < _bd.length; i++) resultBytes[k++] = _bd[i];
        for (uint i = 0; i < _be.length; i++) resultBytes[k++] = _be[i];
        for (uint i = 0; i < _bf.length; i++) resultBytes[k++] = _bf[i];
        for (uint i = 0; i < _bg.length; i++) resultBytes[k++] = _bg[i];
        return resultBytes;
    }
}

library AddressLibrary {
    function toString(address _addr) internal pure returns (string memory) {
        bytes32 value = bytes32(uint256(_addr));
        bytes memory alphabet = "0123456789abcdef";
        bytes memory str = new bytes(42);
        str[0] = '0';
        str[1] = 'x';
        for (uint256 i = 0; i < 20; i++) {
            str[2+i*2] = alphabet[uint8(value[i + 12] >> 4)];
            str[3+i*2] = alphabet[uint8(value[i + 12] & 0x0f)];
        }
        return string(str);
    }
}

library BytesLibrary {
    function toString(bytes32 value) internal pure returns (string memory) {
        bytes memory alphabet = "0123456789abcdef";
        bytes memory str = new bytes(64);
        for (uint256 i = 0; i < 32; i++) {
            str[i*2] = alphabet[uint8(value[i] >> 4)];
            str[1+i*2] = alphabet[uint8(value[i] & 0x0f)];
        }
        return string(str);
    }
}

library ECDSA {
    /**
     * @dev Recover signer address from a message by using their signature
     * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.
     * @param signature bytes signature, the signature is generated using web3.eth.sign()
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        bytes32 r;
        bytes32 s;
        uint8 v;

        // Check the signature length
        if (signature.length != 65) {
            return (address(0));
        }

        // Divide the signature in r, s and v variables
        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        // Version of signature should be 27 or 28, but 0 and 1 are also possible versions
        if (v < 27) {
            v += 27;
        }

        // If the version is correct return the signer address
        if (v != 27 && v != 28) {
            return (address(0));
        } else {
            return ecrecover(hash, v, r, s);
        }
    }

    /**
     * toEthSignedMessageHash
     * @dev prefix a bytes32 value with "\x19Ethereum Signed Message:"
     * and hash the result
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }
}

File 11 of 15: Migrations.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

contract Migrations {
  address public owner = msg.sender;
  uint public last_completed_migration;

  modifier restricted() {
    require(
      msg.sender == owner,
      "This function is restricted to the contract's owner"
    );
    _;
  }

  function setCompleted(uint completed) public restricted {
    last_completed_migration = completed;
  }
}

File 12 of 15: MintableOwnableToken.sol
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

import "./libs.sol";
import "./Roles.sol";
import "./ERC721.sol";

/**
 * @title MintableOwnableToken
 * @dev anyone can mint token.
 */
contract MintableOwnableToken is Ownable, ERC721, IERC721Metadata, ERC721Burnable, ERC721Base, SignerRole {

    /// @notice Token minting event.
    event CreateERC721_v4(address indexed creator, string name, string symbol);

    /// @notice The contract constructor.
    /// @param name - The value for the `name`.
    /// @param symbol - The value for the `symbol`.
    /// @param contractURI - The URI with contract metadata.
    ///        The metadata should be a JSON object with fields: `id, name, description, image, external_link`.
    ///        If the URI containts `{address}` template in its body, then the template must be substituted with the contract address.
    /// @param tokenURIPrefix - The URI prefix for all the tokens. Usually set to ipfs gateway.
    /// @param signer - The address of the initial signer.
    constructor (string memory name, string memory symbol, string memory contractURI, string memory tokenURIPrefix, address signer) public ERC721Base(name, symbol, contractURI, tokenURIPrefix) {
        emit CreateERC721_v4(msg.sender, name, symbol);
        _addSigner(signer);
        _registerInterface(bytes4(keccak256('MINT_WITH_ADDRESS')));
    }

    /// @notice The function for token minting. It creates a new token.
    ///         Must contain the signature of the format: `sha3(tokenContract.address.toLowerCase() + tokenId)`.
    ///         Where `tokenContract.address` is the address of the contract and tokenId is the id in uint256 hex format.
    ///         0 as uint256 must look like this: `0000000000000000000000000000000000000000000000000000000000000000`.
    ///         The message **must not contain** the standard prefix.
    /// @param tokenId - The id of a new token.
    /// @param v - v parameter of the ECDSA signature.
    /// @param r - r parameter of the ECDSA signature.
    /// @param s - s parameter of the ECDSA signature.
    /// @param _fees - An array of the secondary fees for this token.
    /// @param tokenURI - The suffix with `tokenURIPrefix` usually complements ipfs link to metadata object.
    ///        The URI must link to JSON object with various fields: `name, description, image, external_url, attributes`.
    ///        Can also contain another various fields.
    function mint(uint256 tokenId, uint8 v, bytes32 r, bytes32 s, Fee[] memory _fees, string memory tokenURI) public {
        require(isSigner(ecrecover(keccak256(abi.encodePacked(this, tokenId)), v, r, s)), "signer should sign tokenId");
        _mint(msg.sender, tokenId, _fees);
        _setTokenURI(tokenId, tokenURI);
    }

    /// @notice This function can be called by the contract owner and it adds an address as a new signer.
    ///         The signer will authorize token minting by signing token ids.
    /// @param account - The address of a new signer.
    function addSigner(address account) public onlyOwner {
        _addSigner(account);
    }

    /// @notice This function can be called by the contract owner and it removes an address from signers pool.
    /// @param account - The address of a signer to remove.
    function removeSigner(address account) public onlyOwner {
        _removeSigner(account);
    }


    /// @notice Sets the URI prefix for all tokens.
    function setTokenURIPrefix(string memory tokenURIPrefix) public onlyOwner {
        _setTokenURIPrefix(tokenURIPrefix);
    }


    /// @notice Sets the URI for the contract metadata.
    function setContractURI(string memory contractURI) public onlyOwner {
        _setContractURI(contractURI);
    }
}

/**
 * @title MintableUserToken
 * @dev Only owner can mint tokens.
 */
contract MintableUserToken is MintableOwnableToken {
    /// @notice The contract constructor.
    /// @param name - The value for the `name`.
    /// @param symbol - The value for the `symbol`.
    /// @param contractURI - The URI with contract metadata.
    ///        The metadata should be a JSON object with fields: `id, name, description, image, external_link`.
    ///        If the URI containts `{address}` template in its body, then the template must be substituted with the contract address.
    /// @param tokenURIPrefix - The URI prefix for all the tokens. Usually set to ipfs gateway.
    /// @param signer - The address of the initial signer.
    constructor(string memory name, string memory symbol, string memory contractURI, string memory tokenURIPrefix, address signer) MintableOwnableToken(name, symbol, contractURI, tokenURIPrefix, signer) public {}

    /// @notice The function for token minting. It creates a new token. Can be called only by the contract owner.
    ///         Must contain the signature of the format: `sha3(tokenContract.address.toLowerCase() + tokenId)`.
    ///         Where `tokenContract.address` is the address of the contract and tokenId is the id in uint256 hex format.
    ///         0 as uint256 must look like this: `0000000000000000000000000000000000000000000000000000000000000000`.
    ///         The message **must not contain** the standard prefix.
    /// @param tokenId - The id of a new token.
    /// @param v - v parameter of the ECDSA signature.
    /// @param r - r parameter of the ECDSA signature.
    /// @param s - s parameter of the ECDSA signature.
    /// @param _fees - An array of the secondary fees for this token.
    /// @param tokenURI - The suffix with `tokenURIPrefix` usually complements ipfs link to metadata object.
    ///        The URI must link to JSON object with various fields: `name, description, image, external_url, attributes`.
    ///        Can also contain another various fields.
    function mint(uint256 tokenId, uint8 v, bytes32 r, bytes32 s, Fee[] memory _fees, string memory tokenURI) onlyOwner public {
        super.mint(tokenId, v, r, s, _fees, tokenURI);
    }
}

File 14 of 15: Roles.sol
pragma solidity ^0.5.0;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

/*
 * @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 GSN 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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

/**
 * @title SignerRole
 * @dev A signer role contract.
 */
contract SignerRole is Context {
    using Roles for Roles.Role;

    event SignerAdded(address indexed account);
    event SignerRemoved(address indexed account);

    Roles.Role private _signers;

    constructor () internal {
        _addSigner(_msgSender());
    }

    /**
     * @dev Makes function callable only if sender is a signer.
     */
    modifier onlySigner() {
        require(isSigner(_msgSender()), "SignerRole: caller does not have the Signer role");
        _;
    }

    /**
     * @dev Checks if the address is a signer.
     */
    function isSigner(address account) public view returns (bool) {
        return _signers.has(account);
    }

    /**
     * @dev Makes the address a signer. Only other signers can add new signers.
     */
    function addSigner(address account) public onlySigner {
        _addSigner(account);
    }

    /**
     * @dev Removes the address from signers. Signer can be renounced only by himself.
     */
    function renounceSigner() public {
        _removeSigner(_msgSender());
    }

    function _addSigner(address account) internal {
        _signers.add(account);
        emit SignerAdded(account);
    }

    function _removeSigner(address account) internal {
        _signers.remove(account);
        emit SignerRemoved(account);
    }
}

/**
 * @title OperatorRole
 * @dev An operator role contract.
 */
contract OperatorRole is Context {
    using Roles for Roles.Role;

    event OperatorAdded(address indexed account);
    event OperatorRemoved(address indexed account);

    Roles.Role private _operators;

    constructor () internal {

    }

    /**
     * @dev Makes function callable only if sender is an operator.
     */
    modifier onlyOperator() {
        require(isOperator(_msgSender()), "OperatorRole: caller does not have the Operator role");
        _;
    }

    /**
     * @dev Checks if the address is an operator.
     */
    function isOperator(address account) public view returns (bool) {
        return _operators.has(account);
    }

    function _addOperator(address account) internal {
        _operators.add(account);
        emit OperatorAdded(account);
    }

    function _removeOperator(address account) internal {
        _operators.remove(account);
        emit OperatorRemoved(account);
    }
}

/**
 * @title OwnableOperatorRole
 * @dev Allows owner to add and remove operators.
 */
contract OwnableOperatorRole is Ownable, OperatorRole {
    /**
     * @dev Makes the address an operator. Only owner can call this function.
     */
    function addOperator(address account) public onlyOwner {
        _addOperator(account);
    }

    /**
     * @dev Removes the address from operators. Only owner can call this function.
     */
    function removeOperator(address account) public onlyOwner {
        _removeOperator(account);
    }
}

contract PauserRole {
    using Roles for Roles.Role;

    event PauserAdded(address indexed account);
    event PauserRemoved(address indexed account);

    Roles.Role private _pausers;

    constructor () internal {
        _addPauser(msg.sender);
    }

    modifier onlyPauser() {
        require(isPauser(msg.sender));
        _;
    }

    function isPauser(address account) public view returns (bool) {
        return _pausers.has(account);
    }

    function addPauser(address account) public onlyPauser {
        _addPauser(account);
    }

    function renouncePauser() public {
        _removePauser(msg.sender);
    }

    function _addPauser(address account) internal {
        _pausers.add(account);
        emit PauserAdded(account);
    }

    function _removePauser(address account) internal {
        _pausers.remove(account);
        emit PauserRemoved(account);
    }
}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is PauserRole {
    event Paused(address account);
    event Unpaused(address account);

    bool private _paused;

    constructor () internal {
        _paused = false;
    }

    /**
     * @return true if the contract is paused, false otherwise.
     */
    function paused() public view returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     */
    modifier whenNotPaused() {
        require(!_paused);
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     */
    modifier whenPaused() {
        require(_paused);
        _;
    }

    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() public onlyPauser whenNotPaused {
        _paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() public onlyPauser whenPaused {
        _paused = false;
        emit Unpaused(msg.sender);
    }
}

File 15 of 15: TransferProxy.sol
pragma solidity ^0.5.0;

import "./Roles.sol";
import "./ERC721.sol";
import "./ERC1155.sol";
import "./IERC20.sol";

/// @notice ERC721 and ERC1155 transfer proxy.
contract TransferProxy is OwnableOperatorRole {

    /// @notice Calls safeTransferFrom for ERC721.
    /// @notice Can be called only by operator.
    function erc721safeTransferFrom(IERC721 token, address from, address to, uint256 tokenId) external onlyOperator {
        token.safeTransferFrom(from, to, tokenId);
    }

    /// @notice Calls safeTransferFrom for ERC1155.
    /// @notice Can be called only by operator.
    function erc1155safeTransferFrom(IERC1155 token, address from, address to, uint256 id, uint256 value, bytes calldata data) external onlyOperator {
        token.safeTransferFrom(from, to, id, value, data);
    }
}

/// @notice Transfer proxy for ERC721 tokens whithout safe transfer support.
contract TransferProxyForDeprecated is OwnableOperatorRole {

    /// @notice Calls transferFrom for ERC721.
    /// @notice Can be called only by operator.
    function erc721TransferFrom(IERC721 token, address from, address to, uint256 tokenId) external onlyOperator {
        token.transferFrom(from, to, tokenId);
    }
}

/// @notice ERC20 transfer proxy.
contract ERC20TransferProxy is OwnableOperatorRole {

    /// @notice Calls transferFrom for ERC20 and fails on error.
    /// @notice Can be called only by operator.
    function erc20safeTransferFrom(IERC20 token, address from, address to, uint256 value) external onlyOperator {
        require(token.transferFrom(from, to, value), "failure while transferring");
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"string","name":"contractURI","type":"string"},{"internalType":"string","name":"tokenURIPrefix","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"recipients","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"name":"SecondarySaleFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"SignerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"SignerRemoved","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":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"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"creators","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"fees","outputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isSigner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct ERC1155Base.Fee[]","name":"fees","type":"tuple[]"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceSigner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"contractURI","type":"string"}],"name":"setContractURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"tokenURIPrefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenURIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040516200355f3803806200355f83398101604081905262000034916200043a565b8181818180620000546301ffc9a760e01b6001600160e01b03620001d416565b6200006f632dde656160e21b6001600160e01b03620001d416565b6000620000846001600160e01b036200022f16565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000f8620000e96001600160e01b036200022f16565b6001600160e01b036200023416565b80516200010d9060039060208401906200032f565b5050815162000125915060059060208401906200032f565b506200014163e8a3d48560e01b6001600160e01b03620001d416565b506200015d636cdb3d1360e11b6001600160e01b03620001d416565b505084516200017490600a9060208801906200032f565b5083516200018a90600b9060208701906200032f565b506200019f836001600160e01b036200023416565b620001c9604051620001b19062000604565b6040519081900390206001600160e01b03620001d416565b505050505062000703565b6001600160e01b031980821614156200020a5760405162461bcd60e51b8152600401620002019062000623565b60405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b335b90565b6200024f8160026200028660201b62001b6c1790919060201c565b6040516001600160a01b038216907f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f2490600090a250565b6200029b82826001600160e01b03620002e016565b15620002bb5760405162461bcd60e51b8152600401620002019062000611565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160a01b0382166200030b5760405162461bcd60e51b8152600401620002019062000635565b506001600160a01b03811660009081526020839052604090205460ff165b92915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200037257805160ff1916838001178555620003a2565b82800160010185558215620003a2579182015b82811115620003a257825182559160200191906001019062000385565b50620003b0929150620003b4565b5090565b6200023191905b80821115620003b05760008155600101620003bb565b80516200032981620006e9565b600082601f830112620003f057600080fd5b81516200040762000401826200066e565b62000647565b915080825260208301602083018583830111156200042457600080fd5b62000431838284620006b6565b50505092915050565b600080600080600060a086880312156200045357600080fd5b85516001600160401b038111156200046a57600080fd5b6200047888828901620003de565b95505060208601516001600160401b038111156200049557600080fd5b620004a388828901620003de565b9450506040620004b688828901620003d1565b93505060608601516001600160401b03811115620004d357600080fd5b620004e188828901620003de565b92505060808601516001600160401b03811115620004fe57600080fd5b6200050c88828901620003de565b9150509295509295909350565b600062000528601f8362000696565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b600062000563601c8362000696565b7f4552433136353a20696e76616c696420696e7465726661636520696400000000815260200192915050565b60006200059e60228362000696565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b6000620005e46011836200069f565b704d494e545f574954485f4144445245535360781b815260110192915050565b60006200032982620005d5565b60208082528101620003298162000519565b60208082528101620003298162000554565b6020808252810162000329816200058f565b6040518181016001600160401b03811182821017156200066657600080fd5b604052919050565b60006001600160401b038211156200068557600080fd5b506020601f91909101601f19160190565b90815260200190565b919050565b60006001600160a01b03821662000329565b60005b83811015620006d3578181015183820152602001620006b9565b83811115620006e3576000848401525b50505050565b620006f481620006a4565b81146200070057600080fd5b50565b612e4c80620007136000396000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c806395d89b41116100f9578063e5c8b03d11610097578063eb12d61e11610071578063eb12d61e1461039f578063f242432a146103b2578063f2fde38b146103c5578063f5298aca146103d8576101c3565b8063e5c8b03d1461037c578063e8a3d48514610384578063e985e9c51461038c576101c3565b8063b9c4d9fb116100d3578063b9c4d9fb1461032e578063c0ac99831461034e578063c6bf326214610356578063cd53d08e14610369576101c3565b806395d89b411461030057806399e0dd7c14610308578063a22cb4651461031b576101c3565b80634e1273f4116101665780637df73e27116101405780637df73e27146102bd5780638da5cb5b146102d05780638f32d59b146102e5578063938e3d7b146102ed576101c3565b80634e1273f4146102815780636308f1cd14610294578063715018a6146102b5576101c3565b80630e316ab7116101a25780630e316ab7146102265780630e89341c1461023b5780630ebd4c7f1461024e5780632eb2c2d61461026e576101c3565b8062fdd58e146101c857806301ffc9a7146101f157806306fdde0314610211575b600080fd5b6101db6101d6366004612034565b6103eb565b6040516101e89190612c6a565b60405180910390f35b6102046101ff36600461211f565b610415565b6040516101e89190612acd565b610219610434565b6040516101e89190612b19565b610239610234366004611e56565b6104c2565b005b61021961024936600461218f565b6104fb565b61026161025c36600461218f565b610506565b6040516101e89190612abc565b61023961027c366004611eae565b6105f9565b61026161028f3660046120b1565b6108ef565b6102a76102a23660046121ad565b6109c9565b6040516101e89291906129b8565b610239610a0c565b6102046102cb366004611e56565b610a7a565b6102d8610a8d565b6040516101e891906129aa565b610204610a9d565b6102396102fb36600461215b565b610ac3565b610219610af0565b61023961031636600461215b565b610b4b565b610239610329366004612004565b610b78565b61034161033c36600461218f565b610be7565b6040516101e89190612a7a565b610219610cdf565b6102396103643660046121cc565b610d3a565b6102d861037736600461218f565b610dea565b610239610e05565b610219610e17565b61020461039a366004611e74565b610e72565b6102396103ad366004611e56565b610ea0565b6102396103c0366004611f75565b610ecd565b6102396103d3366004611e56565b611087565b6102396103e6366004612064565b6110b4565b60008181526006602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b03191660009081526020819052604090205460ff1690565b600a805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b820191906000526020600020905b81548152906001019060200180831161049d57829003601f168201915b505050505081565b6104ca610a9d565b6104ef5760405162461bcd60e51b81526004016104e690612bca565b60405180910390fd5b6104f8816111ac565b50565b606061040f826111f4565b60008181526009602090815260408083208054825181850281018501909352808352606094859484015b82821015610578576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610530565b505050509050606081516040519080825280602002602001820160405280156105ab578160200160208202803883390190505b50905060005b82518110156105f1578281815181106105c657fe5b6020026020010151602001518282815181106105de57fe5b60209081029190910101526001016105b1565b509392505050565b6001600160a01b03871661061f5760405162461bcd60e51b81526004016104e690612b7a565b84831461063e5760405162461bcd60e51b81526004016104e690612c0a565b6001600160a01b03881633148061067d57506001600160a01b038816600090815260076020908152604080832033845290915290205460ff1615156001145b6106995760405162461bcd60e51b81526004016104e690612baa565b60005b858110156107ce5760008787838181106106b257fe5b90506020020135905060008686848181106106c957fe5b90506020020135905061071b816006600085815260200190815260200160002060008e6001600160a01b03166001600160a01b031681526020019081526020016000205461132f90919063ffffffff16565b6006600084815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000208190555061079e6006600084815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020548261137890919063ffffffff16565b60009283526006602090815260408085206001600160a01b038e168652909152909220919091555060010161069c565b50866001600160a01b0316886001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb898989896040516108229493929190612a8b565b60405180910390a461083c876001600160a01b031661139d565b156108e5576108e533898989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506113d992505050565b5050505050505050565b60608382146108fd57600080fd5b604080518581526020808702820101909152606090858015610929578160200160208202803883390190505b50905060005b858110156109bf576006600086868481811061094757fe5b905060200201358152602001908152602001600020600088888481811061096a57fe5b905060200201602061097f9190810190611e56565b6001600160a01b03166001600160a01b03168152602001908152602001600020548282815181106109ac57fe5b602090810291909101015260010161092f565b5095945050505050565b600960205281600052604060002081815481106109e257fe5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b610a14610a9d565b610a305760405162461bcd60e51b81526004016104e690612bca565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b600061040f60028363ffffffff61148816565b6001546001600160a01b03165b90565b6001546000906001600160a01b0316610ab46114d0565b6001600160a01b031614905090565b610acb610a9d565b610ae75760405162461bcd60e51b81526004016104e690612bca565b6104f8816114d4565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b610b53610a9d565b610b6f5760405162461bcd60e51b81526004016104e690612bca565b6104f8816114eb565b3360008181526007602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190610bdb908590612acd565b60405180910390a35050565b60008181526009602090815260408083208054825181850281018501909352808352606094859484015b82821015610c59576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610c11565b50505050905060608151604051908082528060200260200182016040528015610c8c578160200160208202803883390190505b50905060005b82518110156105f157828181518110610ca757fe5b602002602001015160000151828281518110610cbf57fe5b6001600160a01b0390921660209283029190910190910152600101610c92565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b610db960013089604051602001610d52929190612984565b6040516020818303038152906040528051906020012088888860405160008152602001604052604051610d889493929190612adb565b6020604051602081039080840390855afa158015610daa573d6000803e3d6000fd5b50505060206040510351610a7a565b610dd55760405162461bcd60e51b81526004016104e690612c4a565b610de1878484846114fe565b50505050505050565b6008602052600090815260409020546001600160a01b031681565b610e15610e106114d0565b6111ac565b565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b610ea8610a9d565b610ec45760405162461bcd60e51b81526004016104e690612bca565b6104f88161184c565b6001600160a01b038516610ef35760405162461bcd60e51b81526004016104e690612c3a565b6001600160a01b038616331480610f3257506001600160a01b038616600090815260076020908152604080832033845290915290205460ff1615156001145b610f4e5760405162461bcd60e51b81526004016104e690612baa565b60008481526006602090815260408083206001600160a01b038a168452909152902054610f81908463ffffffff61132f16565b60008581526006602090815260408083206001600160a01b038b81168552925280832093909355871681522054610fb9908490611378565b60008581526006602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188169033907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629061101c9089908990612cac565b60405180910390a4611036856001600160a01b031661139d565b1561107f5761107f338787878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061189492505050565b505050505050565b61108f610a9d565b6110ab5760405162461bcd60e51b81526004016104e690612bca565b6104f881611943565b6001600160a01b0383163314806110f357506001600160a01b038316600090815260076020908152604080832033845290915290205460ff1615156001145b61110f5760405162461bcd60e51b81526004016104e690612b9a565b60008281526006602090815260408083206001600160a01b0387168452909152902054611142908263ffffffff61132f16565b60008381526006602090815260408083206001600160a01b038816808552925280832093909355915190919033907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629061119f9087908790612cac565b60405180910390a4505050565b6111bd60028263ffffffff6119c516565b6040516001600160a01b038216907f3525e22824a8a7df2c9a6029941c824cf95b6447f1e13d5128fd3826d35afe8b90600090a250565b6000818152600460209081526040918290208054835160026001831615610100026000190190921691909104601f810184900484028201840190945283815260609361040f9391929183018282801561128e5780601f106112635761010080835404028352916020019161128e565b820191906000526020600020905b81548152906001019060200180831161127157829003601f168201915b505060038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281529550919350915083018282801561131c5780601f106112f15761010080835404028352916020019161131c565b820191906000526020600020905b8154815290600101906020018083116112ff57829003601f168201915b5050505050611a0d90919063ffffffff16565b600061137183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b02565b9392505050565b6000828201838110156113715760405162461bcd60e51b81526004016104e690612b5a565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906113d157508115155b949350505050565b60405163bc197c8160e01b808252906001600160a01b0386169063bc197c819061140f908a908a908990899089906004016129d3565b602060405180830381600087803b15801561142957600080fd5b505af115801561143d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611461919081019061213d565b6001600160e01b0319161461107f5760405162461bcd60e51b81526004016104e690612bba565b60006001600160a01b0382166114b05760405162461bcd60e51b81526004016104e690612bda565b506001600160a01b03166000908152602091909152604090205460ff1690565b3390565b80516114e7906005906020840190611bdc565b5050565b80516114e7906003906020840190611bdc565b6000848152600860205260409020546001600160a01b0316156115335760405162461bcd60e51b81526004016104e690612bea565b816115505760405162461bcd60e51b81526004016104e690612bfa565b60008151116115715760405162461bcd60e51b81526004016104e690612c5a565b60008481526008602090815260409182902080546001600160a01b0319163317905584518251818152818302810190920190925260609180156115be578160200160208202803883390190505b509050606084516040519080825280602002602001820160405280156115ee578160200160208202803883390190505b50905060005b85518110156117615760006001600160a01b031686828151811061161457fe5b6020026020010151600001516001600160a01b031614156116475760405162461bcd60e51b81526004016104e690612c1a565b85818151811061165357fe5b6020026020010151602001516000141561167f5760405162461bcd60e51b81526004016104e690612b2a565b6000878152600960205260409020865187908390811061169b57fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015191015585518690829081106116f257fe5b60200260200101516000015183828151811061170a57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505085818151811061173657fe5b60200260200101516020015182828151811061174e57fe5b60209081029190910101526001016115f4565b508451156117a5577f99aba1d63749cfd5ad1afda7c4663840924d54eb5f005bbbeadedc6ec13674b286838360405161179c93929190612c78565b60405180910390a15b600086815260066020908152604080832033845290915290208490556117cb8684611b2e565b604051339060009082907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611804908b908a90612cac565b60405180910390a4857f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8460405161183c9190612b19565b60405180910390a2505050505050565b61185d60028263ffffffff611b6c16565b6040516001600160a01b038216907f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f2490600090a250565b60405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e61906118ca908a908a90899089908990600401612a33565b602060405180830381600087803b1580156118e457600080fd5b505af11580156118f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061191c919081019061213d565b6001600160e01b0319161461107f5760405162461bcd60e51b81526004016104e690612c2a565b6001600160a01b0381166119695760405162461bcd60e51b81526004016104e690612b4a565b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6119cf8282611488565b6119eb5760405162461bcd60e51b81526004016104e690612b8a565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6060808390506060839050606081518351016040519080825280601f01601f191660200182016040528015611a49576020820181803883390190505b5090506000805b8451811015611aa157848181518110611a6557fe5b602001015160f81c60f81b838380600101945081518110611a8257fe5b60200101906001600160f81b031916908160001a905350600101611a50565b5060005b8351811015611af657838181518110611aba57fe5b602001015160f81c60f81b838380600101945081518110611ad757fe5b60200101906001600160f81b031916908160001a905350600101611aa5565b50909695505050505050565b60008184841115611b265760405162461bcd60e51b81526004016104e69190612b19565b505050900390565b6000828152600860205260409020546001600160a01b0316611b625760405162461bcd60e51b81526004016104e690612b6a565b6114e78282611bb8565b611b768282611488565b15611b935760405162461bcd60e51b81526004016104e690612b3a565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60008281526004602090815260409091208251611bd792840190611bdc565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c1d57805160ff1916838001178555611c4a565b82800160010185558215611c4a579182015b82811115611c4a578251825591602001919060010190611c2f565b50611c56929150611c5a565b5090565b610a9a91905b80821115611c565760008155600101611c60565b803561040f81612dd1565b60008083601f840112611c9157600080fd5b5081356001600160401b03811115611ca857600080fd5b602083019150836020820283011115611cc057600080fd5b9250929050565b600082601f830112611cd857600080fd5b8135611ceb611ce682612ce0565b612cba565b91508181835260208401935060208101905083856040840282011115611d1057600080fd5b60005b83811015611d3e5781611d268882611e04565b84525060209092019160409190910190600101611d13565b5050505092915050565b803561040f81612de5565b803561040f81612dee565b803561040f81612df7565b805161040f81612df7565b60008083601f840112611d8657600080fd5b5081356001600160401b03811115611d9d57600080fd5b602083019150836001820283011115611cc057600080fd5b600082601f830112611dc657600080fd5b8135611dd4611ce682612d00565b91508082526020830160208301858383011115611df057600080fd5b611dfb838284612d74565b50505092915050565b600060408284031215611e1657600080fd5b611e206040612cba565b90506000611e2e8484611c74565b8252506020611e3f84848301611d53565b60208301525092915050565b803561040f81612e00565b600060208284031215611e6857600080fd5b60006113d18484611c74565b60008060408385031215611e8757600080fd5b6000611e938585611c74565b9250506020611ea485828601611c74565b9150509250929050565b60008060008060008060008060a0898b031215611eca57600080fd5b6000611ed68b8b611c74565b9850506020611ee78b828c01611c74565b97505060408901356001600160401b03811115611f0357600080fd5b611f0f8b828c01611c7f565b965096505060608901356001600160401b03811115611f2d57600080fd5b611f398b828c01611c7f565b945094505060808901356001600160401b03811115611f5757600080fd5b611f638b828c01611d74565b92509250509295985092959890939650565b60008060008060008060a08789031215611f8e57600080fd5b6000611f9a8989611c74565b9650506020611fab89828a01611c74565b9550506040611fbc89828a01611d53565b9450506060611fcd89828a01611d53565b93505060808701356001600160401b03811115611fe957600080fd5b611ff589828a01611d74565b92509250509295509295509295565b6000806040838503121561201757600080fd5b60006120238585611c74565b9250506020611ea485828601611d48565b6000806040838503121561204757600080fd5b60006120538585611c74565b9250506020611ea485828601611d53565b60008060006060848603121561207957600080fd5b60006120858686611c74565b935050602061209686828701611d53565b92505060406120a786828701611d53565b9150509250925092565b600080600080604085870312156120c757600080fd5b84356001600160401b038111156120dd57600080fd5b6120e987828801611c7f565b945094505060208501356001600160401b0381111561210757600080fd5b61211387828801611c7f565b95989497509550505050565b60006020828403121561213157600080fd5b60006113d18484611d5e565b60006020828403121561214f57600080fd5b60006113d18484611d69565b60006020828403121561216d57600080fd5b81356001600160401b0381111561218357600080fd5b6113d184828501611db5565b6000602082840312156121a157600080fd5b60006113d18484611d53565b600080604083850312156121c057600080fd5b60006120538585611d53565b600080600080600080600060e0888a0312156121e757600080fd5b60006121f38a8a611d53565b97505060206122048a828b01611e4b565b96505060406122158a828b01611d53565b95505060606122268a828b01611d53565b94505060808801356001600160401b0381111561224257600080fd5b61224e8a828b01611cc7565b93505060a061225f8a828b01611d53565b92505060c08801356001600160401b0381111561227b57600080fd5b6122878a828b01611db5565b91505092959891949750929550565b60006122a283836122b6565b505060200190565b60006122a283836123fc565b6122bf81612d3a565b82525050565b60006122d082612d2d565b6122da8185612d31565b93506122e583612d27565b8060005b838110156123135781516122fd8882612296565b975061230883612d27565b9250506001016122e9565b509495945050505050565b600061232982612d2d565b6123338185612d31565b935061233e83612d27565b8060005b838110156123135781516123568882612296565b975061236183612d27565b925050600101612342565b60006123788385612d31565b93506001600160fb1b0383111561238e57600080fd5b60208302925061239f838584612d74565b50500190565b60006123b082612d2d565b6123ba8185612d31565b93506123c583612d27565b8060005b838110156123135781516123dd88826122aa565b97506123e883612d27565b9250506001016123c9565b6122bf81612d45565b6122bf81610a9a565b600061241082612d2d565b61241a8185612d31565b935061242a818560208601612d80565b61243381612dc1565b9093019392505050565b6122bf61244982612d69565b612db0565b600061245b601c83612d31565b7f4665652076616c75652073686f756c6420626520706f73697469766500000000815260200192915050565b6000612494601f83612d31565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b60006124cd602683612d31565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015260400192915050565b6000612515601b83612d31565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b600061254e602083612d31565b7f5f736574546f6b656e5552493a20546f6b656e2073686f756c64206578697374815260200192915050565b6000612587602583612d31565b7f64657374696e6174696f6e2061646472657373206d757374206265206e6f6e2d8152643d32b9379760d91b602082015260400192915050565b60006125ce602183612d31565b7f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c8152606560f81b602082015260400192915050565b6000612611602b83612d31565b7f4e656564206f70657261746f7220617070726f76616c20666f7220337264207081526a30b93a3c90313ab937399760a91b602082015260400192915050565b600061265e602f83612d31565b7f4e656564206f70657261746f7220617070726f76616c20666f7220337264207081526e30b93a3c903a3930b739b332b9399760891b602082015260400192915050565b60006126af603e83612d31565b7f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c81527f75652066726f6d206f6e45524331313535426174636852656365697665640000602082015260400192915050565b600061270e602083612d31565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572815260200192915050565b6000612747602283612d31565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b600061278b601783612d31565b7f546f6b656e20697320616c7265616479206d696e746564000000000000000000815260200192915050565b60006127c4601983612d31565b7f537570706c792073686f756c6420626520706f73697469766500000000000000815260200192915050565b60006127fd602983612d31565b7f5f69647320616e64205f76616c756573206172726179206c656e676874206d7581526839ba1036b0ba31b41760b91b602082015260400192915050565b6000612848601b83612d31565b7f526563697069656e742073686f756c642062652070726573656e740000000000815260200192915050565b6000612881603983612d31565b7f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c81527f75652066726f6d206f6e45524331313535526563656976656400000000000000602082015260400192915050565b60006128e0601583612d31565b742fba379036bab9ba103132903737b716bd32b9379760591b815260200192915050565b6000612911601a83612d31565b7f7369676e65722073686f756c64207369676e20746f6b656e4964000000000000815260200192915050565b600061294a601183612d31565b701d5c9a481cda1bdd5b19081899481cd95d607a1b815260200192915050565b6122bf61297682610a9a565b610a9a565b6122bf81612d63565b6000612990828561243d565b6014820191506129a0828461296a565b5060200192915050565b6020810161040f82846122b6565b604081016129c682856122b6565b61137160208301846123fc565b60a081016129e182886122b6565b6129ee60208301876122b6565b8181036040830152612a0081866123a5565b90508181036060830152612a1481856123a5565b90508181036080830152612a288184612405565b979650505050505050565b60a08101612a4182886122b6565b612a4e60208301876122b6565b612a5b60408301866123fc565b612a6860608301856123fc565b8181036080830152612a288184612405565b60208082528101611371818461231e565b60408082528101612a9d81868861236c565b90508181036020830152612ab281848661236c565b9695505050505050565b6020808252810161137181846123a5565b6020810161040f82846123f3565b60808101612ae982876123fc565b612af6602083018661297b565b612b0360408301856123fc565b612b1060608301846123fc565b95945050505050565b602080825281016113718184612405565b6020808252810161040f8161244e565b6020808252810161040f81612487565b6020808252810161040f816124c0565b6020808252810161040f81612508565b6020808252810161040f81612541565b6020808252810161040f8161257a565b6020808252810161040f816125c1565b6020808252810161040f81612604565b6020808252810161040f81612651565b6020808252810161040f816126a2565b6020808252810161040f81612701565b6020808252810161040f8161273a565b6020808252810161040f8161277e565b6020808252810161040f816127b7565b6020808252810161040f816127f0565b6020808252810161040f8161283b565b6020808252810161040f81612874565b6020808252810161040f816128d3565b6020808252810161040f81612904565b6020808252810161040f8161293d565b6020810161040f82846123fc565b60608101612c8682866123fc565b8181036020830152612c9881856122c5565b90508181036040830152612b1081846123a5565b604081016129c682856123fc565b6040518181016001600160401b0381118282101715612cd857600080fd5b604052919050565b60006001600160401b03821115612cf657600080fd5b5060209081020190565b60006001600160401b03821115612d1657600080fd5b506020601f91909101601f19160190565b60200190565b5190565b90815260200190565b600061040f82612d57565b151590565b6001600160e01b03191690565b6001600160a01b031690565b60ff1690565b600061040f82612d3a565b82818337506000910152565b60005b83811015612d9b578181015183820152602001612d83565b83811115612daa576000848401525b50505050565b600061040f82600061040f82612dcb565b601f01601f191690565b60601b90565b612dda81612d3a565b81146104f857600080fd5b612dda81612d45565b612dda81610a9a565b612dda81612d4a565b612dda81612d6356fea365627a7a7231582044ad4c9f051c8f19c5fcd84c2ab63e568bf9a1123e91b1d955ff123dade681646c6578706572696d656e74616cf564736f6c6343000510004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000009bc3ffe230774119683642a1e33827d42c801ce100000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000944696769436f6c4d5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006444947494d540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003968747470733a2f2f6170692d6d61696e6e65742e64696769636f6c2e696f2f636f6e74726163744d657461646174612f7b616464726573737d00000000000000000000000000000000000000000000000000000000000000000000000000000f68747470733a2f2f697066732e696f0000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c35760003560e01c806395d89b41116100f9578063e5c8b03d11610097578063eb12d61e11610071578063eb12d61e1461039f578063f242432a146103b2578063f2fde38b146103c5578063f5298aca146103d8576101c3565b8063e5c8b03d1461037c578063e8a3d48514610384578063e985e9c51461038c576101c3565b8063b9c4d9fb116100d3578063b9c4d9fb1461032e578063c0ac99831461034e578063c6bf326214610356578063cd53d08e14610369576101c3565b806395d89b411461030057806399e0dd7c14610308578063a22cb4651461031b576101c3565b80634e1273f4116101665780637df73e27116101405780637df73e27146102bd5780638da5cb5b146102d05780638f32d59b146102e5578063938e3d7b146102ed576101c3565b80634e1273f4146102815780636308f1cd14610294578063715018a6146102b5576101c3565b80630e316ab7116101a25780630e316ab7146102265780630e89341c1461023b5780630ebd4c7f1461024e5780632eb2c2d61461026e576101c3565b8062fdd58e146101c857806301ffc9a7146101f157806306fdde0314610211575b600080fd5b6101db6101d6366004612034565b6103eb565b6040516101e89190612c6a565b60405180910390f35b6102046101ff36600461211f565b610415565b6040516101e89190612acd565b610219610434565b6040516101e89190612b19565b610239610234366004611e56565b6104c2565b005b61021961024936600461218f565b6104fb565b61026161025c36600461218f565b610506565b6040516101e89190612abc565b61023961027c366004611eae565b6105f9565b61026161028f3660046120b1565b6108ef565b6102a76102a23660046121ad565b6109c9565b6040516101e89291906129b8565b610239610a0c565b6102046102cb366004611e56565b610a7a565b6102d8610a8d565b6040516101e891906129aa565b610204610a9d565b6102396102fb36600461215b565b610ac3565b610219610af0565b61023961031636600461215b565b610b4b565b610239610329366004612004565b610b78565b61034161033c36600461218f565b610be7565b6040516101e89190612a7a565b610219610cdf565b6102396103643660046121cc565b610d3a565b6102d861037736600461218f565b610dea565b610239610e05565b610219610e17565b61020461039a366004611e74565b610e72565b6102396103ad366004611e56565b610ea0565b6102396103c0366004611f75565b610ecd565b6102396103d3366004611e56565b611087565b6102396103e6366004612064565b6110b4565b60008181526006602090815260408083206001600160a01b03861684529091529020545b92915050565b6001600160e01b03191660009081526020819052604090205460ff1690565b600a805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b820191906000526020600020905b81548152906001019060200180831161049d57829003601f168201915b505050505081565b6104ca610a9d565b6104ef5760405162461bcd60e51b81526004016104e690612bca565b60405180910390fd5b6104f8816111ac565b50565b606061040f826111f4565b60008181526009602090815260408083208054825181850281018501909352808352606094859484015b82821015610578576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610530565b505050509050606081516040519080825280602002602001820160405280156105ab578160200160208202803883390190505b50905060005b82518110156105f1578281815181106105c657fe5b6020026020010151602001518282815181106105de57fe5b60209081029190910101526001016105b1565b509392505050565b6001600160a01b03871661061f5760405162461bcd60e51b81526004016104e690612b7a565b84831461063e5760405162461bcd60e51b81526004016104e690612c0a565b6001600160a01b03881633148061067d57506001600160a01b038816600090815260076020908152604080832033845290915290205460ff1615156001145b6106995760405162461bcd60e51b81526004016104e690612baa565b60005b858110156107ce5760008787838181106106b257fe5b90506020020135905060008686848181106106c957fe5b90506020020135905061071b816006600085815260200190815260200160002060008e6001600160a01b03166001600160a01b031681526020019081526020016000205461132f90919063ffffffff16565b6006600084815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000208190555061079e6006600084815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020548261137890919063ffffffff16565b60009283526006602090815260408085206001600160a01b038e168652909152909220919091555060010161069c565b50866001600160a01b0316886001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb898989896040516108229493929190612a8b565b60405180910390a461083c876001600160a01b031661139d565b156108e5576108e533898989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a91508990819084018382808284376000920191909152506113d992505050565b5050505050505050565b60608382146108fd57600080fd5b604080518581526020808702820101909152606090858015610929578160200160208202803883390190505b50905060005b858110156109bf576006600086868481811061094757fe5b905060200201358152602001908152602001600020600088888481811061096a57fe5b905060200201602061097f9190810190611e56565b6001600160a01b03166001600160a01b03168152602001908152602001600020548282815181106109ac57fe5b602090810291909101015260010161092f565b5095945050505050565b600960205281600052604060002081815481106109e257fe5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b610a14610a9d565b610a305760405162461bcd60e51b81526004016104e690612bca565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b600061040f60028363ffffffff61148816565b6001546001600160a01b03165b90565b6001546000906001600160a01b0316610ab46114d0565b6001600160a01b031614905090565b610acb610a9d565b610ae75760405162461bcd60e51b81526004016104e690612bca565b6104f8816114d4565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b610b53610a9d565b610b6f5760405162461bcd60e51b81526004016104e690612bca565b6104f8816114eb565b3360008181526007602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190610bdb908590612acd565b60405180910390a35050565b60008181526009602090815260408083208054825181850281018501909352808352606094859484015b82821015610c59576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101610c11565b50505050905060608151604051908082528060200260200182016040528015610c8c578160200160208202803883390190505b50905060005b82518110156105f157828181518110610ca757fe5b602002602001015160000151828281518110610cbf57fe5b6001600160a01b0390921660209283029190910190910152600101610c92565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b610db960013089604051602001610d52929190612984565b6040516020818303038152906040528051906020012088888860405160008152602001604052604051610d889493929190612adb565b6020604051602081039080840390855afa158015610daa573d6000803e3d6000fd5b50505060206040510351610a7a565b610dd55760405162461bcd60e51b81526004016104e690612c4a565b610de1878484846114fe565b50505050505050565b6008602052600090815260409020546001600160a01b031681565b610e15610e106114d0565b6111ac565b565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104ba5780601f1061048f576101008083540402835291602001916104ba565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b610ea8610a9d565b610ec45760405162461bcd60e51b81526004016104e690612bca565b6104f88161184c565b6001600160a01b038516610ef35760405162461bcd60e51b81526004016104e690612c3a565b6001600160a01b038616331480610f3257506001600160a01b038616600090815260076020908152604080832033845290915290205460ff1615156001145b610f4e5760405162461bcd60e51b81526004016104e690612baa565b60008481526006602090815260408083206001600160a01b038a168452909152902054610f81908463ffffffff61132f16565b60008581526006602090815260408083206001600160a01b038b81168552925280832093909355871681522054610fb9908490611378565b60008581526006602090815260408083206001600160a01b03808b168086529190935292819020939093559151909188169033907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629061101c9089908990612cac565b60405180910390a4611036856001600160a01b031661139d565b1561107f5761107f338787878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061189492505050565b505050505050565b61108f610a9d565b6110ab5760405162461bcd60e51b81526004016104e690612bca565b6104f881611943565b6001600160a01b0383163314806110f357506001600160a01b038316600090815260076020908152604080832033845290915290205460ff1615156001145b61110f5760405162461bcd60e51b81526004016104e690612b9a565b60008281526006602090815260408083206001600160a01b0387168452909152902054611142908263ffffffff61132f16565b60008381526006602090815260408083206001600160a01b038816808552925280832093909355915190919033907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629061119f9087908790612cac565b60405180910390a4505050565b6111bd60028263ffffffff6119c516565b6040516001600160a01b038216907f3525e22824a8a7df2c9a6029941c824cf95b6447f1e13d5128fd3826d35afe8b90600090a250565b6000818152600460209081526040918290208054835160026001831615610100026000190190921691909104601f810184900484028201840190945283815260609361040f9391929183018282801561128e5780601f106112635761010080835404028352916020019161128e565b820191906000526020600020905b81548152906001019060200180831161127157829003601f168201915b505060038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281529550919350915083018282801561131c5780601f106112f15761010080835404028352916020019161131c565b820191906000526020600020905b8154815290600101906020018083116112ff57829003601f168201915b5050505050611a0d90919063ffffffff16565b600061137183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b02565b9392505050565b6000828201838110156113715760405162461bcd60e51b81526004016104e690612b5a565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906113d157508115155b949350505050565b60405163bc197c8160e01b808252906001600160a01b0386169063bc197c819061140f908a908a908990899089906004016129d3565b602060405180830381600087803b15801561142957600080fd5b505af115801561143d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611461919081019061213d565b6001600160e01b0319161461107f5760405162461bcd60e51b81526004016104e690612bba565b60006001600160a01b0382166114b05760405162461bcd60e51b81526004016104e690612bda565b506001600160a01b03166000908152602091909152604090205460ff1690565b3390565b80516114e7906005906020840190611bdc565b5050565b80516114e7906003906020840190611bdc565b6000848152600860205260409020546001600160a01b0316156115335760405162461bcd60e51b81526004016104e690612bea565b816115505760405162461bcd60e51b81526004016104e690612bfa565b60008151116115715760405162461bcd60e51b81526004016104e690612c5a565b60008481526008602090815260409182902080546001600160a01b0319163317905584518251818152818302810190920190925260609180156115be578160200160208202803883390190505b509050606084516040519080825280602002602001820160405280156115ee578160200160208202803883390190505b50905060005b85518110156117615760006001600160a01b031686828151811061161457fe5b6020026020010151600001516001600160a01b031614156116475760405162461bcd60e51b81526004016104e690612c1a565b85818151811061165357fe5b6020026020010151602001516000141561167f5760405162461bcd60e51b81526004016104e690612b2a565b6000878152600960205260409020865187908390811061169b57fe5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b0390921691909117815591015191015585518690829081106116f257fe5b60200260200101516000015183828151811061170a57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505085818151811061173657fe5b60200260200101516020015182828151811061174e57fe5b60209081029190910101526001016115f4565b508451156117a5577f99aba1d63749cfd5ad1afda7c4663840924d54eb5f005bbbeadedc6ec13674b286838360405161179c93929190612c78565b60405180910390a15b600086815260066020908152604080832033845290915290208490556117cb8684611b2e565b604051339060009082907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6290611804908b908a90612cac565b60405180910390a4857f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8460405161183c9190612b19565b60405180910390a2505050505050565b61185d60028263ffffffff611b6c16565b6040516001600160a01b038216907f47d1c22a25bb3a5d4e481b9b1e6944c2eade3181a0a20b495ed61d35b5323f2490600090a250565b60405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e61906118ca908a908a90899089908990600401612a33565b602060405180830381600087803b1580156118e457600080fd5b505af11580156118f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061191c919081019061213d565b6001600160e01b0319161461107f5760405162461bcd60e51b81526004016104e690612c2a565b6001600160a01b0381166119695760405162461bcd60e51b81526004016104e690612b4a565b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6119cf8282611488565b6119eb5760405162461bcd60e51b81526004016104e690612b8a565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6060808390506060839050606081518351016040519080825280601f01601f191660200182016040528015611a49576020820181803883390190505b5090506000805b8451811015611aa157848181518110611a6557fe5b602001015160f81c60f81b838380600101945081518110611a8257fe5b60200101906001600160f81b031916908160001a905350600101611a50565b5060005b8351811015611af657838181518110611aba57fe5b602001015160f81c60f81b838380600101945081518110611ad757fe5b60200101906001600160f81b031916908160001a905350600101611aa5565b50909695505050505050565b60008184841115611b265760405162461bcd60e51b81526004016104e69190612b19565b505050900390565b6000828152600860205260409020546001600160a01b0316611b625760405162461bcd60e51b81526004016104e690612b6a565b6114e78282611bb8565b611b768282611488565b15611b935760405162461bcd60e51b81526004016104e690612b3a565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60008281526004602090815260409091208251611bd792840190611bdc565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611c1d57805160ff1916838001178555611c4a565b82800160010185558215611c4a579182015b82811115611c4a578251825591602001919060010190611c2f565b50611c56929150611c5a565b5090565b610a9a91905b80821115611c565760008155600101611c60565b803561040f81612dd1565b60008083601f840112611c9157600080fd5b5081356001600160401b03811115611ca857600080fd5b602083019150836020820283011115611cc057600080fd5b9250929050565b600082601f830112611cd857600080fd5b8135611ceb611ce682612ce0565b612cba565b91508181835260208401935060208101905083856040840282011115611d1057600080fd5b60005b83811015611d3e5781611d268882611e04565b84525060209092019160409190910190600101611d13565b5050505092915050565b803561040f81612de5565b803561040f81612dee565b803561040f81612df7565b805161040f81612df7565b60008083601f840112611d8657600080fd5b5081356001600160401b03811115611d9d57600080fd5b602083019150836001820283011115611cc057600080fd5b600082601f830112611dc657600080fd5b8135611dd4611ce682612d00565b91508082526020830160208301858383011115611df057600080fd5b611dfb838284612d74565b50505092915050565b600060408284031215611e1657600080fd5b611e206040612cba565b90506000611e2e8484611c74565b8252506020611e3f84848301611d53565b60208301525092915050565b803561040f81612e00565b600060208284031215611e6857600080fd5b60006113d18484611c74565b60008060408385031215611e8757600080fd5b6000611e938585611c74565b9250506020611ea485828601611c74565b9150509250929050565b60008060008060008060008060a0898b031215611eca57600080fd5b6000611ed68b8b611c74565b9850506020611ee78b828c01611c74565b97505060408901356001600160401b03811115611f0357600080fd5b611f0f8b828c01611c7f565b965096505060608901356001600160401b03811115611f2d57600080fd5b611f398b828c01611c7f565b945094505060808901356001600160401b03811115611f5757600080fd5b611f638b828c01611d74565b92509250509295985092959890939650565b60008060008060008060a08789031215611f8e57600080fd5b6000611f9a8989611c74565b9650506020611fab89828a01611c74565b9550506040611fbc89828a01611d53565b9450506060611fcd89828a01611d53565b93505060808701356001600160401b03811115611fe957600080fd5b611ff589828a01611d74565b92509250509295509295509295565b6000806040838503121561201757600080fd5b60006120238585611c74565b9250506020611ea485828601611d48565b6000806040838503121561204757600080fd5b60006120538585611c74565b9250506020611ea485828601611d53565b60008060006060848603121561207957600080fd5b60006120858686611c74565b935050602061209686828701611d53565b92505060406120a786828701611d53565b9150509250925092565b600080600080604085870312156120c757600080fd5b84356001600160401b038111156120dd57600080fd5b6120e987828801611c7f565b945094505060208501356001600160401b0381111561210757600080fd5b61211387828801611c7f565b95989497509550505050565b60006020828403121561213157600080fd5b60006113d18484611d5e565b60006020828403121561214f57600080fd5b60006113d18484611d69565b60006020828403121561216d57600080fd5b81356001600160401b0381111561218357600080fd5b6113d184828501611db5565b6000602082840312156121a157600080fd5b60006113d18484611d53565b600080604083850312156121c057600080fd5b60006120538585611d53565b600080600080600080600060e0888a0312156121e757600080fd5b60006121f38a8a611d53565b97505060206122048a828b01611e4b565b96505060406122158a828b01611d53565b95505060606122268a828b01611d53565b94505060808801356001600160401b0381111561224257600080fd5b61224e8a828b01611cc7565b93505060a061225f8a828b01611d53565b92505060c08801356001600160401b0381111561227b57600080fd5b6122878a828b01611db5565b91505092959891949750929550565b60006122a283836122b6565b505060200190565b60006122a283836123fc565b6122bf81612d3a565b82525050565b60006122d082612d2d565b6122da8185612d31565b93506122e583612d27565b8060005b838110156123135781516122fd8882612296565b975061230883612d27565b9250506001016122e9565b509495945050505050565b600061232982612d2d565b6123338185612d31565b935061233e83612d27565b8060005b838110156123135781516123568882612296565b975061236183612d27565b925050600101612342565b60006123788385612d31565b93506001600160fb1b0383111561238e57600080fd5b60208302925061239f838584612d74565b50500190565b60006123b082612d2d565b6123ba8185612d31565b93506123c583612d27565b8060005b838110156123135781516123dd88826122aa565b97506123e883612d27565b9250506001016123c9565b6122bf81612d45565b6122bf81610a9a565b600061241082612d2d565b61241a8185612d31565b935061242a818560208601612d80565b61243381612dc1565b9093019392505050565b6122bf61244982612d69565b612db0565b600061245b601c83612d31565b7f4665652076616c75652073686f756c6420626520706f73697469766500000000815260200192915050565b6000612494601f83612d31565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b60006124cd602683612d31565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015260400192915050565b6000612515601b83612d31565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b600061254e602083612d31565b7f5f736574546f6b656e5552493a20546f6b656e2073686f756c64206578697374815260200192915050565b6000612587602583612d31565b7f64657374696e6174696f6e2061646472657373206d757374206265206e6f6e2d8152643d32b9379760d91b602082015260400192915050565b60006125ce602183612d31565b7f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c8152606560f81b602082015260400192915050565b6000612611602b83612d31565b7f4e656564206f70657261746f7220617070726f76616c20666f7220337264207081526a30b93a3c90313ab937399760a91b602082015260400192915050565b600061265e602f83612d31565b7f4e656564206f70657261746f7220617070726f76616c20666f7220337264207081526e30b93a3c903a3930b739b332b9399760891b602082015260400192915050565b60006126af603e83612d31565b7f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c81527f75652066726f6d206f6e45524331313535426174636852656365697665640000602082015260400192915050565b600061270e602083612d31565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572815260200192915050565b6000612747602283612d31565b7f526f6c65733a206163636f756e7420697320746865207a65726f206164647265815261737360f01b602082015260400192915050565b600061278b601783612d31565b7f546f6b656e20697320616c7265616479206d696e746564000000000000000000815260200192915050565b60006127c4601983612d31565b7f537570706c792073686f756c6420626520706f73697469766500000000000000815260200192915050565b60006127fd602983612d31565b7f5f69647320616e64205f76616c756573206172726179206c656e676874206d7581526839ba1036b0ba31b41760b91b602082015260400192915050565b6000612848601b83612d31565b7f526563697069656e742073686f756c642062652070726573656e740000000000815260200192915050565b6000612881603983612d31565b7f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c81527f75652066726f6d206f6e45524331313535526563656976656400000000000000602082015260400192915050565b60006128e0601583612d31565b742fba379036bab9ba103132903737b716bd32b9379760591b815260200192915050565b6000612911601a83612d31565b7f7369676e65722073686f756c64207369676e20746f6b656e4964000000000000815260200192915050565b600061294a601183612d31565b701d5c9a481cda1bdd5b19081899481cd95d607a1b815260200192915050565b6122bf61297682610a9a565b610a9a565b6122bf81612d63565b6000612990828561243d565b6014820191506129a0828461296a565b5060200192915050565b6020810161040f82846122b6565b604081016129c682856122b6565b61137160208301846123fc565b60a081016129e182886122b6565b6129ee60208301876122b6565b8181036040830152612a0081866123a5565b90508181036060830152612a1481856123a5565b90508181036080830152612a288184612405565b979650505050505050565b60a08101612a4182886122b6565b612a4e60208301876122b6565b612a5b60408301866123fc565b612a6860608301856123fc565b8181036080830152612a288184612405565b60208082528101611371818461231e565b60408082528101612a9d81868861236c565b90508181036020830152612ab281848661236c565b9695505050505050565b6020808252810161137181846123a5565b6020810161040f82846123f3565b60808101612ae982876123fc565b612af6602083018661297b565b612b0360408301856123fc565b612b1060608301846123fc565b95945050505050565b602080825281016113718184612405565b6020808252810161040f8161244e565b6020808252810161040f81612487565b6020808252810161040f816124c0565b6020808252810161040f81612508565b6020808252810161040f81612541565b6020808252810161040f8161257a565b6020808252810161040f816125c1565b6020808252810161040f81612604565b6020808252810161040f81612651565b6020808252810161040f816126a2565b6020808252810161040f81612701565b6020808252810161040f8161273a565b6020808252810161040f8161277e565b6020808252810161040f816127b7565b6020808252810161040f816127f0565b6020808252810161040f8161283b565b6020808252810161040f81612874565b6020808252810161040f816128d3565b6020808252810161040f81612904565b6020808252810161040f8161293d565b6020810161040f82846123fc565b60608101612c8682866123fc565b8181036020830152612c9881856122c5565b90508181036040830152612b1081846123a5565b604081016129c682856123fc565b6040518181016001600160401b0381118282101715612cd857600080fd5b604052919050565b60006001600160401b03821115612cf657600080fd5b5060209081020190565b60006001600160401b03821115612d1657600080fd5b506020601f91909101601f19160190565b60200190565b5190565b90815260200190565b600061040f82612d57565b151590565b6001600160e01b03191690565b6001600160a01b031690565b60ff1690565b600061040f82612d3a565b82818337506000910152565b60005b83811015612d9b578181015183820152602001612d83565b83811115612daa576000848401525b50505050565b600061040f82600061040f82612dcb565b601f01601f191690565b60601b90565b612dda81612d3a565b81146104f857600080fd5b612dda81612d45565b612dda81610a9a565b612dda81612d4a565b612dda81612d6356fea365627a7a7231582044ad4c9f051c8f19c5fcd84c2ab63e568bf9a1123e91b1d955ff123dade681646c6578706572696d656e74616cf564736f6c63430005100040

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000009bc3ffe230774119683642a1e33827d42c801ce100000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000944696769436f6c4d5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006444947494d540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003968747470733a2f2f6170692d6d61696e6e65742e64696769636f6c2e696f2f636f6e74726163744d657461646174612f7b616464726573737d00000000000000000000000000000000000000000000000000000000000000000000000000000f68747470733a2f2f697066732e696f0000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): DigiColMT
Arg [1] : _symbol (string): DIGIMT
Arg [2] : signer (address): 0x9bc3FFe230774119683642A1e33827D42C801cE1
Arg [3] : contractURI (string): https://api-mainnet.digicol.io/contractMetadata/{address}
Arg [4] : tokenURIPrefix (string): https://ipfs.io

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000009bc3ffe230774119683642a1e33827d42c801ce1
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [6] : 44696769436f6c4d540000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [8] : 444947494d540000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000039
Arg [10] : 68747470733a2f2f6170692d6d61696e6e65742e64696769636f6c2e696f2f63
Arg [11] : 6f6e74726163744d657461646174612f7b616464726573737d00000000000000
Arg [12] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [13] : 68747470733a2f2f697066732e696f0000000000000000000000000000000000


Deployed Bytecode Sourcemap

184:3208:11:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;184:3208:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18713:374:1;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1670:135:3;;;;;;;;;:::i;:::-;;;;;;;;277:18:11;;;:::i;:::-;;;;;;;;1834:97;;;;;;;;;:::i;:::-;;11524:104:1;;;;;;;;;:::i;24481:300::-;;;;;;;;;:::i;:::-;;;;;;;;16663:1798;;;;;;;;;:::i;19395:405::-;;;;;;;;;:::i;23563:38::-;;;;;;;;;:::i;:::-;;;;;;;;;3819:140:12;;;:::i;5209:109::-;;;;;;;;;:::i;3008:79::-;;;:::i;:::-;;;;;;;;3374:94;;;:::i;27282:115:1:-;;;;;;;;;:::i;334:20:11:-;;;:::i;27091:127:1:-;;;;;;;;;:::i;20162:205::-;;;;;;;;;:::i;23953:344::-;;;;;;;;;:::i;:::-;;;;;;;;142:28:7;;;:::i;3107:282:11:-;;;;;;;;;:::i;23484:44:1:-;;;;;;;;;:::i;5631:79:12:-;;;:::i;2455:25:3:-;;;:::i;20654:151:1:-;;;;;;;;;:::i;1562:91:11:-;;;;;;;;;:::i;14070:945:1:-;;;;;;;;;:::i;4114:109:12:-;;;;;;;;;:::i;26069:507:1:-;;;;;;;;;:::i;18713:374::-;18784:7;19058:13;;;:8;:13;;;;;;;;-1:-1:-1;;;;;19058:21:1;;;;;;;;;;18713:374;;;;;:::o;1670:135:3:-;-1:-1:-1;;;;;;1764:33:3;1740:4;1764:33;;;;;;;;;;;;;;1670:135::o;277:18:11:-;;;;;;;;;;;;;;;-1:-1:-1;;277:18:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1834:97::-;3220:9:12;:7;:9::i;:::-;3212:54;;;;-1:-1:-1;;;3212:54:12;;;;;;;;;;;;;;;;;1901:22:11;1915:7;1901:13;:22::i;:::-;1834:97;:::o;11524:104:1:-;11573:13;11606:14;11616:3;11606:9;:14::i;24481:300::-;24580:8;;;;:4;:8;;;;;;;;24559:29;;;;;;;;;;;;;;;;;24533:13;;;;24559:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24559:29:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24599:20;24633:5;:12;24622:24;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;24622:24:1;-1:-1:-1;24599:47:1;-1:-1:-1;24662:6:1;24657:93;24678:5;:12;24674:1;:16;24657:93;;;24724:5;24730:1;24724:8;;;;;;;;;;;;;;:14;;;24712:6;24719:1;24712:9;;;;;;;;;;;;;;;;;:26;24692:3;;24657:93;;;-1:-1:-1;24767:6:1;24481:300;-1:-1:-1;;;24481:300:1:o;16663:1798::-;-1:-1:-1;;;;;16860:19:1;;16852:69;;;;-1:-1:-1;;;16852:69:1;;;;;;;;;16940:29;;;16932:83;;;;-1:-1:-1;;;16932:83:1;;;;;;;;;-1:-1:-1;;;;;17034:19:1;;17043:10;17034:19;;:66;;-1:-1:-1;;;;;;17057:23:1;;;;;;:16;:23;;;;;;;;17081:10;17057:35;;;;;;;;;;:43;;:35;:43;17034:66;17026:126;;;;-1:-1:-1;;;17026:126:1;;;;;;;;;17170:9;17165:388;17185:15;;;17165:388;;;17222:10;17235:4;;17240:1;17235:7;;;;;;;;;;;;;17222:20;;17257:13;17273:7;;17281:1;17273:10;;;;;;;;;;;;;17257:26;;17446:30;17470:5;17446:8;:12;17455:2;17446:12;;;;;;;;;;;:19;17459:5;-1:-1:-1;;;;;17446:19:1;-1:-1:-1;;;;;17446:19:1;;;;;;;;;;;;;:23;;:30;;;;:::i;:::-;17424:8;:12;17433:2;17424:12;;;;;;;;;;;:19;17437:5;-1:-1:-1;;;;;17424:19:1;-1:-1:-1;;;;;17424:19:1;;;;;;;;;;;;:52;;;;17513:28;17523:8;:12;17532:2;17523:12;;;;;;;;;;;:17;17536:3;-1:-1:-1;;;;;17523:17:1;-1:-1:-1;;;;;17523:17:1;;;;;;;;;;;;;17513:5;:9;;:28;;;;:::i;:::-;17491:12;;;;:8;:12;;;;;;;;-1:-1:-1;;;;;17491:17:1;;;;;;;;;;:50;;;;-1:-1:-1;17202:3:1;;17165:388;;;;18144:3;-1:-1:-1;;;;;18111:52:1;18137:5;-1:-1:-1;;;;;18111:52:1;18125:10;-1:-1:-1;;;;;18111:52:1;;18149:4;;18155:7;;18111:52;;;;;;;;;;;;;;;;;;18328:16;:3;-1:-1:-1;;;;;18328:14:1;;:16::i;:::-;18324:130;;;18361:81;18397:10;18409:5;18416:3;18421:4;;18361:81;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;18361:81:1;;;;;;;;;;;;;;;;;;;;-1:-1:-1;18427:7:1;;-1:-1:-1;18427:7:1;;;;18361:81;;;18427:7;;18361:81;18427:7;18361:81;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;;18361:81:1;;;;137:4:-1;18361:81:1;;;;;;;;;;;;;;;;;;-1:-1:-1;18436:5:1;;-1:-1:-1;18436:5:1;;;;18361:81;;18436:5;;;;18361:81;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;18361:35:1;;-1:-1:-1;;;18361:81:1:i;:::-;16663:1798;;;;;;;;:::o;19395:405::-;19495:16;19534:29;;;19526:38;;;;;;19606:29;;;;;;;;;;;;;;;;19577:26;;19620:7;19606:29;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;19606:29:1;-1:-1:-1;19577:58:1;-1:-1:-1;19653:9:1;19648:116;19668:18;;;19648:116;;;19723:8;:17;19732:4;;19737:1;19732:7;;;;;;;;;;;;;19723:17;;;;;;;;;;;:29;19741:7;;19749:1;19741:10;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19723:29:1;-1:-1:-1;;;;;19723:29:1;;;;;;;;;;;;;19708:9;19718:1;19708:12;;;;;;;;;;;;;;;;;:44;19688:3;;19648:116;;;-1:-1:-1;19783:9:1;19395:405;-1:-1:-1;;;;;19395:405:1:o;23563:38::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23563:38:1;;;;-1:-1:-1;23563:38:1;-1:-1:-1;23563:38:1;:::o;3819:140:12:-;3220:9;:7;:9::i;:::-;3212:54;;;;-1:-1:-1;;;3212:54:12;;;;;;;;;3902:6;;3881:40;;3918:1;;-1:-1:-1;;;;;3902:6:12;;3881:40;;3918:1;;3881:40;3932:6;:19;;-1:-1:-1;;;;;;3932:19:12;;;3819:140::o;5209:109::-;5265:4;5289:21;:8;5302:7;5289:21;:12;:21;:::i;3008:79::-;3073:6;;-1:-1:-1;;;;;3073:6:12;3008:79;;:::o;3374:94::-;3454:6;;3414:4;;-1:-1:-1;;;;;3454:6:12;3438:12;:10;:12::i;:::-;-1:-1:-1;;;;;3438:22:12;;3431:29;;3374:94;:::o;27282:115:1:-;3220:9:12;:7;:9::i;:::-;3212:54;;;;-1:-1:-1;;;3212:54:12;;;;;;;;;27361:28:1;27377:11;27361:15;:28::i;334:20:11:-;;;;;;;;;;;;;;;-1:-1:-1;;334:20:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27091:127:1;3220:9:12;:7;:9::i;:::-;3212:54;;;;-1:-1:-1;;;3212:54:12;;;;;;;;;27176:34:1;27195:14;27176:18;:34::i;20162:205::-;20261:10;20244:28;;;;:16;:28;;;;;;;;-1:-1:-1;;;;;20244:39:1;;;;;;;;;;;:51;;-1:-1:-1;;20244:51:1;;;;;;;20311:48;;20244:39;;20261:10;20311:48;;;;20244:51;;20311:48;;;;;;;;;;20162:205;;:::o;23953:344::-;24070:8;;;;:4;:8;;;;;;;;24049:29;;;;;;;;;;;;;;;;;24012:24;;;;24049:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24049:29:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24089:31;24145:5;:12;24123:35;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;24123:35:1;-1:-1:-1;24089:69:1;-1:-1:-1;24174:6:1;24169:97;24190:5;:12;24186:1;:16;24169:97;;;24236:5;24242:1;24236:8;;;;;;;;;;;;;;:18;;;24224:6;24231:1;24224:9;;;;;;;;-1:-1:-1;;;;;24224:30:1;;;:9;;;;;;;;;;;:30;24204:3;;24169:97;;142:28:7;;;;;;;;;;;;;;;-1:-1:-1;;142:28:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3107:282:11;3244:67;3253:57;3290:4;3296:2;3273:26;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3273:26:11;;;3263:37;;;;;;3302:1;3305;3308;3253:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3253:57:11;;;;;;;;3244:8;:67::i;:::-;3236:106;;;;-1:-1:-1;;;3236:106:11;;;;;;;;;3353:28;3359:2;3363:4;3369:6;3377:3;3353:5;:28::i;:::-;3107:282;;;;;;;:::o;23484:44:1:-;;;;;;;;;;;;-1:-1:-1;;;;;23484:44:1;;:::o;5631:79:12:-;5675:27;5689:12;:10;:12::i;:::-;5675:13;:27::i;:::-;5631:79::o;2455:25:3:-;;;;;;;;;;;;;;;-1:-1:-1;;2455:25:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20654:151:1;-1:-1:-1;;;;;20762:24:1;;;20738:4;20762:24;;;:16;:24;;;;;;;;:35;;;;;;;;;;;;;;;20654:151::o;1562:91:11:-;3220:9:12;:7;:9::i;:::-;3212:54;;;;-1:-1:-1;;;3212:54:12;;;;;;;;;1626:19:11;1637:7;1626:10;:19::i;14070:945:1:-;-1:-1:-1;;;;;14205:19:1;;14197:53;;;;-1:-1:-1;;;14197:53:1;;;;;;;;;-1:-1:-1;;;;;14269:19:1;;14278:10;14269:19;;:66;;-1:-1:-1;;;;;;14292:23:1;;;;;;:16;:23;;;;;;;;14316:10;14292:35;;;;;;;;;;:43;;:35;:43;14269:66;14261:126;;;;-1:-1:-1;;;14261:126:1;;;;;;;;;14539:13;;;;:8;:13;;;;;;;;-1:-1:-1;;;;;14539:20:1;;;;;;;;;;:32;;14564:6;14539:32;:24;:32;:::i;:::-;14516:13;;;;:8;:13;;;;;;;;-1:-1:-1;;;;;14516:20:1;;;;;;;;;;:55;;;;14616:18;;;;;;14605:30;;:6;;:10;:30::i;:::-;14582:13;;;;:8;:13;;;;;;;;-1:-1:-1;;;;;14582:18:1;;;;;;;;;;;;;;:53;;;;14681:51;;14582:18;;14681:51;;;14696:10;;14681:51;;;;14591:3;;14725:6;;14681:51;;;;;;;;;;14889:16;:3;-1:-1:-1;;;;;14889:14:1;;:16::i;:::-;14885:123;;;14922:74;14953:10;14965:5;14972:3;14977;14982:6;14990:5;;14922:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;14922:30:1;;-1:-1:-1;;;14922:74:1:i;:::-;14070:945;;;;;;:::o;4114:109:12:-;3220:9;:7;:9::i;:::-;3212:54;;;;-1:-1:-1;;;3212:54:12;;;;;;;;;4187:28;4206:8;4187:18;:28::i;26069:507:1:-;-1:-1:-1;;;;;26158:20:1;;26168:10;26158:20;;:68;;-1:-1:-1;;;;;;26182:24:1;;;;;;:16;:24;;;;;;;;26207:10;26182:36;;;;;;;;;;:44;;:36;:44;26158:68;26150:124;;;;-1:-1:-1;;;26150:124:1;;;;;;;;;26428:13;;;;:8;:13;;;;;;;;-1:-1:-1;;;;;26428:21:1;;;;;;;;;;:33;;26454:6;26428:33;:25;:33;:::i;:::-;26404:13;;;;:8;:13;;;;;;;;-1:-1:-1;;;;;26404:21:1;;;;;;;;;;:57;;;;26507:61;;26404:13;;:21;26522:10;;26507:61;;;;26413:3;;26561:6;;26507:61;;;;;;;;;;26069:507;;;:::o;5848:130:12:-;5908:24;:8;5924:7;5908:24;:15;:24;:::i;:::-;5948:22;;-1:-1:-1;;;;;5948:22:12;;;;;;;;5848:130;:::o;581:142:7:-;695:19;;;;:10;:19;;;;;;;;;673:42;;;;;;;;;;;-1:-1:-1;;673:42:7;;;;;;;;;;;;;;;;;;;;;;;;;;640:13;;673:42;;;;695:19;673:42;;695:19;673:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;673:14:7;:21;;;;;;;;-1:-1:-1;;673:21:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;673:14:7;;-1:-1:-1;673:21:7;-1:-1:-1;673:21:7;;:14;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:42;;;;:::i;1315:136:14:-;1373:7;1400:43;1404:1;1407;1400:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1393:50;1315:136;-1:-1:-1;;;1315:136:14:o;859:181::-;917:7;949:5;;;973:6;;;;965:46;;;;-1:-1:-1;;;965:46:14;;;;;;;;6137:619;6197:4;6665:20;;6508:66;6705:23;;;;;;:42;;-1:-1:-1;6732:15:14;;;6705:42;6697:51;6137:619;-1:-1:-1;;;;6137:619:14:o;22061:1189:1:-;23061:88;;-1:-1:-1;;;23061:88:1;;;23153:22;-1:-1:-1;;;;;23061:48:1;;;7930:10;;23061:88;;23110:9;;23121:5;;23128:4;;23134:7;;23143:5;;23061:88;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23061:88:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23061:88:1;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;23061:88:1;;;;;;;;;-1:-1:-1;;;;;;23061:114:1;;23053:189;;;;-1:-1:-1;;;23053:189:1;;;;;;;;810:203:12;882:4;-1:-1:-1;;;;;907:21:12;;899:68;;;;-1:-1:-1;;;899:68:12;;;;;;;;;-1:-1:-1;;;;;;985:20:12;:11;:20;;;;;;;;;;;;;;;810:203::o;1799:98::-;1879:10;1799:98;:::o;2921:107:3:-;2994:26;;;;:11;;:26;;;;;:::i;:::-;;2921:107;:::o;1226:119:7:-;1305:32;;;;:14;;:32;;;;;:::i;24868:1159:1:-;25006:3;24981:13;;;:8;:13;;;;;;-1:-1:-1;;;;;24981:13:1;:29;24973:65;;;;-1:-1:-1;;;24973:65:1;;;;;;;;;25057:12;25049:50;;;;-1:-1:-1;;;25049:50:1;;;;;;;;;25139:1;25124:4;25118:18;:22;25110:52;;;;-1:-1:-1;;;25110:52:1;;;;;;;;;25175:13;;;;:8;:13;;;;;;;;;:26;;-1:-1:-1;;;;;;25175:26:1;25191:10;25175:26;;;25256:12;;25242:27;;;;;;;;;;;;;;;;25212;;25242;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;25242:27:1;;25212:57;;25280:17;25311:5;:12;25300:24;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;25300:24:1;-1:-1:-1;25280:44:1;-1:-1:-1;25340:6:1;25335:342;25356:5;:12;25352:1;:16;25335:342;;;25428:3;-1:-1:-1;;;;;25398:34:1;:5;25404:1;25398:8;;;;;;;;;;;;;;:18;;;-1:-1:-1;;;;;25398:34:1;;;25390:74;;;;-1:-1:-1;;;25390:74:1;;;;;;;;;25487:5;25493:1;25487:8;;;;;;;;;;;;;;:14;;;25505:1;25487:19;;25479:60;;;;-1:-1:-1;;;25479:60:1;;;;;;;;;25554:9;;;;:4;:9;;;;;25569:8;;:5;;25575:1;;25569:8;;;;;;;;;;;;;;;;;27:10:-1;;39:1;23:18;;;45:23;;-1:-1;25554:24:1;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;25554:24:1;-1:-1:-1;;;;;25554:24:1;;;;;;;;;;;;;;;25609:8;;;;25615:1;;25609:8;;;;;;;;;;;;:18;;;25593:10;25604:1;25593:13;;;;;;;;;;;;;:34;-1:-1:-1;;;;;25593:34:1;;;-1:-1:-1;;;;;25593:34:1;;;;;25651:5;25657:1;25651:8;;;;;;;;;;;;;;:14;;;25642:3;25646:1;25642:6;;;;;;;;;;;;;;;;;:23;25370:3;;25335:342;;;-1:-1:-1;25691:12:1;;:16;25687:93;;25729:39;25747:3;25752:10;25764:3;25729:39;;;;;;;;;;;;;;;;;25687:93;25790:13;;;;:8;:13;;;;;;;;25804:10;25790:25;;;;;;;:35;;;25836:23;25799:3;25854:4;25836:12;:23::i;:::-;25923:66;;25964:10;;25958:3;;25964:10;;25923:66;;;;25976:3;;25981:7;;25923:66;;;;;;;;;;26015:3;26005:14;26009:4;26005:14;;;;;;;;;;;;;;;24868:1159;;;;;;:::o;5718:122:12:-;5775:21;:8;5788:7;5775:21;:12;:21;:::i;:::-;5812:20;;-1:-1:-1;;;;;5812:20:12;;;;;;;;5718:122;:::o;20916:1137:1:-;21882:81;;-1:-1:-1;;;21882:81:1;;;21967:16;-1:-1:-1;;;;;21882:43:1;;;7782:10;;21882:81;;21926:9;;21937:5;;21944:3;;21949:6;;21957:5;;21882:81;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;21882:81:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;21882:81:1;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;21882:81:1;;;;;;;;;-1:-1:-1;;;;;;21882:101:1;;21874:171;;;;-1:-1:-1;;;21874:171:1;;;;;;;;4329:229:12;-1:-1:-1;;;;;4403:22:12;;4395:73;;;;-1:-1:-1;;;4395:73:12;;;;;;;;;4505:6;;4484:38;;-1:-1:-1;;;;;4484:38:12;;;;4505:6;;4484:38;;4505:6;;4484:38;4533:6;:17;;-1:-1:-1;;;;;;4533:17:12;-1:-1:-1;;;;;4533:17:12;;;;;;;;;;4329:229::o;532:183::-;612:18;616:4;622:7;612:3;:18::i;:::-;604:64;;;;-1:-1:-1;;;604:64:12;;;;;;;;;-1:-1:-1;;;;;679:20:12;702:5;679:20;;;;;;;;;;;:28;;-1:-1:-1;;679:28:12;;;532:183::o;10640:422:14:-;10715:13;10741:16;10766:2;10741:28;;10780:16;10805:2;10780:28;;10819:16;10861:3;:10;10848:3;:10;:23;10838:34;;;;;;;;;;;;;;;;;;;;;;;;;21:6:-1;;104:10;10838:34:14;87::-1;135:17;;-1:-1;10838:34:14;-1:-1:-1;10819:53:14;-1:-1:-1;10883:6:14;;10904:55;10925:3;:10;10921:1;:14;10904:55;;;10953:3;10957:1;10953:6;;;;;;;;;;;;;;;;10942:3;10946;;;;;;10942:8;;;;;;;;;;;:17;-1:-1:-1;;;;;10942:17:14;;;;;;;;-1:-1:-1;10937:3:14;;10904:55;;;-1:-1:-1;10975:6:14;10970:55;10991:3;:10;10987:1;:14;10970:55;;;11019:3;11023:1;11019:6;;;;;;;;;;;;;;;;11008:3;11012;;;;;;11008:8;;;;;;;;;;;:17;-1:-1:-1;;;;;11008:17:14;;;;;;;;-1:-1:-1;11003:3:14;;10970:55;;;-1:-1:-1;11050:3:14;;10640:422;-1:-1:-1;;;;;;10640:422:14:o;1788:192::-;1874:7;1910:12;1902:6;;;;1894:29;;;;-1:-1:-1;;;1894:29:14;;;;;;;;;;-1:-1:-1;;;1946:5:14;;;1788:192::o;26823:207:1:-;26938:3;26909:17;;;:8;:17;;;;;;-1:-1:-1;;;;;26909:17:1;26901:78;;;;-1:-1:-1;;;26901:78:1;;;;;;;;;26990:32;27009:7;27018:3;26990:18;:32::i;274:178:12:-;352:18;356:4;362:7;352:3;:18::i;:::-;351:19;343:63;;;;-1:-1:-1;;;343:63:12;;;;;;;;;-1:-1:-1;;;;;417:20:12;:11;:20;;;;;;;;;;;:27;;-1:-1:-1;;417:27:12;440:4;417:27;;;274:178::o;970:111:7:-;1048:19;;;;:10;:19;;;;;;;;:25;;;;;;;;:::i;:::-;;970:111;;:::o;184:3208:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;184:3208:11;;;-1:-1:-1;184:3208:11;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;5:130:-1;72:20;;97:33;72:20;97:33;;313:352;;;443:3;436:4;428:6;424:17;420:27;410:2;;461:1;458;451:12;410:2;-1:-1;481:20;;-1:-1;;;;;510:30;;507:2;;;553:1;550;543:12;507:2;587:4;579:6;575:17;563:29;;638:3;630:4;622:6;618:17;608:8;604:32;601:41;598:2;;;655:1;652;645:12;598:2;403:262;;;;;;706:758;;840:3;833:4;825:6;821:17;817:27;807:2;;858:1;855;848:12;807:2;895:6;882:20;917:97;932:81;1006:6;932:81;;;917:97;;;908:106;;1031:5;1056:6;1049:5;1042:21;1086:4;1078:6;1074:17;1064:27;;1108:4;1103:3;1099:14;1092:21;;1161:6;1208:3;1200:4;1192:6;1188:17;1183:3;1179:27;1176:36;1173:2;;;1225:1;1222;1215:12;1173:2;1250:1;1235:223;1260:6;1257:1;1254:13;1235:223;;;1318:3;1340:54;1390:3;1378:10;1340:54;;;1328:67;;-1:-1;1418:4;1409:14;;;;1446:4;1437:14;;;;;1282:1;1275:9;1235:223;;;1239:14;800:664;;;;;;;;1850:124;1914:20;;1939:30;1914:20;1939:30;;1981:130;2048:20;;2073:33;2048:20;2073:33;;2118:128;2184:20;;2209:32;2184:20;2209:32;;2253:132;2330:13;;2348:32;2330:13;2348:32;;2406:336;;;2520:3;2513:4;2505:6;2501:17;2497:27;2487:2;;2538:1;2535;2528:12;2487:2;-1:-1;2558:20;;-1:-1;;;;;2587:30;;2584:2;;;2630:1;2627;2620:12;2584:2;2664:4;2656:6;2652:17;2640:29;;2715:3;2707:4;2699:6;2695:17;2685:8;2681:32;2678:41;2675:2;;;2732:1;2729;2722:12;2751:442;;2853:3;2846:4;2838:6;2834:17;2830:27;2820:2;;2871:1;2868;2861:12;2820:2;2908:6;2895:20;2930:65;2945:49;2987:6;2945:49;;2930:65;2921:74;;3015:6;3008:5;3001:21;3051:4;3043:6;3039:17;3084:4;3077:5;3073:16;3119:3;3110:6;3105:3;3101:16;3098:25;3095:2;;;3136:1;3133;3126:12;3095:2;3146:41;3180:6;3175:3;3170;3146:41;;;2813:380;;;;;;;;3230:473;;3336:4;3324:9;3319:3;3315:19;3311:30;3308:2;;;3354:1;3351;3344:12;3308:2;3372:20;3387:4;3372:20;;;3363:29;-1:-1;3447:1;3479:57;3532:3;3512:9;3479:57;;;3454:83;;-1:-1;3599:2;3632:49;3677:3;3653:22;;;3632:49;;;3625:4;3618:5;3614:16;3607:75;3558:135;3302:401;;;;;3847:126;3912:20;;3937:31;3912:20;3937:31;;3980:241;;4084:2;4072:9;4063:7;4059:23;4055:32;4052:2;;;4100:1;4097;4090:12;4052:2;4135:1;4152:53;4197:7;4177:9;4152:53;;4228:366;;;4349:2;4337:9;4328:7;4324:23;4320:32;4317:2;;;4365:1;4362;4355:12;4317:2;4400:1;4417:53;4462:7;4442:9;4417:53;;;4407:63;;4379:97;4507:2;4525:53;4570:7;4561:6;4550:9;4546:22;4525:53;;;4515:63;;4486:98;4311:283;;;;;;4601:1179;;;;;;;;;4862:3;4850:9;4841:7;4837:23;4833:33;4830:2;;;4879:1;4876;4869:12;4830:2;4914:1;4931:53;4976:7;4956:9;4931:53;;;4921:63;;4893:97;5021:2;5039:53;5084:7;5075:6;5064:9;5060:22;5039:53;;;5029:63;;5000:98;5157:2;5146:9;5142:18;5129:32;-1:-1;;;;;5173:6;5170:30;5167:2;;;5213:1;5210;5203:12;5167:2;5241:80;5313:7;5304:6;5293:9;5289:22;5241:80;;;5231:90;;;;5108:219;5386:2;5375:9;5371:18;5358:32;-1:-1;;;;;5402:6;5399:30;5396:2;;;5442:1;5439;5432:12;5396:2;5470:80;5542:7;5533:6;5522:9;5518:22;5470:80;;;5460:90;;;;5337:219;5615:3;5604:9;5600:19;5587:33;-1:-1;;;;;5632:6;5629:30;5626:2;;;5672:1;5669;5662:12;5626:2;5700:64;5756:7;5747:6;5736:9;5732:22;5700:64;;;5690:74;;;;5566:204;4824:956;;;;;;;;;;;;5787:867;;;;;;;5978:3;5966:9;5957:7;5953:23;5949:33;5946:2;;;5995:1;5992;5985:12;5946:2;6030:1;6047:53;6092:7;6072:9;6047:53;;;6037:63;;6009:97;6137:2;6155:53;6200:7;6191:6;6180:9;6176:22;6155:53;;;6145:63;;6116:98;6245:2;6263:53;6308:7;6299:6;6288:9;6284:22;6263:53;;;6253:63;;6224:98;6353:2;6371:53;6416:7;6407:6;6396:9;6392:22;6371:53;;;6361:63;;6332:98;6489:3;6478:9;6474:19;6461:33;-1:-1;;;;;6506:6;6503:30;6500:2;;;6546:1;6543;6536:12;6500:2;6574:64;6630:7;6621:6;6610:9;6606:22;6574:64;;;6564:74;;;;6440:204;5940:714;;;;;;;;;6661:360;;;6779:2;6767:9;6758:7;6754:23;6750:32;6747:2;;;6795:1;6792;6785:12;6747:2;6830:1;6847:53;6892:7;6872:9;6847:53;;;6837:63;;6809:97;6937:2;6955:50;6997:7;6988:6;6977:9;6973:22;6955:50;;7028:366;;;7149:2;7137:9;7128:7;7124:23;7120:32;7117:2;;;7165:1;7162;7155:12;7117:2;7200:1;7217:53;7262:7;7242:9;7217:53;;;7207:63;;7179:97;7307:2;7325:53;7370:7;7361:6;7350:9;7346:22;7325:53;;7401:491;;;;7539:2;7527:9;7518:7;7514:23;7510:32;7507:2;;;7555:1;7552;7545:12;7507:2;7590:1;7607:53;7652:7;7632:9;7607:53;;;7597:63;;7569:97;7697:2;7715:53;7760:7;7751:6;7740:9;7736:22;7715:53;;;7705:63;;7676:98;7805:2;7823:53;7868:7;7859:6;7848:9;7844:22;7823:53;;;7813:63;;7784:98;7501:391;;;;;;7899:678;;;;;8090:2;8078:9;8069:7;8065:23;8061:32;8058:2;;;8106:1;8103;8096:12;8058:2;8141:31;;-1:-1;;;;;8181:30;;8178:2;;;8224:1;8221;8214:12;8178:2;8252:80;8324:7;8315:6;8304:9;8300:22;8252:80;;;8242:90;;;;8120:218;8397:2;8386:9;8382:18;8369:32;-1:-1;;;;;8413:6;8410:30;8407:2;;;8453:1;8450;8443:12;8407:2;8481:80;8553:7;8544:6;8533:9;8529:22;8481:80;;;8052:525;;;;-1:-1;8471:90;-1:-1;;;;8052:525;8584:239;;8687:2;8675:9;8666:7;8662:23;8658:32;8655:2;;;8703:1;8700;8693:12;8655:2;8738:1;8755:52;8799:7;8779:9;8755:52;;8830:261;;8944:2;8932:9;8923:7;8919:23;8915:32;8912:2;;;8960:1;8957;8950:12;8912:2;8995:1;9012:63;9067:7;9047:9;9012:63;;9098:347;;9212:2;9200:9;9191:7;9187:23;9183:32;9180:2;;;9228:1;9225;9218:12;9180:2;9263:31;;-1:-1;;;;;9303:30;;9300:2;;;9346:1;9343;9336:12;9300:2;9366:63;9421:7;9412:6;9401:9;9397:22;9366:63;;9452:241;;9556:2;9544:9;9535:7;9531:23;9527:32;9524:2;;;9572:1;9569;9562:12;9524:2;9607:1;9624:53;9669:7;9649:9;9624:53;;9700:366;;;9821:2;9809:9;9800:7;9796:23;9792:32;9789:2;;;9837:1;9834;9827:12;9789:2;9872:1;9889:53;9934:7;9914:9;9889:53;;10073:1267;;;;;;;;10329:3;10317:9;10308:7;10304:23;10300:33;10297:2;;;10346:1;10343;10336:12;10297:2;10381:1;10398:53;10443:7;10423:9;10398:53;;;10388:63;;10360:97;10488:2;10506:51;10549:7;10540:6;10529:9;10525:22;10506:51;;;10496:61;;10467:96;10594:2;10612:53;10657:7;10648:6;10637:9;10633:22;10612:53;;;10602:63;;10573:98;10702:2;10720:53;10765:7;10756:6;10745:9;10741:22;10720:53;;;10710:63;;10681:98;10838:3;10827:9;10823:19;10810:33;-1:-1;;;;;10855:6;10852:30;10849:2;;;10895:1;10892;10885:12;10849:2;10915:95;11002:7;10993:6;10982:9;10978:22;10915:95;;;10905:105;;10789:227;11047:3;11066:53;11111:7;11102:6;11091:9;11087:22;11066:53;;;11056:63;;11026:99;11184:3;11173:9;11169:19;11156:33;-1:-1;;;;;11201:6;11198:30;11195:2;;;11241:1;11238;11231:12;11195:2;11261:63;11316:7;11307:6;11296:9;11292:22;11261:63;;;11251:73;;11135:195;10291:1049;;;;;;;;;;;11348:205;;11451:62;11509:3;11501:6;11451:62;;;-1:-1;;11542:4;11533:14;;11444:109;11744:173;;11831:46;11873:3;11865:6;11831:46;;11925:127;12014:32;12040:5;12014:32;;;12009:3;12002:45;11996:56;;;12464:690;;12609:54;12657:5;12609:54;;;12676:86;12755:6;12750:3;12676:86;;;12669:93;;12783:56;12833:5;12783:56;;;12859:7;12887:1;12872:260;12897:6;12894:1;12891:13;12872:260;;;12964:6;12958:13;12985:63;13044:3;13029:13;12985:63;;;12978:70;;13065:60;13118:6;13065:60;;;13055:70;-1:-1;;12919:1;12912:9;12872:260;;;-1:-1;13145:3;;12588:566;-1:-1;;;;;12588:566;13209:754;;13370:62;13426:5;13370:62;;;13445:94;13532:6;13527:3;13445:94;;;13438:101;;13560:64;13618:5;13560:64;;;13644:7;13672:1;13657:284;13682:6;13679:1;13676:13;13657:284;;;13749:6;13743:13;13770:79;13845:3;13830:13;13770:79;;;13763:86;;13866:68;13927:6;13866:68;;;13856:78;-1:-1;;13704:1;13697:9;13657:284;;14002:467;;14148:86;14227:6;14222:3;14148:86;;;14141:93;;-1:-1;;;;;14253:6;14250:78;14247:2;;;14341:1;14338;14331:12;14247:2;14374:4;14366:6;14362:17;14352:27;;14391:43;14427:6;14422:3;14415:5;14391:43;;;-1:-1;;14447:16;;14134:335;14508:690;;14653:54;14701:5;14653:54;;;14720:86;14799:6;14794:3;14720:86;;;14713:93;;14827:56;14877:5;14827:56;;;14903:7;14931:1;14916:260;14941:6;14938:1;14935:13;14916:260;;;15008:6;15002:13;15029:63;15088:3;15073:13;15029:63;;;15022:70;;15109:60;15162:6;15109:60;;;15099:70;-1:-1;;14963:1;14956:9;14916:260;;15206:104;15283:21;15298:5;15283:21;;15317:113;15400:24;15418:5;15400:24;;15437:343;;15547:38;15579:5;15547:38;;;15597:70;15660:6;15655:3;15597:70;;;15590:77;;15672:52;15717:6;15712:3;15705:4;15698:5;15694:16;15672:52;;;15745:29;15767:6;15745:29;;;15736:39;;;;15527:253;-1:-1;;;15527:253;15787:203;15907:77;15927:56;15977:5;15927:56;;;15907:77;;16698:328;;16858:67;16922:2;16917:3;16858:67;;;16958:30;16938:51;;17017:2;17008:12;;16844:182;-1:-1;;16844:182;17035:331;;17195:67;17259:2;17254:3;17195:67;;;17295:33;17275:54;;17357:2;17348:12;;17181:185;-1:-1;;17181:185;17375:375;;17535:67;17599:2;17594:3;17535:67;;;17635:34;17615:55;;-1:-1;;;17699:2;17690:12;;17683:30;17741:2;17732:12;;17521:229;-1:-1;;17521:229;17759:327;;17919:67;17983:2;17978:3;17919:67;;;18019:29;17999:50;;18077:2;18068:12;;17905:181;-1:-1;;17905:181;18095:332;;18255:67;18319:2;18314:3;18255:67;;;18355:34;18335:55;;18418:2;18409:12;;18241:186;-1:-1;;18241:186;18436:374;;18596:67;18660:2;18655:3;18596:67;;;18696:34;18676:55;;-1:-1;;;18760:2;18751:12;;18744:29;18801:2;18792:12;;18582:228;-1:-1;;18582:228;18819:370;;18979:67;19043:2;19038:3;18979:67;;;19079:34;19059:55;;-1:-1;;;19143:2;19134:12;;19127:25;19180:2;19171:12;;18965:224;-1:-1;;18965:224;19198:380;;19358:67;19422:2;19417:3;19358:67;;;19458:34;19438:55;;-1:-1;;;19522:2;19513:12;;19506:35;19569:2;19560:12;;19344:234;-1:-1;;19344:234;19587:384;;19747:67;19811:2;19806:3;19747:67;;;19847:34;19827:55;;-1:-1;;;19911:2;19902:12;;19895:39;19962:2;19953:12;;19733:238;-1:-1;;19733:238;19980:399;;20140:67;20204:2;20199:3;20140:67;;;20240:34;20220:55;;20309:32;20304:2;20295:12;;20288:54;20370:2;20361:12;;20126:253;-1:-1;;20126:253;20388:332;;20548:67;20612:2;20607:3;20548:67;;;20648:34;20628:55;;20711:2;20702:12;;20534:186;-1:-1;;20534:186;20729:371;;20889:67;20953:2;20948:3;20889:67;;;20989:34;20969:55;;-1:-1;;;21053:2;21044:12;;21037:26;21091:2;21082:12;;20875:225;-1:-1;;20875:225;21109:323;;21269:67;21333:2;21328:3;21269:67;;;21369:25;21349:46;;21423:2;21414:12;;21255:177;-1:-1;;21255:177;21441:325;;21601:67;21665:2;21660:3;21601:67;;;21701:27;21681:48;;21757:2;21748:12;;21587:179;-1:-1;;21587:179;21775:378;;21935:67;21999:2;21994:3;21935:67;;;22035:34;22015:55;;-1:-1;;;22099:2;22090:12;;22083:33;22144:2;22135:12;;21921:232;-1:-1;;21921:232;22162:327;;22322:67;22386:2;22381:3;22322:67;;;22422:29;22402:50;;22480:2;22471:12;;22308:181;-1:-1;;22308:181;22498:394;;22658:67;22722:2;22717:3;22658:67;;;22758:34;22738:55;;22827:27;22822:2;22813:12;;22806:49;22883:2;22874:12;;22644:248;-1:-1;;22644:248;22901:321;;23061:67;23125:2;23120:3;23061:67;;;-1:-1;;;23141:44;;23213:2;23204:12;;23047:175;-1:-1;;23047:175;23231:326;;23391:67;23455:2;23450:3;23391:67;;;23491:28;23471:49;;23548:2;23539:12;;23377:180;-1:-1;;23377:180;23566:317;;23726:67;23790:2;23785:3;23726:67;;;-1:-1;;;23806:40;;23874:2;23865:12;;23712:171;-1:-1;;23712:171;24121:152;24222:45;24242:24;24260:5;24242:24;;;24222:45;;24280:107;24359:22;24375:5;24359:22;;24394:421;;24560:94;24650:3;24641:6;24560:94;;;24676:2;24671:3;24667:12;24660:19;;24690:75;24761:3;24752:6;24690:75;;;-1:-1;24787:2;24778:12;;24548:267;-1:-1;;24548:267;24822:213;24940:2;24925:18;;24954:71;24929:9;24998:6;24954:71;;25042:356;25204:2;25189:18;;25218:87;25193:9;25278:6;25218:87;;;25316:72;25384:2;25373:9;25369:18;25360:6;25316:72;;25405:1039;25753:3;25738:19;;25768:71;25742:9;25812:6;25768:71;;;25850:72;25918:2;25907:9;25903:18;25894:6;25850:72;;;25970:9;25964:4;25960:20;25955:2;25944:9;25940:18;25933:48;25995:108;26098:4;26089:6;25995:108;;;25987:116;;26151:9;26145:4;26141:20;26136:2;26125:9;26121:18;26114:48;26176:108;26279:4;26270:6;26176:108;;;26168:116;;26333:9;26327:4;26323:20;26317:3;26306:9;26302:19;26295:49;26358:76;26429:4;26420:6;26358:76;;;26350:84;25724:720;-1:-1;;;;;;;25724:720;26451:743;26699:3;26684:19;;26714:71;26688:9;26758:6;26714:71;;;26796:72;26864:2;26853:9;26849:18;26840:6;26796:72;;;26879;26947:2;26936:9;26932:18;26923:6;26879:72;;;26962;27030:2;27019:9;27015:18;27006:6;26962:72;;;27083:9;27077:4;27073:20;27067:3;27056:9;27052:19;27045:49;27108:76;27179:4;27170:6;27108:76;;27201:393;27385:2;27399:47;;;27370:18;;27460:124;27370:18;27570:6;27460:124;;27601:660;27867:2;27881:47;;;27852:18;;27942:118;27852:18;28046:6;28038;27942:118;;;27934:126;;28108:9;28102:4;28098:20;28093:2;28082:9;28078:18;28071:48;28133:118;28246:4;28237:6;28229;28133:118;;;28125:126;27838:423;-1:-1;;;;;;27838:423;28268:361;28436:2;28450:47;;;28421:18;;28511:108;28421:18;28605:6;28511:108;;28636:201;28748:2;28733:18;;28762:65;28737:9;28800:6;28762:65;;28844:539;29042:3;29027:19;;29057:71;29031:9;29101:6;29057:71;;;29139:68;29203:2;29192:9;29188:18;29179:6;29139:68;;;29218:72;29286:2;29275:9;29271:18;29262:6;29218:72;;;29301;29369:2;29358:9;29354:18;29345:6;29301:72;;;29013:370;;;;;;;;29390:293;29524:2;29538:47;;;29509:18;;29599:74;29509:18;29659:6;29599:74;;29998:407;30189:2;30203:47;;;30174:18;;30264:131;30174:18;30264:131;;30412:407;30603:2;30617:47;;;30588:18;;30678:131;30588:18;30678:131;;30826:407;31017:2;31031:47;;;31002:18;;31092:131;31002:18;31092:131;;31240:407;31431:2;31445:47;;;31416:18;;31506:131;31416:18;31506:131;;31654:407;31845:2;31859:47;;;31830:18;;31920:131;31830:18;31920:131;;32068:407;32259:2;32273:47;;;32244:18;;32334:131;32244:18;32334:131;;32482:407;32673:2;32687:47;;;32658:18;;32748:131;32658:18;32748:131;;32896:407;33087:2;33101:47;;;33072:18;;33162:131;33072:18;33162:131;;33310:407;33501:2;33515:47;;;33486:18;;33576:131;33486:18;33576:131;;33724:407;33915:2;33929:47;;;33900:18;;33990:131;33900:18;33990:131;;34138:407;34329:2;34343:47;;;34314:18;;34404:131;34314:18;34404:131;;34552:407;34743:2;34757:47;;;34728:18;;34818:131;34728:18;34818:131;;34966:407;35157:2;35171:47;;;35142:18;;35232:131;35142:18;35232:131;;35380:407;35571:2;35585:47;;;35556:18;;35646:131;35556:18;35646:131;;35794:407;35985:2;35999:47;;;35970:18;;36060:131;35970:18;36060:131;;36208:407;36399:2;36413:47;;;36384:18;;36474:131;36384:18;36474:131;;36622:407;36813:2;36827:47;;;36798:18;;36888:131;36798:18;36888:131;;37036:407;37227:2;37241:47;;;37212:18;;37302:131;37212:18;37302:131;;37450:407;37641:2;37655:47;;;37626:18;;37716:131;37626:18;37716:131;;37864:407;38055:2;38069:47;;;38040:18;;38130:131;38040:18;38130:131;;38278:213;38396:2;38381:18;;38410:71;38385:9;38454:6;38410:71;;38498:731;38772:2;38757:18;;38786:71;38761:9;38830:6;38786:71;;;38905:9;38899:4;38895:20;38890:2;38879:9;38875:18;38868:48;38930:108;39033:4;39024:6;38930:108;;;38922:116;;39086:9;39080:4;39076:20;39071:2;39060:9;39056:18;39049:48;39111:108;39214:4;39205:6;39111:108;;39236:324;39382:2;39367:18;;39396:71;39371:9;39440:6;39396:71;;39567:256;39629:2;39623:9;39655:17;;;-1:-1;;;;;39715:34;;39751:22;;;39712:62;39709:2;;;39787:1;39784;39777:12;39709:2;39803;39796:22;39607:216;;-1:-1;39607:216;39830:321;;-1:-1;;;;;39998:6;39995:30;39992:2;;;40038:1;40035;40028:12;39992:2;-1:-1;40073:4;40061:17;;;40126:15;;39929:222;40158:322;;-1:-1;;;;;40294:6;40291:30;40288:2;;;40334:1;40331;40324:12;40288:2;-1:-1;40465:4;40401;40378:17;;;;-1:-1;;40374:33;40455:15;;40225:255;40487:151;40611:4;40602:14;;40559:79;40969:137;41072:12;;41043:63;42145:178;42263:19;;;42312:4;42303:14;;42256:67;43056:91;;43118:24;43136:5;43118:24;;43260:85;43326:13;43319:21;;43302:43;43431:144;-1:-1;;;;;;43492:78;;43475:100;43582:121;-1:-1;;;;;43644:54;;43627:76;43789:81;43860:4;43849:16;;43832:38;43877:159;;43975:56;44025:5;43975:56;;44178:145;44259:6;44254:3;44249;44236:30;-1:-1;44315:1;44297:16;;44290:27;44229:94;44332:268;44397:1;44404:101;44418:6;44415:1;44412:13;44404:101;;;44485:11;;;44479:18;44466:11;;;44459:39;44440:2;44433:10;44404:101;;;44520:6;44517:1;44514:13;44511:2;;;44585:1;44576:6;44571:3;44567:16;44560:27;44511:2;44381:219;;;;;44608:95;;44672:26;44692:5;44710:89;44774:20;44788:5;44774:20;;44887:97;44975:2;44955:14;-1:-1;;44951:28;;44935:49;44992:94;45066:2;45062:14;;45034:52;45094:117;45163:24;45181:5;45163:24;;;45156:5;45153:35;45143:2;;45202:1;45199;45192:12;45358:111;45424:21;45439:5;45424:21;;45476:117;45545:24;45563:5;45545:24;;45600:115;45668:23;45685:5;45668:23;;45846:113;45913:22;45929:5;45913:22;

Swarm Source

bzzr://44ad4c9f051c8f19c5fcd84c2ab63e568bf9a1123e91b1d955ff123dade68164
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.