Token CARBON

Overview ERC-1155

Total Supply:
0 CAR

Holders:
39 addresses

Transfers:
-

Profile Summary

 
Contract:
0x162cf80e2c9b63d46e1e0b244d4ec4c49302cfad0x162cF80e2C9b63d46e1E0B244d4Ec4c49302CFaD

Loading
[ Download CSV Export  ] 
Loading
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
CarbonToken

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 2 of 23 : Pausable.sol
// SPDX-License-Identifier: MIT

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 3 of 23 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 23 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 5 of 23 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 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 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 : draft-EIP712.sol
// SPDX-License-Identifier: MIT

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;

    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);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (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 7 of 23 : SafeMath.sol
// SPDX-License-Identifier: MIT

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 no longer needed starting with Solidity 0.8. 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 substraction 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 8 of 23 : CommonConstants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
    Note: Simple contract to use as base for const vals
*/
contract CommonConstants {

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

File 9 of 23 : ERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interface/IERC1155.sol";
import "../interface/ERC1155TokenReceiver.sol";
import "./ERC165.sol";
import "./CommonConstants.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";


// A sample implementation of core ERC1155 function.
contract ERC1155 is IERC1155, ERC165, CommonConstants
{
    using SafeMath for uint256;
    using Address for address;

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

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

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

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

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

    constructor() {
        _registerInterface(INTERFACE_SIGNATURE_ERC1155);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

        return balances_;
    }

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

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

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

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

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


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

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

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

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

File 10 of 23 : ERC1155Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./HasContractURI.sol";
import "./ERC1155MetadataURI.sol";
import "./ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract ERC1155Base is Ownable, ERC1155MetadataURI, HasContractURI, ERC1155 {
    using SafeMath for uint256;
    // id => creator
    mapping (uint256 => address) public creators;

    constructor(string memory contractURI, string memory tokenURIPrefix) HasContractURI(contractURI) ERC1155MetadataURI(tokenURIPrefix) {

    }
    // Creates a new token type and assings _initialSupply to minter
    function _mint(
        address _to,
        uint256 _id,
        uint256 _supply, 
        string memory _uri
    ) internal {
        creators[_id] = owner();
        balances[_id][_to] = _supply;
        _setTokenURI(_id, _uri);

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

    function burn(address _owner, uint256 _id, uint256 _value) external {
      
        require(_owner == msg.sender || operatorApproval[_owner][msg.sender] == true, "Need operator approval for 3rd party burns.");

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

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

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

    function setTokenURIPrefix(string memory tokenURIPrefix) public onlyOwner {
        _setTokenURIPrefix(tokenURIPrefix);
    }

    function setContractURI(string memory contractURI) public onlyOwner {
        _setContractURI(contractURI);
    }
}

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

import "../interface/IERC1155MetadataURI.sol";
import "./HasTokenURI.sol";
/**
    Note: The ERC-165 identifier for this interface is 0x0e89341c.
*/
contract ERC1155MetadataURI is IERC1155MetadataURI, HasTokenURI {

    constructor(string memory _tokenURIPrefix) HasTokenURI(_tokenURIPrefix) {

    }

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

File 12 of 23 : ERC165.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interface/IERC165.sol";

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

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

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

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

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

File 13 of 23 : HasContractURI.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


import "./ERC165.sol";

contract HasContractURI is ERC165 {

    string public contractURI;

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

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

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

File 14 of 23 : HasTokenURI.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../../lib/utils/StringLibrary.sol";

contract HasTokenURI {
    using StringLibrary for string;

    //Token URI prefix
    string public tokenURIPrefix;

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

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

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

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

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

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

File 15 of 23 : MinterRole.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract MinterRole is Context, Ownable {

  event MinterAdded(address indexed account);
  event MinterRemoved(address indexed account);

  mapping (address => bool) private _minters;

  constructor () {
    _addMinter(_msgSender());
  }

  modifier onlyMinter() {
    require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role");
    _;
  }

  function isMinter(address account) public view returns (bool) {
    require(account != address(0), "MinterRole: account is the zero address");
    return _minters[account] == true;
  }

  function addMinter(address account) public onlyOwner {
    require(!isMinter(account), "Roles: account already has role");
    _addMinter(account);
  }

  function removeMinter(address account) public onlyOwner {
    require(isMinter(account), "MinterRole: account does not have role");
    _removeMinter(account);
  }

  function _addMinter(address account) internal {
    _minters[account] = true;
    emit MinterAdded(account);
  }

  function _removeMinter(address account) internal {
    _minters[account] = false;
    emit MinterRemoved(account);
  }
}

File 16 of 23 : PauserRole.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract PauserRole is Context, Ownable {

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

  mapping (address => bool) private _pausers;

  constructor () {
    _addPauser(_msgSender());
  }

  modifier onlyPauser() {
    require(isPauser(_msgSender()), "PauserRole: caller does not have the Pauser role");
    _;
  }

  function isPauser(address account) public view returns (bool) {
    require(account != address(0), "PauserRole: account is the zero address");
    return _pausers[account] == true;
  }

  function addPauser(address account) public onlyOwner {
    require(!isPauser(account), "Roles: account already has role");
    _addPauser(account);
  }

  function removePauser(address account) public onlyOwner {
    require(isPauser(account), "PauserRole: account does not have role");
    _removePauser(account);
  }

  function _addPauser(address account) internal {
    _pausers[account] = true;
    emit PauserAdded(account);
  }

  function _removePauser(address account) internal {
    _pausers[account] = false;
    emit PauserRemoved(account);
  }
}

File 17 of 23 : PermittedTransfer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2; // required to accept structs as function parameters

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./ERC1155.sol";


abstract contract PermittedTransfer is EIP712, ERC1155 {
  using SafeMath for uint256;
  using Address for address;

  string private constant SIGNATURE_VERSION = "1";
  mapping(string => bool) private _usedPermissions;

  constructor(string memory _name) EIP712(_name, SIGNATURE_VERSION) {}

  // event PermitData(
  //   uint256 chainId,
  //   address indexed signer,
  //   address from,
  //   address to,
  //   uint256 id,
  //   uint256 value,
  //   TransferPermission permission
  // );
  
  /// Transfer permition
  struct TransferPermission {
    address from;
    address to;
    uint256 id;
    uint256 value;
    string uuid;
    bytes signature;
  }

  /// Allow to transfer tokens without paying for gas
  function permittedTransfer(
    address from, 
    address to, 
    uint256 id, 
    uint256 value,
    TransferPermission calldata permission
  ) 
  external {
    // emit PermitData(
    //   block.chainid,
    //   signer, 
    //   from, 
    //   to,
    //   id,
    //   value,
    //   permission
    // );

    require(to != address(0x0), "PermittedTransfer: _to must be non-zero.");
    // check if voucher already used
    require(_usedPermissions[permission.uuid] == false, "PermittedTransfer: permission already used");
    require(
      from == permission.from &&
      to == permission.to &&
      id == permission.id &&
      value == permission.value,
      "PermittedTransfer: signed data is not equal to passed parameters"
    );
    address signer = _verifyTransferPermission(permission);
    require(from == signer, "PermittedTransfer: signature invalid or unauthorized");

    // SafeMath will throw with insuficient funds from
    // or if id is not valid (balance will be 0)
    balances[id][from] = balances[id][from].sub(value);
    balances[id][to] = value.add(balances[id][to]);
    // mark permission as used
    _usedPermissions[permission.uuid] = true;

    // MUST emit event
    emit TransferSingle(msg.sender, from, to, id, value);

    // Now that the balance is updated and the event was emitted,
    // call onERC1155Received if the destination is a contract.
    if (to.isContract()) {
      _doSafeTransferAcceptanceCheck(msg.sender, from, to, id, value, "0x01");
    }
  }

  /// @notice Verifies the signature for a given TransferPermission,
  /// returning the address of the signer.
  /// @dev Will revert if the signature is invalid.
  /// Does not verify that the signer is authorized to transfer NFTs.
  function _verifyTransferPermission(
    TransferPermission calldata permission
  ) 
  internal 
  view 
  returns (address) {
    bytes32 digest = _hashTransferPermission(permission);
    return ECDSA.recover(digest, permission.signature);
  }

  /// @notice Returns a hash of the given TransferPermission, 
  /// prepared using EIP712 typed data hashing rules.
  function _hashTransferPermission(
    TransferPermission calldata permission
  ) 
  internal 
  view 
  returns (bytes32) {
    return _hashTypedDataV4(keccak256(abi.encode(
      keccak256("TransferPermission(address from,address to,uint256 id,uint256 value,string uuid)"),
      permission.from,
      permission.to,
      permission.id,
      permission.value,
      keccak256(abi.encodePacked(permission.uuid))
    )));
  }
}

File 18 of 23 : ERC1155TokenReceiver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
    Note: The ERC-165 identifier for this interface is 0x4e2312e0.
*/
interface ERC1155TokenReceiver {
    /**
        @notice Handle the receipt of a single ERC1155 token type.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated.
        This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61) if it accepts the transfer.
        This function MUST revert if it rejects the transfer.
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @param _operator  The address which initiated the transfer (i.e. msg.sender)
        @param _from      The address which previously owned the token
        @param _id        The ID of the token being transferred
        @param _value     The amount of tokens being transferred
        @param _data      Additional data with no specified format
        @return           `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
    */
    function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _value, bytes calldata _data) external returns(bytes4);

    /**
        @notice Handle the receipt of multiple ERC1155 token types.
        @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated.
        This function MUST return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81) if it accepts the transfer(s).
        This function MUST revert if it rejects the transfer(s).
        Return of any other value than the prescribed keccak256 generated value MUST result in the transaction being reverted by the caller.
        @param _operator  The address which initiated the batch transfer (i.e. msg.sender)
        @param _from      The address which previously owned the token
        @param _ids       An array containing ids of each token being transferred (order and length must match _values array)
        @param _values    An array containing amounts of each token being transferred (order and length must match _ids array)
        @param _data      Additional data with no specified format
        @return           `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
    */
    function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external returns(bytes4);
}

File 19 of 23 : IERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC165.sol";


abstract contract IERC1155 is IERC165 {
    /**
        @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
        The `_operator` argument MUST be msg.sender.
        The `_from` argument MUST be the address of the holder whose balance is decreased.
        The `_to` argument MUST be the address of the recipient whose balance is increased.
        The `_id` argument MUST be the token type being transferred.
        The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.
        When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
        When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
    */
    event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);

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

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

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

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

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

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

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

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

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

File 20 of 23 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

File 21 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @title ERC165
 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
 */
interface IERC165 {

    /**
     * @notice Query if a contract implements an interface
     * @dev Interface identification is specified in ERC-165. This function
     * uses less than 30,000 gas
     * @param _interfaceId The interface identifier, as specified in ERC-165
     */
    function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool);
}

File 22 of 23 : StringLibrary.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

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

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

library StringLibrary {
    using UintLibrary for uint256;

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

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

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

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

File 23 of 23 : CarbonToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../lib/contracts/ERC1155Base.sol";
import "../lib/contracts/PauserRole.sol";
import "../lib/contracts/MinterRole.sol";
import "../lib/contracts/PermittedTransfer.sol";

contract CarbonToken is Ownable, Pausable, ERC1155Base, MinterRole, PauserRole, PermittedTransfer {

    string public name;
    string public symbol;

    constructor(
        string memory _name, 
        string memory _symbol, 
        string memory contractURI, 
        string memory tokenURIPrefix
    ) 
    ERC1155Base(contractURI, tokenURIPrefix)
    PermittedTransfer(_name)
    {
        require(bytes(_name).length > 0, "CarbonToken: required _name");
        require(bytes(_symbol).length > 0, "CarbonToken: required _symbol");
        require(bytes(tokenURIPrefix).length > 0, "CarbonToken: required tokenURIPrefix");
        require(bytes(contractURI).length > 0, "CarbonToken: required contractURI");

        name = _name;
        symbol = _symbol;

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

    function mint(
        address to,
        uint256 id, 
        uint256 supply, 
        string memory uri
    ) 
    onlyMinter 
    whenNotPaused
    public {
        require(to != address(0), "CarbonToken: 'to' is the zero address");
        require(creators[id] == address(0x0), "CarbonToken: token is already minted");
        require(supply != 0, "CarbonToken: 'supply' should be positive");
        require(bytes(uri).length > 0, "CarbonToken 'uri' should be set");

        _mint(to, id, supply, uri);
    }

    function pause() public onlyPauser {
        _pause();
    }

    function unpause() public onlyPauser {
        _unpause();
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"contractURI","type":"string"},{"internalType":"string","name":"tokenURIPrefix","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"PauserRemoved","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":[{"internalType":"address","name":"account","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addPauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"creators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isPauser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"components":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"uuid","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct PermittedTransfer.TransferPermission","name":"permission","type":"tuple"}],"name":"permittedTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removePauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"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":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenURIPrefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

6101206040523480156200001257600080fd5b50604051620037f2380380620037f2833981016040819052620000359162000616565b8382828183604051806040016040528060018152602001603160f81b8152508380620000706200006a6200034c60201b60201c565b62000350565b6000805460ff60a01b19169055805162000092906001906020840190620004b9565b5050825160209384012082519284019290922060c083815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818a018190528183019890985260608101959095526080808601939093523085830152805180860390920182529390920190925280519401939093209092526101005250620001306301ffc9a760e01b620003a0565b805162000145906004906020840190620004b9565b506200015863e8a3d48560e01b620003a0565b506200016b636cdb3d1360e11b620003a0565b506200017990503362000421565b62000184336200046d565b506000845111620001dc5760405162461bcd60e51b815260206004820152601b60248201527f436172626f6e546f6b656e3a207265717569726564205f6e616d65000000000060448201526064015b60405180910390fd5b60008351116200022f5760405162461bcd60e51b815260206004820152601d60248201527f436172626f6e546f6b656e3a207265717569726564205f73796d626f6c0000006044820152606401620001d3565b60008151116200028e5760405162461bcd60e51b8152602060048201526024808201527f436172626f6e546f6b656e3a20726571756972656420746f6b656e55524950726044820152630caccd2f60e31b6064820152608401620001d3565b6000825111620002eb5760405162461bcd60e51b815260206004820152602160248201527f436172626f6e546f6b656e3a20726571756972656420636f6e747261637455526044820152604960f81b6064820152608401620001d3565b83516200030090600b906020870190620004b9565b5082516200031690600c906020860190620004b9565b50620003427fe37243f27916e395706434720b54132b80ef5cc8c56f39b0df6485e8dfb697cf620003a0565b5050505062000722565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160e01b03198082161415620003fc5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401620001d3565b6001600160e01b0319166000908152600360205260409020805460ff19166001179055565b6001600160a01b038116600081815260086020526040808220805460ff19166001179055517f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69190a250565b6001600160a01b038116600081815260096020526040808220805460ff19166001179055517f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f89190a250565b828054620004c790620006cf565b90600052602060002090601f016020900481019282620004eb576000855562000536565b82601f106200050657805160ff191683800117855562000536565b8280016001018555821562000536579182015b828111156200053657825182559160200191906001019062000519565b506200054492915062000548565b5090565b5b8082111562000544576000815560010162000549565b600082601f8301126200057157600080fd5b81516001600160401b03808211156200058e576200058e6200070c565b604051601f8301601f19908116603f01168101908282118183101715620005b957620005b96200070c565b81604052838152602092508683858801011115620005d657600080fd5b600091505b83821015620005fa5785820183015181830184015290820190620005db565b838211156200060c5760008385830101525b9695505050505050565b600080600080608085870312156200062d57600080fd5b84516001600160401b03808211156200064557600080fd5b62000653888389016200055f565b955060208701519150808211156200066a57600080fd5b62000678888389016200055f565b945060408701519150808211156200068f57600080fd5b6200069d888389016200055f565b93506060870151915080821115620006b457600080fd5b50620006c3878288016200055f565b91505092959194509250565b600181811c90821680620006e457607f821691505b602082108114156200070657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e0516101005161308b6200076760003960006124f70152600061254601526000612521015260006124a5015260006124ce015261308b6000f3fe608060405234801561001057600080fd5b50600436106101d95760003560e01c8063938e3d7b11610104578063c0ac9983116100a2578063ee08d20a11610071578063ee08d20a1461044a578063f242432a1461045d578063f2fde38b14610470578063f5298aca1461048357600080fd5b8063c0ac9983146103d5578063cd53d08e146103dd578063e8a3d48514610406578063e985e9c51461040e57600080fd5b806399e0dd7c116100de57806399e0dd7c14610389578063a22cb4651461039c578063aa271e1a146103af578063bb7fde71146103c257600080fd5b8063938e3d7b1461035b57806395d89b411461036e578063983b2d561461037657600080fd5b806346fbf68e1161017c578063715018a61161014b578063715018a61461031357806382dc1ec41461031b5780638456cb591461032e5780638da5cb5b1461033657600080fd5b806346fbf68e146102bb5780634e1273f4146102ce5780635c975abb146102ee5780636b2c0f551461030057600080fd5b80630e89341c116101b85780630e89341c146102785780632eb2c2d61461028b5780633092afd5146102a05780633f4ba83a146102b357600080fd5b8062fdd58e146101de57806301ffc9a71461022657806306fdde0314610263575b600080fd5b6102136101ec366004612aaf565b60009081526005602090815260408083206001600160a01b03949094168352929052205490565b6040519081526020015b60405180910390f35b610253610234366004612bd9565b6001600160e01b03191660009081526003602052604090205460ff1690565b604051901515815260200161021d565b61026b610496565b60405161021d9190612e14565b61026b610286366004612c50565b610524565b61029e6102993660046128c7565b610535565b005b61029e6102ae366004612879565b6108bd565b61029e610957565b6102536102c9366004612879565b610986565b6102e16102dc366004612b6d565b610a12565b60405161021d9190612e01565b600054600160a01b900460ff16610253565b61029e61030e366004612879565b610b1e565b61029e610bb5565b61029e610329366004612879565b610be9565b61029e610c72565b6000546001600160a01b03165b6040516001600160a01b03909116815260200161021d565b61029e610369366004612c13565b610c9f565b61026b610cd2565b61029e610384366004612879565b610cdf565b61029e610397366004612c13565b610d68565b61029e6103aa366004612a73565b610d9b565b6102536103bd366004612879565b610e07565b61029e6103d0366004612b0c565b610e93565b61026b6110e4565b6103436103eb366004612c50565b6007602052600090815260409020546001600160a01b031681565b61026b6110f1565b61025361041c366004612894565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b61029e6104583660046129fa565b6110fe565b61029e61046b366004612982565b61149d565b61029e61047e366004612879565b611653565b61029e610491366004612ad9565b6116eb565b600b80546104a390612f71565b80601f01602080910402602001604051908101604052809291908181526020018280546104cf90612f71565b801561051c5780601f106104f15761010080835404028352916020019161051c565b820191906000526020600020905b8154815290600101906020018083116104ff57829003601f168201915b505050505081565b606061052f8261180d565b92915050565b6001600160a01b03871661059e5760405162461bcd60e51b815260206004820152602560248201527f64657374696e6174696f6e2061646472657373206d757374206265206e6f6e2d6044820152643d32b9379760d91b60648201526084015b60405180910390fd5b8483146105ff5760405162461bcd60e51b815260206004820152602960248201527f5f69647320616e64205f76616c756573206172726179206c656e676874206d7560448201526839ba1036b0ba31b41760b91b6064820152608401610595565b6001600160a01b03881633148061063e57506001600160a01b038816600090815260066020908152604080832033845290915290205460ff1615156001145b61065a5760405162461bcd60e51b815260040161059590612e77565b60005b858110156107a357600087878381811061067957610679612ff3565b905060200201359050600086868481811061069657610696612ff3565b9050602002013590506106e8816005600085815260200190815260200160002060008e6001600160a01b03166001600160a01b031681526020019081526020016000205461194490919063ffffffff16565b6005600084815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000208190555061076b6005600084815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020548261195790919063ffffffff16565b60009283526005602090815260408085206001600160a01b038e168652909152909220919091555061079c81612fac565b905061065d565b50866001600160a01b0316886001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb898989896040516107f79493929190612dda565b60405180910390a46001600160a01b0387163b156108b3576108b333898989898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525050604080516020601f8c018190048102820181019092528a815292508a915089908190840183828082843760009201919091525061196392505050565b5050505050505050565b6000546001600160a01b031633146108e75760405162461bcd60e51b815260040161059590612ec6565b6108f081610e07565b61094b5760405162461bcd60e51b815260206004820152602660248201527f4d696e746572526f6c653a206163636f756e7420646f6573206e6f74206861766044820152656520726f6c6560d01b6064820152608401610595565b61095481611a68565b50565b61096033610986565b61097c5760405162461bcd60e51b815260040161059590612e27565b610984611ab1565b565b60006001600160a01b0382166109ee5760405162461bcd60e51b815260206004820152602760248201527f506175736572526f6c653a206163636f756e7420697320746865207a65726f206044820152666164647265737360c81b6064820152608401610595565b506001600160a01b031660009081526009602052604090205460ff16151560011490565b6060838214610a2057600080fd5b60008467ffffffffffffffff811115610a3b57610a3b613009565b604051908082528060200260200182016040528015610a64578160200160208202803683370190505b50905060005b85811015610b145760056000868684818110610a8857610a88612ff3565b9050602002013581526020019081526020016000206000888884818110610ab157610ab1612ff3565b9050602002016020810190610ac69190612879565b6001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110610af957610af9612ff3565b6020908102919091010152610b0d81612fac565b9050610a6a565b5095945050505050565b6000546001600160a01b03163314610b485760405162461bcd60e51b815260040161059590612ec6565b610b5181610986565b610bac5760405162461bcd60e51b815260206004820152602660248201527f506175736572526f6c653a206163636f756e7420646f6573206e6f74206861766044820152656520726f6c6560d01b6064820152608401610595565b61095481611b4e565b6000546001600160a01b03163314610bdf5760405162461bcd60e51b815260040161059590612ec6565b6109846000611b97565b6000546001600160a01b03163314610c135760405162461bcd60e51b815260040161059590612ec6565b610c1c81610986565b15610c695760405162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c65006044820152606401610595565b61095481611be7565b610c7b33610986565b610c975760405162461bcd60e51b815260040161059590612e27565b610984611c33565b6000546001600160a01b03163314610cc95760405162461bcd60e51b815260040161059590612ec6565b61095481611cbb565b600c80546104a390612f71565b6000546001600160a01b03163314610d095760405162461bcd60e51b815260040161059590612ec6565b610d1281610e07565b15610d5f5760405162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c65006044820152606401610595565b61095481611cd2565b6000546001600160a01b03163314610d925760405162461bcd60e51b815260040161059590612ec6565b61095481611d1e565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600160a01b038216610e6f5760405162461bcd60e51b815260206004820152602760248201527f4d696e746572526f6c653a206163636f756e7420697320746865207a65726f206044820152666164647265737360c81b6064820152608401610595565b506001600160a01b031660009081526008602052604090205460ff16151560011490565b610e9c33610e07565b610f015760405162461bcd60e51b815260206004820152603060248201527f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766560448201526f20746865204d696e74657220726f6c6560801b6064820152608401610595565b600054600160a01b900460ff1615610f4e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610595565b6001600160a01b038416610fb25760405162461bcd60e51b815260206004820152602560248201527f436172626f6e546f6b656e3a2027746f2720697320746865207a65726f206164604482015264647265737360d81b6064820152608401610595565b6000838152600760205260409020546001600160a01b0316156110235760405162461bcd60e51b8152602060048201526024808201527f436172626f6e546f6b656e3a20746f6b656e20697320616c7265616479206d696044820152631b9d195960e21b6064820152608401610595565b816110815760405162461bcd60e51b815260206004820152602860248201527f436172626f6e546f6b656e3a2027737570706c79272073686f756c6420626520604482015267706f73697469766560c01b6064820152608401610595565b60008151116110d25760405162461bcd60e51b815260206004820152601f60248201527f436172626f6e546f6b656e2027757269272073686f756c6420626520736574006044820152606401610595565b6110de84848484611d31565b50505050565b600180546104a390612f71565b600480546104a390612f71565b6001600160a01b0384166111655760405162461bcd60e51b815260206004820152602860248201527f5065726d69747465645472616e736665723a205f746f206d757374206265206e60448201526737b716bd32b9379760c11b6064820152608401610595565b600a6111746080830183612efb565b604051611182929190612d27565b9081526040519081900360200190205460ff16156111f55760405162461bcd60e51b815260206004820152602a60248201527f5065726d69747465645472616e736665723a207065726d697373696f6e20616c6044820152691c9958591e481d5cd95960b21b6064820152608401610595565b6112026020820182612879565b6001600160a01b0316856001600160a01b0316148015611242575061122d6040820160208301612879565b6001600160a01b0316846001600160a01b0316145b80156112515750806040013583145b80156112605750806060013582145b6112d4576040805162461bcd60e51b81526020600482015260248101919091527f5065726d69747465645472616e736665723a207369676e65642064617461206960448201527f73206e6f7420657175616c20746f2070617373656420706172616d65746572736064820152608401610595565b60006112df82611df1565b9050806001600160a01b0316866001600160a01b03161461135f5760405162461bcd60e51b815260206004820152603460248201527f5065726d69747465645472616e736665723a207369676e617475726520696e76604482015273185b1a59081bdc881d5b985d5d1a1bdc9a5e995960621b6064820152608401610595565b60008481526005602090815260408083206001600160a01b038a16845290915290205461138c9084611944565b60008581526005602090815260408083206001600160a01b038b811685529252808320939093558716815220546113c4908490611957565b60008581526005602090815260408083206001600160a01b038a1684529091529020556001600a6113f86080850185612efb565b604051611406929190612d27565b9081526040805160209281900383018120805460ff1916941515949094179093558683529082018590526001600160a01b0387811692908916913391600080516020613036833981519152910160405180910390a46001600160a01b0385163b15611495576114953387878787604051806040016040528060048152602001633078303160e01b815250611e4a565b505050505050565b6001600160a01b0385166114eb5760405162461bcd60e51b81526020600482015260156024820152742fba379036bab9ba103132903737b716bd32b9379760591b6044820152606401610595565b6001600160a01b03861633148061152a57506001600160a01b038616600090815260066020908152604080832033845290915290205460ff1615156001145b6115465760405162461bcd60e51b815260040161059590612e77565b60008481526005602090815260408083206001600160a01b038a1684529091529020546115739084611944565b60008581526005602090815260408083206001600160a01b038b811685529252808320939093558716815220546115ab908490611957565b60008581526005602090815260408083206001600160a01b038a811680865291845293829020949094558051888152918201879052918916913391600080516020613036833981519152910160405180910390a46001600160a01b0385163b1561149557611495338787878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e4a92505050565b6000546001600160a01b0316331461167d5760405162461bcd60e51b815260040161059590612ec6565b6001600160a01b0381166116e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610595565b61095481611b97565b6001600160a01b03831633148061172a57506001600160a01b038316600090815260066020908152604080832033845290915290205460ff1615156001145b61178a5760405162461bcd60e51b815260206004820152602b60248201527f4e656564206f70657261746f7220617070726f76616c20666f7220337264207060448201526a30b93a3c90313ab937399760a91b6064820152608401610595565b60008281526005602090815260408083206001600160a01b03871684529091529020546117b79082611944565b60008381526005602090815260408083206001600160a01b0388168085529083528184209490945580518681529182018590529192913391600080516020613036833981519152910160405180910390a4505050565b6000818152600260205260409020805460609161052f9161182d90612f71565b80601f016020809104026020016040519081016040528092919081815260200182805461185990612f71565b80156118a65780601f1061187b576101008083540402835291602001916118a6565b820191906000526020600020905b81548152906001019060200180831161188957829003601f168201915b5050505050600180546118b890612f71565b80601f01602080910402602001604051908101604052809291908181526020018280546118e490612f71565b80156119315780601f1061190657610100808354040283529160200191611931565b820191906000526020600020905b81548152906001019060200180831161191457829003601f168201915b5050505050611f4f90919063ffffffff16565b60006119508284612f5a565b9392505050565b60006119508284612f42565b60405163bc197c8160e01b808252906001600160a01b0386169063bc197c8190611999908a908a90899089908990600401612d37565b602060405180830381600087803b1580156119b357600080fd5b505af11580156119c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119eb9190612bf6565b6001600160e01b031916146114955760405162461bcd60e51b815260206004820152603e60248201527f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c60448201527f75652066726f6d206f6e455243313135354261746368526563656976656400006064820152608401610595565b6001600160a01b038116600081815260086020526040808220805460ff19169055517fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666929190a250565b600054600160a01b900460ff16611b015760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610595565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038116600081815260096020526040808220805460ff19169055517fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e9190a250565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116600081815260096020526040808220805460ff19166001179055517f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f89190a250565b600054600160a01b900460ff1615611c805760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610595565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b313390565b8051611cce9060049060208401906126b0565b5050565b6001600160a01b038116600081815260086020526040808220805460ff19166001179055517f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69190a250565b8051611cce9060019060208401906126b0565b6000805484825260076020908152604080842080546001600160a01b0319166001600160a01b039485161790556005825280842092881684529190529020829055611d7c83826120a0565b60408051848152602081018490526001600160a01b038616916000913391600080516020613036833981519152910160405180910390a4827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b82604051611de39190612e14565b60405180910390a250505050565b600080611dfd8361210e565b905061195081611e1060a0860186612efb565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506121e092505050565b60405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e6190611e80908a908a90899089908990600401612d95565b602060405180830381600087803b158015611e9a57600080fd5b505af1158015611eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed29190612bf6565b6001600160e01b031916146114955760405162461bcd60e51b815260206004820152603960248201527f636f6e74726163742072657475726e656420616e20756e6b6e6f776e2076616c60448201527f75652066726f6d206f6e455243313135355265636569766564000000000000006064820152608401610595565b8051825160609184918491600091611f679190612f42565b67ffffffffffffffff811115611f7f57611f7f613009565b6040519080825280601f01601f191660200182016040528015611fa9576020820181803683370190505b5090506000805b845181101561202057848181518110611fcb57611fcb612ff3565b01602001516001600160f81b0319168383611fe581612fac565b945081518110611ff757611ff7612ff3565b60200101906001600160f81b031916908160001a9053508061201881612fac565b915050611fb0565b5060005b83518110156120945783818151811061203f5761203f612ff3565b01602001516001600160f81b031916838361205981612fac565b94508151811061206b5761206b612ff3565b60200101906001600160f81b031916908160001a9053508061208c81612fac565b915050612024565b50909695505050505050565b6000828152600760205260409020546001600160a01b03166121045760405162461bcd60e51b815260206004820181905260248201527f5f736574546f6b656e5552493a20546f6b656e2073686f756c642065786973746044820152606401610595565b611cce8282612204565b600061052f7f1c57fa2d9db1d8370a50fec6bd6cb0bf38dd6c04a7a67a3b278b40c89b9f5c0a6121416020850185612879565b6121516040860160208701612879565b604086013560608701356121686080890189612efb565b604051602001612179929190612d27565b60408051601f198184030181528282528051602091820120908301979097526001600160a01b0395861690820152939092166060840152608083015260a082015260c081019190915260e00160405160208183030381529060405280519060200120612228565b60008060006121ef8585612276565b915091506121fc816122e6565b509392505050565b60008281526002602090815260409091208251612223928401906126b0565b505050565b600061052f6122356124a1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000808251604114156122ad5760208301516040840151606085015160001a6122a187828585612594565b945094505050506122df565b8251604014156122d757602083015160408401516122cc868383612681565b9350935050506122df565b506000905060025b9250929050565b60008160048111156122fa576122fa612fdd565b14156123035750565b600181600481111561231757612317612fdd565b14156123655760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610595565b600281600481111561237957612379612fdd565b14156123c75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610595565b60038160048111156123db576123db612fdd565b14156124345760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610595565b600481600481111561244857612448612fdd565b14156109545760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610595565b60007f00000000000000000000000000000000000000000000000000000000000000004614156124f057507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156125cb5750600090506003612678565b8460ff16601b141580156125e357508460ff16601c14155b156125f45750600090506004612678565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612648573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661267157600060019250925050612678565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016126a287828885612594565b935093505050935093915050565b8280546126bc90612f71565b90600052602060002090601f0160209004810192826126de5760008555612724565b82601f106126f757805160ff1916838001178555612724565b82800160010185558215612724579182015b82811115612724578251825591602001919060010190612709565b50612730929150612734565b5090565b5b808211156127305760008155600101612735565b80356001600160a01b038116811461276057600080fd5b919050565b60008083601f84011261277757600080fd5b50813567ffffffffffffffff81111561278f57600080fd5b6020830191508360208260051b85010111156122df57600080fd5b60008083601f8401126127bc57600080fd5b50813567ffffffffffffffff8111156127d457600080fd5b6020830191508360208285010111156122df57600080fd5b600082601f8301126127fd57600080fd5b813567ffffffffffffffff8082111561281857612818613009565b604051601f8301601f19908116603f0116810190828211818310171561284057612840613009565b8160405283815286602085880101111561285957600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561288b57600080fd5b61195082612749565b600080604083850312156128a757600080fd5b6128b083612749565b91506128be60208401612749565b90509250929050565b60008060008060008060008060a0898b0312156128e357600080fd5b6128ec89612749565b97506128fa60208a01612749565b9650604089013567ffffffffffffffff8082111561291757600080fd5b6129238c838d01612765565b909850965060608b013591508082111561293c57600080fd5b6129488c838d01612765565b909650945060808b013591508082111561296157600080fd5b5061296e8b828c016127aa565b999c989b5096995094979396929594505050565b60008060008060008060a0878903121561299b57600080fd5b6129a487612749565b95506129b260208801612749565b94506040870135935060608701359250608087013567ffffffffffffffff8111156129dc57600080fd5b6129e889828a016127aa565b979a9699509497509295939492505050565b600080600080600060a08688031215612a1257600080fd5b612a1b86612749565b9450612a2960208701612749565b93506040860135925060608601359150608086013567ffffffffffffffff811115612a5357600080fd5b860160c08189031215612a6557600080fd5b809150509295509295909350565b60008060408385031215612a8657600080fd5b612a8f83612749565b915060208301358015158114612aa457600080fd5b809150509250929050565b60008060408385031215612ac257600080fd5b612acb83612749565b946020939093013593505050565b600080600060608486031215612aee57600080fd5b612af784612749565b95602085013595506040909401359392505050565b60008060008060808587031215612b2257600080fd5b612b2b85612749565b93506020850135925060408501359150606085013567ffffffffffffffff811115612b5557600080fd5b612b61878288016127ec565b91505092959194509250565b60008060008060408587031215612b8357600080fd5b843567ffffffffffffffff80821115612b9b57600080fd5b612ba788838901612765565b90965094506020870135915080821115612bc057600080fd5b50612bcd87828801612765565b95989497509550505050565b600060208284031215612beb57600080fd5b81356119508161301f565b600060208284031215612c0857600080fd5b81516119508161301f565b600060208284031215612c2557600080fd5b813567ffffffffffffffff811115612c3c57600080fd5b612c48848285016127ec565b949350505050565b600060208284031215612c6257600080fd5b5035919050565b81835260006001600160fb1b03831115612c8257600080fd5b8260051b8083602087013760009401602001938452509192915050565b600081518084526020808501945080840160005b83811015612ccf57815187529582019590820190600101612cb3565b509495945050505050565b6000815180845260005b81811015612d0057602081850181015186830182015201612ce4565b81811115612d12576000602083870101525b50601f01601f19169290920160200192915050565b8183823760009101908152919050565b6001600160a01b0386811682528516602082015260a060408201819052600090612d6390830186612c9f565b8281036060840152612d758186612c9f565b90508281036080840152612d898185612cda565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612dcf90830184612cda565b979650505050505050565b604081526000612dee604083018688612c69565b8281036020840152612dcf818587612c69565b6020815260006119506020830184612c9f565b6020815260006119506020830184612cda565b60208082526030908201527f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766560408201526f207468652050617573657220726f6c6560801b606082015260800190565b6020808252602f908201527f4e656564206f70657261746f7220617070726f76616c20666f7220337264207060408201526e30b93a3c903a3930b739b332b9399760891b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000808335601e19843603018112612f1257600080fd5b83018035915067ffffffffffffffff821115612f2d57600080fd5b6020019150368190038213156122df57600080fd5b60008219821115612f5557612f55612fc7565b500190565b600082821015612f6c57612f6c612fc7565b500390565b600181811c90821680612f8557607f821691505b60208210811415612fa657634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612fc057612fc0612fc7565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461095457600080fdfec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a2646970667358221220abf4d485cf14aa7d8becb1f7656587f08cf81b5df58bcc60963ba8629421381164736f6c63430008070033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000006434152424f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034341520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001368747470733a2f2f636f74726163745f75726900000000000000000000000000000000000000000000000000000000000000000000000000000000000000001568747470733a2f2f697066732e696f2f697066732f0000000000000000000000

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000006434152424f4e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034341520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001368747470733a2f2f636f74726163745f75726900000000000000000000000000000000000000000000000000000000000000000000000000000000000000001568747470733a2f2f697066732e696f2f697066732f0000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): CARBON
Arg [1] : _symbol (string): CAR
Arg [2] : contractURI (string): https://cotract_uri
Arg [3] : tokenURIPrefix (string): https://ipfs.io/ipfs/

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [5] : 434152424f4e0000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 4341520000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [9] : 68747470733a2f2f636f74726163745f75726900000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [11] : 68747470733a2f2f697066732e696f2f697066732f0000000000000000000000


Loading