ETH Price: $3,354.66 (-0.61%)

Token

Gear Pods (PODS)
 

Overview

Max Total Supply

9,782 PODS

Holders

1,948

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
inev.eth
0x1F9A61B1192BF34Cef96b1Abb7225E3efCefbBe8
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Holders of a MetaHero Identity and a Planet are eligible to mint DOT-assembled gear pods: the common, Astral Gear Pod, and the more rare, Cosmic Gear Pod. The legendary Nebula Gear Pod coming soon.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
GearPod

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : GearPod.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

import "./AbstractERC1155Factory.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

contract GearPod is AbstractERC1155Factory {
    using ECDSA for bytes32;
    using Counters for Counters.Counter;

    Counters.Counter private podCounter; 

    struct Pod {
        uint256 startWindow;
        uint256 endWindow;
        uint256 price;
        mapping(address => uint256) amountMinted;
        string tokenUri;
    }
    mapping(uint256 => Pod) public pods;

    IERC20 immutable POW;
    address paymentReceiver;

    address signer;

    error windowClosed();
    error nonExistentToken();
    error signatureInvalid();
    error amountInvalid();
    error niceTry();
    error invalidInput();

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _baseUri,    
        address _powAddress,
        address _paymentReceiver,
        address _signer
    ) ERC1155(_baseUri) {
        name_ = _name;
        symbol_ = _symbol;

        POW = IERC20(_powAddress);
        paymentReceiver = _paymentReceiver;

        signer = _signer;
    }

    function addPod(
        uint256 _startWindow,
        uint256 _endWindow,         
        uint256 _price,
        string memory _tokenUri
    ) public onlyOwner {
        require(_startWindow < _endWindow, "open window must be before close window");

        Pod storage pod = pods[podCounter.current()];
        pod.startWindow = _startWindow;
        pod.endWindow = _endWindow;
        pod.price = _price;
        pod.tokenUri = _tokenUri;

        podCounter.increment();
    }

    function editPod(
        uint256 _tokenId,
        uint256 _startWindow,
        uint256 _endWindow,         
        uint256 _price,
        string calldata _tokenUri
    ) external onlyOwner {
        require(_startWindow < _endWindow, "open window must be before close window");

        pods[_tokenId].startWindow = _startWindow;
        pods[_tokenId].endWindow = _endWindow;
        pods[_tokenId].price = _price;
        pods[_tokenId].tokenUri = _tokenUri;
    }    

    /**
     * @notice Mints the given amount to receiver address
     *
     * @param _signature signature issued by PV
     * @param _validTokenIds token ids wallet is eligible to mint
     * @param _tokenIds token ids wallet wants to mint
     * @param _amounts amounts wallet wants to mint
     * @param _tokenIds amounts wallet is eligible to mint
     */
    function batchMint(
        bytes calldata _signature,        
        uint256[] calldata _validTokenIds, 
        uint256[] calldata _tokenIds,               
        uint256[] calldata _amounts,
        uint256[] calldata _maxAmounts
    ) external {

        if( _tokenIds.length != _amounts.length) {
        	revert invalidInput();
        }

        bytes32 hash = keccak256(
            abi.encodePacked(msg.sender, _validTokenIds, _maxAmounts)
        );
        if (hash.toEthSignedMessageHash().recover(_signature) != signer) {
            revert signatureInvalid();
        }

        uint256 totalPrice;

        for(uint256 i=0; i<_tokenIds.length;) {

	        if (block.timestamp < pods[_tokenIds[i]].startWindow || block.timestamp > pods[_tokenIds[i]].endWindow) {
	            revert windowClosed();
	        }
	        uint256 index = validateTokenId(_validTokenIds, _tokenIds[i]);

	        if(_amounts[i] < 1 || pods[_tokenIds[i]].amountMinted[msg.sender] + _amounts[i] > _maxAmounts[index]) {
	            revert amountInvalid();
	        }
	        pods[_tokenIds[i]].amountMinted[msg.sender] += _amounts[i];

	        totalPrice += pods[_tokenIds[i]].price * _amounts[i];

	        unchecked {
	            i++;
	        }  
        }          

        if(totalPrice > 0) {
            POW.transferFrom(msg.sender, paymentReceiver, totalPrice);
        }

        _mintBatch(msg.sender, _tokenIds, _amounts, "");
    }  

	function validateTokenId(uint256[] calldata validIds, uint256 num) internal pure returns (uint256) {
	    for (uint256 i = 0; i < validIds.length;) {
	        if (validIds[i] == num) {
	            return i;
	        }

	        unchecked {
	            i++;
	        }  
	    }
	    revert niceTry();
	}


    /**
     * @notice Mints the given amount to receiver address
     *
     * @param _receiver the receiving wallet
     * @param _tokenId the token id to mint
     * @param _amount the amount of tokens to mint
     */
    function ownerMint(
        address _receiver,
        uint256 _tokenId,
        uint256 _amount
    ) external onlyOwner {
        _mint(_receiver, _tokenId, _amount, "");
    }

    /**
     * @notice Mints the given s to receiver addresses
     *
     * @param _receivers the receiving wallet
     * @param _tokenId the token id to mint
     * @param _amounts the amount of tokens to mint
     */
    function ownerMintMany(
        address[] calldata _receivers,
        uint256 _tokenId,
        uint256[] calldata _amounts
    ) external onlyOwner {
        for (uint256 i; i < _receivers.length; ) {
            _mint(_receivers[i], _tokenId, _amounts[i], "");

            unchecked {
                i++;
            }
        }
    }

    /**
     * @notice Edit metadata base URI
     *
     * @param _baseURI the new base URI
     *
     */
    function setBaseURI(
        string memory _baseURI
    ) external onlyOwner {
        _setURI(_baseURI);
    }

    /**
     * @notice Edit the address to receives POW payments
     *
     * @param _paymentReceiver the new receiving address
     *
     */
    function setPaymentReceiver(
        address _paymentReceiver
    ) external onlyOwner {
        paymentReceiver = _paymentReceiver;
    }

    /**
     * @notice Change the wallet address required to sign tickets
     *
     * @param _signer the new signing address
     *
     */
    function setSigner(
        address _signer
    ) external onlyOwner {
        signer = _signer;
    }

    function amountMinted(uint256 _tokenId, address _account) public view returns (uint256) {
        return pods[_tokenId].amountMinted[_account];
    }

    /**
     * @notice returns the metadata uri for a given id
     *
     * @param _id the card id to return metadata for
     */
    function uri(
        uint256 _id
    ) public view override returns (string memory) {
        if (!exists(_id)) revert nonExistentToken();

        return string(abi.encodePacked(super.uri(_id), pods[_id].tokenUri));
    }
}

File 2 of 18 : AbstractERC1155Factory.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.14;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";

