ETH Price: $2,284.69 (-2.52%)

Contract

0x1aB9a6d13ea3C336F99E09CB41A2F79c10E1f43a
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040149867442022-06-18 19:42:40811 days ago1655581360IN
 Create: Basketball
0 ETH0.3331097680

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Basketball

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 1500 runs

Other Settings:
default evmVersion
File 1 of 20 : Basketball.sol
pragma solidity ^0.8.10;
// SPDX-License-Identifier: UNLICENSED

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "../roles/AccessRole.sol";

contract Basketball is IERC2981Upgradeable, ERC165StorageUpgradeable, OwnableUpgradeable, IERC1155MetadataURIUpgradeable, ERC1155Upgradeable
    , AccessRole, ReentrancyGuardUpgradeable {
    using StringsUpgradeable for uint256;
    using SafeMathUpgradeable for uint256;

    struct GameInfo {
        uint totalCount;
        uint claimedCount;
        bytes32 rootkey;
    }

    bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;

    // merkle tree root
    bytes32 public gcfRoot;
    bytes32 public communityRoot;

    string public name;
    string public symbol;

    //Token URI prefix
    string public tokenURIPrefix;

    /// @dev royalty percent of 2nd sale. ex: 1 = 1%.
    address public royalty;

    /// @dev royalty percent of 2nd sale. ex: 1 = 1%.
    uint256 public constant royaltyPercent = 5;

    /// @dev total mint supply
    uint256 public totalsupply;

    /// @dev total reserve supply
    uint256 public totalReservedSupply;

    /// @dev total reserve supply
    uint256 public totalThreePointSupply;

    /// @dev max mint supply
    uint256 public maxsupply;

    /// @dev max mint count per transaction
    uint256 public maxMintCount;

    /// @dev drop phase
    uint256 public dropPhase;

    ///@dev mint price
    uint256 public mintprice; 

    /// @dev reserve count mapping
    mapping(address => uint) public reserveCount;

    /// @dev mapping for game info
    mapping(uint => GameInfo) public gameInfo;

    /// @dev mapping for minted of GCF whiltelist minting
    mapping(address => bool) public mintedForGCF;

    /// @dev mapping for minted of community whiltelist minting
    mapping(address => bool) public mintedForCommunity;
    
    /// @dev mapping for minted of 3 point score
    mapping(address => mapping(uint => bool)) mintedForGame;

    ///@dev airdrop flag
    bool public isAirdroped;

    event claimedFromThreePoint(uint256 indexed gameId, address indexed beneficiary);

    /**
     * @dev Constructor Function
     * @param _name name of the token ex: Rarible
     * @param _symbol symbol of the token ex: RARI
     * @param _tokenURIPrefix token URI Prefix
    */
    function initialize(string memory _name, string memory _symbol, string memory _tokenURIPrefix, address _royalty, 
        bytes32 _gcfRoot, bytes32 _communityRoot) public initializer {
        ERC165StorageUpgradeable.__ERC165Storage_init();
        OwnableUpgradeable.__Ownable_init();
        ERC1155Upgradeable.__ERC1155_init(_tokenURIPrefix);
        ReentrancyGuardUpgradeable.__ReentrancyGuard_init();
        AccessRole.initialize();

        name = _name;
        symbol = _symbol;
        tokenURIPrefix = _tokenURIPrefix;
        royalty = _royalty;
        gcfRoot = _gcfRoot;
        communityRoot = _communityRoot;
        dropPhase = 0;
        totalsupply = 0;
        totalReservedSupply = 0;
        maxsupply = 20000;
        mintprice = 0.08 ether;
        maxMintCount = 3;
        isAirdroped = false;

        addAdmin(_msgSender());
        addMinter(_msgSender());
        _registerInterface(_INTERFACE_ID_ERC2981);
    }

    /**
     * @dev Creates a new token type and assings _initialSupply to minter
     * @param _beneficiary address where mint to
     * @param _id token Id
     * @param _supply mint supply
    */
    function safeMint(address _beneficiary, uint256 _id, uint256 _supply) internal {
        require(_supply != 0, "Supply should be positive");

        _mint(_beneficiary, _id, _supply, "");
    }

    /**
     * @dev burn token with id and value
     * @param _owner address where mint to
     * @param _id token Id which will burn
     * @param _value token count which will burn
    */
    function burn(address _owner, uint256 _id, uint256 _value) external {
        require(_owner == msg.sender || isApprovedForAll(_owner, msg.sender) == true, "Need operator approval for 3rd party burns.");

        _burn(_owner, _id, _value);
    }

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

    /**
     * @dev function which return token URI
     * @param _id token Id
     */
    function uri(uint256 _id) override(ERC1155Upgradeable, IERC1155MetadataURIUpgradeable) virtual public view returns (string memory) {
        return bytes(tokenURIPrefix).length > 0 ? string(abi.encodePacked(tokenURIPrefix, _id.toString())) : "";
    }

        /**
     * @dev reserve function for reserve mint.
     */
    function reserve(uint256 _count) external payable {
        require(dropPhase == 3, "not general minting period");
        require((totalsupply + totalReservedSupply + _count) <= maxsupply, "overflow maxsupply");
        require(_count <= maxMintCount, "too many count for one transaction");
        require(msg.value >= (mintprice * _count), "mintprice is not enough");
        reserveCount[msg.sender] += _count;
        totalReservedSupply += _count;
    }

    /**
     * @dev mint function.
     */
    function mint(uint256 _count, bytes32[] calldata _merkleProof) external payable nonReentrant {
        require(dropPhase > 0, "not the drop period");
        require(_count <= maxMintCount, "too many count for one transaction");

        if(dropPhase == 1) {
            require(maxsupply >= (totalsupply + totalReservedSupply + _count), "overflow maxsupply");
            require(mintedForGCF[msg.sender] == false, "have already minted to this address");
            bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _count));
            require(MerkleProofUpgradeable.verify(_merkleProof, gcfRoot, leaf), "Invalid Proof");
            safeMint(msg.sender, 1, _count);
            mintedForGCF[msg.sender] = true;
            totalsupply+=_count;
        } else if(dropPhase == 2) {
            require(maxsupply >= (totalsupply + totalReservedSupply + _count), "overflow maxsupply");
            require(mintedForCommunity[msg.sender] == false, "have already minted to this address");
            require(msg.value >= (mintprice * _count), "mintprice is not enough");
            bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _count));
            require(MerkleProofUpgradeable.verify(_merkleProof, communityRoot, leaf), "Invalid Proof");
            safeMint(msg.sender, 1, _count);
            mintedForCommunity[msg.sender] = true;
            totalsupply+=_count;
        } else if(dropPhase == 3) {
            if(reserveCount[msg.sender] == 0) {
                require(maxsupply >= (totalsupply + totalReservedSupply + _count), "overflow maxsupply");
                require(msg.value >= (mintprice * _count), "mintprice is not enough");
            } else {
                require(maxsupply >= (totalsupply + totalReservedSupply), "overflow maxsupply");
                require(reserveCount[msg.sender] >= _count, "not enough reserved token");
            }

            safeMint(msg.sender, 1, _count);
            totalsupply += _count;
            
            if(reserveCount[msg.sender] >= _count) {
                reserveCount[msg.sender] -= _count;
                totalReservedSupply -= _count;
            }
        } else {}
    }

    function mintForAirdrop(uint256 _airdropCount) external onlyOwner {
        require(!isAirdroped, "have already airdropped");
        _mint(msg.sender, 1, _airdropCount, "");
        totalThreePointSupply = _airdropCount;
        isAirdroped = true;
    }

    function claimFromThreePoint(uint256 _gameId, bytes32[] calldata _merkleProof, address _beneficiary) public nonReentrant {
        require(gameInfo[_gameId].totalCount > gameInfo[_gameId].claimedCount, "have already minted all NFTs");
        require(mintedForGame[_beneficiary][_gameId] == false, "have already minted to this address");

        bytes32 leaf = keccak256(abi.encodePacked(_beneficiary));
        require(MerkleProofUpgradeable.verify(_merkleProof, gameInfo[_gameId].rootkey, leaf), "Invalid Proof");
        safeMint(_beneficiary, 1, 1);
        mintedForGame[_beneficiary][_gameId] = true;
        gameInfo[_gameId].claimedCount++;
        totalThreePointSupply++;
        emit claimedFromThreePoint(_gameId, _beneficiary);
    }

    function setDropPhase(uint256 _dropPhase) external onlyOwner {
        require(_dropPhase <= 3, "dropPhase shold be not greater than 3");
        dropPhase = _dropPhase;
    }

    function setMintPrice(uint256 _mintprice) external onlyOwner {
        require(_mintprice > 0, "mint price shold be not 0");
        mintprice = _mintprice;
    }

    function setMaxMintCount(uint256 _maxMintCount) external onlyOwner {
        require(_maxMintCount > 0, "max mint count should be not 0");
        maxMintCount = _maxMintCount;
    }

    /**
     * @dev set maxsupply function
     */
    function setMaxSupply(uint256 _maxsupply) external onlyAdmin {
        maxsupply = _maxsupply;
    }

    /**
     * @dev set gcfRoot function
     */
    function setGCFRoot(bytes32 _gcfRoot) external onlyAdmin {
        gcfRoot = _gcfRoot;
    }

    /**
     * @dev set communityRoot function
     */
    function setCommunityRoot(bytes32 _communityRoot) external onlyAdmin {
        communityRoot = _communityRoot;
    }

    /**
     * @dev set game root key
     */
    function setGameRootKey(uint256 _gameId, bytes32 _rootkey, uint _totalCount) external onlyAdmin {
        GameInfo memory ri;
        ri.rootkey = _rootkey;
        ri.totalCount = _totalCount;
        ri.claimedCount = 0;
        gameInfo[_gameId] = ri;
    }

    /**
     * @dev withdraw all ethers to owner.
     */
    function withdraw() public payable onlyOwner {
        address payable ownerAddress =  payable(msg.sender);
        ownerAddress.transfer(address(this).balance);
    }

    function royaltyInfo(uint256 , uint256 salePrice) external view override(IERC2981Upgradeable) returns (address receiver, uint256 royaltyAmount) {
        receiver = royalty;
        royaltyAmount = salePrice.mul(royaltyPercent).div(100);
    }

    function supportsInterface(bytes4 interfaceId) public view override(IERC165Upgradeable, ERC165StorageUpgradeable, ERC1155Upgradeable, AccessControlUpgradeable) returns (bool) {
        return
            interfaceId == type(IERC1155Upgradeable).interfaceId ||
            interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId ||
            interfaceId == type(IAccessControlUpgradeable).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 2 of 20 : AccessRole.sol
pragma solidity ^0.8.10;
// SPDX-License-Identifier: UNLICENSED

import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";

contract AccessRole is AccessControlUpgradeable {
    
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

    modifier onlyAdmin() {
        require(isAdmin(_msgSender()), "Ownable: caller is not the admin");
        _;
    }

    modifier onlyMinter() {
        require(isMinter(_msgSender()), "Ownable: caller is not the minter");
        _;
    }

    function initialize() public initializer {
        AccessControlUpgradeable.__AccessControl_init();
        
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    function addMinter(address _account) public onlyAdmin {
        _setupRole(MINTER_ROLE, _account);
    }

    function removeMinter(address _account) public onlyAdmin {
        revokeRole(MINTER_ROLE, _account);
    }

    function addAdmin(address _account) public onlyAdmin {
        _setupRole(DEFAULT_ADMIN_ROLE , _account);
    }

    function removeAdmin(address _account) public onlyAdmin {
        revokeRole(DEFAULT_ADMIN_ROLE , _account);
    }

    function isMinter(address _account) internal virtual view returns(bool) {
        return hasRole(MINTER_ROLE, _account);
    }

    function isAdmin(address _account) internal virtual view returns(bool) {
        return hasRole(DEFAULT_ADMIN_ROLE , _account);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

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

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

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

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

File 6 of 20 : ERC165StorageUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Storage based implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {
    function __ERC165Storage_init() internal onlyInitializing {
    }

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

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

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

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

File 7 of 20 : MerkleProofUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProofUpgradeable {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155Upgradeable.sol";

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must 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 20 : IERC1155ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: 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 IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

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

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

        return array;
    }

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

File 15 of 20 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

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

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

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

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

File 16 of 20 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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

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

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

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

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = _setInitializedVersion(1);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

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

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

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

    function _setInitializedVersion(uint8 version) private returns (bool) {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
        // of initializers, because in other contexts the contract may have been reentered.
        if (_initializing) {
            require(
                version == 1 && !AddressUpgradeable.isContract(address(this)),
                "Initializable: contract is already initialized"
            );
            return false;
        } else {
            require(_initialized < version, "Initializable: contract is already initialized");
            _initialized = version;
            return true;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev 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);
    }

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

File 19 of 20 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"gameId","type":"uint256"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"}],"name":"claimedFromThreePoint","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"claimFromThreePoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dropPhase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gameInfo","outputs":[{"internalType":"uint256","name":"totalCount","type":"uint256"},{"internalType":"uint256","name":"claimedCount","type":"uint256"},{"internalType":"bytes32","name":"rootkey","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gcfRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_tokenURIPrefix","type":"string"},{"internalType":"address","name":"_royalty","type":"address"},{"internalType":"bytes32","name":"_gcfRoot","type":"bytes32"},{"internalType":"bytes32","name":"_communityRoot","type":"bytes32"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isAirdroped","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":"maxMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxsupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_airdropCount","type":"uint256"}],"name":"mintForAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedForCommunity","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedForGCF","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintprice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_account","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reserveCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_communityRoot","type":"bytes32"}],"name":"setCommunityRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dropPhase","type":"uint256"}],"name":"setDropPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_gcfRoot","type":"bytes32"}],"name":"setGCFRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gameId","type":"uint256"},{"internalType":"bytes32","name":"_rootkey","type":"bytes32"},{"internalType":"uint256","name":"_totalCount","type":"uint256"}],"name":"setGameRootKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintCount","type":"uint256"}],"name":"setMaxMintCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxsupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintprice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReservedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalThreePointSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"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"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b50614a7a806100206000396000f3fe6080604052600436106103755760003560e01c8063894a5aef116101d1578063cb689f4311610102578063e985e9c5116100a0578063f2fde38b1161006f578063f2fde38b14610a9e578063f4a0a52814610abe578063f5298aca14610ade578063fc4c811814610afe57600080fd5b8063e985e9c5146109e4578063f1721d9e14610a2d578063f17f54a514610a5e578063f242432a14610a7e57600080fd5b8063d8028c4b116100dc578063d8028c4b1461095b578063dfbda40a14610989578063e5988b54146109a9578063e88a2ae2146109c457600080fd5b8063cb689f43146108e7578063d539139314610907578063d547741f1461093b57600080fd5b80639c76b14b1161016f578063a22cb46511610149578063a22cb46514610847578063a6f8166814610867578063ba41b0c6146108bf578063c0ac9983146108d257600080fd5b80639c76b14b146107fd5780639f67756d1461081d578063a217fddf1461083257600080fd5b806391d14854116101ab57806391d148541461076b57806395d89b41146107b1578063983b2d56146107c65780639a667031146107e657600080fd5b8063894a5aef146107165780638d28b00e1461072d5780638da5cb5b1461074d57600080fd5b80633ccfd60b116102ab578063704802751161024957806374cc36421161022357806374cc3642146106b75780638129fc1c146106d7578063819b25ba146106ec57806388eab676146106ff57600080fd5b8063704802751461066b578063715018a61461068b57806372dd529b146106a057600080fd5b806357e984fe1161028557806357e984fe146105fd57806358caac5c1461061d578063674d13c8146106345780636f8b44b01461064b57600080fd5b80633ccfd60b146105b15780634b6406d1146105b95780634e1273f4146105d057600080fd5b806329ee566c116103185780632f2ff15d116102f25780632f2ff15d1461053a5780633092afd51461055a57806332c60eef1461057a57806336568abe1461059157600080fd5b806329ee566c146104a25780632a55205a146104db5780632eb2c2d61461051a57600080fd5b80630aef459d116103545780630aef459d146103ff5780630e89341c146104305780631785f53c14610450578063248a9ca31461047257600080fd5b8062fdd58e1461037a57806301ffc9a7146103ad57806306fdde03146103dd575b600080fd5b34801561038657600080fd5b5061039a610395366004613e63565b610b15565b6040519081526020015b60405180910390f35b3480156103b957600080fd5b506103cd6103c8366004613ea3565b610bc0565b60405190151581526020016103a4565b3480156103e957600080fd5b506103f2610c21565b6040516103a49190613f1c565b34801561040b57600080fd5b506103cd61041a366004613f2f565b61016e6020526000908152604090205460ff1681565b34801561043c57600080fd5b506103f261044b366004613f4a565b610cb0565b34801561045c57600080fd5b5061047061046b366004613f2f565b610d10565b005b34801561047e57600080fd5b5061039a61048d366004613f4a565b600090815260fb602052604090206001015490565b3480156104ae57600080fd5b50610164546104c3906001600160a01b031681565b6040516001600160a01b0390911681526020016103a4565b3480156104e757600080fd5b506104fb6104f6366004613f63565b610d73565b604080516001600160a01b0390931683526020830191909152016103a4565b34801561052657600080fd5b506104706105353660046140d1565b610da1565b34801561054657600080fd5b5061047061055536600461417b565b610e43565b34801561056657600080fd5b50610470610575366004613f2f565b610e6d565b34801561058657600080fd5b5061039a6101695481565b34801561059d57600080fd5b506104706105ac36600461417b565b610eec565b610470610f78565b3480156105c557600080fd5b5061039a6101685481565b3480156105dc57600080fd5b506105f06105eb36600461419e565b611000565b6040516103a491906142a4565b34801561060957600080fd5b50610470610618366004613f4a565b61113e565b34801561062957600080fd5b5061039a61015f5481565b34801561064057600080fd5b5061039a6101665481565b34801561065757600080fd5b50610470610666366004613f4a565b611199565b34801561067757600080fd5b50610470610686366004613f2f565b6111f4565b34801561069757600080fd5b50610470611254565b3480156106ac57600080fd5b5061039a6101655481565b3480156106c357600080fd5b506104706106d2366004614303565b6112ba565b3480156106e357600080fd5b5061047061156d565b6104706106fa366004613f4a565b6115ec565b34801561070b57600080fd5b5061039a61016b5481565b34801561072257600080fd5b5061039a6101605481565b34801561073957600080fd5b50610470610748366004614361565b6117a1565b34801561075957600080fd5b506097546001600160a01b03166104c3565b34801561077757600080fd5b506103cd61078636600461417b565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156107bd57600080fd5b506103f2611831565b3480156107d257600080fd5b506104706107e1366004613f2f565b61183f565b3480156107f257600080fd5b5061039a6101675481565b34801561080957600080fd5b50610470610818366004613f4a565b6118be565b34801561082957600080fd5b5061039a600581565b34801561083e57600080fd5b5061039a600081565b34801561085357600080fd5b5061047061086236600461438d565b611919565b34801561087357600080fd5b506108a4610882366004613f4a565b61016d6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016103a4565b6104706108cd3660046143c9565b611924565b3480156108de57600080fd5b506103f2612065565b3480156108f357600080fd5b50610470610902366004613f4a565b612073565b34801561091357600080fd5b5061039a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561094757600080fd5b5061047061095636600461417b565b612151565b34801561096757600080fd5b5061039a610976366004613f2f565b61016c6020526000908152604090205481565b34801561099557600080fd5b506104706109a4366004613f4a565b612176565b3480156109b557600080fd5b50610171546103cd9060ff1681565b3480156109d057600080fd5b506104706109df366004614415565b61224d565b3480156109f057600080fd5b506103cd6109ff3660046144c0565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b348015610a3957600080fd5b506103cd610a48366004613f2f565b61016f6020526000908152604090205460ff1681565b348015610a6a57600080fd5b50610470610a79366004613f4a565b6123c5565b348015610a8a57600080fd5b50610470610a993660046144ea565b612475565b348015610aaa57600080fd5b50610470610ab9366004613f2f565b612510565b348015610aca57600080fd5b50610470610ad9366004613f4a565b6125ef565b348015610aea57600080fd5b50610470610af936600461454f565b61269f565b348015610b0a57600080fd5b5061039a61016a5481565b60006001600160a01b038316610b985760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600090815260c9602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b1480610bf157506001600160e01b031982166303a24d0760e21b145b80610c0c57506001600160e01b03198216637965db0b60e01b145b80610c1b5750610c1b8261275b565b92915050565b6101618054610c2f90614582565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5b90614582565b8015610ca85780601f10610c7d57610100808354040283529160200191610ca8565b820191906000526020600020905b815481529060010190602001808311610c8b57829003601f168201915b505050505081565b606060006101638054610cc290614582565b905011610cde5760405180602001604052806000815250610c1b565b610163610cea83612780565b604051602001610cfb9291906145bc565b60405160208183030381529060405292915050565b610d1933612889565b610d655760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d70600082612151565b50565b610164546001600160a01b03166000610d986064610d928560056128c9565b906128dc565b90509250929050565b6001600160a01b038516331480610dbd5750610dbd85336109ff565b610e2f5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610b8f565b610e3c85858585856128e8565b5050505050565b600082815260fb6020526040902060010154610e5e81612b71565b610e688383612b7b565b505050565b610e7633612889565b610ec25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d707f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682612151565b6001600160a01b0381163314610f6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b8f565b610f748282612c1d565b5050565b6097546001600160a01b03163314610fd25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b604051339081904780156108fc02916000818181858888f19350505050158015610f74573d6000803e3d6000fd5b606081518351146110795760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610b8f565b6000835167ffffffffffffffff81111561109557611095613f85565b6040519080825280602002602001820160405280156110be578160200160208202803683370190505b50905060005b8451811015611136576111098582815181106110e2576110e2614643565b60200260200101518583815181106110fc576110fc614643565b6020026020010151610b15565b82828151811061111b5761111b614643565b602090810291909101015261112f8161466f565b90506110c4565b509392505050565b61114733612889565b6111935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b61015f55565b6111a233612889565b6111ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b61016855565b6111fd33612889565b6112495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d70600082612ca0565b6097546001600160a01b031633146112ae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6112b86000612caa565b565b600261012d540361130d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b8f565b600261012d55600084815261016d6020526040902060018101549054116113765760405162461bcd60e51b815260206004820152601c60248201527f6861766520616c7265616479206d696e74656420616c6c204e465473000000006044820152606401610b8f565b6001600160a01b03811660009081526101706020908152604080832087845290915290205460ff16156113f75760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610b8f565b6040516bffffffffffffffffffffffff19606083901b16602082015260009060340160405160208183030381529060405280519060200120905061148084848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a815261016d60205260409020600201549250859150612d149050565b6114bc5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610b8f565b6114c882600180612d2a565b6001600160a01b0382166000908152610170602090815260408083208884528252808320805460ff1916600190811790915561016d90925282200180549161150f8361466f565b909155505061016780549060006115258361466f565b90915550506040516001600160a01b0383169086907f874ce4476621a88a8358c99e2aebd2e177158190da82d6e9e1eaba6188c0e59590600090a35050600161012d55505050565b60006115796001612d95565b90508015611591576000805461ff0019166101001790555b611599612ece565b6115a4600033612ca0565b8015610d70576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61016a5460031461163f5760405162461bcd60e51b815260206004820152601a60248201527f6e6f742067656e6572616c206d696e74696e6720706572696f640000000000006044820152606401610b8f565b610168548161016654610165546116569190614688565b6116609190614688565b11156116a35760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b610169548111156117015760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610b8f565b8061016b5461171091906146a0565b34101561175f5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610b8f565b33600090815261016c60205260408120805483929061177f908490614688565b925050819055508061016660008282546117999190614688565b909155505050565b6117aa33612889565b6117f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b604080516060810182526000602080830182815283850196875294835295815261016d90955293209251835551600183015551600290910155565b6101628054610c2f90614582565b61184833612889565b6118945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d707f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682612ca0565b6118c733612889565b6119135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b61016055565b610f74338383612f39565b600261012d54036119775760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b8f565b600261012d5561016a546119cd5760405162461bcd60e51b815260206004820152601360248201527f6e6f74207468652064726f7020706572696f64000000000000000000000000006044820152606401610b8f565b61016954831115611a2b5760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610b8f565b61016a54600103611c0b57826101665461016554611a499190614688565b611a539190614688565b610168541015611a9a5760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b33600090815261016e602052604090205460ff1615611b075760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610b8f565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050611b898383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505061015f549150849050612d14565b611bc55760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610b8f565b611bd133600186612d2a565b33600090815261016e60205260408120805460ff191660011790556101658054869290611bff908490614688565b9091555061205a915050565b61016a54600203611e3d57826101665461016554611c299190614688565b611c339190614688565b610168541015611c7a5760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b33600090815261016f602052604090205460ff1615611ce75760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610b8f565b8261016b54611cf691906146a0565b341015611d455760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610b8f565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050611dc783838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610160549150849050612d14565b611e035760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610b8f565b611e0f33600186612d2a565b33600090815261016f60205260408120805460ff191660011790556101658054869290611bff908490614688565b61016a5460030361205a5733600090815261016c60205260408120549003611f2657826101665461016554611e729190614688565b611e7c9190614688565b610168541015611ec35760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b8261016b54611ed291906146a0565b341015611f215760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610b8f565b611fdf565b6101665461016554611f389190614688565b610168541015611f7f5760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b33600090815261016c6020526040902054831115611fdf5760405162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820726573657276656420746f6b656e000000000000006044820152606401610b8f565b611feb33600185612d2a565b826101656000828254611ffe9190614688565b909155505033600090815261016c6020526040902054831161205a5733600090815261016c60205260408120805485929061203a9084906146bf565b9250508190555082610166600082825461205491906146bf565b90915550505b5050600161012d5550565b6101638054610c2f90614582565b6097546001600160a01b031633146120cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6101715460ff16156121215760405162461bcd60e51b815260206004820152601760248201527f6861766520616c72656164792061697264726f707065640000000000000000006044820152606401610b8f565b61213d336001836040518060200160405280600081525061302d565b61016755610171805460ff19166001179055565b600082815260fb602052604090206001015461216c81612b71565b610e688383612c1d565b6097546001600160a01b031633146121d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b60038111156122475760405162461bcd60e51b815260206004820152602560248201527f64726f7050686173652073686f6c64206265206e6f742067726561746572207460448201527f68616e20330000000000000000000000000000000000000000000000000000006064820152608401610b8f565b61016a55565b60006122596001612d95565b90508015612271576000805461ff0019166101001790555b612279612ece565b612281613156565b61228a856131c9565b61229261323d565b61229a61156d565b6101616122a7888261471c565b506101626122b5878261471c565b506101636122c3868261471c565b5061016480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861617905561015f839055610160829055600061016a81905561016581905561016655614e206101685567011c37937e08000061016b55600361016955610171805460ff19169055612344336111f4565b61234d3361183f565b6123767f2a55205a000000000000000000000000000000000000000000000000000000006132b0565b80156123bc576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6097546001600160a01b0316331461241f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6000811161246f5760405162461bcd60e51b815260206004820152601e60248201527f6d6178206d696e7420636f756e742073686f756c64206265206e6f74203000006044820152606401610b8f565b61016955565b6001600160a01b038516331480612491575061249185336109ff565b6125035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610b8f565b610e3c858585858561332f565b6097546001600160a01b0316331461256a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6001600160a01b0381166125e65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b8f565b610d7081612caa565b6097546001600160a01b031633146126495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b600081116126995760405162461bcd60e51b815260206004820152601960248201527f6d696e742070726963652073686f6c64206265206e6f742030000000000000006044820152606401610b8f565b61016b55565b6001600160a01b0383163314806126de57506001600160a01b038316600090815260ca6020908152604080832033845290915290205460ff1615156001145b6127505760405162461bcd60e51b815260206004820152602b60248201527f4e656564206f70657261746f7220617070726f76616c20666f7220337264207060448201527f61727479206275726e732e0000000000000000000000000000000000000000006064820152608401610b8f565b610e688383836134f1565b60006001600160e01b03198216637965db0b60e01b1480610c1b5750610c1b82613689565b6060816000036127a75750506040805180820190915260018152600360fc1b602082015290565b8160005b81156127d157806127bb8161466f565b91506127ca9050600a836147f2565b91506127ab565b60008167ffffffffffffffff8111156127ec576127ec613f85565b6040519080825280601f01601f191660200182016040528015612816576020820181803683370190505b5090505b84156128815761282b6001836146bf565b9150612838600a86614806565b612843906030614688565b60f81b81838151811061285857612858614643565b60200101906001600160f81b031916908160001a90535061287a600a866147f2565b945061281a565b949350505050565b6001600160a01b03811660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604081205460ff16610c1b565b60006128d582846146a0565b9392505050565b60006128d582846147f2565b815183511461295f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610b8f565b6001600160a01b0384166129c35760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b8f565b3360005b8451811015612b035760008582815181106129e4576129e4614643565b602002602001015190506000858381518110612a0257612a02614643565b602090810291909101810151600084815260c9835260408082206001600160a01b038e168352909352919091205490915081811015612aa95760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610b8f565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612ae8908490614688565b9250508190555050505080612afc9061466f565b90506129c7565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612b5392919061481a565b60405180910390a4612b698187878787876136c9565b505050505050565b610d708133613883565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff16610f7457600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612bd93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff1615610f7457600082815260fb602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610f748282612b7b565b609780546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082612d218584613903565b14949350505050565b80600003612d7a5760405162461bcd60e51b815260206004820152601960248201527f537570706c792073686f756c6420626520706f736974697665000000000000006044820152606401610b8f565b610e688383836040518060200160405280600081525061302d565b60008054610100900460ff1615612e32578160ff166001148015612db85750303b155b612e2a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b8f565b506000919050565b60005460ff808416911610612eaf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b8f565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166112b85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b816001600160a01b0316836001600160a01b031603612fc05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610b8f565b6001600160a01b03838116600081815260ca6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166130a95760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610b8f565b3360006130b58561396f565b905060006130c28561396f565b9050600086815260c9602090815260408083206001600160a01b038b168452909152812080548792906130f6908490614688565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46123bc836000898989896139ba565b600054610100900460ff166131c15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b6112b8613acb565b600054610100900460ff166132345760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b610d7081613b3f565b600054610100900460ff166132a85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b6112b8613bb3565b6001600160e01b0319808216900361330a5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610b8f565b6001600160e01b0319166000908152606560205260409020805460ff19166001179055565b6001600160a01b0384166133935760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b8f565b33600061339f8561396f565b905060006133ac8561396f565b9050600086815260c9602090815260408083206001600160a01b038c168452909152902054858110156134475760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610b8f565b600087815260c9602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613486908490614688565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46134e6848a8a8a8a8a6139ba565b505050505050505050565b6001600160a01b0383166135535760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610b8f565b33600061355f8461396f565b9050600061356c8461396f565b604080516020808201835260009182905288825260c981528282206001600160a01b038b168352905220549091508481101561360f5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610b8f565b600086815260c9602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526123bc565b60006001600160e01b03198216636cdb3d1360e11b14806136ba57506001600160e01b031982166303a24d0760e21b145b80610c1b5750610c1b82613c26565b6001600160a01b0384163b15612b695760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061370d9089908990889088908890600401614848565b6020604051808303816000875af1925050508015613748575060408051601f3d908101601f19168201909252613745918101906148a6565b60015b6137fd576137546148c3565b806308c379a00361378d57506137686148df565b80613773575061378f565b8060405162461bcd60e51b8152600401610b8f9190613f1c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610b8f565b6001600160e01b0319811663bc197c8160e01b146123bc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610b8f565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff16610f74576138c1816001600160a01b03166014613c7b565b6138cc836020613c7b565b6040516020016138dd929190614969565b60408051601f198184030181529082905262461bcd60e51b8252610b8f91600401613f1c565b600081815b845181101561113657600085828151811061392557613925614643565b6020026020010151905080831161394b576000838152602082905260409020925061395c565b600081815260208490526040902092505b50806139678161466f565b915050613908565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106139a9576139a9614643565b602090810291909101015292915050565b6001600160a01b0384163b15612b695760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906139fe90899089908890889088906004016149ea565b6020604051808303816000875af1925050508015613a39575060408051601f3d908101601f19168201909252613a36918101906148a6565b60015b613a45576137546148c3565b6001600160e01b0319811663f23a6e6160e01b146123bc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610b8f565b600054610100900460ff16613b365760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b6112b833612caa565b600054610100900460ff16613baa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b610d7081613e40565b600054610100900460ff16613c1e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b600161012d55565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610c1b5750506001600160e01b03191660009081526065602052604090205460ff1690565b60606000613c8a8360026146a0565b613c95906002614688565b67ffffffffffffffff811115613cad57613cad613f85565b6040519080825280601f01601f191660200182016040528015613cd7576020820181803683370190505b509050600360fc1b81600081518110613cf257613cf2614643565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613d3d57613d3d614643565b60200101906001600160f81b031916908160001a9053506000613d618460026146a0565b613d6c906001614688565b90505b6001811115613df1577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613dad57613dad614643565b1a60f81b828281518110613dc357613dc3614643565b60200101906001600160f81b031916908160001a90535060049490941c93613dea81614a2d565b9050613d6f565b5083156128d55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b8f565b60cb610f74828261471c565b80356001600160a01b0381168114612ec957600080fd5b60008060408385031215613e7657600080fd5b613e7f83613e4c565b946020939093013593505050565b6001600160e01b031981168114610d7057600080fd5b600060208284031215613eb557600080fd5b81356128d581613e8d565b60005b83811015613edb578181015183820152602001613ec3565b83811115613eea576000848401525b50505050565b60008151808452613f08816020860160208601613ec0565b601f01601f19169290920160200192915050565b6020815260006128d56020830184613ef0565b600060208284031215613f4157600080fd5b6128d582613e4c565b600060208284031215613f5c57600080fd5b5035919050565b60008060408385031215613f7657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613fc157613fc1613f85565b6040525050565b600067ffffffffffffffff821115613fe257613fe2613f85565b5060051b60200190565b600082601f830112613ffd57600080fd5b8135602061400a82613fc8565b6040516140178282613f9b565b83815260059390931b850182019282810191508684111561403757600080fd5b8286015b84811015614052578035835291830191830161403b565b509695505050505050565b600082601f83011261406e57600080fd5b813567ffffffffffffffff81111561408857614088613f85565b60405161409f601f8301601f191660200182613f9b565b8181528460208386010111156140b457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156140e957600080fd5b6140f286613e4c565b945061410060208701613e4c565b9350604086013567ffffffffffffffff8082111561411d57600080fd5b61412989838a01613fec565b9450606088013591508082111561413f57600080fd5b61414b89838a01613fec565b9350608088013591508082111561416157600080fd5b5061416e8882890161405d565b9150509295509295909350565b6000806040838503121561418e57600080fd5b82359150610d9860208401613e4c565b600080604083850312156141b157600080fd5b823567ffffffffffffffff808211156141c957600080fd5b818501915085601f8301126141dd57600080fd5b813560206141ea82613fc8565b6040516141f78282613f9b565b83815260059390931b850182019282810191508984111561421757600080fd5b948201945b8386101561423c5761422d86613e4c565b8252948201949082019061421c565b9650508601359250508082111561425257600080fd5b5061425f85828601613fec565b9150509250929050565b600081518084526020808501945080840160005b838110156142995781518752958201959082019060010161427d565b509495945050505050565b6020815260006128d56020830184614269565b60008083601f8401126142c957600080fd5b50813567ffffffffffffffff8111156142e157600080fd5b6020830191508360208260051b85010111156142fc57600080fd5b9250929050565b6000806000806060858703121561431957600080fd5b84359350602085013567ffffffffffffffff81111561433757600080fd5b614343878288016142b7565b9094509250614356905060408601613e4c565b905092959194509250565b60008060006060848603121561437657600080fd5b505081359360208301359350604090920135919050565b600080604083850312156143a057600080fd5b6143a983613e4c565b9150602083013580151581146143be57600080fd5b809150509250929050565b6000806000604084860312156143de57600080fd5b83359250602084013567ffffffffffffffff8111156143fc57600080fd5b614408868287016142b7565b9497909650939450505050565b60008060008060008060c0878903121561442e57600080fd5b863567ffffffffffffffff8082111561444657600080fd5b6144528a838b0161405d565b9750602089013591508082111561446857600080fd5b6144748a838b0161405d565b9650604089013591508082111561448a57600080fd5b5061449789828a0161405d565b9450506144a660608801613e4c565b92506080870135915060a087013590509295509295509295565b600080604083850312156144d357600080fd5b6144dc83613e4c565b9150610d9860208401613e4c565b600080600080600060a0868803121561450257600080fd5b61450b86613e4c565b945061451960208701613e4c565b93506040860135925060608601359150608086013567ffffffffffffffff81111561454357600080fd5b61416e8882890161405d565b60008060006060848603121561456457600080fd5b61456d84613e4c565b95602085013595506040909401359392505050565b600181811c9082168061459657607f821691505b6020821081036145b657634e487b7160e01b600052602260045260246000fd5b50919050565b60008084546145ca81614582565b600182811680156145e257600181146145f757614626565b60ff1984168752821515830287019450614626565b8860005260208060002060005b8581101561461d5781548a820152908401908201614604565b50505082870194505b50505050835161463a818360208801613ec0565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161468157614681614659565b5060010190565b6000821982111561469b5761469b614659565b500190565b60008160001904831182151516156146ba576146ba614659565b500290565b6000828210156146d1576146d1614659565b500390565b601f821115610e6857600081815260208120601f850160051c810160208610156146fd5750805b601f850160051c820191505b81811015612b6957828155600101614709565b815167ffffffffffffffff81111561473657614736613f85565b61474a816147448454614582565b846146d6565b602080601f83116001811461477f57600084156147675750858301515b600019600386901b1c1916600185901b178555612b69565b600085815260208120601f198616915b828110156147ae5788860151825594840194600190910190840161478f565b50858210156147cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601260045260246000fd5b600082614801576148016147dc565b500490565b600082614815576148156147dc565b500690565b60408152600061482d6040830185614269565b828103602084015261483f8185614269565b95945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261487460a0830186614269565b82810360608401526148868186614269565b9050828103608084015261489a8185613ef0565b98975050505050505050565b6000602082840312156148b857600080fd5b81516128d581613e8d565b600060033d11156148dc5760046000803e5060005160e01c5b90565b600060443d10156148ed5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561491d57505050505090565b82850191508151818111156149355750505050505090565b843d870101602082850101111561494f5750505050505090565b61495e60208286010187613f9b565b509095945050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516149a1816017850160208801613ec0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516149de816028840160208801613ec0565b01602801949350505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152614a2260a0830184613ef0565b979650505050505050565b600081614a3c57614a3c614659565b50600019019056fea264697066735822122015fb0ec7617a9df637a1846d1b22a766be0aea229d3c76c36f35c5b2b8dc71f164736f6c634300080f0033

Deployed Bytecode

0x6080604052600436106103755760003560e01c8063894a5aef116101d1578063cb689f4311610102578063e985e9c5116100a0578063f2fde38b1161006f578063f2fde38b14610a9e578063f4a0a52814610abe578063f5298aca14610ade578063fc4c811814610afe57600080fd5b8063e985e9c5146109e4578063f1721d9e14610a2d578063f17f54a514610a5e578063f242432a14610a7e57600080fd5b8063d8028c4b116100dc578063d8028c4b1461095b578063dfbda40a14610989578063e5988b54146109a9578063e88a2ae2146109c457600080fd5b8063cb689f43146108e7578063d539139314610907578063d547741f1461093b57600080fd5b80639c76b14b1161016f578063a22cb46511610149578063a22cb46514610847578063a6f8166814610867578063ba41b0c6146108bf578063c0ac9983146108d257600080fd5b80639c76b14b146107fd5780639f67756d1461081d578063a217fddf1461083257600080fd5b806391d14854116101ab57806391d148541461076b57806395d89b41146107b1578063983b2d56146107c65780639a667031146107e657600080fd5b8063894a5aef146107165780638d28b00e1461072d5780638da5cb5b1461074d57600080fd5b80633ccfd60b116102ab578063704802751161024957806374cc36421161022357806374cc3642146106b75780638129fc1c146106d7578063819b25ba146106ec57806388eab676146106ff57600080fd5b8063704802751461066b578063715018a61461068b57806372dd529b146106a057600080fd5b806357e984fe1161028557806357e984fe146105fd57806358caac5c1461061d578063674d13c8146106345780636f8b44b01461064b57600080fd5b80633ccfd60b146105b15780634b6406d1146105b95780634e1273f4146105d057600080fd5b806329ee566c116103185780632f2ff15d116102f25780632f2ff15d1461053a5780633092afd51461055a57806332c60eef1461057a57806336568abe1461059157600080fd5b806329ee566c146104a25780632a55205a146104db5780632eb2c2d61461051a57600080fd5b80630aef459d116103545780630aef459d146103ff5780630e89341c146104305780631785f53c14610450578063248a9ca31461047257600080fd5b8062fdd58e1461037a57806301ffc9a7146103ad57806306fdde03146103dd575b600080fd5b34801561038657600080fd5b5061039a610395366004613e63565b610b15565b6040519081526020015b60405180910390f35b3480156103b957600080fd5b506103cd6103c8366004613ea3565b610bc0565b60405190151581526020016103a4565b3480156103e957600080fd5b506103f2610c21565b6040516103a49190613f1c565b34801561040b57600080fd5b506103cd61041a366004613f2f565b61016e6020526000908152604090205460ff1681565b34801561043c57600080fd5b506103f261044b366004613f4a565b610cb0565b34801561045c57600080fd5b5061047061046b366004613f2f565b610d10565b005b34801561047e57600080fd5b5061039a61048d366004613f4a565b600090815260fb602052604090206001015490565b3480156104ae57600080fd5b50610164546104c3906001600160a01b031681565b6040516001600160a01b0390911681526020016103a4565b3480156104e757600080fd5b506104fb6104f6366004613f63565b610d73565b604080516001600160a01b0390931683526020830191909152016103a4565b34801561052657600080fd5b506104706105353660046140d1565b610da1565b34801561054657600080fd5b5061047061055536600461417b565b610e43565b34801561056657600080fd5b50610470610575366004613f2f565b610e6d565b34801561058657600080fd5b5061039a6101695481565b34801561059d57600080fd5b506104706105ac36600461417b565b610eec565b610470610f78565b3480156105c557600080fd5b5061039a6101685481565b3480156105dc57600080fd5b506105f06105eb36600461419e565b611000565b6040516103a491906142a4565b34801561060957600080fd5b50610470610618366004613f4a565b61113e565b34801561062957600080fd5b5061039a61015f5481565b34801561064057600080fd5b5061039a6101665481565b34801561065757600080fd5b50610470610666366004613f4a565b611199565b34801561067757600080fd5b50610470610686366004613f2f565b6111f4565b34801561069757600080fd5b50610470611254565b3480156106ac57600080fd5b5061039a6101655481565b3480156106c357600080fd5b506104706106d2366004614303565b6112ba565b3480156106e357600080fd5b5061047061156d565b6104706106fa366004613f4a565b6115ec565b34801561070b57600080fd5b5061039a61016b5481565b34801561072257600080fd5b5061039a6101605481565b34801561073957600080fd5b50610470610748366004614361565b6117a1565b34801561075957600080fd5b506097546001600160a01b03166104c3565b34801561077757600080fd5b506103cd61078636600461417b565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156107bd57600080fd5b506103f2611831565b3480156107d257600080fd5b506104706107e1366004613f2f565b61183f565b3480156107f257600080fd5b5061039a6101675481565b34801561080957600080fd5b50610470610818366004613f4a565b6118be565b34801561082957600080fd5b5061039a600581565b34801561083e57600080fd5b5061039a600081565b34801561085357600080fd5b5061047061086236600461438d565b611919565b34801561087357600080fd5b506108a4610882366004613f4a565b61016d6020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016103a4565b6104706108cd3660046143c9565b611924565b3480156108de57600080fd5b506103f2612065565b3480156108f357600080fd5b50610470610902366004613f4a565b612073565b34801561091357600080fd5b5061039a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561094757600080fd5b5061047061095636600461417b565b612151565b34801561096757600080fd5b5061039a610976366004613f2f565b61016c6020526000908152604090205481565b34801561099557600080fd5b506104706109a4366004613f4a565b612176565b3480156109b557600080fd5b50610171546103cd9060ff1681565b3480156109d057600080fd5b506104706109df366004614415565b61224d565b3480156109f057600080fd5b506103cd6109ff3660046144c0565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b348015610a3957600080fd5b506103cd610a48366004613f2f565b61016f6020526000908152604090205460ff1681565b348015610a6a57600080fd5b50610470610a79366004613f4a565b6123c5565b348015610a8a57600080fd5b50610470610a993660046144ea565b612475565b348015610aaa57600080fd5b50610470610ab9366004613f2f565b612510565b348015610aca57600080fd5b50610470610ad9366004613f4a565b6125ef565b348015610aea57600080fd5b50610470610af936600461454f565b61269f565b348015610b0a57600080fd5b5061039a61016a5481565b60006001600160a01b038316610b985760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600090815260c9602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b1480610bf157506001600160e01b031982166303a24d0760e21b145b80610c0c57506001600160e01b03198216637965db0b60e01b145b80610c1b5750610c1b8261275b565b92915050565b6101618054610c2f90614582565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5b90614582565b8015610ca85780601f10610c7d57610100808354040283529160200191610ca8565b820191906000526020600020905b815481529060010190602001808311610c8b57829003601f168201915b505050505081565b606060006101638054610cc290614582565b905011610cde5760405180602001604052806000815250610c1b565b610163610cea83612780565b604051602001610cfb9291906145bc565b60405160208183030381529060405292915050565b610d1933612889565b610d655760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d70600082612151565b50565b610164546001600160a01b03166000610d986064610d928560056128c9565b906128dc565b90509250929050565b6001600160a01b038516331480610dbd5750610dbd85336109ff565b610e2f5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610b8f565b610e3c85858585856128e8565b5050505050565b600082815260fb6020526040902060010154610e5e81612b71565b610e688383612b7b565b505050565b610e7633612889565b610ec25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d707f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682612151565b6001600160a01b0381163314610f6a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b8f565b610f748282612c1d565b5050565b6097546001600160a01b03163314610fd25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b604051339081904780156108fc02916000818181858888f19350505050158015610f74573d6000803e3d6000fd5b606081518351146110795760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610b8f565b6000835167ffffffffffffffff81111561109557611095613f85565b6040519080825280602002602001820160405280156110be578160200160208202803683370190505b50905060005b8451811015611136576111098582815181106110e2576110e2614643565b60200260200101518583815181106110fc576110fc614643565b6020026020010151610b15565b82828151811061111b5761111b614643565b602090810291909101015261112f8161466f565b90506110c4565b509392505050565b61114733612889565b6111935760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b61015f55565b6111a233612889565b6111ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b61016855565b6111fd33612889565b6112495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d70600082612ca0565b6097546001600160a01b031633146112ae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6112b86000612caa565b565b600261012d540361130d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b8f565b600261012d55600084815261016d6020526040902060018101549054116113765760405162461bcd60e51b815260206004820152601c60248201527f6861766520616c7265616479206d696e74656420616c6c204e465473000000006044820152606401610b8f565b6001600160a01b03811660009081526101706020908152604080832087845290915290205460ff16156113f75760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610b8f565b6040516bffffffffffffffffffffffff19606083901b16602082015260009060340160405160208183030381529060405280519060200120905061148084848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a815261016d60205260409020600201549250859150612d149050565b6114bc5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610b8f565b6114c882600180612d2a565b6001600160a01b0382166000908152610170602090815260408083208884528252808320805460ff1916600190811790915561016d90925282200180549161150f8361466f565b909155505061016780549060006115258361466f565b90915550506040516001600160a01b0383169086907f874ce4476621a88a8358c99e2aebd2e177158190da82d6e9e1eaba6188c0e59590600090a35050600161012d55505050565b60006115796001612d95565b90508015611591576000805461ff0019166101001790555b611599612ece565b6115a4600033612ca0565b8015610d70576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b61016a5460031461163f5760405162461bcd60e51b815260206004820152601a60248201527f6e6f742067656e6572616c206d696e74696e6720706572696f640000000000006044820152606401610b8f565b610168548161016654610165546116569190614688565b6116609190614688565b11156116a35760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b610169548111156117015760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610b8f565b8061016b5461171091906146a0565b34101561175f5760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610b8f565b33600090815261016c60205260408120805483929061177f908490614688565b925050819055508061016660008282546117999190614688565b909155505050565b6117aa33612889565b6117f65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b604080516060810182526000602080830182815283850196875294835295815261016d90955293209251835551600183015551600290910155565b6101628054610c2f90614582565b61184833612889565b6118945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b610d707f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a682612ca0565b6118c733612889565b6119135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6044820152606401610b8f565b61016055565b610f74338383612f39565b600261012d54036119775760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b8f565b600261012d5561016a546119cd5760405162461bcd60e51b815260206004820152601360248201527f6e6f74207468652064726f7020706572696f64000000000000000000000000006044820152606401610b8f565b61016954831115611a2b5760405162461bcd60e51b815260206004820152602260248201527f746f6f206d616e7920636f756e7420666f72206f6e65207472616e736163746960448201526137b760f11b6064820152608401610b8f565b61016a54600103611c0b57826101665461016554611a499190614688565b611a539190614688565b610168541015611a9a5760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b33600090815261016e602052604090205460ff1615611b075760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610b8f565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050611b898383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505061015f549150849050612d14565b611bc55760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610b8f565b611bd133600186612d2a565b33600090815261016e60205260408120805460ff191660011790556101658054869290611bff908490614688565b9091555061205a915050565b61016a54600203611e3d57826101665461016554611c299190614688565b611c339190614688565b610168541015611c7a5760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b33600090815261016f602052604090205460ff1615611ce75760405162461bcd60e51b815260206004820152602360248201527f6861766520616c7265616479206d696e74656420746f2074686973206164647260448201526265737360e81b6064820152608401610b8f565b8261016b54611cf691906146a0565b341015611d455760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610b8f565b6040516bffffffffffffffffffffffff193360601b16602082015260348101849052600090605401604051602081830303815290604052805190602001209050611dc783838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610160549150849050612d14565b611e035760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210283937b7b360991b6044820152606401610b8f565b611e0f33600186612d2a565b33600090815261016f60205260408120805460ff191660011790556101658054869290611bff908490614688565b61016a5460030361205a5733600090815261016c60205260408120549003611f2657826101665461016554611e729190614688565b611e7c9190614688565b610168541015611ec35760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b8261016b54611ed291906146a0565b341015611f215760405162461bcd60e51b815260206004820152601760248201527f6d696e747072696365206973206e6f7420656e6f7567680000000000000000006044820152606401610b8f565b611fdf565b6101665461016554611f389190614688565b610168541015611f7f5760405162461bcd60e51b81526020600482015260126024820152716f766572666c6f77206d6178737570706c7960701b6044820152606401610b8f565b33600090815261016c6020526040902054831115611fdf5760405162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f75676820726573657276656420746f6b656e000000000000006044820152606401610b8f565b611feb33600185612d2a565b826101656000828254611ffe9190614688565b909155505033600090815261016c6020526040902054831161205a5733600090815261016c60205260408120805485929061203a9084906146bf565b9250508190555082610166600082825461205491906146bf565b90915550505b5050600161012d5550565b6101638054610c2f90614582565b6097546001600160a01b031633146120cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6101715460ff16156121215760405162461bcd60e51b815260206004820152601760248201527f6861766520616c72656164792061697264726f707065640000000000000000006044820152606401610b8f565b61213d336001836040518060200160405280600081525061302d565b61016755610171805460ff19166001179055565b600082815260fb602052604090206001015461216c81612b71565b610e688383612c1d565b6097546001600160a01b031633146121d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b60038111156122475760405162461bcd60e51b815260206004820152602560248201527f64726f7050686173652073686f6c64206265206e6f742067726561746572207460448201527f68616e20330000000000000000000000000000000000000000000000000000006064820152608401610b8f565b61016a55565b60006122596001612d95565b90508015612271576000805461ff0019166101001790555b612279612ece565b612281613156565b61228a856131c9565b61229261323d565b61229a61156d565b6101616122a7888261471c565b506101626122b5878261471c565b506101636122c3868261471c565b5061016480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861617905561015f839055610160829055600061016a81905561016581905561016655614e206101685567011c37937e08000061016b55600361016955610171805460ff19169055612344336111f4565b61234d3361183f565b6123767f2a55205a000000000000000000000000000000000000000000000000000000006132b0565b80156123bc576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b6097546001600160a01b0316331461241f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6000811161246f5760405162461bcd60e51b815260206004820152601e60248201527f6d6178206d696e7420636f756e742073686f756c64206265206e6f74203000006044820152606401610b8f565b61016955565b6001600160a01b038516331480612491575061249185336109ff565b6125035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610b8f565b610e3c858585858561332f565b6097546001600160a01b0316331461256a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b6001600160a01b0381166125e65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b8f565b610d7081612caa565b6097546001600160a01b031633146126495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b8f565b600081116126995760405162461bcd60e51b815260206004820152601960248201527f6d696e742070726963652073686f6c64206265206e6f742030000000000000006044820152606401610b8f565b61016b55565b6001600160a01b0383163314806126de57506001600160a01b038316600090815260ca6020908152604080832033845290915290205460ff1615156001145b6127505760405162461bcd60e51b815260206004820152602b60248201527f4e656564206f70657261746f7220617070726f76616c20666f7220337264207060448201527f61727479206275726e732e0000000000000000000000000000000000000000006064820152608401610b8f565b610e688383836134f1565b60006001600160e01b03198216637965db0b60e01b1480610c1b5750610c1b82613689565b6060816000036127a75750506040805180820190915260018152600360fc1b602082015290565b8160005b81156127d157806127bb8161466f565b91506127ca9050600a836147f2565b91506127ab565b60008167ffffffffffffffff8111156127ec576127ec613f85565b6040519080825280601f01601f191660200182016040528015612816576020820181803683370190505b5090505b84156128815761282b6001836146bf565b9150612838600a86614806565b612843906030614688565b60f81b81838151811061285857612858614643565b60200101906001600160f81b031916908160001a90535061287a600a866147f2565b945061281a565b949350505050565b6001600160a01b03811660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604081205460ff16610c1b565b60006128d582846146a0565b9392505050565b60006128d582846147f2565b815183511461295f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610b8f565b6001600160a01b0384166129c35760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b8f565b3360005b8451811015612b035760008582815181106129e4576129e4614643565b602002602001015190506000858381518110612a0257612a02614643565b602090810291909101810151600084815260c9835260408082206001600160a01b038e168352909352919091205490915081811015612aa95760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610b8f565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612ae8908490614688565b9250508190555050505080612afc9061466f565b90506129c7565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612b5392919061481a565b60405180910390a4612b698187878787876136c9565b505050505050565b610d708133613883565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff16610f7457600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612bd93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff1615610f7457600082815260fb602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610f748282612b7b565b609780546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082612d218584613903565b14949350505050565b80600003612d7a5760405162461bcd60e51b815260206004820152601960248201527f537570706c792073686f756c6420626520706f736974697665000000000000006044820152606401610b8f565b610e688383836040518060200160405280600081525061302d565b60008054610100900460ff1615612e32578160ff166001148015612db85750303b155b612e2a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b8f565b506000919050565b60005460ff808416911610612eaf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610b8f565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166112b85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b816001600160a01b0316836001600160a01b031603612fc05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610b8f565b6001600160a01b03838116600081815260ca6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166130a95760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610b8f565b3360006130b58561396f565b905060006130c28561396f565b9050600086815260c9602090815260408083206001600160a01b038b168452909152812080548792906130f6908490614688565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46123bc836000898989896139ba565b600054610100900460ff166131c15760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b6112b8613acb565b600054610100900460ff166132345760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b610d7081613b3f565b600054610100900460ff166132a85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b6112b8613bb3565b6001600160e01b0319808216900361330a5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610b8f565b6001600160e01b0319166000908152606560205260409020805460ff19166001179055565b6001600160a01b0384166133935760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b8f565b33600061339f8561396f565b905060006133ac8561396f565b9050600086815260c9602090815260408083206001600160a01b038c168452909152902054858110156134475760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610b8f565b600087815260c9602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613486908490614688565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46134e6848a8a8a8a8a6139ba565b505050505050505050565b6001600160a01b0383166135535760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610b8f565b33600061355f8461396f565b9050600061356c8461396f565b604080516020808201835260009182905288825260c981528282206001600160a01b038b168352905220549091508481101561360f5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610b8f565b600086815260c9602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526123bc565b60006001600160e01b03198216636cdb3d1360e11b14806136ba57506001600160e01b031982166303a24d0760e21b145b80610c1b5750610c1b82613c26565b6001600160a01b0384163b15612b695760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061370d9089908990889088908890600401614848565b6020604051808303816000875af1925050508015613748575060408051601f3d908101601f19168201909252613745918101906148a6565b60015b6137fd576137546148c3565b806308c379a00361378d57506137686148df565b80613773575061378f565b8060405162461bcd60e51b8152600401610b8f9190613f1c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610b8f565b6001600160e01b0319811663bc197c8160e01b146123bc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610b8f565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff16610f74576138c1816001600160a01b03166014613c7b565b6138cc836020613c7b565b6040516020016138dd929190614969565b60408051601f198184030181529082905262461bcd60e51b8252610b8f91600401613f1c565b600081815b845181101561113657600085828151811061392557613925614643565b6020026020010151905080831161394b576000838152602082905260409020925061395c565b600081815260208490526040902092505b50806139678161466f565b915050613908565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106139a9576139a9614643565b602090810291909101015292915050565b6001600160a01b0384163b15612b695760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906139fe90899089908890889088906004016149ea565b6020604051808303816000875af1925050508015613a39575060408051601f3d908101601f19168201909252613a36918101906148a6565b60015b613a45576137546148c3565b6001600160e01b0319811663f23a6e6160e01b146123bc5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610b8f565b600054610100900460ff16613b365760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b6112b833612caa565b600054610100900460ff16613baa5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b610d7081613e40565b600054610100900460ff16613c1e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610b8f565b600161012d55565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610c1b5750506001600160e01b03191660009081526065602052604090205460ff1690565b60606000613c8a8360026146a0565b613c95906002614688565b67ffffffffffffffff811115613cad57613cad613f85565b6040519080825280601f01601f191660200182016040528015613cd7576020820181803683370190505b509050600360fc1b81600081518110613cf257613cf2614643565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613d3d57613d3d614643565b60200101906001600160f81b031916908160001a9053506000613d618460026146a0565b613d6c906001614688565b90505b6001811115613df1577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613dad57613dad614643565b1a60f81b828281518110613dc357613dc3614643565b60200101906001600160f81b031916908160001a90535060049490941c93613dea81614a2d565b9050613d6f565b5083156128d55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b8f565b60cb610f74828261471c565b80356001600160a01b0381168114612ec957600080fd5b60008060408385031215613e7657600080fd5b613e7f83613e4c565b946020939093013593505050565b6001600160e01b031981168114610d7057600080fd5b600060208284031215613eb557600080fd5b81356128d581613e8d565b60005b83811015613edb578181015183820152602001613ec3565b83811115613eea576000848401525b50505050565b60008151808452613f08816020860160208601613ec0565b601f01601f19169290920160200192915050565b6020815260006128d56020830184613ef0565b600060208284031215613f4157600080fd5b6128d582613e4c565b600060208284031215613f5c57600080fd5b5035919050565b60008060408385031215613f7657600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613fc157613fc1613f85565b6040525050565b600067ffffffffffffffff821115613fe257613fe2613f85565b5060051b60200190565b600082601f830112613ffd57600080fd5b8135602061400a82613fc8565b6040516140178282613f9b565b83815260059390931b850182019282810191508684111561403757600080fd5b8286015b84811015614052578035835291830191830161403b565b509695505050505050565b600082601f83011261406e57600080fd5b813567ffffffffffffffff81111561408857614088613f85565b60405161409f601f8301601f191660200182613f9b565b8181528460208386010111156140b457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156140e957600080fd5b6140f286613e4c565b945061410060208701613e4c565b9350604086013567ffffffffffffffff8082111561411d57600080fd5b61412989838a01613fec565b9450606088013591508082111561413f57600080fd5b61414b89838a01613fec565b9350608088013591508082111561416157600080fd5b5061416e8882890161405d565b9150509295509295909350565b6000806040838503121561418e57600080fd5b82359150610d9860208401613e4c565b600080604083850312156141b157600080fd5b823567ffffffffffffffff808211156141c957600080fd5b818501915085601f8301126141dd57600080fd5b813560206141ea82613fc8565b6040516141f78282613f9b565b83815260059390931b850182019282810191508984111561421757600080fd5b948201945b8386101561423c5761422d86613e4c565b8252948201949082019061421c565b9650508601359250508082111561425257600080fd5b5061425f85828601613fec565b9150509250929050565b600081518084526020808501945080840160005b838110156142995781518752958201959082019060010161427d565b509495945050505050565b6020815260006128d56020830184614269565b60008083601f8401126142c957600080fd5b50813567ffffffffffffffff8111156142e157600080fd5b6020830191508360208260051b85010111156142fc57600080fd5b9250929050565b6000806000806060858703121561431957600080fd5b84359350602085013567ffffffffffffffff81111561433757600080fd5b614343878288016142b7565b9094509250614356905060408601613e4c565b905092959194509250565b60008060006060848603121561437657600080fd5b505081359360208301359350604090920135919050565b600080604083850312156143a057600080fd5b6143a983613e4c565b9150602083013580151581146143be57600080fd5b809150509250929050565b6000806000604084860312156143de57600080fd5b83359250602084013567ffffffffffffffff8111156143fc57600080fd5b614408868287016142b7565b9497909650939450505050565b60008060008060008060c0878903121561442e57600080fd5b863567ffffffffffffffff8082111561444657600080fd5b6144528a838b0161405d565b9750602089013591508082111561446857600080fd5b6144748a838b0161405d565b9650604089013591508082111561448a57600080fd5b5061449789828a0161405d565b9450506144a660608801613e4c565b92506080870135915060a087013590509295509295509295565b600080604083850312156144d357600080fd5b6144dc83613e4c565b9150610d9860208401613e4c565b600080600080600060a0868803121561450257600080fd5b61450b86613e4c565b945061451960208701613e4c565b93506040860135925060608601359150608086013567ffffffffffffffff81111561454357600080fd5b61416e8882890161405d565b60008060006060848603121561456457600080fd5b61456d84613e4c565b95602085013595506040909401359392505050565b600181811c9082168061459657607f821691505b6020821081036145b657634e487b7160e01b600052602260045260246000fd5b50919050565b60008084546145ca81614582565b600182811680156145e257600181146145f757614626565b60ff1984168752821515830287019450614626565b8860005260208060002060005b8581101561461d5781548a820152908401908201614604565b50505082870194505b50505050835161463a818360208801613ec0565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161468157614681614659565b5060010190565b6000821982111561469b5761469b614659565b500190565b60008160001904831182151516156146ba576146ba614659565b500290565b6000828210156146d1576146d1614659565b500390565b601f821115610e6857600081815260208120601f850160051c810160208610156146fd5750805b601f850160051c820191505b81811015612b6957828155600101614709565b815167ffffffffffffffff81111561473657614736613f85565b61474a816147448454614582565b846146d6565b602080601f83116001811461477f57600084156147675750858301515b600019600386901b1c1916600185901b178555612b69565b600085815260208120601f198616915b828110156147ae5788860151825594840194600190910190840161478f565b50858210156147cc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601260045260246000fd5b600082614801576148016147dc565b500490565b600082614815576148156147dc565b500690565b60408152600061482d6040830185614269565b828103602084015261483f8185614269565b95945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261487460a0830186614269565b82810360608401526148868186614269565b9050828103608084015261489a8185613ef0565b98975050505050505050565b6000602082840312156148b857600080fd5b81516128d581613e8d565b600060033d11156148dc5760046000803e5060005160e01c5b90565b600060443d10156148ed5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561491d57505050505090565b82850191508151818111156149355750505050505090565b843d870101602082850101111561494f5750505050505090565b61495e60208286010187613f9b565b509095945050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516149a1816017850160208801613ec0565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516149de816028840160208801613ec0565b01602801949350505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152614a2260a0830184613ef0565b979650505050505050565b600081614a3c57614a3c614659565b50600019019056fea264697066735822122015fb0ec7617a9df637a1846d1b22a766be0aea229d3c76c36f35c5b2b8dc71f164736f6c634300080f0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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