ETH Price: $3,344.52 (-0.92%)

Contract

0x8a40308096Ed940Ba773E133a53C97B625721D6C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040159751642022-11-15 11:33:23738 days ago1668512003IN
 Create: DegenScoreBeacon
0 ETH0.0450188613.99964045

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DegenScoreBeacon

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 19 : DegenScoreBeacon.sol
// SPDX-License-Identifier: MIT
/*
     $$$$$$$\  $$$$$$$$\  $$$$$$\  $$$$$$$$\ $$\   $$\  $$$$$$\   $$$$$$\   $$$$$$\  $$$$$$$\  $$$$$$$$\
     $$  __$$\ $$  _____|$$  __$$\ $$  _____|$$$\  $$ |$$  __$$\ $$  __$$\ $$  __$$\ $$  __$$\ $$  _____|
     $$ |  $$ |$$ |      $$ /  \__|$$ |      $$$$\ $$ |$$ /  \__|$$ /  \__|$$ /  $$ |$$ |  $$ |$$ |
     $$ |  $$ |$$$$$\    $$ |$$$$\ $$$$$\    $$ $$\$$ |\$$$$$$\  $$ |      $$ |  $$ |$$$$$$$  |$$$$$\
     $$ |  $$ |$$  __|   $$ |\_$$ |$$  __|   $$ \$$$$ | \____$$\ $$ |      $$ |  $$ |$$  __$$< $$  __|
     $$ |  $$ |$$ |      $$ |  $$ |$$ |      $$ |\$$$ |$$\   $$ |$$ |  $$\ $$ |  $$ |$$ |  $$ |$$ |
     $$$$$$$  |$$$$$$$$\ \$$$$$$  |$$$$$$$$\ $$ | \$$ |\$$$$$$  |\$$$$$$  | $$$$$$  |$$ |  $$ |$$$$$$$$\
     \_______/ \________| \______/ \________|\__|  \__| \______/  \______/  \______/ \__|  \__|\________|



     $$$$$$$\  $$$$$$$$\  $$$$$$\   $$$$$$\   $$$$$$\  $$\   $$\
     $$  __$$\ $$  _____|$$  __$$\ $$  __$$\ $$  __$$\ $$$\  $$ |
     $$ |  $$ |$$ |      $$ /  $$ |$$ /  \__|$$ /  $$ |$$$$\ $$ |
     $$$$$$$\ |$$$$$\    $$$$$$$$ |$$ |      $$ |  $$ |$$ $$\$$ |
     $$  __$$\ $$  __|   $$  __$$ |$$ |      $$ |  $$ |$$ \$$$$ |
     $$ |  $$ |$$ |      $$ |  $$ |$$ |  $$\ $$ |  $$ |$$ |\$$$ |
     $$$$$$$  |$$$$$$$$\ $$ |  $$ |\$$$$$$  | $$$$$$  |$$ | \$$ |
     \_______/ \________|\__|  \__| \______/  \______/ \__|  \__|
*/

pragma solidity ^0.8.16;

import "./interfaces/IDegenScoreBeaconReader.sol";
import "./interfaces/IDegenScoreBeaconWriter.sol";
import "./SoulboundERC1155.sol";
import "./structs/Contract.sol";
import "./structs/Submit.sol";

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";

/**
 * @title DegenScore Beacon
 * @author DegenScore Team
 * @notice The DegenScore Beacon is an Ethereum soulbound token that highlights your on-chain skills & traits across one or more wallets.
 * @dev This contract is the implementation of the DegenScore Beacon
 */
contract DegenScoreBeacon is
    Initializable,
    IDegenScoreBeaconReader,
    IDegenScoreBeaconWriter,
    SoulboundERC1155,
    OwnableUpgradeable,
    PausableUpgradeable
{
    /// @dev the signer who signs `UserPayload` used in `submitTraits`
    address private signer;

    /// @dev receives the fees payed by users when calling `submitTraits`
    address payable private feeCollector;

    /// @dev the TTL of how long signatures used in `submitTraits` are valid
    uint32 private signatureTTLSeconds;

    /// @dev the URL base for fetching metadata for a primary Trait
    string private primaryTraitURI;

    /// @dev the URL base for fetching off chain traits and metadata of a user's Beacon
    string private beaconURI;

    /// @dev stores the traits of a user
    mapping(address => mapping(uint256 => Trait)) private _traits;

    /// @dev stores metadata of a user
    mapping(address => BeaconData) private beaconData;

    /// @dev reverse lookup for a Beacon ID
    mapping(uint128 => address) private beaconIds;

    function initialize(
        address _owner,
        address _signer,
        address payable _feeCollector,
        uint32 _signatureTTLSeconds,
        string calldata _primaryURI,
        string calldata _beaconURI
    ) public initializer {
        __Ownable_init();
        __Pausable_init();

        _transferOwnership(_owner);
        signer = _signer;
        feeCollector = _feeCollector;
        signatureTTLSeconds = _signatureTTLSeconds;
        primaryTraitURI = _primaryURI;
        beaconURI = _beaconURI;
    }

    /// External methods

    function submitTraits(UserPayload calldata payload, bytes memory signature) external payable whenNotPaused {
        require(
            ECDSAUpgradeable.recover(
                ECDSAUpgradeable.toEthSignedMessageHash(keccak256(abi.encode(payload))),
                signature
            ) == signer,
            "Invalid signature"
        );

        unchecked {
            require(payload.createdAt > (block.timestamp - signatureTTLSeconds), "Signature expired");

            BeaconData memory metadata = beaconData[payload.account];
            bool isFirstSubmission = metadata.updatedAt == 0;

            require(payload.createdAt > metadata.updatedAt, "Invalid data");

            require(msg.value == payload.price, "Wrong value sent");
            feeCollector.transfer(msg.value);

            metadata = BeaconData({
                updatedAt: payload.createdAt,
                beaconId: payload.beaconId,
                traitIds: new uint256[](payload.traits.length)
            });

            for (uint256 i = 0; i < payload.traits.length; i++) {
                uint256 traitId = payload.traits[i].id;

                // check if is first submission in case user has burned before
                uint192 oldTraitValue = isFirstSubmission ? 0 : _traits[payload.account][payload.traits[i].id].value;
                uint192 newTraitValue = payload.traits[i].value;

                _traits[payload.account][traitId] = Trait({value: newTraitValue, updatedAt: payload.createdAt});
                metadata.traitIds[i] = traitId;

                _triggerTransferEvent(traitId, payload.account, oldTraitValue, newTraitValue);
            }

            beaconData[payload.account] = metadata;

            // emit mint event if submitted data for the first time
            if (isFirstSubmission) {
                beaconIds[payload.beaconId] = payload.account; // mapping only needs to be done on first submission
                emit TransferSingle(address(this), address(0), payload.account, payload.beaconId, 1);
            }

            emit SubmitTraits(payload.beaconId, payload.createdAt);
        }
    }

    function burn() external override {
        BeaconData memory metadata = beaconData[msg.sender];
        require(metadata.updatedAt != 0, "Address does not own a Beacon");

        delete beaconIds[metadata.beaconId];
        delete beaconData[msg.sender];

        emit TransferBatch(
            address(this),
            msg.sender,
            address(0),
            metadata.traitIds,
            new uint256[](metadata.traitIds.length) // set all traits to 0
        );
        emit TransferSingle(address(this), msg.sender, address(0), metadata.beaconId, 0);
        emit Burn(metadata.beaconId);
    }

    /// Public methods

    function getTrait(
        address account,
        uint256 traitId,
        uint64 maxAge
    ) public view override returns (uint192) {
        return _getTrait(account, traitId, maxAge);
    }

    function getTraitBatch(
        address[] memory accounts,
        uint256[] memory traitIds,
        uint64[] memory maxAges
    ) public view override returns (uint192[] memory) {
        return _getTraitBatch(accounts, traitIds, maxAges);
    }

    function getAllTraitsOf(address account)
        public
        view
        override
        returns (
            uint256[] memory traitIds,
            uint192[] memory traitValues,
            uint64 updatedAt
        )
    {
        require(account != address(0), "address zero is not a valid owner");
        BeaconData memory data = beaconData[account];
        uint192[] memory _traitValues = new uint192[](data.traitIds.length);

        for (uint256 i = 0; i < data.traitIds.length; ++i) {
            _traitValues[i] = _getTrait(account, data.traitIds[i], 0);
        }

        return (data.traitIds, _traitValues, data.updatedAt);
    }

    function beaconDataOf(address account) public view override returns (BeaconData memory) {
        require(account != address(0), "address zero is not a valid owner");
        return beaconData[account];
    }

    function ownerOfBeacon(uint128 beaconId) public view override returns (address owner) {
        return _ownerOfBeacon(beaconId);
    }

    function getTraitURI(uint256 traitId) public view override returns (string memory) {
        return string.concat(primaryTraitURI, StringsUpgradeable.toString(traitId), ".json");
    }

    function getBeaconURI(uint128 beaconId) public view override returns (string memory) {
        address beaconAddress = beaconIds[beaconId];
        require(beaconAddress != address(0), "No Beacon found");
        return string.concat(beaconURI, StringsUpgradeable.toHexString(beaconAddress), ".json");
    }

    /// ERC1155 methods

    /**
     * @dev Should not be used for Beacon integrations.
     * It to display the Beacon on existing platforms using the ERC1155 interface.
     */
    function balanceOf(address account, uint256 id) public view override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");

        return _getTraitOrBeacon(account, id);
    }

    /**
     * @dev Should not be used for Beacon integrations.
     * It to display the Beacon on existing platforms using the ERC1155 interface.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "accounts and ids length mismatch");

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

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

        return batchBalances;
    }

    /**
     * @dev Should not be used for Beacon integrations.
     * It to display the Beacon on existing platforms using the ERC1155 interface.
     */
    function uri(uint256 id) public view override returns (string memory) {
        if (beaconIds[uint128(id)] == address(0)) {
            return getTraitURI(id);
        } else {
            return getBeaconURI(uint128(id));
        }
    }

    /// Management methods

    /**
     * @return address the address of the DegenScore signer
     */
    function getSigner() public view returns (address) {
        return signer;
    }

    /**
     * @notice updates the DegenScore signer
     */
    function setSigner(address _signer) public onlyOwner {
        require(_signer != address(0), "New signer is the zero address");
        signer = _signer;
    }

    /**
     * @return address address of the fee collector
     */
    function getFeeCollector() public view returns (address) {
        return feeCollector;
    }

    /**
     * @notice updates the fee collector
     */
    function setFeeCollector(address payable _feeCollector) public onlyOwner {
        require(_feeCollector != address(0), "New feeCollector is the zero address");
        feeCollector = _feeCollector;
    }

    /**
     * @return ttl the signature TTL in seconds
     */
    function getSignatureTTL() public view returns (uint32) {
        return signatureTTLSeconds;
    }

    /**
     * @notice updates the signature TTL
     */
    function setSignatureTTL(uint32 _TTLSeconds) public onlyOwner {
        signatureTTLSeconds = _TTLSeconds;
    }

    /**
     * @notice updates the primary Trait URL base
     */
    function setPrimaryTraitURI(string calldata _uri) public onlyOwner {
        primaryTraitURI = _uri;
    }

    /**
     * @notice updates the Beacon URL base
     */
    function setBeaconURI(string calldata _uri) public onlyOwner {
        beaconURI = _uri;
    }

    /**
     * @notice pauses the Beacon contract
     */
    function pause() public onlyOwner {
        _pause();
    }

    /**
     * @notice unpauses the Beacon contract
     */
    function unpause() public onlyOwner {
        _unpause();
    }

    /// Internal methods

    function _triggerTransferEvent(
        uint256 traitId,
        address owner,
        uint256 oldTraitValue,
        uint256 newTraitValue
    ) internal {
        unchecked {
            if (oldTraitValue == newTraitValue) return;

            bool isGreaterValue = newTraitValue > oldTraitValue;
            address operator = address(this);
            address from = isGreaterValue ? address(0) : owner;
            address to = isGreaterValue ? owner : address(0);
            uint256 value = isGreaterValue ? newTraitValue - oldTraitValue : oldTraitValue - newTraitValue;

            // if isGreaterValue is true, function triggers mint event. Otherwise triggers burn event.
            emit TransferSingle(operator, from, to, traitId, value);
        }
    }

    function _getTraitBatch(
        address[] memory accounts,
        uint256[] memory traitIds,
        uint64[] memory maxAges
    ) internal view returns (uint192[] memory) {
        require(accounts.length == traitIds.length, "accounts and traitIds length mismatch");
        require(accounts.length == maxAges.length, "accounts and maxAges length mismatch");

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

        for (uint192 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = _getTrait(accounts[i], traitIds[i], maxAges[i]);
        }

        return batchBalances;
    }

    function _getTrait(
        address account,
        uint256 traitId,
        uint64 maxAge
    ) internal view whenNotPaused returns (uint192) {
        BeaconData memory metadata = beaconData[account];

        Trait memory trait = _traits[account][traitId];
        if (trait.updatedAt != metadata.updatedAt) {
            return 0;
        }

        if (maxAge == 0) {
            return trait.value;
        }

        if ((trait.updatedAt + maxAge) <= block.timestamp) {
            return 0;
        }

        return trait.value;
    }

    function _getTraitOrBeacon(address account, uint256 id) internal view returns (uint256) {
        uint256 trait = _getTrait(account, id, 0);
        if (trait != 0) return trait;

        BeaconData memory metadata = beaconData[account];

        if (metadata.updatedAt == 0) {
            return 0;
        } else {
            return 1;
        }
    }

    function _ownerOfBeacon(uint128 beaconId) internal view returns (address account) {
        return beaconIds[beaconId];
    }
}

