ETH Price: $3,113.70 (+1.38%)
Gas: 3 Gwei

Token

 

Overview

Max Total Supply

783

Holders

611

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

0xa0FE2486b4a9d860B9b246980A07F790e8fEfd77
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:
TheArmors

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 23 : TheArmors.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

//import "hardhat/console.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";


contract TheArmors is ERC1155, ERC2981, PaymentSplitter, Pausable, AccessControl, ERC1155Burnable, EIP712, ReentrancyGuard {
    using SafeMath for uint256;
    string private constant SIGNING_DOMAIN = "TheArmorsSign";
    string private constant SIGNATURE_VERSION = "1";
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    mapping(uint256 => uint256) private _control;
    
    event Mint(address indexed to, uint256 indexed id, uint256 _value);
    
    bool private metaREVEAL = false;
    string private armorGenericMetaURI;
    string private armorIPFSMetaURI;

    struct ArmorVoucher {
        uint256 tokenId;
        uint256 minPrice;
        address to;
        bytes signature;
    }
    struct ArmorFuse {
        uint256 tokenId;
        uint256[] armorsIds;
        uint256[] amounts;
        bytes signature;
    }


    constructor(address[] memory _address, uint256[] memory _shares, string memory _ipfs) ERC1155("") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_address,_shares) payable {

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(MINTER_ROLE, msg.sender);
        _grantRole(PAUSER_ROLE, msg.sender);
        _setDefaultRoyalty(msg.sender, 500);
   
        armorGenericMetaURI = "ipfs://QmW61jF4MDwMRVUqLTbQk5V3tdVUXSxPkVtx11bfiS2F6z";
        armorIPFSMetaURI = _ipfs;
    }

    function contractURI() public pure returns (string memory) {
        return "https://thearmors.io/assets/contract.json";
    }

    function uri(uint256 tokenId) override public view returns (string memory) {

        if (!metaREVEAL)
            return armorGenericMetaURI;

        return(string(abi.encodePacked(armorIPFSMetaURI, Strings.toString(tokenId),".json")));
    }

    function setGenericMeta(string memory sampleURI) public onlyRole(DEFAULT_ADMIN_ROLE) {
        armorGenericMetaURI = sampleURI;
    }

    function setMetaReveal(bool _reveal) public onlyRole(DEFAULT_ADMIN_ROLE) {
        metaREVEAL = _reveal;
    }

    function getArmor(ArmorVoucher calldata voucher) public whenNotPaused nonReentrant payable
    {
        address signer = _verify(voucher);
        require(hasRole(MINTER_ROLE, signer), "Not authorized to mint");
        require(msg.value >= voucher.minPrice, "Value below price");
        require(_control[voucher.tokenId] == 0, "already minted");
        _mint(voucher.to, voucher.tokenId, 1, "");
        _control[voucher.tokenId] = voucher.tokenId;
        emit Mint(voucher.to, voucher.tokenId, msg.value);
    }

    function fuseArmors(ArmorFuse calldata toFuse) public whenNotPaused nonReentrant
    {
        address signer = _verify(toFuse);
        require(toFuse.armorsIds.length == 2, "require 2 armors");
        require(hasRole(MINTER_ROLE, signer), "Not authorized to fuse");
        require(_control[toFuse.tokenId] == 0, "already minted");
        address wallet = _msgSender();
        _burnBatch(wallet, toFuse.armorsIds, toFuse.amounts);
        _mint(wallet, toFuse.tokenId, 1, "");
        _control[toFuse.tokenId] = toFuse.tokenId;
    }

    function _verify(ArmorFuse calldata voucher) internal view returns (address) {
        bytes32 digest = _hash(voucher);
        return ECDSA.recover(digest, voucher.signature);
    }

    function _hash(ArmorFuse calldata voucher) internal view returns (bytes32) {
        return _hashTypedDataV4(keccak256(abi.encode(
            keccak256("ArmorToFuse(uint256 tokenId,uint256[] armorsIds,uint256[] amounts)"),
            voucher.tokenId,
            keccak256(abi.encodePacked(voucher.armorsIds)),
            keccak256(abi.encodePacked(voucher.amounts))
        )));
    }
    
    function _verify(ArmorVoucher calldata voucher) internal view returns (address) {
        bytes32 digest = _hash(voucher);
        return ECDSA.recover(digest, voucher.signature);
    }

    function _hash(ArmorVoucher calldata voucher) internal view returns (bytes32) {
        return _hashTypedDataV4(keccak256(abi.encode(
            keccak256("ArmorVoucher(uint256 tokenId,uint256 minPrice,address to)"),
            voucher.tokenId,
            voucher.minPrice,
            voucher.to
        )));
    }

    function deleteDefaultRoyalty() public onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _deleteDefaultRoyalty();
    }

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _setTokenRoyalty(tokenId, receiver, feeNumerator);
    }

    function resetTokenRoyalty(uint256 tokenId) public onlyRole(DEFAULT_ADMIN_ROLE)
    {
        _resetTokenRoyalty(tokenId);
    }

    function pause() public onlyRole(PAUSER_ROLE) {
        _pause();
    }

    function unpause() public onlyRole(PAUSER_ROLE) {
        _unpause();
    }

    function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
        internal
        whenNotPaused
        override
    {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC1155, AccessControl, ERC2981)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 3 of 23 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 4 of 23 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 5 of 23 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    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));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 6 of 23 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

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

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 7 of 23 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 9 of 23 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 10 of 23 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

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

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

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

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

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

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

        address operator = _msgSender();

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

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

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

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

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

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

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

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

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

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

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

        return array;
    }
}