abstract contract AbstractERC1155Factory is
    ERC1155Supply,
    ERC1155Burnable,
    Ownable
{
    string public name_;
    string public symbol_;

    function name() public view returns (string memory) {
        return name_;
    }

    function symbol() public view returns (string memory) {
        return symbol_;
    }

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 5 of 18 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

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

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 6 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../ERC1155.sol";

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

        _burn(account, id, value);
    }

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

        _burnBatch(account, ids, values);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 9 of 18 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 id = ids[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

        return array;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"address","name":"_powAddress","type":"address"},{"internalType":"address","name":"_paymentReceiver","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"amountInvalid","type":"error"},{"inputs":[],"name":"invalidInput","type":"error"},{"inputs":[],"name":"niceTry","type":"error"},{"inputs":[],"name":"nonExistentToken","type":"error"},{"inputs":[],"name":"signatureInvalid","type":"error"},{"inputs":[],"name":"windowClosed","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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"},{"inputs":[{"internalType":"uint256","name":"_startWindow","type":"uint256"},{"internalType":"uint256","name":"_endWindow","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"string","name":"_tokenUri","type":"string"}],"name":"addPod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"amountMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256[]","name":"_validTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"_maxAmounts","type":"uint256[]"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_startWindow","type":"uint256"},{"internalType":"uint256","name":"_endWindow","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"string","name":"_tokenUri","type":"string"}],"name":"editPod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name_","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_receivers","type":"address[]"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"ownerMintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pods","outputs":[{"internalType":"uint256","name":"startWindow","type":"uint256"},{"internalType":"uint256","name":"endWindow","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"string","name":"tokenUri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_paymentReceiver","type":"address"}],"name":"setPaymentReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol_","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b5060405162003841380380620038418339810160408190526200003491620002ae565b836200004081620000b3565b506200004c33620000cc565b8551620000619060059060208901906200011e565b508451620000779060069060208801906200011e565b506001600160a01b03928316608052600980549284166001600160a01b0319938416179055600a805491909316911617905550620003b2915050565b8051620000c89060029060208401906200011e565b5050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200012c9062000376565b90600052602060002090601f0160209004810192826200015057600085556200019b565b82601f106200016b57805160ff19168380011785556200019b565b828001600101855582156200019b579182015b828111156200019b5782518255916020019190600101906200017e565b50620001a9929150620001ad565b5090565b5b80821115620001a95760008155600101620001ae565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001ec57600080fd5b81516001600160401b0380821115620002095762000209620001c4565b604051601f8301601f19908116603f01168101908282118183101715620002345762000234620001c4565b816040528381526020925086838588010111156200025157600080fd5b600091505b8382101562000275578582018301518183018401529082019062000256565b83821115620002875760008385830101525b9695505050505050565b80516001600160a01b0381168114620002a957600080fd5b919050565b60008060008060008060c08789031215620002c857600080fd5b86516001600160401b0380821115620002e057600080fd5b620002ee8a838b01620001da565b975060208901519150808211156200030557600080fd5b620003138a838b01620001da565b965060408901519150808211156200032a57600080fd5b506200033989828a01620001da565b9450506200034a6060880162000291565b92506200035a6080880162000291565b91506200036a60a0880162000291565b90509295509295509295565b600181811c908216806200038b57607f821691505b602082108103620003ac57634e487b7160e01b600052602260045260246000fd5b50919050565b608051613473620003ce60003960006109e601526134736000f3fe608060405234801561001057600080fd5b50600436106101ce5760003560e01c80636b20c45411610104578063bd85b039116100a2578063e985e9c511610071578063e985e9c514610411578063f242432a1461044d578063f2fde38b14610460578063f5298aca1461047357600080fd5b8063bd85b039146103b3578063bf1470a0146103d3578063da9ea9fc146103e6578063e2b9e1861461040957600080fd5b80638da5cb5b116100de5780638da5cb5b1461037557806395d89b4114610390578063a22cb46514610398578063af17dea6146103ab57600080fd5b80636b20c454146103475780636c19e7831461035a578063715018a61461036d57600080fd5b8063388b9fe01161017157806355f804b31161014b57806355f804b3146102fb578063616c79ba1461030e578063652d90f81461032157806365ebf99a1461033457600080fd5b8063388b9fe0146102a65780634e1273f4146102b95780634f558e79146102d957600080fd5b80630e89341c116101ad5780630e89341c146102315780631f6ab6a81461024457806325101eaa1461027e5780632eb2c2d61461029357600080fd5b8062fdd58e146101d357806301ffc9a7146101f957806306fdde031461021c575b600080fd5b6101e66101e1366004612543565b610486565b6040519081526020015b60405180910390f35b61020c610207366004612583565b61051d565b60405190151581526020016101f0565b61022461056f565b6040516101f091906125f8565b61022461023f36600461260b565b610601565b6101e6610252366004612624565b60008281526008602090815260408083206001600160a01b038516845260030190915290205492915050565b61029161028c3660046126d5565b610672565b005b6102916102a136600461290e565b610ae1565b6102916102b43660046129b7565b610b78565b6102cc6102c73660046129ea565b610bc2565b6040516101f09190612aef565b61020c6102e736600461260b565b600090815260036020526040902054151590565b610291610309366004612b02565b610ceb565b61029161031c366004612b3e565b610d21565b61029161032f366004612b97565b610dc1565b610291610342366004612c00565b610e40565b610291610355366004612c1b565b610e8c565b610291610368366004612c00565b610ecf565b610291610f1b565b6004546040516001600160a01b0390911681526020016101f0565b610224610f51565b6102916103a6366004612c9c565b610f60565b610224610f6f565b6101e66103c136600461260b565b60009081526003602052604090205490565b6102916103e1366004612cd3565b610ffd565b6103f96103f436600461260b565b61109b565b6040516101f09493929190612d4c565b61022461114e565b61020c61041f366004612d7b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61029161045b366004612da5565b61115b565b61029161046e366004612c00565b6111a0565b6102916104813660046129b7565b611238565b60006001600160a01b0383166104f75760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061054e57506001600160e01b031982166303a24d0760e21b145b8061056957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606005805461057e90612e09565b80601f01602080910402602001604051908101604052809291908181526020018280546105aa90612e09565b80156105f75780601f106105cc576101008083540402835291602001916105f7565b820191906000526020600020905b8154815290600101906020018083116105da57829003601f168201915b5050505050905090565b60008181526003602052604090205460609061063057604051632f7cdc9160e01b815260040160405180910390fd5b6106398261127b565b600083815260086020908152604091829020915161065c93926004019101612e43565b6040516020818303038152906040529050919050565b848314610692576040516328f1d5cf60e01b815260040160405180910390fd5b600033898985856040516020016106ad959493929190612f20565b60408051601f198184030181528282528051602091820120600a54601f8f018390048302850183019093528d845293506001600160a01b0390911691610719918e908e9081908401838280828437600092019190915250610713925086915061130f9050565b90611362565b6001600160a01b03161461074057604051630db90c6160e01b815260040160405180910390fd5b6000805b878110156109b057600860008a8a8481811061076257610762612f5a565b905060200201358152602001908152602001600020600001544210806107b55750600860008a8a8481811061079957610799612f5a565b9050602002013581526020019081526020016000206001015442115b156107d3576040516326dc4a6b60e11b815260040160405180910390fd5b60006107f88c8c8c8c868181106107ec576107ec612f5a565b9050602002013561137e565b9050600188888481811061080e5761080e612f5a565b9050602002013510806108ac575085858281811061082e5761082e612f5a565b9050602002013588888481811061084757610847612f5a565b90506020020135600860008d8d8781811061086457610864612f5a565b9050602002013581526020019081526020016000206003016000336001600160a01b03166001600160a01b03168152602001908152602001600020546108aa9190612f86565b115b156108ca57604051630c14f42160e31b815260040160405180910390fd5b8787838181106108dc576108dc612f5a565b90506020020135600860008c8c868181106108f9576108f9612f5a565b9050602002013581526020019081526020016000206003016000336001600160a01b03166001600160a01b0316815260200190815260200160002060008282546109439190612f86565b90915550889050878381811061095b5761095b612f5a565b90506020020135600860008c8c8681811061097857610978612f5a565b9050602002013581526020019081526020016000206002015461099b9190612f9e565b6109a59084612f86565b925050600101610744565b508015610a57576009546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018390527f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303816000875af1158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190612fbd565b505b610ad33389898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b9182918501908490808284376000920182905250604080516020810190915290815292506113d9915050565b505050505050505050505050565b6001600160a01b038516331480610afd5750610afd853361041f565b610b645760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016104ee565b610b718585858585611533565b5050505050565b6004546001600160a01b03163314610ba25760405162461bcd60e51b81526004016104ee90612fda565b610bbd838383604051806020016040528060008152506116d5565b505050565b60608151835114610c275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104ee565b600083516001600160401b03811115610c4257610c426127c5565b604051908082528060200260200182016040528015610c6b578160200160208202803683370190505b50905060005b8451811015610ce357610cb6858281518110610c8f57610c8f612f5a565b6020026020010151858381518110610ca957610ca9612f5a565b6020026020010151610486565b828281518110610cc857610cc8612f5a565b6020908102919091010152610cdc8161300f565b9050610c71565b509392505050565b6004546001600160a01b03163314610d155760405162461bcd60e51b81526004016104ee90612fda565b610d1e816117b5565b50565b6004546001600160a01b03163314610d4b5760405162461bcd60e51b81526004016104ee90612fda565b828410610d6a5760405162461bcd60e51b81526004016104ee90613028565b600060086000610d7960075490565b815260208082019290925260400160002086815560018101869055600281018590558351909250610db29160048401919085019061241a565b50610b71600780546001019055565b6004546001600160a01b03163314610deb5760405162461bcd60e51b81526004016104ee90612fda565b838510610e0a5760405162461bcd60e51b81526004016104ee90613028565b60008681526008602052604090208581556001810185905560028101849055610e3790600401838361249e565b50505050505050565b6004546001600160a01b03163314610e6a5760405162461bcd60e51b81526004016104ee90612fda565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316331480610ea85750610ea8833361041f565b610ec45760405162461bcd60e51b81526004016104ee9061306f565b610bbd8383836117c8565b6004546001600160a01b03163314610ef95760405162461bcd60e51b81526004016104ee90612fda565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610f455760405162461bcd60e51b81526004016104ee90612fda565b610f4f6000611966565b565b60606006805461057e90612e09565b610f6b3383836119b8565b5050565b60068054610f7c90612e09565b80601f0160208091040260200160405190810160405280929190818152602001828054610fa890612e09565b8015610ff55780601f10610fca57610100808354040283529160200191610ff5565b820191906000526020600020905b815481529060010190602001808311610fd857829003601f168201915b505050505081565b6004546001600160a01b031633146110275760405162461bcd60e51b81526004016104ee90612fda565b60005b848110156110935761108b86868381811061104757611047612f5a565b905060200201602081019061105c9190612c00565b8585858581811061106f5761106f612f5a565b90506020020135604051806020016040528060008152506116d5565b60010161102a565b505050505050565b6008602052600090815260409020805460018201546002830154600484018054939492939192916110cb90612e09565b80601f01602080910402602001604051908101604052809291908181526020018280546110f790612e09565b80156111445780601f1061111957610100808354040283529160200191611144565b820191906000526020600020905b81548152906001019060200180831161112757829003601f168201915b5050505050905084565b60058054610f7c90612e09565b6001600160a01b0385163314806111775750611177853361041f565b6111935760405162461bcd60e51b81526004016104ee9061306f565b610b718585858585611a98565b6004546001600160a01b031633146111ca5760405162461bcd60e51b81526004016104ee90612fda565b6001600160a01b03811661122f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104ee565b610d1e81611966565b6001600160a01b0383163314806112545750611254833361041f565b6112705760405162461bcd60e51b81526004016104ee9061306f565b610bbd838383611bd0565b60606002805461128a90612e09565b80601f01602080910402602001604051908101604052809291908181526020018280546112b690612e09565b80156113035780601f106112d857610100808354040283529160200191611303565b820191906000526020600020905b8154815290600101906020018083116112e657829003601f168201915b50505050509050919050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b60008060006113718585611ce8565b91509150610ce381611d56565b6000805b838110156113b8578285858381811061139d5761139d612f5a565b90506020020135036113b05790506113d2565b600101611382565b506040516319884a6d60e11b815260040160405180910390fd5b9392505050565b6001600160a01b0384166113ff5760405162461bcd60e51b81526004016104ee906130b8565b81518351146114205760405162461bcd60e51b81526004016104ee906130f9565b3361143081600087878787611f0c565b60005b84518110156114cb5783818151811061144e5761144e612f5a565b602002602001015160008087848151811061146b5761146b612f5a565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114b39190612f86565b909155508190506114c38161300f565b915050611433565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161151c929190613141565b60405180910390a4610b7181600087878787611f1a565b81518351146115545760405162461bcd60e51b81526004016104ee906130f9565b6001600160a01b03841661157a5760405162461bcd60e51b81526004016104ee9061316f565b33611589818787878787611f0c565b60005b845181101561166f5760008582815181106115a9576115a9612f5a565b6020026020010151905060008583815181106115c7576115c7612f5a565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156116175760405162461bcd60e51b81526004016104ee906131b4565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611654908490612f86565b92505081905550505050806116689061300f565b905061158c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516116bf929190613141565b60405180910390a4611093818787878787611f1a565b6001600160a01b0384166116fb5760405162461bcd60e51b81526004016104ee906130b8565b33600061170785612075565b9050600061171485612075565b905061172583600089858589611f0c565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290611755908490612f86565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610e37836000898989896120c0565b8051610f6b90600290602084019061241a565b6001600160a01b0383166117ee5760405162461bcd60e51b81526004016104ee906131fe565b805182511461180f5760405162461bcd60e51b81526004016104ee906130f9565b600033905061183281856000868660405180602001604052806000815250611f0c565b60005b83518110156118f757600084828151811061185257611852612f5a565b60200260200101519050600084838151811061187057611870612f5a565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156118c05760405162461bcd60e51b81526004016104ee90613241565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806118ef8161300f565b915050611835565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611948929190613141565b60405180910390a46040805160208101909152600090525b50505050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031603611a2b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104ee565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416611abe5760405162461bcd60e51b81526004016104ee9061316f565b336000611aca85612075565b90506000611ad785612075565b9050611ae7838989858589611f0c565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015611b285760405162461bcd60e51b81526004016104ee906131b4565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611b65908490612f86565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611bc5848a8a8a8a8a6120c0565b505050505050505050565b6001600160a01b038316611bf65760405162461bcd60e51b81526004016104ee906131fe565b336000611c0284612075565b90506000611c0f84612075565b9050611c2f83876000858560405180602001604052806000815250611f0c565b6000858152602081815260408083206001600160a01b038a16845290915290205484811015611c705760405162461bcd60e51b81526004016104ee90613241565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052610e37565b6000808251604103611d1e5760208301516040840151606085015160001a611d128782858561217b565b94509450505050611d4f565b8251604003611d475760208301516040840151611d3c868383612268565b935093505050611d4f565b506000905060025b9250929050565b6000816004811115611d6a57611d6a613285565b03611d725750565b6001816004811115611d8657611d86613285565b03611dd35760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104ee565b6002816004811115611de757611de7613285565b03611e345760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104ee565b6003816004811115611e4857611e48613285565b03611ea05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104ee565b6004816004811115611eb457611eb4613285565b03610d1e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104ee565b6110938686868686866122a1565b6001600160a01b0384163b156110935760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611f5e908990899088908890889060040161329b565b6020604051808303816000875af1925050508015611f99575060408051601f3d908101601f19168201909252611f96918101906132f9565b60015b61204557611fa5613316565b806308c379a003611fde5750611fb9613332565b80611fc45750611fe0565b8060405162461bcd60e51b81526004016104ee91906125f8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104ee565b6001600160e01b0319811663bc197c8160e01b14610e375760405162461bcd60e51b81526004016104ee906133bb565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106120af576120af612f5a565b602090810291909101015292915050565b6001600160a01b0384163b156110935760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906121049089908990889088908890600401613403565b6020604051808303816000875af192505050801561213f575060408051601f3d908101601f1916820190925261213c918101906132f9565b60015b61214b57611fa5613316565b6001600160e01b0319811663f23a6e6160e01b14610e375760405162461bcd60e51b81526004016104ee906133bb565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121b2575060009050600361225f565b8460ff16601b141580156121ca57508460ff16601c14155b156121db575060009050600461225f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561222f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166122585760006001925092505061225f565b9150600090505b94509492505050565b6000806001600160ff1b0383168161228560ff86901c601b612f86565b90506122938782888561217b565b935093505050935093915050565b6001600160a01b0385166123285760005b8351811015612326578281815181106122cd576122cd612f5a565b6020026020010151600360008684815181106122eb576122eb612f5a565b6020026020010151815260200190815260200160002060008282546123109190612f86565b9091555061231f90508161300f565b90506122b2565b505b6001600160a01b0384166110935760005b8351811015610e3757600084828151811061235657612356612f5a565b60200260200101519050600084838151811061237457612374612f5a565b60200260200101519050600060036000848152602001908152602001600020549050818110156123f75760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016104ee565b600092835260036020526040909220910390556124138161300f565b9050612339565b82805461242690612e09565b90600052602060002090601f016020900481019282612448576000855561248e565b82601f1061246157805160ff191683800117855561248e565b8280016001018555821561248e579182015b8281111561248e578251825591602001919060010190612473565b5061249a929150612512565b5090565b8280546124aa90612e09565b90600052602060002090601f0160209004810192826124cc576000855561248e565b82601f106124e55782800160ff1982351617855561248e565b8280016001018555821561248e579182015b8281111561248e5782358255916020019190600101906124f7565b5b8082111561249a5760008155600101612513565b80356001600160a01b038116811461253e57600080fd5b919050565b6000806040838503121561255657600080fd5b61255f83612527565b946020939093013593505050565b6001600160e01b031981168114610d1e57600080fd5b60006020828403121561259557600080fd5b81356113d28161256d565b60005b838110156125bb5781810151838201526020016125a3565b838111156119605750506000910152565b600081518084526125e48160208601602086016125a0565b601f01601f19169290920160200192915050565b6020815260006113d260208301846125cc565b60006020828403121561261d57600080fd5b5035919050565b6000806040838503121561263757600080fd5b8235915061264760208401612527565b90509250929050565b60008083601f84011261266257600080fd5b5081356001600160401b0381111561267957600080fd5b602083019150836020828501011115611d4f57600080fd5b60008083601f8401126126a357600080fd5b5081356001600160401b038111156126ba57600080fd5b6020830191508360208260051b8501011115611d4f57600080fd5b60008060008060008060008060008060a08b8d0312156126f457600080fd5b8a356001600160401b038082111561270b57600080fd5b6127178e838f01612650565b909c509a5060208d013591508082111561273057600080fd5b61273c8e838f01612691565b909a50985060408d013591508082111561275557600080fd5b6127618e838f01612691565b909850965060608d013591508082111561277a57600080fd5b6127868e838f01612691565b909650945060808d013591508082111561279f57600080fd5b506127ac8d828e01612691565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612800576128006127c5565b6040525050565b60006001600160401b03821115612820576128206127c5565b5060051b60200190565b600082601f83011261283b57600080fd5b8135602061284882612807565b60405161285582826127db565b83815260059390931b850182019282810191508684111561287557600080fd5b8286015b848110156128905780358352918301918301612879565b509695505050505050565b600082601f8301126128ac57600080fd5b81356001600160401b038111156128c5576128c56127c5565b6040516128dc601f8301601f1916602001826127db565b8181528460208386010111156128f157600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561292657600080fd5b61292f86612527565b945061293d60208701612527565b935060408601356001600160401b038082111561295957600080fd5b61296589838a0161282a565b9450606088013591508082111561297b57600080fd5b61298789838a0161282a565b9350608088013591508082111561299d57600080fd5b506129aa8882890161289b565b9150509295509295909350565b6000806000606084860312156129cc57600080fd5b6129d584612527565b95602085013595506040909401359392505050565b600080604083850312156129fd57600080fd5b82356001600160401b0380821115612a1457600080fd5b818501915085601f830112612a2857600080fd5b81356020612a3582612807565b604051612a4282826127db565b83815260059390931b8501820192828101915089841115612a6257600080fd5b948201945b83861015612a8757612a7886612527565b82529482019490820190612a67565b96505086013592505080821115612a9d57600080fd5b50612aaa8582860161282a565b9150509250929050565b600081518084526020808501945080840160005b83811015612ae457815187529582019590820190600101612ac8565b509495945050505050565b6020815260006113d26020830184612ab4565b600060208284031215612b1457600080fd5b81356001600160401b03811115612b2a57600080fd5b612b368482850161289b565b949350505050565b60008060008060808587031215612b5457600080fd5b84359350602085013592506040850135915060608501356001600160401b03811115612b7f57600080fd5b612b8b8782880161289b565b91505092959194509250565b60008060008060008060a08789031215612bb057600080fd5b8635955060208701359450604087013593506060870135925060808701356001600160401b03811115612be257600080fd5b612bee89828a01612650565b979a9699509497509295939492505050565b600060208284031215612c1257600080fd5b6113d282612527565b600080600060608486031215612c3057600080fd5b612c3984612527565b925060208401356001600160401b0380821115612c5557600080fd5b612c618783880161282a565b93506040860135915080821115612c7757600080fd5b50612c848682870161282a565b9150509250925092565b8015158114610d1e57600080fd5b60008060408385031215612caf57600080fd5b612cb883612527565b91506020830135612cc881612c8e565b809150509250929050565b600080600080600060608688031215612ceb57600080fd5b85356001600160401b0380821115612d0257600080fd5b612d0e89838a01612691565b9097509550602088013594506040880135915080821115612d2e57600080fd5b50612d3b88828901612691565b969995985093965092949392505050565b848152836020820152826040820152608060608201526000612d7160808301846125cc565b9695505050505050565b60008060408385031215612d8e57600080fd5b612d9783612527565b915061264760208401612527565b600080600080600060a08688031215612dbd57600080fd5b612dc686612527565b9450612dd460208701612527565b9350604086013592506060860135915060808601356001600160401b03811115612dfd57600080fd5b6129aa8882890161289b565b600181811c90821680612e1d57607f821691505b602082108103612e3d57634e487b7160e01b600052602260045260246000fd5b50919050565b600083516020612e5682858389016125a0565b845491840191600090600181811c9080831680612e7457607f831692505b8583108103612e9157634e487b7160e01b85526022600452602485fd5b808015612ea55760018114612eb657612ee3565b60ff19851688528388019550612ee3565b60008b81526020902060005b85811015612edb5781548a820152908401908801612ec2565b505083880195505b50939a9950505050505050505050565b60006001600160fb1b03831115612f0957600080fd5b8260051b8083863760009401938452509192915050565b6bffffffffffffffffffffffff198660601b1681526000612f4f612f48601484018789612ef3565b8486612ef3565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612f9957612f99612f70565b500190565b6000816000190483118215151615612fb857612fb8612f70565b500290565b600060208284031215612fcf57600080fd5b81516113d281612c8e565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001820161302157613021612f70565b5060010190565b60208082526027908201527f6f70656e2077696e646f77206d757374206265206265666f726520636c6f73656040820152662077696e646f7760c81b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6040815260006131546040830185612ab4565b82810360208401526131668185612ab4565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0386811682528516602082015260a0604082018190526000906132c790830186612ab4565b82810360608401526132d98186612ab4565b905082810360808401526132ed81856125cc565b98975050505050505050565b60006020828403121561330b57600080fd5b81516113d28161256d565b600060033d111561332f5760046000803e5060005160e01c5b90565b600060443d10156133405790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561336f57505050505090565b82850191508151818111156133875750505050505090565b843d87010160208285010111156133a15750505050505090565b6133b0602082860101876127db565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612f4f908301846125cc56fea26469706673582212204040ce7b15c9aa7217e60140111a420ee71f35a8700b9559663a077e55e3e67264736f6c634300080e003300000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000043ab765ee05075d78ad8aa79dcb1978ca307925800000000000000000000000019c30ad5ea4f7f9f36a8662b5fa2cbc09e55fded000000000000000000000000b76d77ccdc21179efb512c4cd41b7363e1d1789f00000000000000000000000000000000000000000000000000000000000000094765617220506f647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004504f4453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007697066733a2f2f00000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ce5760003560e01c80636b20c45411610104578063bd85b039116100a2578063e985e9c511610071578063e985e9c514610411578063f242432a1461044d578063f2fde38b14610460578063f5298aca1461047357600080fd5b8063bd85b039146103b3578063bf1470a0146103d3578063da9ea9fc146103e6578063e2b9e1861461040957600080fd5b80638da5cb5b116100de5780638da5cb5b1461037557806395d89b4114610390578063a22cb46514610398578063af17dea6146103ab57600080fd5b80636b20c454146103475780636c19e7831461035a578063715018a61461036d57600080fd5b8063388b9fe01161017157806355f804b31161014b57806355f804b3146102fb578063616c79ba1461030e578063652d90f81461032157806365ebf99a1461033457600080fd5b8063388b9fe0146102a65780634e1273f4146102b95780634f558e79146102d957600080fd5b80630e89341c116101ad5780630e89341c146102315780631f6ab6a81461024457806325101eaa1461027e5780632eb2c2d61461029357600080fd5b8062fdd58e146101d357806301ffc9a7146101f957806306fdde031461021c575b600080fd5b6101e66101e1366004612543565b610486565b6040519081526020015b60405180910390f35b61020c610207366004612583565b61051d565b60405190151581526020016101f0565b61022461056f565b6040516101f091906125f8565b61022461023f36600461260b565b610601565b6101e6610252366004612624565b60008281526008602090815260408083206001600160a01b038516845260030190915290205492915050565b61029161028c3660046126d5565b610672565b005b6102916102a136600461290e565b610ae1565b6102916102b43660046129b7565b610b78565b6102cc6102c73660046129ea565b610bc2565b6040516101f09190612aef565b61020c6102e736600461260b565b600090815260036020526040902054151590565b610291610309366004612b02565b610ceb565b61029161031c366004612b3e565b610d21565b61029161032f366004612b97565b610dc1565b610291610342366004612c00565b610e40565b610291610355366004612c1b565b610e8c565b610291610368366004612c00565b610ecf565b610291610f1b565b6004546040516001600160a01b0390911681526020016101f0565b610224610f51565b6102916103a6366004612c9c565b610f60565b610224610f6f565b6101e66103c136600461260b565b60009081526003602052604090205490565b6102916103e1366004612cd3565b610ffd565b6103f96103f436600461260b565b61109b565b6040516101f09493929190612d4c565b61022461114e565b61020c61041f366004612d7b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61029161045b366004612da5565b61115b565b61029161046e366004612c00565b6111a0565b6102916104813660046129b7565b611238565b60006001600160a01b0383166104f75760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061054e57506001600160e01b031982166303a24d0760e21b145b8061056957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606005805461057e90612e09565b80601f01602080910402602001604051908101604052809291908181526020018280546105aa90612e09565b80156105f75780601f106105cc576101008083540402835291602001916105f7565b820191906000526020600020905b8154815290600101906020018083116105da57829003601f168201915b5050505050905090565b60008181526003602052604090205460609061063057604051632f7cdc9160e01b815260040160405180910390fd5b6106398261127b565b600083815260086020908152604091829020915161065c93926004019101612e43565b6040516020818303038152906040529050919050565b848314610692576040516328f1d5cf60e01b815260040160405180910390fd5b600033898985856040516020016106ad959493929190612f20565b60408051601f198184030181528282528051602091820120600a54601f8f018390048302850183019093528d845293506001600160a01b0390911691610719918e908e9081908401838280828437600092019190915250610713925086915061130f9050565b90611362565b6001600160a01b03161461074057604051630db90c6160e01b815260040160405180910390fd5b6000805b878110156109b057600860008a8a8481811061076257610762612f5a565b905060200201358152602001908152602001600020600001544210806107b55750600860008a8a8481811061079957610799612f5a565b9050602002013581526020019081526020016000206001015442115b156107d3576040516326dc4a6b60e11b815260040160405180910390fd5b60006107f88c8c8c8c868181106107ec576107ec612f5a565b9050602002013561137e565b9050600188888481811061080e5761080e612f5a565b9050602002013510806108ac575085858281811061082e5761082e612f5a565b9050602002013588888481811061084757610847612f5a565b90506020020135600860008d8d8781811061086457610864612f5a565b9050602002013581526020019081526020016000206003016000336001600160a01b03166001600160a01b03168152602001908152602001600020546108aa9190612f86565b115b156108ca57604051630c14f42160e31b815260040160405180910390fd5b8787838181106108dc576108dc612f5a565b90506020020135600860008c8c868181106108f9576108f9612f5a565b9050602002013581526020019081526020016000206003016000336001600160a01b03166001600160a01b0316815260200190815260200160002060008282546109439190612f86565b90915550889050878381811061095b5761095b612f5a565b90506020020135600860008c8c8681811061097857610978612f5a565b9050602002013581526020019081526020016000206002015461099b9190612f9e565b6109a59084612f86565b925050600101610744565b508015610a57576009546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018390527f00000000000000000000000043ab765ee05075d78ad8aa79dcb1978ca3079258909116906323b872dd906064016020604051808303816000875af1158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a559190612fbd565b505b610ad33389898080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b9182918501908490808284376000920182905250604080516020810190915290815292506113d9915050565b505050505050505050505050565b6001600160a01b038516331480610afd5750610afd853361041f565b610b645760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016104ee565b610b718585858585611533565b5050505050565b6004546001600160a01b03163314610ba25760405162461bcd60e51b81526004016104ee90612fda565b610bbd838383604051806020016040528060008152506116d5565b505050565b60608151835114610c275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104ee565b600083516001600160401b03811115610c4257610c426127c5565b604051908082528060200260200182016040528015610c6b578160200160208202803683370190505b50905060005b8451811015610ce357610cb6858281518110610c8f57610c8f612f5a565b6020026020010151858381518110610ca957610ca9612f5a565b6020026020010151610486565b828281518110610cc857610cc8612f5a565b6020908102919091010152610cdc8161300f565b9050610c71565b509392505050565b6004546001600160a01b03163314610d155760405162461bcd60e51b81526004016104ee90612fda565b610d1e816117b5565b50565b6004546001600160a01b03163314610d4b5760405162461bcd60e51b81526004016104ee90612fda565b828410610d6a5760405162461bcd60e51b81526004016104ee90613028565b600060086000610d7960075490565b815260208082019290925260400160002086815560018101869055600281018590558351909250610db29160048401919085019061241a565b50610b71600780546001019055565b6004546001600160a01b03163314610deb5760405162461bcd60e51b81526004016104ee90612fda565b838510610e0a5760405162461bcd60e51b81526004016104ee90613028565b60008681526008602052604090208581556001810185905560028101849055610e3790600401838361249e565b50505050505050565b6004546001600160a01b03163314610e6a5760405162461bcd60e51b81526004016104ee90612fda565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316331480610ea85750610ea8833361041f565b610ec45760405162461bcd60e51b81526004016104ee9061306f565b610bbd8383836117c8565b6004546001600160a01b03163314610ef95760405162461bcd60e51b81526004016104ee90612fda565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314610f455760405162461bcd60e51b81526004016104ee90612fda565b610f4f6000611966565b565b60606006805461057e90612e09565b610f6b3383836119b8565b5050565b60068054610f7c90612e09565b80601f0160208091040260200160405190810160405280929190818152602001828054610fa890612e09565b8015610ff55780601f10610fca57610100808354040283529160200191610ff5565b820191906000526020600020905b815481529060010190602001808311610fd857829003601f168201915b505050505081565b6004546001600160a01b031633146110275760405162461bcd60e51b81526004016104ee90612fda565b60005b848110156110935761108b86868381811061104757611047612f5a565b905060200201602081019061105c9190612c00565b8585858581811061106f5761106f612f5a565b90506020020135604051806020016040528060008152506116d5565b60010161102a565b505050505050565b6008602052600090815260409020805460018201546002830154600484018054939492939192916110cb90612e09565b80601f01602080910402602001604051908101604052809291908181526020018280546110f790612e09565b80156111445780601f1061111957610100808354040283529160200191611144565b820191906000526020600020905b81548152906001019060200180831161112757829003601f168201915b5050505050905084565b60058054610f7c90612e09565b6001600160a01b0385163314806111775750611177853361041f565b6111935760405162461bcd60e51b81526004016104ee9061306f565b610b718585858585611a98565b6004546001600160a01b031633146111ca5760405162461bcd60e51b81526004016104ee90612fda565b6001600160a01b03811661122f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104ee565b610d1e81611966565b6001600160a01b0383163314806112545750611254833361041f565b6112705760405162461bcd60e51b81526004016104ee9061306f565b610bbd838383611bd0565b60606002805461128a90612e09565b80601f01602080910402602001604051908101604052809291908181526020018280546112b690612e09565b80156113035780601f106112d857610100808354040283529160200191611303565b820191906000526020600020905b8154815290600101906020018083116112e657829003601f168201915b50505050509050919050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b60008060006113718585611ce8565b91509150610ce381611d56565b6000805b838110156113b8578285858381811061139d5761139d612f5a565b90506020020135036113b05790506113d2565b600101611382565b506040516319884a6d60e11b815260040160405180910390fd5b9392505050565b6001600160a01b0384166113ff5760405162461bcd60e51b81526004016104ee906130b8565b81518351146114205760405162461bcd60e51b81526004016104ee906130f9565b3361143081600087878787611f0c565b60005b84518110156114cb5783818151811061144e5761144e612f5a565b602002602001015160008087848151811061146b5761146b612f5a565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546114b39190612f86565b909155508190506114c38161300f565b915050611433565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161151c929190613141565b60405180910390a4610b7181600087878787611f1a565b81518351146115545760405162461bcd60e51b81526004016104ee906130f9565b6001600160a01b03841661157a5760405162461bcd60e51b81526004016104ee9061316f565b33611589818787878787611f0c565b60005b845181101561166f5760008582815181106115a9576115a9612f5a565b6020026020010151905060008583815181106115c7576115c7612f5a565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156116175760405162461bcd60e51b81526004016104ee906131b4565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611654908490612f86565b92505081905550505050806116689061300f565b905061158c565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516116bf929190613141565b60405180910390a4611093818787878787611f1a565b6001600160a01b0384166116fb5760405162461bcd60e51b81526004016104ee906130b8565b33600061170785612075565b9050600061171485612075565b905061172583600089858589611f0c565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290611755908490612f86565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610e37836000898989896120c0565b8051610f6b90600290602084019061241a565b6001600160a01b0383166117ee5760405162461bcd60e51b81526004016104ee906131fe565b805182511461180f5760405162461bcd60e51b81526004016104ee906130f9565b600033905061183281856000868660405180602001604052806000815250611f0c565b60005b83518110156118f757600084828151811061185257611852612f5a565b60200260200101519050600084838151811061187057611870612f5a565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156118c05760405162461bcd60e51b81526004016104ee90613241565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806118ef8161300f565b915050611835565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611948929190613141565b60405180910390a46040805160208101909152600090525b50505050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031603611a2b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104ee565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416611abe5760405162461bcd60e51b81526004016104ee9061316f565b336000611aca85612075565b90506000611ad785612075565b9050611ae7838989858589611f0c565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015611b285760405162461bcd60e51b81526004016104ee906131b4565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611b65908490612f86565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611bc5848a8a8a8a8a6120c0565b505050505050505050565b6001600160a01b038316611bf65760405162461bcd60e51b81526004016104ee906131fe565b336000611c0284612075565b90506000611c0f84612075565b9050611c2f83876000858560405180602001604052806000815250611f0c565b6000858152602081815260408083206001600160a01b038a16845290915290205484811015611c705760405162461bcd60e51b81526004016104ee90613241565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052610e37565b6000808251604103611d1e5760208301516040840151606085015160001a611d128782858561217b565b94509450505050611d4f565b8251604003611d475760208301516040840151611d3c868383612268565b935093505050611d4f565b506000905060025b9250929050565b6000816004811115611d6a57611d6a613285565b03611d725750565b6001816004811115611d8657611d86613285565b03611dd35760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104ee565b6002816004811115611de757611de7613285565b03611e345760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104ee565b6003816004811115611e4857611e48613285565b03611ea05760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104ee565b6004816004811115611eb457611eb4613285565b03610d1e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104ee565b6110938686868686866122a1565b6001600160a01b0384163b156110935760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611f5e908990899088908890889060040161329b565b6020604051808303816000875af1925050508015611f99575060408051601f3d908101601f19168201909252611f96918101906132f9565b60015b61204557611fa5613316565b806308c379a003611fde5750611fb9613332565b80611fc45750611fe0565b8060405162461bcd60e51b81526004016104ee91906125f8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104ee565b6001600160e01b0319811663bc197c8160e01b14610e375760405162461bcd60e51b81526004016104ee906133bb565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106120af576120af612f5a565b602090810291909101015292915050565b6001600160a01b0384163b156110935760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906121049089908990889088908890600401613403565b6020604051808303816000875af192505050801561213f575060408051601f3d908101601f1916820190925261213c918101906132f9565b60015b61214b57611fa5613316565b6001600160e01b0319811663f23a6e6160e01b14610e375760405162461bcd60e51b81526004016104ee906133bb565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156121b2575060009050600361225f565b8460ff16601b141580156121ca57508460ff16601c14155b156121db575060009050600461225f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561222f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166122585760006001925092505061225f565b9150600090505b94509492505050565b6000806001600160ff1b0383168161228560ff86901c601b612f86565b90506122938782888561217b565b935093505050935093915050565b6001600160a01b0385166123285760005b8351811015612326578281815181106122cd576122cd612f5a565b6020026020010151600360008684815181106122eb576122eb612f5a565b6020026020010151815260200190815260200160002060008282546123109190612f86565b9091555061231f90508161300f565b90506122b2565b505b6001600160a01b0384166110935760005b8351811015610e3757600084828151811061235657612356612f5a565b60200260200101519050600084838151811061237457612374612f5a565b60200260200101519050600060036000848152602001908152602001600020549050818110156123f75760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016104ee565b600092835260036020526040909220910390556124138161300f565b9050612339565b82805461242690612e09565b90600052602060002090601f016020900481019282612448576000855561248e565b82601f1061246157805160ff191683800117855561248e565b8280016001018555821561248e579182015b8281111561248e578251825591602001919060010190612473565b5061249a929150612512565b5090565b8280546124aa90612e09565b90600052602060002090601f0160209004810192826124cc576000855561248e565b82601f106124e55782800160ff1982351617855561248e565b8280016001018555821561248e579182015b8281111561248e5782358255916020019190600101906124f7565b5b8082111561249a5760008155600101612513565b80356001600160a01b038116811461253e57600080fd5b919050565b6000806040838503121561255657600080fd5b61255f83612527565b946020939093013593505050565b6001600160e01b031981168114610d1e57600080fd5b60006020828403121561259557600080fd5b81356113d28161256d565b60005b838110156125bb5781810151838201526020016125a3565b838111156119605750506000910152565b600081518084526125e48160208601602086016125a0565b601f01601f19169290920160200192915050565b6020815260006113d260208301846125cc565b60006020828403121561261d57600080fd5b5035919050565b6000806040838503121561263757600080fd5b8235915061264760208401612527565b90509250929050565b60008083601f84011261266257600080fd5b5081356001600160401b0381111561267957600080fd5b602083019150836020828501011115611d4f57600080fd5b60008083601f8401126126a357600080fd5b5081356001600160401b038111156126ba57600080fd5b6020830191508360208260051b8501011115611d4f57600080fd5b60008060008060008060008060008060a08b8d0312156126f457600080fd5b8a356001600160401b038082111561270b57600080fd5b6127178e838f01612650565b909c509a5060208d013591508082111561273057600080fd5b61273c8e838f01612691565b909a50985060408d013591508082111561275557600080fd5b6127618e838f01612691565b909850965060608d013591508082111561277a57600080fd5b6127868e838f01612691565b909650945060808d013591508082111561279f57600080fd5b506127ac8d828e01612691565b915080935050809150509295989b9194979a5092959850565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612800576128006127c5565b6040525050565b60006001600160401b03821115612820576128206127c5565b5060051b60200190565b600082601f83011261283b57600080fd5b8135602061284882612807565b60405161285582826127db565b83815260059390931b850182019282810191508684111561287557600080fd5b8286015b848110156128905780358352918301918301612879565b509695505050505050565b600082601f8301126128ac57600080fd5b81356001600160401b038111156128c5576128c56127c5565b6040516128dc601f8301601f1916602001826127db565b8181528460208386010111156128f157600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561292657600080fd5b61292f86612527565b945061293d60208701612527565b935060408601356001600160401b038082111561295957600080fd5b61296589838a0161282a565b9450606088013591508082111561297b57600080fd5b61298789838a0161282a565b9350608088013591508082111561299d57600080fd5b506129aa8882890161289b565b9150509295509295909350565b6000806000606084860312156129cc57600080fd5b6129d584612527565b95602085013595506040909401359392505050565b600080604083850312156129fd57600080fd5b82356001600160401b0380821115612a1457600080fd5b818501915085601f830112612a2857600080fd5b81356020612a3582612807565b604051612a4282826127db565b83815260059390931b8501820192828101915089841115612a6257600080fd5b948201945b83861015612a8757612a7886612527565b82529482019490820190612a67565b96505086013592505080821115612a9d57600080fd5b50612aaa8582860161282a565b9150509250929050565b600081518084526020808501945080840160005b83811015612ae457815187529582019590820190600101612ac8565b509495945050505050565b6020815260006113d26020830184612ab4565b600060208284031215612b1457600080fd5b81356001600160401b03811115612b2a57600080fd5b612b368482850161289b565b949350505050565b60008060008060808587031215612b5457600080fd5b84359350602085013592506040850135915060608501356001600160401b03811115612b7f57600080fd5b612b8b8782880161289b565b91505092959194509250565b60008060008060008060a08789031215612bb057600080fd5b8635955060208701359450604087013593506060870135925060808701356001600160401b03811115612be257600080fd5b612bee89828a01612650565b979a9699509497509295939492505050565b600060208284031215612c1257600080fd5b6113d282612527565b600080600060608486031215612c3057600080fd5b612c3984612527565b925060208401356001600160401b0380821115612c5557600080fd5b612c618783880161282a565b93506040860135915080821115612c7757600080fd5b50612c848682870161282a565b9150509250925092565b8015158114610d1e57600080fd5b60008060408385031215612caf57600080fd5b612cb883612527565b91506020830135612cc881612c8e565b809150509250929050565b600080600080600060608688031215612ceb57600080fd5b85356001600160401b0380821115612d0257600080fd5b612d0e89838a01612691565b9097509550602088013594506040880135915080821115612d2e57600080fd5b50612d3b88828901612691565b969995985093965092949392505050565b848152836020820152826040820152608060608201526000612d7160808301846125cc565b9695505050505050565b60008060408385031215612d8e57600080fd5b612d9783612527565b915061264760208401612527565b600080600080600060a08688031215612dbd57600080fd5b612dc686612527565b9450612dd460208701612527565b9350604086013592506060860135915060808601356001600160401b03811115612dfd57600080fd5b6129aa8882890161289b565b600181811c90821680612e1d57607f821691505b602082108103612e3d57634e487b7160e01b600052602260045260246000fd5b50919050565b600083516020612e5682858389016125a0565b845491840191600090600181811c9080831680612e7457607f831692505b8583108103612e9157634e487b7160e01b85526022600452602485fd5b808015612ea55760018114612eb657612ee3565b60ff19851688528388019550612ee3565b60008b81526020902060005b85811015612edb5781548a820152908401908801612ec2565b505083880195505b50939a9950505050505050505050565b60006001600160fb1b03831115612f0957600080fd5b8260051b8083863760009401938452509192915050565b6bffffffffffffffffffffffff198660601b1681526000612f4f612f48601484018789612ef3565b8486612ef3565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115612f9957612f99612f70565b500190565b6000816000190483118215151615612fb857612fb8612f70565b500290565b600060208284031215612fcf57600080fd5b81516113d281612c8e565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001820161302157613021612f70565b5060010190565b60208082526027908201527f6f70656e2077696e646f77206d757374206265206265666f726520636c6f73656040820152662077696e646f7760c81b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6040815260006131546040830185612ab4565b82810360208401526131668185612ab4565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0386811682528516602082015260a0604082018190526000906132c790830186612ab4565b82810360608401526132d98186612ab4565b905082810360808401526132ed81856125cc565b98975050505050505050565b60006020828403121561330b57600080fd5b81516113d28161256d565b600060033d111561332f5760046000803e5060005160e01c5b90565b600060443d10156133405790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561336f57505050505090565b82850191508151818111156133875750505050505090565b843d87010160208285010111156133a15750505050505090565b6133b0602082860101876127db565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612f4f908301846125cc56fea26469706673582212204040ce7b15c9aa7217e60140111a420ee71f35a8700b9559663a077e55e3e67264736f6c634300080e0033

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

00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000043ab765ee05075d78ad8aa79dcb1978ca307925800000000000000000000000019c30ad5ea4f7f9f36a8662b5fa2cbc09e55fded000000000000000000000000b76d77ccdc21179efb512c4cd41b7363e1d1789f00000000000000000000000000000000000000000000000000000000000000094765617220506f647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004504f4453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007697066733a2f2f00000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Gear Pods
Arg [1] : _symbol (string): PODS
Arg [2] : _baseUri (string): ipfs://
Arg [3] : _powAddress (address): 0x43Ab765ee05075d78AD8aa79dcb1978CA3079258
Arg [4] : _paymentReceiver (address): 0x19C30Ad5EA4f7f9F36A8662b5FA2Cbc09E55FDED
Arg [5] : _signer (address): 0xb76d77CcDc21179efB512c4cD41B7363e1D1789f

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 00000000000000000000000043ab765ee05075d78ad8aa79dcb1978ca3079258
Arg [4] : 00000000000000000000000019c30ad5ea4f7f9f36a8662b5fa2cbc09e55fded
Arg [5] : 000000000000000000000000b76d77ccdc21179efb512c4cd41b7363e1d1789f
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [7] : 4765617220506f64730000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [9] : 504f445300000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [11] : 697066733a2f2f00000000000000000000000000000000000000000000000000


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

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