File 2 of 19 : SoulboundERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";

error SoulBoundContract(string message);

abstract contract SoulboundERC1155 is IERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {
    string constant REVERT_ERROR = "This Token is Soul bound. Only balance and metadata can be read";

    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == type(IERC1155Upgradeable).interfaceId ||
            interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId;
    }

    function setApprovalForAll(address, bool) public virtual override {
        revert SoulBoundContract(REVERT_ERROR);
    }

    function isApprovedForAll(address, address) public pure virtual override returns (bool) {
        return false;
    }

    function safeTransferFrom(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) public pure {
        revert SoulBoundContract(REVERT_ERROR);
    }

    function safeBatchTransferFrom(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) public pure {
        revert SoulBoundContract(REVERT_ERROR);
    }

    uint256[49] __gap;
}

File 3 of 19 : IDegenScoreBeaconReader.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "../structs/Contract.sol";

interface IDegenScoreBeaconReader {
    /**
     * @dev returns the Beacon data for a account
     * @param account the address of the Beacon holder
     * @return beaconData the metadata of a Beacon holder
     */
    function beaconDataOf(address account) external view returns (BeaconData memory);

    /**
     * @dev returns the owner address of a beaconId
     * @param beaconId the Beacon ID
     * @return owner the address of the Beacon owner
     */
    function ownerOfBeacon(uint128 beaconId) external view returns (address owner);

    /**
     * @notice This is used to lookup a Trait of a account.
     * `maxAge` can be used to only return a Trait value if the Trait is not older than the specified age.
     * If no Trait is found or the Trait is older than `maxAge` it returns 0
     * @dev returns the value for a primary Trait of a account
     * @param account the address of the user
     * @param traitId the Trait ID of the primary Trait
     * @param maxAge the maximum age of a Trait in seconds
     */
    function getTrait(
        address account,
        uint256 traitId,
        uint64 maxAge
    ) external view returns (uint192);

    /**
     * @notice Lookup traits in batches
     */
    function getTraitBatch(
        address[] memory accounts,
        uint256[] memory traitIds,
        uint64[] memory maxAges
    ) external view returns (uint192[] memory);

    /**
     * @notice returns all traits of an account
     * @param account the address of the account to lookup
     * @return traitIds the primary Trait IDs of the account
     * @return traitValues the values for each Trait ID
     * @return updatedAt the timestamp of when the Beacon was updated
     */
    function getAllTraitsOf(address account)
        external
        view
        returns (
            uint256[] memory traitIds,
            uint192[] memory traitValues,
            uint64 updatedAt
        );

    /**
     * @dev returns the metadata URL for the `traitId`
     * @param traitId the ID of the primary Trait
     * @return url the URL of the Trait metadata
     */
    function getTraitURI(uint256 traitId) external view returns (string memory);

    /**
     * @dev returns the metadata URL of the Beacon. This is used to get secondary traits.
     * @param beaconId the ID of the Beacon
     * @return url the URL of the Beacon metadata
     */
    function getBeaconURI(uint128 beaconId) external view returns (string memory);
}

File 4 of 19 : IDegenScoreBeaconWriter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "../structs/Submit.sol";

interface IDegenScoreBeaconWriter {
    /**
     * @dev Emitted when a user has successfully submitted traits
     * @param beaconId the ID of the Beacon
     * @param createdAt the timestamp of the signature
     */
    event SubmitTraits(uint256 beaconId, uint64 createdAt);

    /**
     * @dev Emitted when a Beacon is burned
     * @param beaconId the ID of the burned Beacon
     */
    event Burn(uint256 beaconId);

    /**
     * @dev Is used to submit Trait data signed by `signer`
     * @param payload contains Trait data of a user
     * @param signature is the signature for `payload`
     */
    function submitTraits(UserPayload calldata payload, bytes memory signature) external payable;

    /**
     * @dev burns the Beacon of the caller
     */
    function burn() external;
}

File 5 of 19 : Contract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

/// @dev holds a primary Trait
struct Trait {
    /// @dev the timestamp when the Trait was updated
    uint64 updatedAt;
    /// @dev the Trait value
    uint192 value;
}

/// @dev holds data of a Beacon
struct BeaconData {
    /// @dev the ID of the Beacon
    uint128 beaconId;
    /// @dev the timestamp when the Beacon was updated
    uint64 updatedAt;
    /// @dev the primary Trait IDs of the Beacon holder
    uint256[] traitIds;
}

File 6 of 19 : Submit.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