File 11 of 23 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

    /**
     * @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 a - b;
    }

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 12 of 23 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = address(this).balance + totalReleased();
        uint256 payment = _pendingPayment(account, totalReceived, released(account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] += payment;
        _totalReleased += payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        uint256 payment = _pendingPayment(account, totalReceived, released(token, account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _erc20Released[token][account] += payment;
        _erc20TotalReleased[token] += payment;

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

File 18 of 23 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 20 of 23 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 23 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"_address","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"},{"internalType":"string","name":"_ipfs","type":"string"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256[]","name":"armorsIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct TheArmors.ArmorFuse","name":"toFuse","type":"tuple"}],"name":"fuseArmors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPrice","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct TheArmors.ArmorVoucher","name":"voucher","type":"tuple"}],"name":"getArmor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"sampleURI","type":"string"}],"name":"setGenericMeta","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_reveal","type":"bool"}],"name":"setMetaReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

61014060408190526010805460ff1916905562004e4938819003908190833981016040819052620000309162000890565b6040518060400160405280600d81526020016c2a3432a0b936b7b939a9b4b3b760991b815250604051806040016040528060018152602001603160f81b81525084846040518060200160405280600081525062000093816200032f60201b60201c565b508051825114620001065760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001595760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620000fd565b60005b8251811015620001c557620001b08382815181106200017f576200017f62000a80565b60200260200101518383815181106200019c576200019c62000a80565b60200260200101516200034860201b60201c565b80620001bc8162000a4c565b9150506200015c565b5050600c805460ff1916905550815160208084019190912082518383012060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81880181905281830187905260608201869052608082019490945230818401528151808203909301835260c00190528051940193909320919290916080523060601b60c0526101205250506001600e555062000279905060003362000536565b620002a57f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63362000536565b620002d17f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3362000536565b620002df336101f4620005da565b60405180606001604052806035815260200162004e146035913980516200030f91601191602090910190620006db565b50805162000325906012906020840190620006db565b5050505062000aac565b805162000344906002906020840190620006db565b5050565b6001600160a01b038216620003b55760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620000fd565b60008111620004075760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620000fd565b6001600160a01b03821660009081526007602052604090205415620004835760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620000fd565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0319166001600160a01b0384169081179091556000908152600760205260409020819055600554620004ed908290620009f4565b600555604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b6000828152600d602090815260408083206001600160a01b038516845290915290205460ff1662000344576000828152600d602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005963390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6127106001600160601b03821611156200064a5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401620000fd565b6001600160a01b038216620006a25760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620000fd565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b828054620006e99062000a0f565b90600052602060002090601f0160209004810192826200070d576000855562000758565b82601f106200072857805160ff191683800117855562000758565b8280016001018555821562000758579182015b82811115620007585782518255916020019190600101906200073b565b50620007669291506200076a565b5090565b5b808211156200076657600081556001016200076b565b600082601f8301126200079357600080fd5b81516020620007ac620007a683620009ce565b6200099b565b80838252828201915082860187848660051b8901011115620007cd57600080fd5b60005b85811015620007ee57815184529284019290840190600101620007d0565b5090979650505050505050565b600082601f8301126200080d57600080fd5b81516001600160401b0381111562000829576200082962000a96565b60206200083f601f8301601f191682016200099b565b82815285828487010111156200085457600080fd5b60005b838110156200087457858101830151828201840152820162000857565b83811115620008865760008385840101525b5095945050505050565b600080600060608486031215620008a657600080fd5b83516001600160401b0380821115620008be57600080fd5b818601915086601f830112620008d357600080fd5b81516020620008e6620007a683620009ce565b8083825282820191508286018b848660051b89010111156200090757600080fd5b600096505b84871015620009425780516001600160a01b03811681146200092d57600080fd5b8352600196909601959183019183016200090c565b50918901519197509093505050808211156200095d57600080fd5b6200096b8783880162000781565b935060408601519150808211156200098257600080fd5b506200099186828701620007fb565b9150509250925092565b604051601f8201601f191681016001600160401b0381118282101715620009c657620009c662000a96565b604052919050565b60006001600160401b03821115620009ea57620009ea62000a96565b5060051b60200190565b6000821982111562000a0a5762000a0a62000a6a565b500190565b600181811c9082168062000a2457607f821691505b6020821081141562000a4657634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000a635762000a6362000a6a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160601c60e051610100516101205161431562000aff6000396000612fa401526000612ff301526000612fce01526000612f2701526000612f5101526000612f7b01526143156000f3fe60806040526004361061023e5760003560e01c80636b20c4541161012e578063ce7c2ac2116100ab578063e63ab1e91161006f578063e63ab1e914610797578063e8a3d485146107cb578063e985e9c5146107e0578063f242432a14610829578063f5298aca1461084957600080fd5b8063ce7c2ac2146106c2578063d5391393146106f8578063d547741f1461072c578063d79779b21461074c578063e33b7de31461078257600080fd5b80639852595c116100f25780639852595c1461062f5780639a294d7914610665578063a217fddf14610678578063a22cb4651461068d578063aa1b103f146106ad57600080fd5b80636b20c454146105825780638456cb59146105a25780638a616bc0146105b75780638b83209b146105d757806391d148541461060f57600080fd5b806334b1b9d2116101bc57806348b750441161018057806348b75044146104dd5780634e1273f4146104fd578063574a4f9b1461052a5780635944c7531461054a5780635c975abb1461056a57600080fd5b806334b1b9d21461042d57806336568abe1461044d5780633a98ef391461046d5780633f4ba83a14610482578063406072a91461049757600080fd5b8063210df79111610203578063210df7911461035e578063248a9ca31461037e5780632a55205a146103ae5780632eb2c2d6146103ed5780632f2ff15d1461040d57600080fd5b8062fdd58e1461028c57806301ffc9a7146102bf57806304634d8d146102ef5780630e89341c14610311578063191655871461033e57600080fd5b36610287577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561029857600080fd5b506102ac6102a73660046136a3565b610869565b6040519081526020015b60405180910390f35b3480156102cb57600080fd5b506102df6102da366004613883565b610900565b60405190151581526020016102b6565b3480156102fb57600080fd5b5061030f61030a366004613704565b610911565b005b34801561031d57600080fd5b5061033161032c366004613845565b61092b565b6040516102b69190613c7d565b34801561034a57600080fd5b5061030f610359366004613495565b6109fc565b34801561036a57600080fd5b5061030f6103793660046138bd565b610b2a565b34801561038a57600080fd5b506102ac610399366004613845565b6000908152600d602052604090206001015490565b3480156103ba57600080fd5b506103ce6103c9366004613990565b610b48565b604080516001600160a01b0390931683526020830191909152016102b6565b3480156103f957600080fd5b5061030f6104083660046134eb565b610bf6565b34801561041957600080fd5b5061030f61042836600461385e565b610c8d565b34801561043957600080fd5b5061030f610448366004613905565b610cb2565b34801561045957600080fd5b5061030f61046836600461385e565b610f0a565b34801561047957600080fd5b506005546102ac565b34801561048e57600080fd5b5061030f610f88565b3480156104a357600080fd5b506102ac6104b23660046134b2565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b3480156104e957600080fd5b5061030f6104f83660046134b2565b610fbd565b34801561050957600080fd5b5061051d610518366004613739565b6111a5565b6040516102b69190613c45565b34801561053657600080fd5b5061030f61054536600461380b565b6112ce565b34801561055657600080fd5b5061030f610565366004613952565b6112ed565b34801561057657600080fd5b50600c5460ff166102df565b34801561058e57600080fd5b5061030f61059d366004613600565b611309565b3480156105ae57600080fd5b5061030f61134c565b3480156105c357600080fd5b5061030f6105d2366004613845565b61137e565b3480156105e357600080fd5b506105f76105f2366004613845565b61139b565b6040516001600160a01b0390911681526020016102b6565b34801561061b57600080fd5b506102df61062a36600461385e565b6113cb565b34801561063b57600080fd5b506102ac61064a366004613495565b6001600160a01b031660009081526008602052604090205490565b61030f610673366004613905565b6113f6565b34801561068457600080fd5b506102ac600081565b34801561069957600080fd5b5061030f6106a8366004613675565b611623565b3480156106b957600080fd5b5061030f61162e565b3480156106ce57600080fd5b506102ac6106dd366004613495565b6001600160a01b031660009081526007602052604090205490565b34801561070457600080fd5b506102ac7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561073857600080fd5b5061030f61074736600461385e565b611643565b34801561075857600080fd5b506102ac610767366004613495565b6001600160a01b03166000908152600a602052604090205490565b34801561078e57600080fd5b506006546102ac565b3480156107a357600080fd5b506102ac7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b3480156107d757600080fd5b50610331611668565b3480156107ec57600080fd5b506102df6107fb3660046134b2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561083557600080fd5b5061030f610844366004613598565b611688565b34801561085557600080fd5b5061030f6108643660046136cf565b6116cd565b60006001600160a01b0383166108da5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b600061090b82611710565b92915050565b600061091c81611735565b610926838361173f565b505050565b60105460609060ff166109ca5760118054610945906140db565b80601f0160208091040260200160405190810160405280929190818152602001828054610971906140db565b80156109be5780601f10610993576101008083540402835291602001916109be565b820191906000526020600020905b8154815290600101906020018083116109a157829003601f168201915b50505050509050919050565b60126109d5836117f9565b6040516020016109e6929190613a7d565b6040516020818303038152906040529050919050565b6001600160a01b038116600090815260076020526040902054610a315760405162461bcd60e51b81526004016108d190613d65565b6000610a3c60065490565b610a469047614036565b90506000610a738383610a6e866001600160a01b031660009081526008602052604090205490565b6118fe565b905080610a925760405162461bcd60e51b81526004016108d190613dab565b6001600160a01b03831660009081526008602052604081208054839290610aba908490614036565b925050819055508060066000828254610ad39190614036565b90915550610ae390508382611946565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6000610b3581611735565b81516109269060119060208501906132d4565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610bbd5750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610bdc906001600160601b031687614062565b610be6919061404e565b91519350909150505b9250929050565b6001600160a01b038516331480610c125750610c1285336107fb565b610c795760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016108d1565b610c868585858585611a5f565b5050505050565b6000828152600d6020526040902060010154610ca881611735565b6109268383611c09565b600c5460ff1615610cd55760405162461bcd60e51b81526004016108d190613df6565b6002600e541415610d285760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d1565b6002600e556000610d3882611c8f565b9050610d476020830183613f84565b9050600214610d8b5760405162461bcd60e51b815260206004820152601060248201526f7265717569726520322061726d6f727360801b60448201526064016108d1565b610db57f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826113cb565b610dfa5760405162461bcd60e51b81526020600482015260166024820152754e6f7420617574686f72697a656420746f206675736560501b60448201526064016108d1565b81356000908152600f602052604090205415610e495760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016108d1565b33610ed181610e5b6020860186613f84565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610e9a925050506040870187613f84565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ce892505050565b610ef1818460000135600160405180602001604052806000815250611e84565b5050356000818152600f60205260409020556001600e55565b6001600160a01b0381163314610f7a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108d1565b610f848282611fa7565b5050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610fb281611735565b610fba61200e565b50565b6001600160a01b038116600090815260076020526040902054610ff25760405162461bcd60e51b81526004016108d190613d65565b6001600160a01b0382166000908152600a60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561104a57600080fd5b505afa15801561105e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110829190613939565b61108c9190614036565b905060006110c58383610a6e87876001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b9050806110e45760405162461bcd60e51b81526004016108d190613dab565b6001600160a01b038085166000908152600b602090815260408083209387168352929052908120805483929061111b908490614036565b90915550506001600160a01b0384166000908152600a602052604081208054839290611148908490614036565b9091555061115990508484836120a1565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b6060815183511461120a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016108d1565b600083516001600160401b03811115611225576112256141c3565b60405190808252806020026020018201604052801561124e578160200160208202803683370190505b50905060005b84518110156112c657611299858281518110611272576112726141ad565b602002602001015185838151811061128c5761128c6141ad565b6020026020010151610869565b8282815181106112ab576112ab6141ad565b60209081029190910101526112bf8161413c565b9050611254565b509392505050565b60006112d981611735565b506010805460ff1916911515919091179055565b60006112f881611735565b6113038484846120f3565b50505050565b6001600160a01b038316331480611325575061132583336107fb565b6113415760405162461bcd60e51b81526004016108d190613d1c565b610926838383611ce8565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61137681611735565b610fba6121be565b600061138981611735565b50600090815260046020526040812055565b6000600982815481106113b0576113b06141ad565b6000918252602090912001546001600160a01b031692915050565b6000918252600d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600c5460ff16156114195760405162461bcd60e51b81526004016108d190613df6565b6002600e54141561146c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d1565b6002600e55600061147c82612216565b90506114a87f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826113cb565b6114ed5760405162461bcd60e51b8152602060048201526016602482015275139bdd08185d5d1a1bdc9a5e9959081d1bc81b5a5b9d60521b60448201526064016108d1565b81602001353410156115355760405162461bcd60e51b815260206004820152601160248201527056616c75652062656c6f7720707269636560781b60448201526064016108d1565b81356000908152600f6020526040902054156115845760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016108d1565b6115b36115976060840160408501613495565b8360000135600160405180602001604052806000815250611e84565b81356000818152600f6020526040908190208290556115d89060608501908501613495565b6001600160a01b03167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f3460405161161291815260200190565b60405180910390a350506001600e55565b610f84338383612222565b600061163981611735565b610fba6000600355565b6000828152600d602052604090206001015461165e81611735565b6109268383611fa7565b60606040518060600160405280602981526020016142b760299139905090565b6001600160a01b0385163314806116a457506116a485336107fb565b6116c05760405162461bcd60e51b81526004016108d190613d1c565b610c868585858585612303565b6001600160a01b0383163314806116e957506116e983336107fb565b6117055760405162461bcd60e51b81526004016108d190613d1c565b61092683838361243b565b60006001600160e01b03198216637965db0b60e01b148061090b575061090b82612553565b610fba8133612578565b6127106001600160601b038216111561176a5760405162461bcd60e51b81526004016108d190613ef2565b6001600160a01b0382166117c05760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108d1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b60608161181d5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561184757806118318161413c565b91506118409050600a8361404e565b9150611821565b6000816001600160401b03811115611861576118616141c3565b6040519080825280601f01601f19166020018201604052801561188b576020820181803683370190505b5090505b84156118f6576118a0600183614081565b91506118ad600a86614157565b6118b8906030614036565b60f81b8183815181106118cd576118cd6141ad565b60200101906001600160f81b031916908160001a9053506118ef600a8661404e565b945061188f565b949350505050565b6005546001600160a01b038416600090815260076020526040812054909183916119289086614062565b611932919061404e565b61193c9190614081565b90505b9392505050565b804710156119965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108d1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146119e3576040519150601f19603f3d011682016040523d82523d6000602084013e6119e8565b606091505b50509050806109265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108d1565b8151835114611a805760405162461bcd60e51b81526004016108d190613f3c565b6001600160a01b038416611aa65760405162461bcd60e51b81526004016108d190613e20565b33611ab58187878787876125dc565b60005b8451811015611b9b576000858281518110611ad557611ad56141ad565b602002602001015190506000858381518110611af357611af36141ad565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611b435760405162461bcd60e51b81526004016108d190613ea8565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611b80908490614036565b9250508190555050505080611b949061413c565b9050611ab8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611beb929190613c58565b60405180910390a4611c01818787878787612604565b505050505050565b611c1382826113cb565b610f84576000828152600d602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c4b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600080611c9b8361276f565b905061193f81611cae6060860186613fcd565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061283d92505050565b6001600160a01b038316611d0e5760405162461bcd60e51b81526004016108d190613e65565b8051825114611d2f5760405162461bcd60e51b81526004016108d190613f3c565b6000339050611d52818560008686604051806020016040528060008152506125dc565b60005b8351811015611e17576000848281518110611d7257611d726141ad565b602002602001015190506000848381518110611d9057611d906141ad565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015611de05760405162461bcd60e51b81526004016108d190613cd8565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580611e0f8161413c565b915050611d55565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611e68929190613c58565b60405180910390a4604080516020810190915260009052611303565b6001600160a01b038416611ee45760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016108d1565b336000611ef085612859565b90506000611efd85612859565b9050611f0e836000898585896125dc565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290611f3e908490614036565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f9e836000898989896128a4565b50505050505050565b611fb182826113cb565b15610f84576000828152600d602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600c5460ff166120575760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108d1565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261092690849061296e565b6127106001600160601b038216111561211e5760405162461bcd60e51b81526004016108d190613ef2565b6001600160a01b0382166121745760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016108d1565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b600c5460ff16156121e15760405162461bcd60e51b81526004016108d190613df6565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586120843390565b600080611c9b83612a40565b816001600160a01b0316836001600160a01b031614156122965760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016108d1565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166123295760405162461bcd60e51b81526004016108d190613e20565b33600061233585612859565b9050600061234285612859565b90506123528389898585896125dc565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156123935760405162461bcd60e51b81526004016108d190613ea8565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906123d0908490614036565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612430848a8a8a8a8a6128a4565b505050505050505050565b6001600160a01b0383166124615760405162461bcd60e51b81526004016108d190613e65565b33600061246d84612859565b9050600061247a84612859565b905061249a838760008585604051806020016040528060008152506125dc565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156124db5760405162461bcd60e51b81526004016108d190613cd8565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611f9e565b60006001600160e01b0319821663152a902d60e11b148061090b575061090b82612aaa565b61258282826113cb565b610f845761259a816001600160a01b03166014612afa565b6125a5836020612afa565b6040516020016125b6929190613b38565b60408051601f198184030181529082905262461bcd60e51b82526108d191600401613c7d565b600c5460ff16156125ff5760405162461bcd60e51b81526004016108d190613df6565b611c01565b6001600160a01b0384163b15611c015760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906126489089908990889088908890600401613bad565b602060405180830381600087803b15801561266257600080fd5b505af1925050508015612692575060408051601f3d908101601f1916820190925261268f918101906138a0565b60015b61273f5761269e6141d9565b806308c379a014156126d857506126b36141f4565b806126be57506126da565b8060405162461bcd60e51b81526004016108d19190613c7d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016108d1565b6001600160e01b0319811663bc197c8160e01b14611f9e5760405162461bcd60e51b81526004016108d190613c90565b600061090b7f9dfcfb25cb819731f1fd812690ea842f45e66106b59df74bea5263b68538c81d83356127a46020860186613f84565b6040516020016127b5929190613a35565b604051602081830303815290604052805190602001208580604001906127db9190613f84565b6040516020016127ec929190613a35565b60408051601f198184030181528282528051602091820120908301959095528101929092526060820152608081019190915260a0015b60405160208183030381529060405280519060200120612c95565b600080600061284c8585612ce3565b915091506112c681612d50565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612893576128936141ad565b602090810291909101015292915050565b6001600160a01b0384163b15611c015760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906128e89089908990889088908890600401613c0b565b602060405180830381600087803b15801561290257600080fd5b505af1925050508015612932575060408051601f3d908101601f1916820190925261292f918101906138a0565b60015b61293e5761269e6141d9565b6001600160e01b0319811663f23a6e6160e01b14611f9e5760405162461bcd60e51b81526004016108d190613c90565b60006129c3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612f0b9092919063ffffffff16565b80519091501561092657808060200190518101906129e19190613828565b6109265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108d1565b600061090b7f27ba86c5586021ba823aed5ecec8f176e93654daf63efd0cf6386a53edab3f9183356020850135612a7d6060870160408801613495565b60408051602081019590955284019290925260608301526001600160a01b0316608082015260a001612822565b60006001600160e01b03198216636cdb3d1360e11b1480612adb57506001600160e01b031982166303a24d0760e21b145b8061090b57506301ffc9a760e01b6001600160e01b031983161461090b565b60606000612b09836002614062565b612b14906002614036565b6001600160401b03811115612b2b57612b2b6141c3565b6040519080825280601f01601f191660200182016040528015612b55576020820181803683370190505b509050600360fc1b81600081518110612b7057612b706141ad565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612b9f57612b9f6141ad565b60200101906001600160f81b031916908160001a9053506000612bc3846002614062565b612bce906001614036565b90505b6001811115612c46576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612c0257612c026141ad565b1a60f81b828281518110612c1857612c186141ad565b60200101906001600160f81b031916908160001a90535060049490941c93612c3f816140c4565b9050612bd1565b50831561193f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108d1565b600061090b612ca2612f1a565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080825160411415612d1a5760208301516040840151606085015160001a612d0e87828585613044565b94509450505050610bef565b825160401415612d445760208301516040840151612d39868383613131565b935093505050610bef565b50600090506002610bef565b6000816004811115612d6457612d64614197565b1415612d6d5750565b6001816004811115612d8157612d81614197565b1415612dcf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108d1565b6002816004811115612de357612de3614197565b1415612e315760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108d1565b6003816004811115612e4557612e45614197565b1415612e9e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108d1565b6004816004811115612eb257612eb2614197565b1415610fba5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108d1565b606061193c848460008561316a565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612f7357507f000000000000000000000000000000000000000000000000000000000000000046145b15612f9d57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b90565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561307b5750600090506003613128565b8460ff16601b1415801561309357508460ff16601c14155b156130a45750600090506004613128565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156130f8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661312157600060019250925050613128565b9150600090505b94509492505050565b6000806001600160ff1b0383168161314e60ff86901c601b614036565b905061315c87828885613044565b935093505050935093915050565b6060824710156131cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108d1565b6001600160a01b0385163b6132225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108d1565b600080866001600160a01b0316858760405161323e9190613a61565b60006040518083038185875af1925050503d806000811461327b576040519150601f19603f3d011682016040523d82523d6000602084013e613280565b606091505b509150915061329082828661329b565b979650505050505050565b606083156132aa57508161193f565b8251156132ba5782518084602001fd5b8160405162461bcd60e51b81526004016108d19190613c7d565b8280546132e0906140db565b90600052602060002090601f0160209004810192826133025760008555613348565b82601f1061331b57805160ff1916838001178555613348565b82800160010185558215613348579182015b8281111561334857825182559160200191906001019061332d565b50613354929150613358565b5090565b5b808211156133545760008155600101613359565b60006001600160401b03831115613386576133866141c3565b60405161339d601f8501601f191660200182614110565b8091508381528484840111156133b257600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126133db57600080fd5b813560206133e882614013565b6040516133f58282614110565b8381528281019150858301600585901b8701840188101561341557600080fd5b60005b8581101561343457813584529284019290840190600101613418565b5090979650505050505050565b600082601f83011261345257600080fd5b61193f8383356020850161336d565b60006080828403121561347357600080fd5b50919050565b80356001600160601b038116811461349057600080fd5b919050565b6000602082840312156134a757600080fd5b813561193f8161427d565b600080604083850312156134c557600080fd5b82356134d08161427d565b915060208301356134e08161427d565b809150509250929050565b600080600080600060a0868803121561350357600080fd5b853561350e8161427d565b9450602086013561351e8161427d565b935060408601356001600160401b038082111561353a57600080fd5b61354689838a016133ca565b9450606088013591508082111561355c57600080fd5b61356889838a016133ca565b9350608088013591508082111561357e57600080fd5b5061358b88828901613441565b9150509295509295909350565b600080600080600060a086880312156135b057600080fd5b85356135bb8161427d565b945060208601356135cb8161427d565b9350604086013592506060860135915060808601356001600160401b038111156135f457600080fd5b61358b88828901613441565b60008060006060848603121561361557600080fd5b83356136208161427d565b925060208401356001600160401b038082111561363c57600080fd5b613648878388016133ca565b9350604086013591508082111561365e57600080fd5b5061366b868287016133ca565b9150509250925092565b6000806040838503121561368857600080fd5b82356136938161427d565b915060208301356134e081614292565b600080604083850312156136b657600080fd5b82356136c18161427d565b946020939093013593505050565b6000806000606084860312156136e457600080fd5b83356136ef8161427d565b95602085013595506040909401359392505050565b6000806040838503121561371757600080fd5b82356137228161427d565b915061373060208401613479565b90509250929050565b6000806040838503121561374c57600080fd5b82356001600160401b038082111561376357600080fd5b818501915085601f83011261377757600080fd5b8135602061378482614013565b6040516137918282614110565b8381528281019150858301600585901b870184018b10156137b157600080fd5b600096505b848710156137dd5780356137c98161427d565b8352600196909601959183019183016137b6565b50965050860135925050808211156137f457600080fd5b50613801858286016133ca565b9150509250929050565b60006020828403121561381d57600080fd5b813561193f81614292565b60006020828403121561383a57600080fd5b815161193f81614292565b60006020828403121561385757600080fd5b5035919050565b6000806040838503121561387157600080fd5b8235915060208301356134e08161427d565b60006020828403121561389557600080fd5b813561193f816142a0565b6000602082840312156138b257600080fd5b815161193f816142a0565b6000602082840312156138cf57600080fd5b81356001600160401b038111156138e557600080fd5b8201601f810184136138f657600080fd5b6118f68482356020840161336d565b60006020828403121561391757600080fd5b81356001600160401b0381111561392d57600080fd5b6118f684828501613461565b60006020828403121561394b57600080fd5b5051919050565b60008060006060848603121561396757600080fd5b8335925060208401356139798161427d565b915061398760408501613479565b90509250925092565b600080604083850312156139a357600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156139e2578151875295820195908201906001016139c6565b509495945050505050565b60008151808452613a05816020860160208601614098565b601f01601f19169290920160200192915050565b60008151613a2b818560208601614098565b9290920192915050565b60006001600160fb1b03831115613a4b57600080fd5b8260051b80858437600092019182525092915050565b60008251613a73818460208701614098565b9190910192915050565b600080845481600182811c915080831680613a9957607f831692505b6020808410821415613ab957634e487b7160e01b86526022600452602486fd5b818015613acd5760018114613ade57613b0b565b60ff19861689528489019650613b0b565b60008b81526020902060005b86811015613b035781548b820152908501908301613aea565b505084890196505b505050505050613b2f613b1e8286613a19565b64173539b7b760d91b815260050190565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613b70816017850160208801614098565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613ba1816028840160208801614098565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613bd9908301866139b2565b8281036060840152613beb81866139b2565b90508281036080840152613bff81856139ed565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613290908301846139ed565b60208152600061193f60208301846139b2565b604081526000613c6b60408301856139b2565b8281036020840152613b2f81856139b2565b60208152600061193f60208301846139ed565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000808335601e19843603018112613f9b57600080fd5b8301803591506001600160401b03821115613fb557600080fd5b6020019150600581901b3603821315610bef57600080fd5b6000808335601e19843603018112613fe457600080fd5b8301803591506001600160401b03821115613ffe57600080fd5b602001915036819003821315610bef57600080fd5b60006001600160401b0382111561402c5761402c6141c3565b5060051b60200190565b600082198211156140495761404961416b565b500190565b60008261405d5761405d614181565b500490565b600081600019048311821515161561407c5761407c61416b565b500290565b6000828210156140935761409361416b565b500390565b60005b838110156140b357818101518382015260200161409b565b838111156113035750506000910152565b6000816140d3576140d361416b565b506000190190565b600181811c908216806140ef57607f821691505b6020821081141561347357634e487b7160e01b600052602260045260246000fd5b601f8201601f191681016001600160401b0381118282101715614135576141356141c3565b6040525050565b60006000198214156141505761415061416b565b5060010190565b60008261416657614166614181565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156130415760046000803e5060005160e01c90565b600060443d10156142025790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561423157505050505090565b82850191508151818111156142495750505050505090565b843d87010160208285010111156142635750505050505090565b61427260208286010187614110565b509095945050505050565b6001600160a01b0381168114610fba57600080fd5b8015158114610fba57600080fd5b6001600160e01b031981168114610fba57600080fdfe68747470733a2f2f74686561726d6f72732e696f2f6173736574732f636f6e74726163742e6a736f6ea26469706673582212204f79a5dc635e14df6a34022e273a25b6ffcfb4f408a866c35c52d2be5e3a7df564736f6c63430008070033697066733a2f2f516d5736316a46344d44774d525655714c5462516b35563374645655585378506b5674783131626669533246367a0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000008000000000000000000000000accdb39f98e4cc10e3caab32352c97363918c0260000000000000000000000005f96ba320ae2666997e6ba236b82a9b22867a618000000000000000000000000e70d6a78adb9f3fb7bee0e86b35cfa948f9d761c000000000000000000000000c57bd49cf85ab073b3383251e9db3a71fb405bae000000000000000000000000ac69091ca431283226577f630785cf07f2b30e98000000000000000000000000af803df825ce8c694f9fcb632bbe198b124e631300000000000000000000000067d5dc3136d028aee28af5c1df7e13fe5be32bd00000000000000000000000006fd5d4427bc295a916b5821f81666c0d5ba303f9000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d564c474a6f643435507a317142727150646a43635857347578593738684e6a766f324e4466687a46636262392f00000000000000000000

Deployed Bytecode

0x60806040526004361061023e5760003560e01c80636b20c4541161012e578063ce7c2ac2116100ab578063e63ab1e91161006f578063e63ab1e914610797578063e8a3d485146107cb578063e985e9c5146107e0578063f242432a14610829578063f5298aca1461084957600080fd5b8063ce7c2ac2146106c2578063d5391393146106f8578063d547741f1461072c578063d79779b21461074c578063e33b7de31461078257600080fd5b80639852595c116100f25780639852595c1461062f5780639a294d7914610665578063a217fddf14610678578063a22cb4651461068d578063aa1b103f146106ad57600080fd5b80636b20c454146105825780638456cb59146105a25780638a616bc0146105b75780638b83209b146105d757806391d148541461060f57600080fd5b806334b1b9d2116101bc57806348b750441161018057806348b75044146104dd5780634e1273f4146104fd578063574a4f9b1461052a5780635944c7531461054a5780635c975abb1461056a57600080fd5b806334b1b9d21461042d57806336568abe1461044d5780633a98ef391461046d5780633f4ba83a14610482578063406072a91461049757600080fd5b8063210df79111610203578063210df7911461035e578063248a9ca31461037e5780632a55205a146103ae5780632eb2c2d6146103ed5780632f2ff15d1461040d57600080fd5b8062fdd58e1461028c57806301ffc9a7146102bf57806304634d8d146102ef5780630e89341c14610311578063191655871461033e57600080fd5b36610287577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561029857600080fd5b506102ac6102a73660046136a3565b610869565b6040519081526020015b60405180910390f35b3480156102cb57600080fd5b506102df6102da366004613883565b610900565b60405190151581526020016102b6565b3480156102fb57600080fd5b5061030f61030a366004613704565b610911565b005b34801561031d57600080fd5b5061033161032c366004613845565b61092b565b6040516102b69190613c7d565b34801561034a57600080fd5b5061030f610359366004613495565b6109fc565b34801561036a57600080fd5b5061030f6103793660046138bd565b610b2a565b34801561038a57600080fd5b506102ac610399366004613845565b6000908152600d602052604090206001015490565b3480156103ba57600080fd5b506103ce6103c9366004613990565b610b48565b604080516001600160a01b0390931683526020830191909152016102b6565b3480156103f957600080fd5b5061030f6104083660046134eb565b610bf6565b34801561041957600080fd5b5061030f61042836600461385e565b610c8d565b34801561043957600080fd5b5061030f610448366004613905565b610cb2565b34801561045957600080fd5b5061030f61046836600461385e565b610f0a565b34801561047957600080fd5b506005546102ac565b34801561048e57600080fd5b5061030f610f88565b3480156104a357600080fd5b506102ac6104b23660046134b2565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b3480156104e957600080fd5b5061030f6104f83660046134b2565b610fbd565b34801561050957600080fd5b5061051d610518366004613739565b6111a5565b6040516102b69190613c45565b34801561053657600080fd5b5061030f61054536600461380b565b6112ce565b34801561055657600080fd5b5061030f610565366004613952565b6112ed565b34801561057657600080fd5b50600c5460ff166102df565b34801561058e57600080fd5b5061030f61059d366004613600565b611309565b3480156105ae57600080fd5b5061030f61134c565b3480156105c357600080fd5b5061030f6105d2366004613845565b61137e565b3480156105e357600080fd5b506105f76105f2366004613845565b61139b565b6040516001600160a01b0390911681526020016102b6565b34801561061b57600080fd5b506102df61062a36600461385e565b6113cb565b34801561063b57600080fd5b506102ac61064a366004613495565b6001600160a01b031660009081526008602052604090205490565b61030f610673366004613905565b6113f6565b34801561068457600080fd5b506102ac600081565b34801561069957600080fd5b5061030f6106a8366004613675565b611623565b3480156106b957600080fd5b5061030f61162e565b3480156106ce57600080fd5b506102ac6106dd366004613495565b6001600160a01b031660009081526007602052604090205490565b34801561070457600080fd5b506102ac7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561073857600080fd5b5061030f61074736600461385e565b611643565b34801561075857600080fd5b506102ac610767366004613495565b6001600160a01b03166000908152600a602052604090205490565b34801561078e57600080fd5b506006546102ac565b3480156107a357600080fd5b506102ac7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b3480156107d757600080fd5b50610331611668565b3480156107ec57600080fd5b506102df6107fb3660046134b2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561083557600080fd5b5061030f610844366004613598565b611688565b34801561085557600080fd5b5061030f6108643660046136cf565b6116cd565b60006001600160a01b0383166108da5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b600061090b82611710565b92915050565b600061091c81611735565b610926838361173f565b505050565b60105460609060ff166109ca5760118054610945906140db565b80601f0160208091040260200160405190810160405280929190818152602001828054610971906140db565b80156109be5780601f10610993576101008083540402835291602001916109be565b820191906000526020600020905b8154815290600101906020018083116109a157829003601f168201915b50505050509050919050565b60126109d5836117f9565b6040516020016109e6929190613a7d565b6040516020818303038152906040529050919050565b6001600160a01b038116600090815260076020526040902054610a315760405162461bcd60e51b81526004016108d190613d65565b6000610a3c60065490565b610a469047614036565b90506000610a738383610a6e866001600160a01b031660009081526008602052604090205490565b6118fe565b905080610a925760405162461bcd60e51b81526004016108d190613dab565b6001600160a01b03831660009081526008602052604081208054839290610aba908490614036565b925050819055508060066000828254610ad39190614036565b90915550610ae390508382611946565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6000610b3581611735565b81516109269060119060208501906132d4565b60008281526004602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610bbd5750604080518082019091526003546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610bdc906001600160601b031687614062565b610be6919061404e565b91519350909150505b9250929050565b6001600160a01b038516331480610c125750610c1285336107fb565b610c795760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016108d1565b610c868585858585611a5f565b5050505050565b6000828152600d6020526040902060010154610ca881611735565b6109268383611c09565b600c5460ff1615610cd55760405162461bcd60e51b81526004016108d190613df6565b6002600e541415610d285760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d1565b6002600e556000610d3882611c8f565b9050610d476020830183613f84565b9050600214610d8b5760405162461bcd60e51b815260206004820152601060248201526f7265717569726520322061726d6f727360801b60448201526064016108d1565b610db57f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826113cb565b610dfa5760405162461bcd60e51b81526020600482015260166024820152754e6f7420617574686f72697a656420746f206675736560501b60448201526064016108d1565b81356000908152600f602052604090205415610e495760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016108d1565b33610ed181610e5b6020860186613f84565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610e9a925050506040870187613f84565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611ce892505050565b610ef1818460000135600160405180602001604052806000815250611e84565b5050356000818152600f60205260409020556001600e55565b6001600160a01b0381163314610f7a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108d1565b610f848282611fa7565b5050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610fb281611735565b610fba61200e565b50565b6001600160a01b038116600090815260076020526040902054610ff25760405162461bcd60e51b81526004016108d190613d65565b6001600160a01b0382166000908152600a60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b15801561104a57600080fd5b505afa15801561105e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110829190613939565b61108c9190614036565b905060006110c58383610a6e87876001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b9050806110e45760405162461bcd60e51b81526004016108d190613dab565b6001600160a01b038085166000908152600b602090815260408083209387168352929052908120805483929061111b908490614036565b90915550506001600160a01b0384166000908152600a602052604081208054839290611148908490614036565b9091555061115990508484836120a1565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b6060815183511461120a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016108d1565b600083516001600160401b03811115611225576112256141c3565b60405190808252806020026020018201604052801561124e578160200160208202803683370190505b50905060005b84518110156112c657611299858281518110611272576112726141ad565b602002602001015185838151811061128c5761128c6141ad565b6020026020010151610869565b8282815181106112ab576112ab6141ad565b60209081029190910101526112bf8161413c565b9050611254565b509392505050565b60006112d981611735565b506010805460ff1916911515919091179055565b60006112f881611735565b6113038484846120f3565b50505050565b6001600160a01b038316331480611325575061132583336107fb565b6113415760405162461bcd60e51b81526004016108d190613d1c565b610926838383611ce8565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61137681611735565b610fba6121be565b600061138981611735565b50600090815260046020526040812055565b6000600982815481106113b0576113b06141ad565b6000918252602090912001546001600160a01b031692915050565b6000918252600d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600c5460ff16156114195760405162461bcd60e51b81526004016108d190613df6565b6002600e54141561146c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d1565b6002600e55600061147c82612216565b90506114a87f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826113cb565b6114ed5760405162461bcd60e51b8152602060048201526016602482015275139bdd08185d5d1a1bdc9a5e9959081d1bc81b5a5b9d60521b60448201526064016108d1565b81602001353410156115355760405162461bcd60e51b815260206004820152601160248201527056616c75652062656c6f7720707269636560781b60448201526064016108d1565b81356000908152600f6020526040902054156115845760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016108d1565b6115b36115976060840160408501613495565b8360000135600160405180602001604052806000815250611e84565b81356000818152600f6020526040908190208290556115d89060608501908501613495565b6001600160a01b03167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f3460405161161291815260200190565b60405180910390a350506001600e55565b610f84338383612222565b600061163981611735565b610fba6000600355565b6000828152600d602052604090206001015461165e81611735565b6109268383611fa7565b60606040518060600160405280602981526020016142b760299139905090565b6001600160a01b0385163314806116a457506116a485336107fb565b6116c05760405162461bcd60e51b81526004016108d190613d1c565b610c868585858585612303565b6001600160a01b0383163314806116e957506116e983336107fb565b6117055760405162461bcd60e51b81526004016108d190613d1c565b61092683838361243b565b60006001600160e01b03198216637965db0b60e01b148061090b575061090b82612553565b610fba8133612578565b6127106001600160601b038216111561176a5760405162461bcd60e51b81526004016108d190613ef2565b6001600160a01b0382166117c05760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016108d1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600355565b60608161181d5750506040805180820190915260018152600360fc1b602082015290565b8160005b811561184757806118318161413c565b91506118409050600a8361404e565b9150611821565b6000816001600160401b03811115611861576118616141c3565b6040519080825280601f01601f19166020018201604052801561188b576020820181803683370190505b5090505b84156118f6576118a0600183614081565b91506118ad600a86614157565b6118b8906030614036565b60f81b8183815181106118cd576118cd6141ad565b60200101906001600160f81b031916908160001a9053506118ef600a8661404e565b945061188f565b949350505050565b6005546001600160a01b038416600090815260076020526040812054909183916119289086614062565b611932919061404e565b61193c9190614081565b90505b9392505050565b804710156119965760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108d1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146119e3576040519150601f19603f3d011682016040523d82523d6000602084013e6119e8565b606091505b50509050806109265760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108d1565b8151835114611a805760405162461bcd60e51b81526004016108d190613f3c565b6001600160a01b038416611aa65760405162461bcd60e51b81526004016108d190613e20565b33611ab58187878787876125dc565b60005b8451811015611b9b576000858281518110611ad557611ad56141ad565b602002602001015190506000858381518110611af357611af36141ad565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611b435760405162461bcd60e51b81526004016108d190613ea8565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611b80908490614036565b9250508190555050505080611b949061413c565b9050611ab8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611beb929190613c58565b60405180910390a4611c01818787878787612604565b505050505050565b611c1382826113cb565b610f84576000828152600d602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c4b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600080611c9b8361276f565b905061193f81611cae6060860186613fcd565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061283d92505050565b6001600160a01b038316611d0e5760405162461bcd60e51b81526004016108d190613e65565b8051825114611d2f5760405162461bcd60e51b81526004016108d190613f3c565b6000339050611d52818560008686604051806020016040528060008152506125dc565b60005b8351811015611e17576000848281518110611d7257611d726141ad565b602002602001015190506000848381518110611d9057611d906141ad565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015611de05760405162461bcd60e51b81526004016108d190613cd8565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580611e0f8161413c565b915050611d55565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611e68929190613c58565b60405180910390a4604080516020810190915260009052611303565b6001600160a01b038416611ee45760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016108d1565b336000611ef085612859565b90506000611efd85612859565b9050611f0e836000898585896125dc565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290611f3e908490614036565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f9e836000898989896128a4565b50505050505050565b611fb182826113cb565b15610f84576000828152600d602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600c5460ff166120575760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108d1565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261092690849061296e565b6127106001600160601b038216111561211e5760405162461bcd60e51b81526004016108d190613ef2565b6001600160a01b0382166121745760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d6574657273000000000060448201526064016108d1565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600490529190942093519051909116600160a01b029116179055565b600c5460ff16156121e15760405162461bcd60e51b81526004016108d190613df6565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586120843390565b600080611c9b83612a40565b816001600160a01b0316836001600160a01b031614156122965760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016108d1565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166123295760405162461bcd60e51b81526004016108d190613e20565b33600061233585612859565b9050600061234285612859565b90506123528389898585896125dc565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156123935760405162461bcd60e51b81526004016108d190613ea8565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906123d0908490614036565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612430848a8a8a8a8a6128a4565b505050505050505050565b6001600160a01b0383166124615760405162461bcd60e51b81526004016108d190613e65565b33600061246d84612859565b9050600061247a84612859565b905061249a838760008585604051806020016040528060008152506125dc565b6000858152602081815260408083206001600160a01b038a168452909152902054848110156124db5760405162461bcd60e51b81526004016108d190613cd8565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611f9e565b60006001600160e01b0319821663152a902d60e11b148061090b575061090b82612aaa565b61258282826113cb565b610f845761259a816001600160a01b03166014612afa565b6125a5836020612afa565b6040516020016125b6929190613b38565b60408051601f198184030181529082905262461bcd60e51b82526108d191600401613c7d565b600c5460ff16156125ff5760405162461bcd60e51b81526004016108d190613df6565b611c01565b6001600160a01b0384163b15611c015760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906126489089908990889088908890600401613bad565b602060405180830381600087803b15801561266257600080fd5b505af1925050508015612692575060408051601f3d908101601f1916820190925261268f918101906138a0565b60015b61273f5761269e6141d9565b806308c379a014156126d857506126b36141f4565b806126be57506126da565b8060405162461bcd60e51b81526004016108d19190613c7d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016108d1565b6001600160e01b0319811663bc197c8160e01b14611f9e5760405162461bcd60e51b81526004016108d190613c90565b600061090b7f9dfcfb25cb819731f1fd812690ea842f45e66106b59df74bea5263b68538c81d83356127a46020860186613f84565b6040516020016127b5929190613a35565b604051602081830303815290604052805190602001208580604001906127db9190613f84565b6040516020016127ec929190613a35565b60408051601f198184030181528282528051602091820120908301959095528101929092526060820152608081019190915260a0015b60405160208183030381529060405280519060200120612c95565b600080600061284c8585612ce3565b915091506112c681612d50565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612893576128936141ad565b602090810291909101015292915050565b6001600160a01b0384163b15611c015760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906128e89089908990889088908890600401613c0b565b602060405180830381600087803b15801561290257600080fd5b505af1925050508015612932575060408051601f3d908101601f1916820190925261292f918101906138a0565b60015b61293e5761269e6141d9565b6001600160e01b0319811663f23a6e6160e01b14611f9e5760405162461bcd60e51b81526004016108d190613c90565b60006129c3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612f0b9092919063ffffffff16565b80519091501561092657808060200190518101906129e19190613828565b6109265760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108d1565b600061090b7f27ba86c5586021ba823aed5ecec8f176e93654daf63efd0cf6386a53edab3f9183356020850135612a7d6060870160408801613495565b60408051602081019590955284019290925260608301526001600160a01b0316608082015260a001612822565b60006001600160e01b03198216636cdb3d1360e11b1480612adb57506001600160e01b031982166303a24d0760e21b145b8061090b57506301ffc9a760e01b6001600160e01b031983161461090b565b60606000612b09836002614062565b612b14906002614036565b6001600160401b03811115612b2b57612b2b6141c3565b6040519080825280601f01601f191660200182016040528015612b55576020820181803683370190505b509050600360fc1b81600081518110612b7057612b706141ad565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612b9f57612b9f6141ad565b60200101906001600160f81b031916908160001a9053506000612bc3846002614062565b612bce906001614036565b90505b6001811115612c46576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612c0257612c026141ad565b1a60f81b828281518110612c1857612c186141ad565b60200101906001600160f81b031916908160001a90535060049490941c93612c3f816140c4565b9050612bd1565b50831561193f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108d1565b600061090b612ca2612f1a565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080825160411415612d1a5760208301516040840151606085015160001a612d0e87828585613044565b94509450505050610bef565b825160401415612d445760208301516040840151612d39868383613131565b935093505050610bef565b50600090506002610bef565b6000816004811115612d6457612d64614197565b1415612d6d5750565b6001816004811115612d8157612d81614197565b1415612dcf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108d1565b6002816004811115612de357612de3614197565b1415612e315760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108d1565b6003816004811115612e4557612e45614197565b1415612e9e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108d1565b6004816004811115612eb257612eb2614197565b1415610fba5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108d1565b606061193c848460008561316a565b6000306001600160a01b037f000000000000000000000000f37c1de9201f19830e1d6d0f2cefbbe402c4b23c16148015612f7357507f000000000000000000000000000000000000000000000000000000000000000146145b15612f9d57507f9b6b1a701304c5ad7ec74007964f8d6e99c7c15d88368d2901ba20d539417eaf90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f3dd7b056a0f8d2b871c65c6280d88ddc71a71d41a0ac0092c3268aa7a6bcb452828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b90565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561307b5750600090506003613128565b8460ff16601b1415801561309357508460ff16601c14155b156130a45750600090506004613128565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156130f8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661312157600060019250925050613128565b9150600090505b94509492505050565b6000806001600160ff1b0383168161314e60ff86901c601b614036565b905061315c87828885613044565b935093505050935093915050565b6060824710156131cb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108d1565b6001600160a01b0385163b6132225760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108d1565b600080866001600160a01b0316858760405161323e9190613a61565b60006040518083038185875af1925050503d806000811461327b576040519150601f19603f3d011682016040523d82523d6000602084013e613280565b606091505b509150915061329082828661329b565b979650505050505050565b606083156132aa57508161193f565b8251156132ba5782518084602001fd5b8160405162461bcd60e51b81526004016108d19190613c7d565b8280546132e0906140db565b90600052602060002090601f0160209004810192826133025760008555613348565b82601f1061331b57805160ff1916838001178555613348565b82800160010185558215613348579182015b8281111561334857825182559160200191906001019061332d565b50613354929150613358565b5090565b5b808211156133545760008155600101613359565b60006001600160401b03831115613386576133866141c3565b60405161339d601f8501601f191660200182614110565b8091508381528484840111156133b257600080fd5b83836020830137600060208583010152509392505050565b600082601f8301126133db57600080fd5b813560206133e882614013565b6040516133f58282614110565b8381528281019150858301600585901b8701840188101561341557600080fd5b60005b8581101561343457813584529284019290840190600101613418565b5090979650505050505050565b600082601f83011261345257600080fd5b61193f8383356020850161336d565b60006080828403121561347357600080fd5b50919050565b80356001600160601b038116811461349057600080fd5b919050565b6000602082840312156134a757600080fd5b813561193f8161427d565b600080604083850312156134c557600080fd5b82356134d08161427d565b915060208301356134e08161427d565b809150509250929050565b600080600080600060a0868803121561350357600080fd5b853561350e8161427d565b9450602086013561351e8161427d565b935060408601356001600160401b038082111561353a57600080fd5b61354689838a016133ca565b9450606088013591508082111561355c57600080fd5b61356889838a016133ca565b9350608088013591508082111561357e57600080fd5b5061358b88828901613441565b9150509295509295909350565b600080600080600060a086880312156135b057600080fd5b85356135bb8161427d565b945060208601356135cb8161427d565b9350604086013592506060860135915060808601356001600160401b038111156135f457600080fd5b61358b88828901613441565b60008060006060848603121561361557600080fd5b83356136208161427d565b925060208401356001600160401b038082111561363c57600080fd5b613648878388016133ca565b9350604086013591508082111561365e57600080fd5b5061366b868287016133ca565b9150509250925092565b6000806040838503121561368857600080fd5b82356136938161427d565b915060208301356134e081614292565b600080604083850312156136b657600080fd5b82356136c18161427d565b946020939093013593505050565b6000806000606084860312156136e457600080fd5b83356136ef8161427d565b95602085013595506040909401359392505050565b6000806040838503121561371757600080fd5b82356137228161427d565b915061373060208401613479565b90509250929050565b6000806040838503121561374c57600080fd5b82356001600160401b038082111561376357600080fd5b818501915085601f83011261377757600080fd5b8135602061378482614013565b6040516137918282614110565b8381528281019150858301600585901b870184018b10156137b157600080fd5b600096505b848710156137dd5780356137c98161427d565b8352600196909601959183019183016137b6565b50965050860135925050808211156137f457600080fd5b50613801858286016133ca565b9150509250929050565b60006020828403121561381d57600080fd5b813561193f81614292565b60006020828403121561383a57600080fd5b815161193f81614292565b60006020828403121561385757600080fd5b5035919050565b6000806040838503121561387157600080fd5b8235915060208301356134e08161427d565b60006020828403121561389557600080fd5b813561193f816142a0565b6000602082840312156138b257600080fd5b815161193f816142a0565b6000602082840312156138cf57600080fd5b81356001600160401b038111156138e557600080fd5b8201601f810184136138f657600080fd5b6118f68482356020840161336d565b60006020828403121561391757600080fd5b81356001600160401b0381111561392d57600080fd5b6118f684828501613461565b60006020828403121561394b57600080fd5b5051919050565b60008060006060848603121561396757600080fd5b8335925060208401356139798161427d565b915061398760408501613479565b90509250925092565b600080604083850312156139a357600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156139e2578151875295820195908201906001016139c6565b509495945050505050565b60008151808452613a05816020860160208601614098565b601f01601f19169290920160200192915050565b60008151613a2b818560208601614098565b9290920192915050565b60006001600160fb1b03831115613a4b57600080fd5b8260051b80858437600092019182525092915050565b60008251613a73818460208701614098565b9190910192915050565b600080845481600182811c915080831680613a9957607f831692505b6020808410821415613ab957634e487b7160e01b86526022600452602486fd5b818015613acd5760018114613ade57613b0b565b60ff19861689528489019650613b0b565b60008b81526020902060005b86811015613b035781548b820152908501908301613aea565b505084890196505b505050505050613b2f613b1e8286613a19565b64173539b7b760d91b815260050190565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613b70816017850160208801614098565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613ba1816028840160208801614098565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090613bd9908301866139b2565b8281036060840152613beb81866139b2565b90508281036080840152613bff81856139ed565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613290908301846139ed565b60208152600061193f60208301846139b2565b604081526000613c6b60408301856139b2565b8281036020840152613b2f81856139b2565b60208152600061193f60208301846139ed565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6000808335601e19843603018112613f9b57600080fd5b8301803591506001600160401b03821115613fb557600080fd5b6020019150600581901b3603821315610bef57600080fd5b6000808335601e19843603018112613fe457600080fd5b8301803591506001600160401b03821115613ffe57600080fd5b602001915036819003821315610bef57600080fd5b60006001600160401b0382111561402c5761402c6141c3565b5060051b60200190565b600082198211156140495761404961416b565b500190565b60008261405d5761405d614181565b500490565b600081600019048311821515161561407c5761407c61416b565b500290565b6000828210156140935761409361416b565b500390565b60005b838110156140b357818101518382015260200161409b565b838111156113035750506000910152565b6000816140d3576140d361416b565b506000190190565b600181811c908216806140ef57607f821691505b6020821081141561347357634e487b7160e01b600052602260045260246000fd5b601f8201601f191681016001600160401b0381118282101715614135576141356141c3565b6040525050565b60006000198214156141505761415061416b565b5060010190565b60008261416657614166614181565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156130415760046000803e5060005160e01c90565b600060443d10156142025790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561423157505050505090565b82850191508151818111156142495750505050505090565b843d87010160208285010111156142635750505050505090565b61427260208286010187614110565b509095945050505050565b6001600160a01b0381168114610fba57600080fd5b8015158114610fba57600080fd5b6001600160e01b031981168114610fba57600080fdfe68747470733a2f2f74686561726d6f72732e696f2f6173736574732f636f6e74726163742e6a736f6ea26469706673582212204f79a5dc635e14df6a34022e273a25b6ffcfb4f408a866c35c52d2be5e3a7df564736f6c63430008070033

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

0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000008000000000000000000000000accdb39f98e4cc10e3caab32352c97363918c0260000000000000000000000005f96ba320ae2666997e6ba236b82a9b22867a618000000000000000000000000e70d6a78adb9f3fb7bee0e86b35cfa948f9d761c000000000000000000000000c57bd49cf85ab073b3383251e9db3a71fb405bae000000000000000000000000ac69091ca431283226577f630785cf07f2b30e98000000000000000000000000af803df825ce8c694f9fcb632bbe198b124e631300000000000000000000000067d5dc3136d028aee28af5c1df7e13fe5be32bd00000000000000000000000006fd5d4427bc295a916b5821f81666c0d5ba303f9000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d564c474a6f643435507a317142727150646a43635857347578593738684e6a766f324e4466687a46636262392f00000000000000000000

-----Decoded View---------------
Arg [0] : _address (address[]): 0xacCdB39F98e4cC10e3cAAb32352c97363918C026,0x5f96Ba320Ae2666997E6ba236b82A9b22867A618,0xE70D6A78ADb9f3FB7bEe0e86B35cfa948f9D761C,0xC57bd49cF85Ab073b3383251e9db3a71FB405baE,0xAC69091Ca431283226577f630785CF07f2b30e98,0xAf803Df825ce8c694f9Fcb632bbe198b124e6313,0x67d5Dc3136D028AeE28af5c1df7e13fE5BE32bD0,0x6fd5d4427BC295a916b5821F81666C0d5bA303F9
Arg [1] : _shares (uint256[]): 1,5,15,5,24,15,24,11
Arg [2] : _ipfs (string): ipfs://QmVLGJod45Pz1qBrqPdjCcXW4uxY78hNjvo2NDfhzFcbb9/

-----Encoded View---------------
24 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [2] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [4] : 000000000000000000000000accdb39f98e4cc10e3caab32352c97363918c026
Arg [5] : 0000000000000000000000005f96ba320ae2666997e6ba236b82a9b22867a618
Arg [6] : 000000000000000000000000e70d6a78adb9f3fb7bee0e86b35cfa948f9d761c
Arg [7] : 000000000000000000000000c57bd49cf85ab073b3383251e9db3a71fb405bae
Arg [8] : 000000000000000000000000ac69091ca431283226577f630785cf07f2b30e98
Arg [9] : 000000000000000000000000af803df825ce8c694f9fcb632bbe198b124e6313
Arg [10] : 00000000000000000000000067d5dc3136d028aee28af5c1df7e13fe5be32bd0
Arg [11] : 0000000000000000000000006fd5d4427bc295a916b5821f81666c0d5ba303f9
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [15] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [18] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000018
Arg [20] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [22] : 697066733a2f2f516d564c474a6f643435507a317142727150646a4363585734
Arg [23] : 7578593738684e6a766f324e4466687a46636262392f00000000000000000000


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.