/// @dev the payload sent by the user to submit traits
struct UserPayload {
    /// @dev the timestamp the payload was created at
    uint64 createdAt;
    /// @dev the account the data belongs to
    address account;
    /// @dev the Beacon ID
    uint128 beaconId;
    /// @dev the price the user needs to pay to submit the data
    uint128 price;
    /// @dev the traits of the user
    TraitData[] traits;
}

/// @dev describes a primary Trait in the `UserPayload`
struct TraitData {
    /// @dev the ID of the Trait
    uint256 id;
    /// @dev the value of the Trait
    uint192 value;
}

File 7 of 19 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 8 of 19 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @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.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        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());
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 9 of 19 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

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

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

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 10 of 19 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 11 of 19 : ECDSAUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../StringsUpgradeable.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSAUpgradeable {
    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) {
        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.
            /// @solidity memory-safe-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 {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 13 of 19 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155Upgradeable.sol";
import "./IERC1155ReceiverUpgradeable.sol";
import "./extensions/IERC1155MetadataURIUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {
    using AddressUpgradeable for address;

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

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

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

    /**
     * @dev See {_setURI}.
     */
    function __ERC1155_init(string memory uri_) internal onlyInitializing {
        __ERC1155_init_unchained(uri_);
    }

    function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing {
        _setURI(uri_);
    }

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

        return array;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[47] private __gap;
}

File 14 of 19 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev 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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 16 of 19 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

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

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

import "../IERC1155Upgradeable.sol";

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"SoulBoundContract","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"beaconId","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":false,"internalType":"uint256","name":"beaconId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"createdAt","type":"uint64"}],"name":"SubmitTraits","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"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"beaconDataOf","outputs":[{"components":[{"internalType":"uint128","name":"beaconId","type":"uint128"},{"internalType":"uint64","name":"updatedAt","type":"uint64"},{"internalType":"uint256[]","name":"traitIds","type":"uint256[]"}],"internalType":"struct BeaconData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAllTraitsOf","outputs":[{"internalType":"uint256[]","name":"traitIds","type":"uint256[]"},{"internalType":"uint192[]","name":"traitValues","type":"uint192[]"},{"internalType":"uint64","name":"updatedAt","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"beaconId","type":"uint128"}],"name":"getBeaconURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSignatureTTL","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"traitId","type":"uint256"},{"internalType":"uint64","name":"maxAge","type":"uint64"}],"name":"getTrait","outputs":[{"internalType":"uint192","name":"","type":"uint192"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"traitIds","type":"uint256[]"},{"internalType":"uint64[]","name":"maxAges","type":"uint64[]"}],"name":"getTraitBatch","outputs":[{"internalType":"uint192[]","name":"","type":"uint192[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"traitId","type":"uint256"}],"name":"getTraitURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address payable","name":"_feeCollector","type":"address"},{"internalType":"uint32","name":"_signatureTTLSeconds","type":"uint32"},{"internalType":"string","name":"_primaryURI","type":"string"},{"internalType":"string","name":"_beaconURI","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"beaconId","type":"uint128"}],"name":"ownerOfBeacon","outputs":[{"internalType":"address","name":"owner","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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBeaconURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_feeCollector","type":"address"}],"name":"setFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setPrimaryTraitURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_TTLSeconds","type":"uint32"}],"name":"setSignatureTTL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"createdAt","type":"uint64"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint128","name":"beaconId","type":"uint128"},{"internalType":"uint128","name":"price","type":"uint128"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint192","name":"value","type":"uint192"}],"internalType":"struct TraitData[]","name":"traits","type":"tuple[]"}],"internalType":"struct UserPayload","name":"payload","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"submitTraits","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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"}]

608060405234801561001057600080fd5b50613951806100206000396000f3fe6080604052600436106101e25760003560e01c80637ac3c02f11610102578063abf360d311610095578063bebd026c11610064578063bebd026c146105c1578063e985e9c5146105e1578063f242432a14610604578063f2fde38b1461061f57600080fd5b8063abf360d314610541578063b4b1927814610561578063b707aefc14610574578063be6c191b146105a157600080fd5b8063a22cb465116100d1578063a22cb465146104b9578063a428a58b146104d4578063a42dce80146104f4578063a51a92621461051457600080fd5b80637ac3c02f1461044857806380f00927146104665780638456cb59146104865780638da5cb5b1461049b57600080fd5b80633f4ba83a1161017a5780634e50f447116101495780634e50f447146103c35780635c975abb146103fb5780636c19e78314610413578063715018a61461043357600080fd5b80633f4ba83a1461033a57806343480ac11461034f57806344df8e70146103815780634e1273f41461039657600080fd5b806312fde4b7116101b657806312fde4b7146102a657806316710db6146102d857806316f50c89146102f85780632eb2c2d61461031a57600080fd5b8062fdd58e146101e757806301ffc9a71461021a578063037cb2561461024a5780630e89341c14610279575b600080fd5b3480156101f357600080fd5b50610207610202366004612a88565b61063f565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a610235366004612ab4565b6106d5565b6040519015158152602001610211565b34801561025657600080fd5b5061026a610265366004612af6565b61076d565b60405161021193929190612b87565b34801561028557600080fd5b50610299610294366004612bc7565b610945565b6040516102119190612c04565b3480156102b257600080fd5b5060c9546001600160a01b03165b6040516001600160a01b039091168152602001610211565b3480156102e457600080fd5b506102996102f3366004612bc7565b610985565b34801561030457600080fd5b50610318610313366004612c8d565b6109b9565b005b34801561032657600080fd5b50610318610335366004612d8a565b610b66565b34801561034657600080fd5b50610318610bb2565b34801561035b57600080fd5b5060c954600160a01b900463ffffffff1660405163ffffffff9091168152602001610211565b34801561038d57600080fd5b50610318610bc4565b3480156103a257600080fd5b506103b66103b1366004612f62565b610e2d565b6040516102119190612fc6565b3480156103cf57600080fd5b506103e36103de366004612ff1565b610f45565b6040516001600160c01b039091168152602001610211565b34801561040757600080fd5b5060965460ff1661023a565b34801561041f57600080fd5b5061031861042e366004612af6565b610f5c565b34801561043f57600080fd5b50610318610fdc565b34801561045457600080fd5b5060c8546001600160a01b03166102c0565b34801561047257600080fd5b5061031861048136600461302f565b610fee565b34801561049257600080fd5b50610318611034565b3480156104a757600080fd5b506064546001600160a01b03166102c0565b3480156104c557600080fd5b5061031861033536600461304a565b3480156104e057600080fd5b506103186104ef366004613088565b611044565b34801561050057600080fd5b5061031861050f366004612af6565b61105e565b34801561052057600080fd5b5061053461052f366004612af6565b611103565b60405161021191906130ca565b34801561054d57600080fd5b5061029961055c36600461314f565b611221565b61031861056f36600461316a565b6112c6565b34801561058057600080fd5b5061059461058f366004613229565b611a73565b604051610211919061330e565b3480156105ad57600080fd5b506102c06105bc36600461314f565b611a80565b3480156105cd57600080fd5b506103186105dc366004613088565b611aa7565b3480156105ed57600080fd5b5061023a6105fc366004613321565b600092915050565b34801561061057600080fd5b5061031861033536600461334f565b34801561062b57600080fd5b5061031861063a366004612af6565b611abc565b60006001600160a01b0383166106c25760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e65720000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6106cc8383611b4c565b90505b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a260000000000000000000000000000000000000000000000000000000014806106cf57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c000000000000000000000000000000000000000000000000000000001492915050565b60608060006001600160a01b0384166107d25760405162461bcd60e51b815260206004820152602160248201527f61646472657373207a65726f206973206e6f7420612076616c6964206f776e656044820152603960f91b60648201526084016106b9565b6001600160a01b038416600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff168185015260018201805484518187028101870186528181529295939486019383018282801561086257602002820191906000526020600020905b81548152602001906001019080831161084e575b5050505050815250509050600081604001515167ffffffffffffffff81111561088d5761088d612e28565b6040519080825280602002602001820160405280156108b6578160200160208202803683370190505b50905060005b82604001515181101561092c576108f287846040015183815181106108e3576108e36133cb565b60200260200101516000611c3a565b828281518110610904576109046133cb565b6001600160c01b0390921660209283029190910190910152610925816133f7565b90506108bc565b5060408201516020909201519196909550909350915050565b6001600160801b038116600090815260ce60205260409020546060906001600160a01b0316610977576106cf82610985565b6106cf82611221565b919050565b606060ca61099283611da3565b6040516020016109a392919061344a565b6040516020818303038152906040529050919050565b600054610100900460ff16158080156109d95750600054600160ff909116105b806109f35750303b1580156109f3575060005460ff166001145b610a655760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106b9565b6000805460ff191660011790558015610a88576000805461ff0019166101001790555b610a90611eac565b610a98611f1f565b610aa189611f92565b60c880546001600160a01b0319166001600160a01b038a81169190911790915560c9805491891677ffffffffffffffffffffffffffffffffffffffffffffffff1990921691909117600160a01b63ffffffff89160217905560ca610b06858783613547565b5060cb610b14838583613547565b508015610b5b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6040518060600160405280603f81526020016138dd603f91396040517f8005b2d10000000000000000000000000000000000000000000000000000000081526004016106b99190612c04565b610bba611fe4565b610bc261203e565b565b33600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff1681850152600182018054845181870281018701865281815292959394860193830182828015610c4b57602002820191906000526020600020905b815481526020019060010190808311610c37575b5050505050815250509050806020015167ffffffffffffffff16600003610cb45760405162461bcd60e51b815260206004820152601d60248201527f4164647265737320646f6573206e6f74206f776e206120426561636f6e00000060448201526064016106b9565b80516001600160801b0316600090815260ce6020908152604080832080546001600160a01b031916905533835260cd9091528120805477ffffffffffffffffffffffffffffffffffffffffffffffff1916815590610d1560018301826129f5565b505060408101518051600091339130917f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb9167ffffffffffffffff811115610d5f57610d5f612e28565b604051908082528060200260200182016040528015610d88578160200160208202803683370190505b50604051610d97929190613608565b60405180910390a48051604080516001600160801b03909216825260006020830181905291339130917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a480516040516001600160801b0390911681527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b60608151835114610e805760405162461bcd60e51b815260206004820181905260248201527f6163636f756e747320616e6420696473206c656e677468206d69736d6174636860448201526064016106b9565b6000835167ffffffffffffffff811115610e9c57610e9c612e28565b604051908082528060200260200182016040528015610ec5578160200160208202803683370190505b50905060005b8451811015610f3d57610f10858281518110610ee957610ee96133cb565b6020026020010151858381518110610f0357610f036133cb565b6020026020010151611b4c565b828281518110610f2257610f226133cb565b6020908102919091010152610f36816133f7565b9050610ecb565b509392505050565b6000610f52848484611c3a565b90505b9392505050565b610f64611fe4565b6001600160a01b038116610fba5760405162461bcd60e51b815260206004820152601e60248201527f4e6577207369676e657220697320746865207a65726f2061646472657373000060448201526064016106b9565b60c880546001600160a01b0319166001600160a01b0392909216919091179055565b610fe4611fe4565b610bc26000611f92565b610ff6611fe4565b60c9805463ffffffff909216600160a01b027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b61103c611fe4565b610bc2612090565b61104c611fe4565b60cb611059828483613547565b505050565b611066611fe4565b6001600160a01b0381166110e15760405162461bcd60e51b8152602060048201526024808201527f4e657720666565436f6c6c6563746f7220697320746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016106b9565b60c980546001600160a01b0319166001600160a01b0392909216919091179055565b604080516060808201835260008083526020830152918101919091526001600160a01b03821661117f5760405162461bcd60e51b815260206004820152602160248201527f61646472657373207a65726f206973206e6f7420612076616c6964206f776e656044820152603960f91b60648201526084016106b9565b6001600160a01b038216600090815260cd6020908152604091829020825160608101845281546001600160801b0381168252600160801b900467ffffffffffffffff16818401526001820180548551818602810186018752818152929593949386019383018282801561121157602002820191906000526020600020905b8154815260200190600101908083116111fd575b5050505050815250509050919050565b6001600160801b038116600090815260ce60205260409020546060906001600160a01b0316806112935760405162461bcd60e51b815260206004820152600f60248201527f4e6f20426561636f6e20666f756e64000000000000000000000000000000000060448201526064016106b9565b60cb61129e826120cd565b6040516020016112af92919061344a565b604051602081830303815290604052915050919050565b6112ce6120e3565b60c8546040516001600160a01b039091169061135c90611356906112f6908690602001613694565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b83612136565b6001600160a01b0316146113b25760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e617475726500000000000000000000000000000060448201526064016106b9565b60c954600160a01b900463ffffffff1642036113d1602084018461375e565b67ffffffffffffffff16116114285760405162461bcd60e51b815260206004820152601160248201527f5369676e6174757265206578706972656400000000000000000000000000000060448201526064016106b9565b600060cd8161143d6040860160208701612af6565b6001600160a01b031681526020808201929092526040908101600020815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff16818501526001820180548451818702810187018652818152929593948601938301828280156114ce57602002820191906000526020600020905b8154815260200190600101908083116114ba575b5050509190925250505060208082015191925067ffffffffffffffff9091168015916114fc9086018661375e565b67ffffffffffffffff16116115535760405162461bcd60e51b815260206004820152600c60248201527f496e76616c69642064617461000000000000000000000000000000000000000060448201526064016106b9565b611563608085016060860161314f565b6001600160801b031634146115ba5760405162461bcd60e51b815260206004820152601060248201527f57726f6e672076616c75652073656e740000000000000000000000000000000060448201526064016106b9565b60c9546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156115f3573d6000803e3d6000fd5b506040518060600160405280856040016020810190611612919061314f565b6001600160801b0316815260209081019061162f9087018761375e565b67ffffffffffffffff16815260200161164b6080870187613779565b905067ffffffffffffffff81111561166557611665612e28565b60405190808252806020026020018201604052801561168e578160200160208202803683370190505b509052915060005b6116a36080860186613779565b905081101561189b5760006116bb6080870187613779565b838181106116cb576116cb6133cb565b90506040020160000135905060008361175f5760cc60006116f260408a0160208b01612af6565b6001600160a01b03168152602081019190915260400160009081209061171b60808a018a613779565b8681811061172b5761172b6133cb565b60409081029290920135835250602082019290925201600020546801000000000000000090046001600160c01b0316611762565b60005b905060006117736080890189613779565b85818110611783576117836133cb565b905060400201602001602081019061179b91906137c3565b60408051808201909152909150806117b660208b018b61375e565b67ffffffffffffffff168152602001826001600160c01b031681525060cc60008a60200160208101906117e99190612af6565b6001600160a01b03168152602080820192909252604090810160009081208782528352819020835193909201516001600160c01b0316680100000000000000000267ffffffffffffffff909316929092179055860151805184919086908110611854576118546133cb565b602002602001018181525050611890838960200160208101906118779190612af6565b846001600160c01b0316846001600160c01b0316612152565b505050600101611696565b508160cd60006118b16040880160208901612af6565b6001600160a01b031681526020808201929092526040908101600020835181548585015167ffffffffffffffff16600160801b0277ffffffffffffffffffffffffffffffffffffffffffffffff199091166001600160801b0390921691909117178155908301518051919261192e92600185019290910190612a13565b509050508015611a04576119486040850160208601612af6565b60ce600061195c606088016040890161314f565b6001600160801b03168152602080820192909252604090810160002080546001600160a01b0319166001600160a01b0394909416939093179092556119a5918601908601612af6565b6001600160a01b03166000307fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f626119e26060890160408a0161314f565b604080516001600160801b039092168252600160208301520160405180910390a45b7faeb65f31af8942df157a69a57e5f1f13eb845025d4a223ba73f412fa55038247611a35606086016040870161314f565b611a42602087018761375e565b604080516001600160801b03909316835267ffffffffffffffff90911660208301520160405180910390a150505050565b6060610f52848484612202565b6001600160801b038116600090815260ce60205260408120546001600160a01b03166106cf565b611aaf611fe4565b60ca611059828483613547565b611ac4611fe4565b6001600160a01b038116611b405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106b9565b611b4981611f92565b50565b600080611b5b84846000611c3a565b6001600160c01b031690508015611b735790506106cf565b6001600160a01b038416600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff1681850152600182018054845181870281018701865281815292959394860193830182828015611c0357602002820191906000526020600020905b815481526020019060010190808311611bef575b5050505050815250509050806020015167ffffffffffffffff16600003611c2f576000925050506106cf565b6001925050506106cf565b6000611c446120e3565b6001600160a01b038416600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff1681850152600182018054845181870281018701865281815292959394860193830182828015611cd457602002820191906000526020600020905b815481526020019060010190808311611cc0575b505050919092525050506001600160a01b038616600090815260cc6020908152604080832088845282529182902082518084019093525467ffffffffffffffff808216808552680100000000000000009092046001600160c01b0316848401529184015193945091921614611d4e57600092505050610f55565b8367ffffffffffffffff16600003611d6d57602001519150610f559050565b80514290611d7c9086906137de565b67ffffffffffffffff1611611d9657600092505050610f55565b6020015195945050505050565b606081600003611dca5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611df45780611dde816133f7565b9150611ded9050600a8361381c565b9150611dce565b60008167ffffffffffffffff811115611e0f57611e0f612e28565b6040519080825280601f01601f191660200182016040528015611e39576020820181803683370190505b5090505b8415611ea457611e4e600183613830565b9150611e5b600a86613843565b611e66906030613857565b60f81b818381518110611e7b57611e7b6133cb565b60200101906001600160f81b031916908160001a905350611e9d600a8661381c565b9450611e3d565b949350505050565b600054610100900460ff16611f175760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b610bc261240b565b600054610100900460ff16611f8a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b610bc261247f565b606480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6064546001600160a01b03163314610bc25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106b9565b6120466124f6565b6096805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6120986120e3565b6096805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586120733390565b60606106cf6001600160a01b0383166014612548565b60965460ff1615610bc25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016106b9565b6000806000612145858561270d565b91509150610f3d81612752565b8181146121fc578181113060008261216a578561216d565b60005b905060008361217d57600061217f565b865b905060008461219057858703612194565b8686035b9050816001600160a01b0316836001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628c856040516121ee929190918252602082015260400190565b60405180910390a450505050505b50505050565b6060825184511461227b5760405162461bcd60e51b815260206004820152602560248201527f6163636f756e747320616e64207472616974496473206c656e677468206d697360448201527f6d6174636800000000000000000000000000000000000000000000000000000060648201526084016106b9565b81518451146122f15760405162461bcd60e51b8152602060048201526024808201527f6163636f756e747320616e64206d617841676573206c656e677468206d69736d60448201527f617463680000000000000000000000000000000000000000000000000000000060648201526084016106b9565b6000845167ffffffffffffffff81111561230d5761230d612e28565b604051908082528060200260200182016040528015612336578160200160208202803683370190505b50905060005b8551816001600160c01b03161015612402576123bf86826001600160c01b03168151811061236c5761236c6133cb565b602002602001015186836001600160c01b03168151811061238f5761238f6133cb565b602002602001015186846001600160c01b0316815181106123b2576123b26133cb565b6020026020010151611c3a565b82826001600160c01b0316815181106123da576123da6133cb565b6001600160c01b03909216602092830291909101909101526123fb8161386a565b905061233c565b50949350505050565b600054610100900460ff166124765760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b610bc233611f92565b600054610100900460ff166124ea5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b6096805460ff19169055565b60965460ff16610bc25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016106b9565b60606000612557836002613890565b612562906002613857565b67ffffffffffffffff81111561257a5761257a612e28565b6040519080825280601f01601f1916602001820160405280156125a4576020820181803683370190505b509050600360fc1b816000815181106125bf576125bf6133cb565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061260a5761260a6133cb565b60200101906001600160f81b031916908160001a905350600061262e846002613890565b612639906001613857565b90505b60018111156126be577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061267a5761267a6133cb565b1a60f81b828281518110612690576126906133cb565b60200101906001600160f81b031916908160001a90535060049490941c936126b7816138af565b905061263c565b5083156106cc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106b9565b60008082516041036127435760208301516040840151606085015160001a61273787828585612908565b9450945050505061274b565b506000905060025b9250929050565b6000816004811115612766576127666138c6565b0361276e5750565b6001816004811115612782576127826138c6565b036127cf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106b9565b60028160048111156127e3576127e36138c6565b036128305760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106b9565b6003816004811115612844576128446138c6565b0361289c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106b9565b60048160048111156128b0576128b06138c6565b03611b495760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106b9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561293f57506000905060036129ec565b8460ff16601b1415801561295757508460ff16601c14155b1561296857506000905060046129ec565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129bc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129e5576000600192509250506129ec565b9150600090505b94509492505050565b5080546000825590600052602060002090810190611b499190612a5e565b828054828255906000526020600020908101928215612a4e579160200282015b82811115612a4e578251825591602001919060010190612a33565b50612a5a929150612a5e565b5090565b5b80821115612a5a5760008155600101612a5f565b6001600160a01b0381168114611b4957600080fd5b60008060408385031215612a9b57600080fd5b8235612aa681612a73565b946020939093013593505050565b600060208284031215612ac657600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146106cc57600080fd5b600060208284031215612b0857600080fd5b81356106cc81612a73565b600081518084526020808501945080840160005b83811015612b4357815187529582019590820190600101612b27565b509495945050505050565b600081518084526020808501945080840160005b83811015612b435781516001600160c01b031687529582019590820190600101612b62565b606081526000612b9a6060830186612b13565b8281036020840152612bac8186612b4e565b91505067ffffffffffffffff83166040830152949350505050565b600060208284031215612bd957600080fd5b5035919050565b60005b83811015612bfb578181015183820152602001612be3565b50506000910152565b6020815260008251806020840152612c23816040850160208701612be0565b601f01601f19169190910160400192915050565b803563ffffffff8116811461098057600080fd5b60008083601f840112612c5d57600080fd5b50813567ffffffffffffffff811115612c7557600080fd5b60208301915083602082850101111561274b57600080fd5b60008060008060008060008060c0898b031215612ca957600080fd5b8835612cb481612a73565b97506020890135612cc481612a73565b96506040890135612cd481612a73565b9550612ce260608a01612c37565b9450608089013567ffffffffffffffff80821115612cff57600080fd5b612d0b8c838d01612c4b565b909650945060a08b0135915080821115612d2457600080fd5b50612d318b828c01612c4b565b999c989b5096995094979396929594505050565b60008083601f840112612d5757600080fd5b50813567ffffffffffffffff811115612d6f57600080fd5b6020830191508360208260051b850101111561274b57600080fd5b60008060008060008060008060a0898b031215612da657600080fd5b8835612db181612a73565b97506020890135612dc181612a73565b9650604089013567ffffffffffffffff80821115612dde57600080fd5b612dea8c838d01612d45565b909850965060608b0135915080821115612e0357600080fd5b612e0f8c838d01612d45565b909650945060808b0135915080821115612d2457600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612e6757612e67612e28565b604052919050565b600067ffffffffffffffff821115612e8957612e89612e28565b5060051b60200190565b600082601f830112612ea457600080fd5b81356020612eb9612eb483612e6f565b612e3e565b82815260059290921b84018101918181019086841115612ed857600080fd5b8286015b84811015612efc578035612eef81612a73565b8352918301918301612edc565b509695505050505050565b600082601f830112612f1857600080fd5b81356020612f28612eb483612e6f565b82815260059290921b84018101918181019086841115612f4757600080fd5b8286015b84811015612efc5780358352918301918301612f4b565b60008060408385031215612f7557600080fd5b823567ffffffffffffffff80821115612f8d57600080fd5b612f9986838701612e93565b93506020850135915080821115612faf57600080fd5b50612fbc85828601612f07565b9150509250929050565b6020815260006106cc6020830184612b13565b803567ffffffffffffffff8116811461098057600080fd5b60008060006060848603121561300657600080fd5b833561301181612a73565b92506020840135915061302660408501612fd9565b90509250925092565b60006020828403121561304157600080fd5b6106cc82612c37565b6000806040838503121561305d57600080fd5b823561306881612a73565b91506020830135801515811461307d57600080fd5b809150509250929050565b6000806020838503121561309b57600080fd5b823567ffffffffffffffff8111156130b257600080fd5b6130be85828601612c4b565b90969095509350505050565b60006020808352608083016001600160801b038551168285015267ffffffffffffffff82860151166040850152604085015160608086015281815180845260a0870191508483019350600092505b80831015612efc5783518252928401926001929092019190840190613118565b80356001600160801b038116811461098057600080fd5b60006020828403121561316157600080fd5b6106cc82613138565b6000806040838503121561317d57600080fd5b823567ffffffffffffffff8082111561319557600080fd5b9084019060a082870312156131a957600080fd5b90925060209084820135818111156131c057600080fd5b8501601f810187136131d157600080fd5b8035828111156131e3576131e3612e28565b6131f5601f8201601f19168501612e3e565b9250808352878482840101111561320b57600080fd5b80848301858501376000848285010152505080925050509250929050565b60008060006060848603121561323e57600080fd5b833567ffffffffffffffff8082111561325657600080fd5b61326287838801612e93565b945060209150818601358181111561327957600080fd5b61328588828901612f07565b94505060408601358181111561329a57600080fd5b86019050601f810187136132ad57600080fd5b80356132bb612eb482612e6f565b81815260059190911b820183019083810190898311156132da57600080fd5b928401925b828410156132ff576132f084612fd9565b825292840192908401906132df565b80955050505050509250925092565b6020815260006106cc6020830184612b4e565b6000806040838503121561333457600080fd5b823561333f81612a73565b9150602083013561307d81612a73565b60008060008060008060a0878903121561336857600080fd5b863561337381612a73565b9550602087013561338381612a73565b94506040870135935060608701359250608087013567ffffffffffffffff8111156133ad57600080fd5b6133b989828a01612c4b565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613409576134096133e1565b5060010190565b600181811c9082168061342457607f821691505b60208210810361344457634e487b7160e01b600052602260045260246000fd5b50919050565b600080845461345881613410565b600182811680156134705760018114613485576134b4565b60ff19841687528215158302870194506134b4565b8860005260208060002060005b858110156134ab5781548a820152908401908201613492565b50505082870194505b5050505083516134c8818360208801612be0565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b601f82111561105957600081815260208120601f850160051c810160208610156135205750805b601f850160051c820191505b8181101561353f5782815560010161352c565b505050505050565b67ffffffffffffffff83111561355f5761355f612e28565b6135738361356d8354613410565b836134f9565b6000601f8411600181146135a7576000851561358f5750838201355b600019600387901b1c1916600186901b178355613601565b600083815260209020601f19861690835b828110156135d857868501358255602094850194600190920191016135b8565b50868210156135f55760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152600061361b6040830185612b13565b828103602084015261362d8185612b13565b95945050505050565b80356001600160c01b038116811461098057600080fd5b8183526000602080850194508260005b85811015612b4357813587526001600160c01b0361367c848401613636565b1687840152604096870196919091019060010161365d565b60208152600067ffffffffffffffff806136ad85612fd9565b16602084015260208401356136c181612a73565b6001600160a01b0381166040850152506136dd60408501613138565b6001600160801b038082166060860152806136fa60608801613138565b16608086015250506080840135601e1985360301811261371957600080fd5b84016020810190358281111561372e57600080fd5b8060061b360382131561374057600080fd5b60a08086015261375460c08601828461364d565b9695505050505050565b60006020828403121561377057600080fd5b6106cc82612fd9565b6000808335601e1984360301811261379057600080fd5b83018035915067ffffffffffffffff8211156137ab57600080fd5b6020019150600681901b360382131561274b57600080fd5b6000602082840312156137d557600080fd5b6106cc82613636565b67ffffffffffffffff8181168382160190808211156137ff576137ff6133e1565b5092915050565b634e487b7160e01b600052601260045260246000fd5b60008261382b5761382b613806565b500490565b818103818111156106cf576106cf6133e1565b60008261385257613852613806565b500690565b808201808211156106cf576106cf6133e1565b60006001600160c01b03808316818103613886576138866133e1565b6001019392505050565b60008160001904831182151516156138aa576138aa6133e1565b500290565b6000816138be576138be6133e1565b506000190190565b634e487b7160e01b600052602160045260246000fdfe5468697320546f6b656e20697320536f756c20626f756e642e204f6e6c792062616c616e636520616e64206d657461646174612063616e2062652072656164a2646970667358221220313a43abf92f4d5ca77a9ec0cfc3459398a4e4c33f373a48e3133d749f02cc5164736f6c63430008100033

Deployed Bytecode

0x6080604052600436106101e25760003560e01c80637ac3c02f11610102578063abf360d311610095578063bebd026c11610064578063bebd026c146105c1578063e985e9c5146105e1578063f242432a14610604578063f2fde38b1461061f57600080fd5b8063abf360d314610541578063b4b1927814610561578063b707aefc14610574578063be6c191b146105a157600080fd5b8063a22cb465116100d1578063a22cb465146104b9578063a428a58b146104d4578063a42dce80146104f4578063a51a92621461051457600080fd5b80637ac3c02f1461044857806380f00927146104665780638456cb59146104865780638da5cb5b1461049b57600080fd5b80633f4ba83a1161017a5780634e50f447116101495780634e50f447146103c35780635c975abb146103fb5780636c19e78314610413578063715018a61461043357600080fd5b80633f4ba83a1461033a57806343480ac11461034f57806344df8e70146103815780634e1273f41461039657600080fd5b806312fde4b7116101b657806312fde4b7146102a657806316710db6146102d857806316f50c89146102f85780632eb2c2d61461031a57600080fd5b8062fdd58e146101e757806301ffc9a71461021a578063037cb2561461024a5780630e89341c14610279575b600080fd5b3480156101f357600080fd5b50610207610202366004612a88565b61063f565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a610235366004612ab4565b6106d5565b6040519015158152602001610211565b34801561025657600080fd5b5061026a610265366004612af6565b61076d565b60405161021193929190612b87565b34801561028557600080fd5b50610299610294366004612bc7565b610945565b6040516102119190612c04565b3480156102b257600080fd5b5060c9546001600160a01b03165b6040516001600160a01b039091168152602001610211565b3480156102e457600080fd5b506102996102f3366004612bc7565b610985565b34801561030457600080fd5b50610318610313366004612c8d565b6109b9565b005b34801561032657600080fd5b50610318610335366004612d8a565b610b66565b34801561034657600080fd5b50610318610bb2565b34801561035b57600080fd5b5060c954600160a01b900463ffffffff1660405163ffffffff9091168152602001610211565b34801561038d57600080fd5b50610318610bc4565b3480156103a257600080fd5b506103b66103b1366004612f62565b610e2d565b6040516102119190612fc6565b3480156103cf57600080fd5b506103e36103de366004612ff1565b610f45565b6040516001600160c01b039091168152602001610211565b34801561040757600080fd5b5060965460ff1661023a565b34801561041f57600080fd5b5061031861042e366004612af6565b610f5c565b34801561043f57600080fd5b50610318610fdc565b34801561045457600080fd5b5060c8546001600160a01b03166102c0565b34801561047257600080fd5b5061031861048136600461302f565b610fee565b34801561049257600080fd5b50610318611034565b3480156104a757600080fd5b506064546001600160a01b03166102c0565b3480156104c557600080fd5b5061031861033536600461304a565b3480156104e057600080fd5b506103186104ef366004613088565b611044565b34801561050057600080fd5b5061031861050f366004612af6565b61105e565b34801561052057600080fd5b5061053461052f366004612af6565b611103565b60405161021191906130ca565b34801561054d57600080fd5b5061029961055c36600461314f565b611221565b61031861056f36600461316a565b6112c6565b34801561058057600080fd5b5061059461058f366004613229565b611a73565b604051610211919061330e565b3480156105ad57600080fd5b506102c06105bc36600461314f565b611a80565b3480156105cd57600080fd5b506103186105dc366004613088565b611aa7565b3480156105ed57600080fd5b5061023a6105fc366004613321565b600092915050565b34801561061057600080fd5b5061031861033536600461334f565b34801561062b57600080fd5b5061031861063a366004612af6565b611abc565b60006001600160a01b0383166106c25760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e65720000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6106cc8383611b4c565b90505b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a260000000000000000000000000000000000000000000000000000000014806106cf57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c000000000000000000000000000000000000000000000000000000001492915050565b60608060006001600160a01b0384166107d25760405162461bcd60e51b815260206004820152602160248201527f61646472657373207a65726f206973206e6f7420612076616c6964206f776e656044820152603960f91b60648201526084016106b9565b6001600160a01b038416600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff168185015260018201805484518187028101870186528181529295939486019383018282801561086257602002820191906000526020600020905b81548152602001906001019080831161084e575b5050505050815250509050600081604001515167ffffffffffffffff81111561088d5761088d612e28565b6040519080825280602002602001820160405280156108b6578160200160208202803683370190505b50905060005b82604001515181101561092c576108f287846040015183815181106108e3576108e36133cb565b60200260200101516000611c3a565b828281518110610904576109046133cb565b6001600160c01b0390921660209283029190910190910152610925816133f7565b90506108bc565b5060408201516020909201519196909550909350915050565b6001600160801b038116600090815260ce60205260409020546060906001600160a01b0316610977576106cf82610985565b6106cf82611221565b919050565b606060ca61099283611da3565b6040516020016109a392919061344a565b6040516020818303038152906040529050919050565b600054610100900460ff16158080156109d95750600054600160ff909116105b806109f35750303b1580156109f3575060005460ff166001145b610a655760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016106b9565b6000805460ff191660011790558015610a88576000805461ff0019166101001790555b610a90611eac565b610a98611f1f565b610aa189611f92565b60c880546001600160a01b0319166001600160a01b038a81169190911790915560c9805491891677ffffffffffffffffffffffffffffffffffffffffffffffff1990921691909117600160a01b63ffffffff89160217905560ca610b06858783613547565b5060cb610b14838583613547565b508015610b5b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050505050565b6040518060600160405280603f81526020016138dd603f91396040517f8005b2d10000000000000000000000000000000000000000000000000000000081526004016106b99190612c04565b610bba611fe4565b610bc261203e565b565b33600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff1681850152600182018054845181870281018701865281815292959394860193830182828015610c4b57602002820191906000526020600020905b815481526020019060010190808311610c37575b5050505050815250509050806020015167ffffffffffffffff16600003610cb45760405162461bcd60e51b815260206004820152601d60248201527f4164647265737320646f6573206e6f74206f776e206120426561636f6e00000060448201526064016106b9565b80516001600160801b0316600090815260ce6020908152604080832080546001600160a01b031916905533835260cd9091528120805477ffffffffffffffffffffffffffffffffffffffffffffffff1916815590610d1560018301826129f5565b505060408101518051600091339130917f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb9167ffffffffffffffff811115610d5f57610d5f612e28565b604051908082528060200260200182016040528015610d88578160200160208202803683370190505b50604051610d97929190613608565b60405180910390a48051604080516001600160801b03909216825260006020830181905291339130917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a480516040516001600160801b0390911681527fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb9060200160405180910390a150565b60608151835114610e805760405162461bcd60e51b815260206004820181905260248201527f6163636f756e747320616e6420696473206c656e677468206d69736d6174636860448201526064016106b9565b6000835167ffffffffffffffff811115610e9c57610e9c612e28565b604051908082528060200260200182016040528015610ec5578160200160208202803683370190505b50905060005b8451811015610f3d57610f10858281518110610ee957610ee96133cb565b6020026020010151858381518110610f0357610f036133cb565b6020026020010151611b4c565b828281518110610f2257610f226133cb565b6020908102919091010152610f36816133f7565b9050610ecb565b509392505050565b6000610f52848484611c3a565b90505b9392505050565b610f64611fe4565b6001600160a01b038116610fba5760405162461bcd60e51b815260206004820152601e60248201527f4e6577207369676e657220697320746865207a65726f2061646472657373000060448201526064016106b9565b60c880546001600160a01b0319166001600160a01b0392909216919091179055565b610fe4611fe4565b610bc26000611f92565b610ff6611fe4565b60c9805463ffffffff909216600160a01b027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b61103c611fe4565b610bc2612090565b61104c611fe4565b60cb611059828483613547565b505050565b611066611fe4565b6001600160a01b0381166110e15760405162461bcd60e51b8152602060048201526024808201527f4e657720666565436f6c6c6563746f7220697320746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016106b9565b60c980546001600160a01b0319166001600160a01b0392909216919091179055565b604080516060808201835260008083526020830152918101919091526001600160a01b03821661117f5760405162461bcd60e51b815260206004820152602160248201527f61646472657373207a65726f206973206e6f7420612076616c6964206f776e656044820152603960f91b60648201526084016106b9565b6001600160a01b038216600090815260cd6020908152604091829020825160608101845281546001600160801b0381168252600160801b900467ffffffffffffffff16818401526001820180548551818602810186018752818152929593949386019383018282801561121157602002820191906000526020600020905b8154815260200190600101908083116111fd575b5050505050815250509050919050565b6001600160801b038116600090815260ce60205260409020546060906001600160a01b0316806112935760405162461bcd60e51b815260206004820152600f60248201527f4e6f20426561636f6e20666f756e64000000000000000000000000000000000060448201526064016106b9565b60cb61129e826120cd565b6040516020016112af92919061344a565b604051602081830303815290604052915050919050565b6112ce6120e3565b60c8546040516001600160a01b039091169061135c90611356906112f6908690602001613694565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b83612136565b6001600160a01b0316146113b25760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e617475726500000000000000000000000000000060448201526064016106b9565b60c954600160a01b900463ffffffff1642036113d1602084018461375e565b67ffffffffffffffff16116114285760405162461bcd60e51b815260206004820152601160248201527f5369676e6174757265206578706972656400000000000000000000000000000060448201526064016106b9565b600060cd8161143d6040860160208701612af6565b6001600160a01b031681526020808201929092526040908101600020815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff16818501526001820180548451818702810187018652818152929593948601938301828280156114ce57602002820191906000526020600020905b8154815260200190600101908083116114ba575b5050509190925250505060208082015191925067ffffffffffffffff9091168015916114fc9086018661375e565b67ffffffffffffffff16116115535760405162461bcd60e51b815260206004820152600c60248201527f496e76616c69642064617461000000000000000000000000000000000000000060448201526064016106b9565b611563608085016060860161314f565b6001600160801b031634146115ba5760405162461bcd60e51b815260206004820152601060248201527f57726f6e672076616c75652073656e740000000000000000000000000000000060448201526064016106b9565b60c9546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156115f3573d6000803e3d6000fd5b506040518060600160405280856040016020810190611612919061314f565b6001600160801b0316815260209081019061162f9087018761375e565b67ffffffffffffffff16815260200161164b6080870187613779565b905067ffffffffffffffff81111561166557611665612e28565b60405190808252806020026020018201604052801561168e578160200160208202803683370190505b509052915060005b6116a36080860186613779565b905081101561189b5760006116bb6080870187613779565b838181106116cb576116cb6133cb565b90506040020160000135905060008361175f5760cc60006116f260408a0160208b01612af6565b6001600160a01b03168152602081019190915260400160009081209061171b60808a018a613779565b8681811061172b5761172b6133cb565b60409081029290920135835250602082019290925201600020546801000000000000000090046001600160c01b0316611762565b60005b905060006117736080890189613779565b85818110611783576117836133cb565b905060400201602001602081019061179b91906137c3565b60408051808201909152909150806117b660208b018b61375e565b67ffffffffffffffff168152602001826001600160c01b031681525060cc60008a60200160208101906117e99190612af6565b6001600160a01b03168152602080820192909252604090810160009081208782528352819020835193909201516001600160c01b0316680100000000000000000267ffffffffffffffff909316929092179055860151805184919086908110611854576118546133cb565b602002602001018181525050611890838960200160208101906118779190612af6565b846001600160c01b0316846001600160c01b0316612152565b505050600101611696565b508160cd60006118b16040880160208901612af6565b6001600160a01b031681526020808201929092526040908101600020835181548585015167ffffffffffffffff16600160801b0277ffffffffffffffffffffffffffffffffffffffffffffffff199091166001600160801b0390921691909117178155908301518051919261192e92600185019290910190612a13565b509050508015611a04576119486040850160208601612af6565b60ce600061195c606088016040890161314f565b6001600160801b03168152602080820192909252604090810160002080546001600160a01b0319166001600160a01b0394909416939093179092556119a5918601908601612af6565b6001600160a01b03166000307fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f626119e26060890160408a0161314f565b604080516001600160801b039092168252600160208301520160405180910390a45b7faeb65f31af8942df157a69a57e5f1f13eb845025d4a223ba73f412fa55038247611a35606086016040870161314f565b611a42602087018761375e565b604080516001600160801b03909316835267ffffffffffffffff90911660208301520160405180910390a150505050565b6060610f52848484612202565b6001600160801b038116600090815260ce60205260408120546001600160a01b03166106cf565b611aaf611fe4565b60ca611059828483613547565b611ac4611fe4565b6001600160a01b038116611b405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106b9565b611b4981611f92565b50565b600080611b5b84846000611c3a565b6001600160c01b031690508015611b735790506106cf565b6001600160a01b038416600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff1681850152600182018054845181870281018701865281815292959394860193830182828015611c0357602002820191906000526020600020905b815481526020019060010190808311611bef575b5050505050815250509050806020015167ffffffffffffffff16600003611c2f576000925050506106cf565b6001925050506106cf565b6000611c446120e3565b6001600160a01b038416600090815260cd60209081526040808320815160608101835281546001600160801b0381168252600160801b900467ffffffffffffffff1681850152600182018054845181870281018701865281815292959394860193830182828015611cd457602002820191906000526020600020905b815481526020019060010190808311611cc0575b505050919092525050506001600160a01b038616600090815260cc6020908152604080832088845282529182902082518084019093525467ffffffffffffffff808216808552680100000000000000009092046001600160c01b0316848401529184015193945091921614611d4e57600092505050610f55565b8367ffffffffffffffff16600003611d6d57602001519150610f559050565b80514290611d7c9086906137de565b67ffffffffffffffff1611611d9657600092505050610f55565b6020015195945050505050565b606081600003611dca5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611df45780611dde816133f7565b9150611ded9050600a8361381c565b9150611dce565b60008167ffffffffffffffff811115611e0f57611e0f612e28565b6040519080825280601f01601f191660200182016040528015611e39576020820181803683370190505b5090505b8415611ea457611e4e600183613830565b9150611e5b600a86613843565b611e66906030613857565b60f81b818381518110611e7b57611e7b6133cb565b60200101906001600160f81b031916908160001a905350611e9d600a8661381c565b9450611e3d565b949350505050565b600054610100900460ff16611f175760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b610bc261240b565b600054610100900460ff16611f8a5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b610bc261247f565b606480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6064546001600160a01b03163314610bc25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106b9565b6120466124f6565b6096805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6120986120e3565b6096805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586120733390565b60606106cf6001600160a01b0383166014612548565b60965460ff1615610bc25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016106b9565b6000806000612145858561270d565b91509150610f3d81612752565b8181146121fc578181113060008261216a578561216d565b60005b905060008361217d57600061217f565b865b905060008461219057858703612194565b8686035b9050816001600160a01b0316836001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628c856040516121ee929190918252602082015260400190565b60405180910390a450505050505b50505050565b6060825184511461227b5760405162461bcd60e51b815260206004820152602560248201527f6163636f756e747320616e64207472616974496473206c656e677468206d697360448201527f6d6174636800000000000000000000000000000000000000000000000000000060648201526084016106b9565b81518451146122f15760405162461bcd60e51b8152602060048201526024808201527f6163636f756e747320616e64206d617841676573206c656e677468206d69736d60448201527f617463680000000000000000000000000000000000000000000000000000000060648201526084016106b9565b6000845167ffffffffffffffff81111561230d5761230d612e28565b604051908082528060200260200182016040528015612336578160200160208202803683370190505b50905060005b8551816001600160c01b03161015612402576123bf86826001600160c01b03168151811061236c5761236c6133cb565b602002602001015186836001600160c01b03168151811061238f5761238f6133cb565b602002602001015186846001600160c01b0316815181106123b2576123b26133cb565b6020026020010151611c3a565b82826001600160c01b0316815181106123da576123da6133cb565b6001600160c01b03909216602092830291909101909101526123fb8161386a565b905061233c565b50949350505050565b600054610100900460ff166124765760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b610bc233611f92565b600054610100900460ff166124ea5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b60648201526084016106b9565b6096805460ff19169055565b60965460ff16610bc25760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016106b9565b60606000612557836002613890565b612562906002613857565b67ffffffffffffffff81111561257a5761257a612e28565b6040519080825280601f01601f1916602001820160405280156125a4576020820181803683370190505b509050600360fc1b816000815181106125bf576125bf6133cb565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061260a5761260a6133cb565b60200101906001600160f81b031916908160001a905350600061262e846002613890565b612639906001613857565b90505b60018111156126be577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061267a5761267a6133cb565b1a60f81b828281518110612690576126906133cb565b60200101906001600160f81b031916908160001a90535060049490941c936126b7816138af565b905061263c565b5083156106cc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106b9565b60008082516041036127435760208301516040840151606085015160001a61273787828585612908565b9450945050505061274b565b506000905060025b9250929050565b6000816004811115612766576127666138c6565b0361276e5750565b6001816004811115612782576127826138c6565b036127cf5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106b9565b60028160048111156127e3576127e36138c6565b036128305760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106b9565b6003816004811115612844576128446138c6565b0361289c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106b9565b60048160048111156128b0576128b06138c6565b03611b495760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106b9565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561293f57506000905060036129ec565b8460ff16601b1415801561295757508460ff16601c14155b1561296857506000905060046129ec565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156129bc573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166129e5576000600192509250506129ec565b9150600090505b94509492505050565b5080546000825590600052602060002090810190611b499190612a5e565b828054828255906000526020600020908101928215612a4e579160200282015b82811115612a4e578251825591602001919060010190612a33565b50612a5a929150612a5e565b5090565b5b80821115612a5a5760008155600101612a5f565b6001600160a01b0381168114611b4957600080fd5b60008060408385031215612a9b57600080fd5b8235612aa681612a73565b946020939093013593505050565b600060208284031215612ac657600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146106cc57600080fd5b600060208284031215612b0857600080fd5b81356106cc81612a73565b600081518084526020808501945080840160005b83811015612b4357815187529582019590820190600101612b27565b509495945050505050565b600081518084526020808501945080840160005b83811015612b435781516001600160c01b031687529582019590820190600101612b62565b606081526000612b9a6060830186612b13565b8281036020840152612bac8186612b4e565b91505067ffffffffffffffff83166040830152949350505050565b600060208284031215612bd957600080fd5b5035919050565b60005b83811015612bfb578181015183820152602001612be3565b50506000910152565b6020815260008251806020840152612c23816040850160208701612be0565b601f01601f19169190910160400192915050565b803563ffffffff8116811461098057600080fd5b60008083601f840112612c5d57600080fd5b50813567ffffffffffffffff811115612c7557600080fd5b60208301915083602082850101111561274b57600080fd5b60008060008060008060008060c0898b031215612ca957600080fd5b8835612cb481612a73565b97506020890135612cc481612a73565b96506040890135612cd481612a73565b9550612ce260608a01612c37565b9450608089013567ffffffffffffffff80821115612cff57600080fd5b612d0b8c838d01612c4b565b909650945060a08b0135915080821115612d2457600080fd5b50612d318b828c01612c4b565b999c989b5096995094979396929594505050565b60008083601f840112612d5757600080fd5b50813567ffffffffffffffff811115612d6f57600080fd5b6020830191508360208260051b850101111561274b57600080fd5b60008060008060008060008060a0898b031215612da657600080fd5b8835612db181612a73565b97506020890135612dc181612a73565b9650604089013567ffffffffffffffff80821115612dde57600080fd5b612dea8c838d01612d45565b909850965060608b0135915080821115612e0357600080fd5b612e0f8c838d01612d45565b909650945060808b0135915080821115612d2457600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612e6757612e67612e28565b604052919050565b600067ffffffffffffffff821115612e8957612e89612e28565b5060051b60200190565b600082601f830112612ea457600080fd5b81356020612eb9612eb483612e6f565b612e3e565b82815260059290921b84018101918181019086841115612ed857600080fd5b8286015b84811015612efc578035612eef81612a73565b8352918301918301612edc565b509695505050505050565b600082601f830112612f1857600080fd5b81356020612f28612eb483612e6f565b82815260059290921b84018101918181019086841115612f4757600080fd5b8286015b84811015612efc5780358352918301918301612f4b565b60008060408385031215612f7557600080fd5b823567ffffffffffffffff80821115612f8d57600080fd5b612f9986838701612e93565b93506020850135915080821115612faf57600080fd5b50612fbc85828601612f07565b9150509250929050565b6020815260006106cc6020830184612b13565b803567ffffffffffffffff8116811461098057600080fd5b60008060006060848603121561300657600080fd5b833561301181612a73565b92506020840135915061302660408501612fd9565b90509250925092565b60006020828403121561304157600080fd5b6106cc82612c37565b6000806040838503121561305d57600080fd5b823561306881612a73565b91506020830135801515811461307d57600080fd5b809150509250929050565b6000806020838503121561309b57600080fd5b823567ffffffffffffffff8111156130b257600080fd5b6130be85828601612c4b565b90969095509350505050565b60006020808352608083016001600160801b038551168285015267ffffffffffffffff82860151166040850152604085015160608086015281815180845260a0870191508483019350600092505b80831015612efc5783518252928401926001929092019190840190613118565b80356001600160801b038116811461098057600080fd5b60006020828403121561316157600080fd5b6106cc82613138565b6000806040838503121561317d57600080fd5b823567ffffffffffffffff8082111561319557600080fd5b9084019060a082870312156131a957600080fd5b90925060209084820135818111156131c057600080fd5b8501601f810187136131d157600080fd5b8035828111156131e3576131e3612e28565b6131f5601f8201601f19168501612e3e565b9250808352878482840101111561320b57600080fd5b80848301858501376000848285010152505080925050509250929050565b60008060006060848603121561323e57600080fd5b833567ffffffffffffffff8082111561325657600080fd5b61326287838801612e93565b945060209150818601358181111561327957600080fd5b61328588828901612f07565b94505060408601358181111561329a57600080fd5b86019050601f810187136132ad57600080fd5b80356132bb612eb482612e6f565b81815260059190911b820183019083810190898311156132da57600080fd5b928401925b828410156132ff576132f084612fd9565b825292840192908401906132df565b80955050505050509250925092565b6020815260006106cc6020830184612b4e565b6000806040838503121561333457600080fd5b823561333f81612a73565b9150602083013561307d81612a73565b60008060008060008060a0878903121561336857600080fd5b863561337381612a73565b9550602087013561338381612a73565b94506040870135935060608701359250608087013567ffffffffffffffff8111156133ad57600080fd5b6133b989828a01612c4b565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613409576134096133e1565b5060010190565b600181811c9082168061342457607f821691505b60208210810361344457634e487b7160e01b600052602260045260246000fd5b50919050565b600080845461345881613410565b600182811680156134705760018114613485576134b4565b60ff19841687528215158302870194506134b4565b8860005260208060002060005b858110156134ab5781548a820152908401908201613492565b50505082870194505b5050505083516134c8818360208801612be0565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b601f82111561105957600081815260208120601f850160051c810160208610156135205750805b601f850160051c820191505b8181101561353f5782815560010161352c565b505050505050565b67ffffffffffffffff83111561355f5761355f612e28565b6135738361356d8354613410565b836134f9565b6000601f8411600181146135a7576000851561358f5750838201355b600019600387901b1c1916600186901b178355613601565b600083815260209020601f19861690835b828110156135d857868501358255602094850194600190920191016135b8565b50868210156135f55760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60408152600061361b6040830185612b13565b828103602084015261362d8185612b13565b95945050505050565b80356001600160c01b038116811461098057600080fd5b8183526000602080850194508260005b85811015612b4357813587526001600160c01b0361367c848401613636565b1687840152604096870196919091019060010161365d565b60208152600067ffffffffffffffff806136ad85612fd9565b16602084015260208401356136c181612a73565b6001600160a01b0381166040850152506136dd60408501613138565b6001600160801b038082166060860152806136fa60608801613138565b16608086015250506080840135601e1985360301811261371957600080fd5b84016020810190358281111561372e57600080fd5b8060061b360382131561374057600080fd5b60a08086015261375460c08601828461364d565b9695505050505050565b60006020828403121561377057600080fd5b6106cc82612fd9565b6000808335601e1984360301811261379057600080fd5b83018035915067ffffffffffffffff8211156137ab57600080fd5b6020019150600681901b360382131561274b57600080fd5b6000602082840312156137d557600080fd5b6106cc82613636565b67ffffffffffffffff8181168382160190808211156137ff576137ff6133e1565b5092915050565b634e487b7160e01b600052601260045260246000fd5b60008261382b5761382b613806565b500490565b818103818111156106cf576106cf6133e1565b60008261385257613852613806565b500690565b808201808211156106cf576106cf6133e1565b60006001600160c01b03808316818103613886576138866133e1565b6001019392505050565b60008160001904831182151516156138aa576138aa6133e1565b500290565b6000816138be576138be6133e1565b506000190190565b634e487b7160e01b600052602160045260246000fdfe5468697320546f6b656e20697320536f756c20626f756e642e204f6e6c792062616c616e636520616e64206d657461646174612063616e2062652072656164a2646970667358221220313a43abf92f4d5ca77a9ec0cfc3459398a4e4c33f373a48e3133d749f02cc5164736f6c63430008100033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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