ERC-1155
Overview
Max Total Supply
100 GOG
Holders
42
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
GiftsOfGratitude
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // ____ _ _ _ _ // / ___|_ __ __ _| |_(_) |_ _ _ __| | ___ // | | _| '__/ _` | __| | __| | | |/ _` |/ _ \ // | |_| | | | (_| | |_| | |_| |_| | (_| | __/ // \____|_| \__,_|\__|_|\__|\__,_|\__,_|\___| // // A collection of 2,222 unique Non-Fungible Power SUNFLOWERS living in // the metaverse. Becoming a GRATITUDE GANG NFT owner introduces you to // a FAMILY of heart-centered, purpose-driven, service-oriented human // beings. // // https://www.gratitudegang.io/ // import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; // ============ Errors ============ error InvalidCall(); // ============ Interfaces ============ interface IERC20Burnable is IERC20 { /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. */ function burnFrom(address account, uint256 amount) external; } // ============ Contract ============ /** * @dev Gratitude store where members can buy other NFTs */ contract GiftsOfGratitude is Ownable, ReentrancyGuard, ERC1155Burnable, ERC1155Pausable, ERC1155Supply, AccessControl { using Strings for uint256; // ============ Structs ============ struct Token { uint256 maxSupply; uint256 ethPrice; uint256 gratisPrice; bool active; } // ============ Constants ============ bytes32 public constant FUNDER_ROLE = keccak256("FUNDER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant CURATOR_ROLE = keccak256("CURATOR_ROLE"); IERC20Burnable public immutable GRATIS; // ============ Storage ============ //a count of total items uint256 public totalTokens; //mapping of token id to token info (max, price) mapping(uint256 => Token) private _tokens; //the contract metadata string private _contractURI; // ============ Deploy ============ /** * @dev Sets the base token uri */ constructor( string memory contract_uri, string memory token_uri, IERC20Burnable gratis, address admin ) ERC1155(token_uri) { _contractURI = contract_uri; _setupRole(DEFAULT_ADMIN_ROLE, admin); _setupRole(PAUSER_ROLE, admin); GRATIS = gratis; } // ============ Read Methods ============ /** * @dev Returns the contract URI */ function contractURI() external view returns(string memory) { return _contractURI; } /** * @dev Returns true if the token exists */ function exists(uint256 id) public view override returns(bool) { return _tokens[id].active; } /** * @dev Get the maximum supply for a token */ function maxSupply(uint256 id) public view returns(uint256) { return _tokens[id].maxSupply; } /** * @dev Get the mint supply for a token */ function ethPrice(uint256 id) public view returns(uint256) { return _tokens[id].ethPrice; } /** * @dev Get the mint supply for a token */ function gratisPrice(uint256 id) public view returns(uint256) { return _tokens[id].gratisPrice; } /** * @dev Returns the name */ function name() external pure returns(string memory) { return "Gifts of Gratitude"; } /** * @dev Get the remaining supply for a token */ function remainingSupply(uint256 id) public view returns(uint256) { uint256 max = maxSupply(id); if (max == 0) revert InvalidCall(); return max - totalSupply(id); } /** * @dev Returns the symbol */ function symbol() external pure returns(string memory) { return "GOG"; } /** * @dev Returns the max and price for a token */ function tokenInfo(uint256 id) external view returns(uint256 max, uint256 eth, uint256 gratis, uint256 supply) { return ( _tokens[id].maxSupply, _tokens[id].ethPrice, _tokens[id].gratisPrice, totalSupply(id) ); } /** * @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 id) public view virtual override returns(string memory) { if (exists(id)) { return string(abi.encodePacked(super.uri(id), "/", id.toString(), ".json")); } return string(abi.encodePacked(super.uri(id), "/{id}.json")); } // ============ Write Methods ============ /** * @dev Allows anyone to mint by purchasing with eth */ function buy(address to, uint256 id, uint256 quantity) external payable nonReentrant { //get price uint256 price = ethPrice(id) * quantity; //if there is a price and the amount sent is less than if (price == 0 || msg.value < price) revert InvalidCall(); //we are okay to mint _mintSupply(to, id, quantity); } /** * @dev Allows anyone to redeem with a voucher (proof) */ function redeem( address to, uint256 id, uint256 quantity, bytes memory voucher ) external nonReentrant { //make sure the minter signed this off if (!hasRole(MINTER_ROLE, ECDSA.recover( ECDSA.toEthSignedMessageHash( keccak256(abi.encodePacked("redeem", to, id, quantity)) ), voucher ))) revert InvalidCall(); //we are okay to mint _mintSupply(to, id, quantity); } /** * @dev Allows anyone to mint by purchasing with eth */ function support(address to, uint256 id, uint256 quantity) external payable nonReentrant { //get price uint256 price = gratisPrice(id) * quantity; //if there is a price and the amount sent is less than if( price == 0) revert InvalidCall(); //burn it. muhahaha GRATIS.burnFrom(to, price); //we are okay to mint _mintSupply(to, id, quantity); } // ============ Admin Methods ============ /** * @dev Adds a token that can be minted */ function addToken(uint256 id, uint256 max, uint256 eth, uint256 gratis) external onlyRole(CURATOR_ROLE) { _tokens[id] = Token(max, eth, gratis, true); totalTokens++; } /** * @dev Allows admin to mint */ function mint(address to, uint256 id, uint256 quantity) external onlyRole(MINTER_ROLE) { _mintSupply(to, id, quantity); } /** * @dev Pauses all token transfers. */ function pause() public virtual onlyRole(PAUSER_ROLE) { _pause(); } /** * @dev Unpauses all token transfers. */ function unpause() public virtual onlyRole(PAUSER_ROLE) { _unpause(); } /** * @dev Allows admin to update URI */ function updateURI(string memory newuri) external onlyRole(CURATOR_ROLE) { _setURI(newuri); } /** * @dev Sends the entire contract balance to a `recipient`. */ function withdraw(address recipient) external nonReentrant onlyRole(FUNDER_ROLE) { Address.sendValue(payable(recipient), address(this).balance); } /** * @dev This contract should not hold any tokens in the first place. * This method exists to transfer out tokens funds. */ function withdraw(IERC20 erc20, address recipient, uint256 amount) external nonReentrant onlyRole(FUNDER_ROLE) { SafeERC20.safeTransfer(erc20, recipient, amount); } // ============ Internal Methods ============ /** * @dev Mint token considering max supply */ function _mintSupply(address to, uint256 id, uint256 quantity) internal { //if the id does not exists if (!exists(id)) revert InvalidCall(); //get max and calculated supply uint256 max = maxSupply(id); uint256 supply = totalSupply(id) + quantity; //if there is a max supply and it was exceeded if(max > 0 && supply > max) revert InvalidCall(); //we are okay to mint _mint(to, id, quantity, ""); } // ============ Overrides ============ /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC1155) returns(bool) { return super.supportsInterface(interfaceId); } /** * @dev Describes linear override for `_beforeTokenTransfer` used in * both `ERC721` and `ERC721Pausable` */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable, ERC1155Supply) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @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 { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view 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()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/ERC1155Pausable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC1155 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * _Available since v3.1._ */ abstract contract ERC1155Pausable is ERC1155, Pausable { /** * @dev See {ERC1155-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); require(!paused(), "ERC1155Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), 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); _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); _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(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _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); _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(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); 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); } /** * @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); } /** * @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 {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. 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. 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"contract_uri","type":"string"},{"internalType":"string","name":"token_uri","type":"string"},{"internalType":"contract IERC20Burnable","name":"gratis","type":"address"},{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"CURATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FUNDER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GRATIS","outputs":[{"internalType":"contract IERC20Burnable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"gratis","type":"uint256"}],"name":"addToken","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":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ethPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"id","type":"uint256"}],"name":"gratisPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes","name":"voucher","type":"bytes"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"remainingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"support","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenInfo","outputs":[{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"gratis","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokens","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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"updateURI","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":[{"internalType":"address","name":"recipient","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"erc20","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620040f7380380620040f7833981016040819052620000349162000361565b826200004033620000bf565b600180556200004f816200010f565b506005805460ff1916905583516200006f90600a906020870190620001d5565b506200007d60008262000128565b620000a97f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8262000128565b506001600160a01b031660805250620004329050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805162000124906004906020840190620001d5565b5050565b60008281526007602090815260408083206001600160a01b038516845290915290205462000124908390839060ff16620001245760008281526007602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001913390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620001e390620003f5565b90600052602060002090601f01602090048101928262000207576000855562000252565b82601f106200022257805160ff191683800117855562000252565b8280016001018555821562000252579182015b828111156200025257825182559160200191906001019062000235565b506200026092915062000264565b5090565b5b8082111562000260576000815560010162000265565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002a357600080fd5b81516001600160401b0380821115620002c057620002c06200027b565b604051601f8301601f19908116603f01168101908282118183101715620002eb57620002eb6200027b565b816040528381526020925086838588010111156200030857600080fd5b600091505b838210156200032c57858201830151818301840152908201906200030d565b838211156200033e5760008385830101525b9695505050505050565b6001600160a01b03811681146200035e57600080fd5b50565b600080600080608085870312156200037857600080fd5b84516001600160401b03808211156200039057600080fd5b6200039e8883890162000291565b95506020870151915080821115620003b557600080fd5b50620003c48782880162000291565b9350506040850151620003d78162000348565b6060860151909250620003ea8162000348565b939692955090935050565b600181811c908216806200040a57607f821691505b602082108114156200042c57634e487b7160e01b600052602260045260246000fd5b50919050565b608051613ca2620004556000396000818161054901526111150152613ca26000f3fe60806040526004361061027c5760003560e01c8063776414561161014f578063c30f4a5a116100c1578063e63ab1e91161007a578063e63ab1e91461086e578063e8a3d485146108a2578063e985e9c5146108b7578063f242432a14610900578063f2fde38b14610920578063f5298aca1461094057600080fd5b8063c30f4a5a1461076a578063cc33c8751461078a578063d5391393146107ca578063d547741f146107fe578063d620fb541461081e578063d9caed121461084e57600080fd5b806391d148541161011357806391d14854146106a957806395d89b41146106c9578063a217fddf146106f5578063a22cb4651461070a578063a59ac6dd1461072a578063bd85b0391461073d57600080fd5b806377641456146106205780637e1c0c09146106335780638456cb5914610649578063869f75941461065e5780638da5cb5b1461068b57600080fd5b80633cf3e664116101f3578063516fb458116101ac578063516fb4581461053757806351cff8d9146105835780635c975abb146105a35780636a06bf6e146105bb5780636b20c454146105eb578063715018a61461060b57600080fd5b80633cf3e6641461044e5780633f4ba83a1461046e57806347fda41a146104835780634a2cfb54146104a35780634e1273f4146104d75780634f558e791461050457600080fd5b8063156e29f611610245578063156e29f61461036a578063248a9ca31461038a5780632eb2c2d6146103ba5780632f2ff15d146103da57806334aedecd146103fa57806336568abe1461042e57600080fd5b8062fdd58e1461028157806301ffc9a7146102b457806306fdde03146102e45780630e89341c1461032857806311a6314314610348575b600080fd5b34801561028d57600080fd5b506102a161029c366004612f76565b610960565b6040519081526020015b60405180910390f35b3480156102c057600080fd5b506102d46102cf366004612fb8565b6109f9565b60405190151581526020016102ab565b3480156102f057600080fd5b506040805180820190915260128152714769667473206f662047726174697475646560701b60208201525b6040516102ab919061302d565b34801561033457600080fd5b5061031b610343366004613040565b610a0a565b34801561035457600080fd5b50610368610363366004613059565b610a79565b005b34801561037657600080fd5b5061036861038536600461308b565b610b18565b34801561039657600080fd5b506102a16103a5366004613040565b60009081526007602052604090206001015490565b3480156103c657600080fd5b506103686103d5366004613213565b610b54565b3480156103e657600080fd5b506103686103f53660046132c0565b610beb565b34801561040657600080fd5b506102a17f0914bb97ca83e85ef385857d9d418f187ff630589e0c9f44db92976d8e4519cb81565b34801561043a57600080fd5b506103686104493660046132c0565b610c16565b34801561045a57600080fd5b506103686104693660046132f0565b610c94565b34801561047a57600080fd5b50610368610dc7565b34801561048f57600080fd5b506102a161049e366004613040565b610dfd565b3480156104af57600080fd5b506102a17f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a1081565b3480156104e357600080fd5b506104f76104f2366004613352565b610e4a565b6040516102ab9190613459565b34801561051057600080fd5b506102d461051f366004613040565b60009081526009602052604090206003015460ff1690565b34801561054357600080fd5b5061056b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102ab565b34801561058f57600080fd5b5061036861059e36600461346c565b610f73565b3480156105af57600080fd5b5060055460ff166102d4565b3480156105c757600080fd5b506102a16105d6366004613040565b60009081526009602052604090206002015490565b3480156105f757600080fd5b50610368610606366004613489565b610fd8565b34801561061757600080fd5b5061036861101b565b61036861062e36600461308b565b611081565b34801561063f57600080fd5b506102a160085481565b34801561065557600080fd5b5061036861117c565b34801561066a57600080fd5b506102a1610679366004613040565b60009081526009602052604090205490565b34801561069757600080fd5b506000546001600160a01b031661056b565b3480156106b557600080fd5b506102d46106c43660046132c0565b6111af565b3480156106d557600080fd5b50604080518082019091526003815262474f4760e81b602082015261031b565b34801561070157600080fd5b506102a1600081565b34801561071657600080fd5b5061036861072536600461350c565b6111da565b61036861073836600461308b565b6111e5565b34801561074957600080fd5b506102a1610758366004613040565b60009081526006602052604090205490565b34801561077657600080fd5b5061036861078536600461353a565b61125f565b34801561079657600080fd5b506107aa6107a5366004613040565b611293565b6040805194855260208501939093529183015260608201526080016102ab565b3480156107d657600080fd5b506102a17f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561080a57600080fd5b506103686108193660046132c0565b6112dc565b34801561082a57600080fd5b506102a1610839366004613040565b60009081526009602052604090206001015490565b34801561085a57600080fd5b50610368610869366004613582565b611302565b34801561087a57600080fd5b506102a17f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b3480156108ae57600080fd5b5061031b611360565b3480156108c357600080fd5b506102d46108d23660046135c3565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b34801561090c57600080fd5b5061036861091b3660046135f1565b6113f2565b34801561092c57600080fd5b5061036861093b36600461346c565b611437565b34801561094c57600080fd5b5061036861095b36600461308b565b6114ff565b60006001600160a01b0383166109d15760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526002602090815260408083206001600160a01b03949094168352929052205490565b6000610a0482611542565b92915050565b60008181526009602052604090206003015460609060ff1615610a6057610a3082611567565b610a39836115fb565b604051602001610a4a929190613659565b6040516020818303038152906040529050919050565b610a6982611567565b604051602001610a4a91906136a7565b7f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a10610aa48133611700565b60408051608081018252858152602080820186815282840186815260016060850181815260008c815260099095529584209451855591519184019190915551600283015591516003909101805460ff19169115159190911790556008805491610b0c836136eb565b91905055505050505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610b438133611700565b610b4e848484611764565b50505050565b6001600160a01b038516331480610b705750610b7085336108d2565b610bd75760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016109c8565b610be48585858585611808565b5050505050565b600082815260076020526040902060010154610c078133611700565b610c1183836119b5565b505050565b6001600160a01b0381163314610c865760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109c8565b610c908282611a3b565b5050565b60026001541415610cb75760405162461bcd60e51b81526004016109c890613706565b60026001556040516572656465656d60d01b60208201526bffffffffffffffffffffffff19606086901b166026820152603a8101849052605a8101839052610d95907f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6906106c490610d8f90607a01604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b84611aa2565b610db25760405163574b16a760e11b815260040160405180910390fd5b610dbd848484611764565b5050600180555050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610df28133611700565b610dfa611abe565b50565b60008181526009602052604081205480610e2a5760405163574b16a760e11b815260040160405180910390fd5b600083815260066020526040902054610e43908261373d565b9392505050565b60608151835114610eaf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016109c8565b600083516001600160401b03811115610eca57610eca6130c0565b604051908082528060200260200182016040528015610ef3578160200160208202803683370190505b50905060005b8451811015610f6b57610f3e858281518110610f1757610f17613754565b6020026020010151858381518110610f3157610f31613754565b6020026020010151610960565b828281518110610f5057610f50613754565b6020908102919091010152610f64816136eb565b9050610ef9565b509392505050565b60026001541415610f965760405162461bcd60e51b81526004016109c890613706565b60026001557f0914bb97ca83e85ef385857d9d418f187ff630589e0c9f44db92976d8e4519cb610fc68133611700565b610fd08247611b51565b505060018055565b6001600160a01b038316331480610ff45750610ff483336108d2565b6110105760405162461bcd60e51b81526004016109c89061376a565b610c11838383611c6a565b6000546001600160a01b031633146110755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109c8565b61107f6000611dfb565b565b600260015414156110a45760405162461bcd60e51b81526004016109c890613706565b60026001556000816110c58460009081526009602052604090206002015490565b6110cf91906137b3565b9050806110ef5760405163574b16a760e11b815260040160405180910390fd5b60405163079cc67960e41b81526001600160a01b038581166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906379cc679090604401600060405180830381600087803b15801561115957600080fd5b505af115801561116d573d6000803e3d6000fd5b50505050610dbd848484611764565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6111a78133611700565b610dfa611e4b565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610c90338383611ec6565b600260015414156112085760405162461bcd60e51b81526004016109c890613706565b60026001556000816112298460009081526009602052604090206001015490565b61123391906137b3565b905080158061124157508034105b15610db25760405163574b16a760e11b815260040160405180910390fd5b7f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a1061128a8133611700565b610c9082611fa7565b6000818152600960205260408120805460018201546002909201548392839283929091906112cd8860009081526006602052604090205490565b93509350935093509193509193565b6000828152600760205260409020600101546112f88133611700565b610c118383611a3b565b600260015414156113255760405162461bcd60e51b81526004016109c890613706565b60026001557f0914bb97ca83e85ef385857d9d418f187ff630589e0c9f44db92976d8e4519cb6113558133611700565b610dbd848484611fba565b6060600a805461136f906137d2565b80601f016020809104026020016040519081016040528092919081815260200182805461139b906137d2565b80156113e85780601f106113bd576101008083540402835291602001916113e8565b820191906000526020600020905b8154815290600101906020018083116113cb57829003601f168201915b5050505050905090565b6001600160a01b03851633148061140e575061140e85336108d2565b61142a5760405162461bcd60e51b81526004016109c89061376a565b610be4858585858561200c565b6000546001600160a01b031633146114915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109c8565b6001600160a01b0381166114f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109c8565b610dfa81611dfb565b6001600160a01b03831633148061151b575061151b83336108d2565b6115375760405162461bcd60e51b81526004016109c89061376a565b610c1183838361213c565b60006001600160e01b03198216637965db0b60e01b1480610a045750610a0482612241565b606060048054611576906137d2565b80601f01602080910402602001604051908101604052809291908181526020018280546115a2906137d2565b80156115ef5780601f106115c4576101008083540402835291602001916115ef565b820191906000526020600020905b8154815290600101906020018083116115d257829003601f168201915b50505050509050919050565b60608161161f5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156116495780611633816136eb565b91506116429050600a83613823565b9150611623565b6000816001600160401b03811115611663576116636130c0565b6040519080825280601f01601f19166020018201604052801561168d576020820181803683370190505b5090505b84156116f8576116a260018361373d565b91506116af600a86613837565b6116ba90603061384b565b60f81b8183815181106116cf576116cf613754565b60200101906001600160f81b031916908160001a9053506116f1600a86613823565b9450611691565b949350505050565b61170a82826111af565b610c9057611722816001600160a01b03166014612291565b61172d836020612291565b60405160200161173e929190613863565b60408051601f198184030181529082905262461bcd60e51b82526109c89160040161302d565b60008281526009602052604090206003015460ff166117965760405163574b16a760e11b815260040160405180910390fd5b60008281526009602090815260408083205460069092528220549091906117be90849061384b565b90506000821180156117cf57508181115b156117ed5760405163574b16a760e11b815260040160405180910390fd5b610be48585856040518060200160405280600081525061242c565b81518351146118295760405162461bcd60e51b81526004016109c8906138d8565b6001600160a01b03841661184f5760405162461bcd60e51b81526004016109c890613920565b3361185e81878787878761252f565b60005b845181101561194757600085828151811061187e5761187e613754565b60200260200101519050600085838151811061189c5761189c613754565b60209081029190910181015160008481526002835260408082206001600160a01b038e1683529093529190912054909150818110156118ed5760405162461bcd60e51b81526004016109c890613965565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061192c90849061384b565b9250508190555050505080611940906136eb565b9050611861565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516119979291906139af565b60405180910390a46119ad81878787878761253d565b505050505050565b6119bf82826111af565b610c905760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556119f73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611a4582826111af565b15610c905760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000806000611ab185856126a8565b91509150610f6b81612718565b60055460ff16611b075760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109c8565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b80471015611ba15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109c8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611bee576040519150601f19603f3d011682016040523d82523d6000602084013e611bf3565b606091505b5050905080610c115760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109c8565b6001600160a01b038316611c905760405162461bcd60e51b81526004016109c8906139dd565b8051825114611cb15760405162461bcd60e51b81526004016109c8906138d8565b6000339050611cd48185600086866040518060200160405280600081525061252f565b60005b8351811015611d9c576000848281518110611cf457611cf4613754565b602002602001015190506000848381518110611d1257611d12613754565b60209081029190910181015160008481526002835260408082206001600160a01b038c168352909352919091205490915081811015611d635760405162461bcd60e51b81526004016109c890613a20565b60009283526002602090815260408085206001600160a01b038b1686529091529092209103905580611d94816136eb565b915050611cd7565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611ded9291906139af565b60405180910390a450505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60055460ff1615611e915760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109c8565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b343390565b816001600160a01b0316836001600160a01b03161415611f3a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016109c8565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b8051610c90906004906020840190612ec8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c119084906128d3565b6001600160a01b0384166120325760405162461bcd60e51b81526004016109c890613920565b33612051818787612042886129a5565b61204b886129a5565b8761252f565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156120945760405162461bcd60e51b81526004016109c890613965565b60008581526002602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906120d390849061384b565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46121338288888888886129f0565b50505050505050565b6001600160a01b0383166121625760405162461bcd60e51b81526004016109c8906139dd565b3361219181856000612173876129a5565b61217c876129a5565b6040518060200160405280600081525061252f565b60008381526002602090815260408083206001600160a01b0388168452909152902054828110156121d45760405162461bcd60e51b81526004016109c890613a20565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60006001600160e01b03198216636cdb3d1360e11b148061227257506001600160e01b031982166303a24d0760e21b145b80610a0457506301ffc9a760e01b6001600160e01b0319831614610a04565b606060006122a08360026137b3565b6122ab90600261384b565b6001600160401b038111156122c2576122c26130c0565b6040519080825280601f01601f1916602001820160405280156122ec576020820181803683370190505b509050600360fc1b8160008151811061230757612307613754565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061233657612336613754565b60200101906001600160f81b031916908160001a905350600061235a8460026137b3565b61236590600161384b565b90505b60018111156123dd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061239957612399613754565b1a60f81b8282815181106123af576123af613754565b60200101906001600160f81b031916908160001a90535060049490941c936123d681613a64565b9050612368565b508315610e435760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109c8565b6001600160a01b03841661248c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109c8565b3361249d81600087612042886129a5565b60008481526002602090815260408083206001600160a01b0389168452909152812080548592906124cf90849061384b565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610be4816000878787876129f0565b6119ad868686868686612aba565b6001600160a01b0384163b156119ad5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906125819089908990889088908890600401613a7b565b602060405180830381600087803b15801561259b57600080fd5b505af19250505080156125cb575060408051601f3d908101601f191682019092526125c891810190613ad9565b60015b612678576125d7613af6565b806308c379a0141561261157506125ec613b12565b806125f75750612613565b8060405162461bcd60e51b81526004016109c8919061302d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016109c8565b6001600160e01b0319811663bc197c8160e01b146121335760405162461bcd60e51b81526004016109c890613b9b565b6000808251604114156126df5760208301516040840151606085015160001a6126d387828585612bd4565b94509450505050612711565b82516040141561270957602083015160408401516126fe868383612cc1565b935093505050612711565b506000905060025b9250929050565b600081600481111561272c5761272c613be3565b14156127355750565b600181600481111561274957612749613be3565b14156127975760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109c8565b60028160048111156127ab576127ab613be3565b14156127f95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109c8565b600381600481111561280d5761280d613be3565b14156128665760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109c8565b600481600481111561287a5761287a613be3565b1415610dfa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109c8565b6000612928826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612cf09092919063ffffffff16565b805190915015610c1157808060200190518101906129469190613bf9565b610c115760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109c8565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106129df576129df613754565b602090810291909101015292915050565b6001600160a01b0384163b156119ad5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612a349089908990889088908890600401613c16565b602060405180830381600087803b158015612a4e57600080fd5b505af1925050508015612a7e575060408051601f3d908101601f19168201909252612a7b91810190613ad9565b60015b612a8a576125d7613af6565b6001600160e01b0319811663f23a6e6160e01b146121335760405162461bcd60e51b81526004016109c890613b9b565b612ac8868686868686612cff565b6001600160a01b038516612b4f5760005b8351811015612b4d57828181518110612af457612af4613754565b602002602001015160066000868481518110612b1257612b12613754565b602002602001015181526020019081526020016000206000828254612b37919061384b565b90915550612b469050816136eb565b9050612ad9565b505b6001600160a01b0384166119ad5760005b835181101561213357828181518110612b7b57612b7b613754565b602002602001015160066000868481518110612b9957612b99613754565b602002602001015181526020019081526020016000206000828254612bbe919061373d565b90915550612bcd9050816136eb565b9050612b60565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c0b5750600090506003612cb8565b8460ff16601b14158015612c2357508460ff16601c14155b15612c345750600090506004612cb8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612c88573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612cb157600060019250925050612cb8565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612ce287828885612bd4565b935093505050935093915050565b60606116f88484600085612d67565b60055460ff16156119ad5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b60648201526084016109c8565b606082471015612dc85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109c8565b843b612e165760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109c8565b600080866001600160a01b03168587604051612e329190613c50565b60006040518083038185875af1925050503d8060008114612e6f576040519150601f19603f3d011682016040523d82523d6000602084013e612e74565b606091505b5091509150612e84828286612e8f565b979650505050505050565b60608315612e9e575081610e43565b825115612eae5782518084602001fd5b8160405162461bcd60e51b81526004016109c8919061302d565b828054612ed4906137d2565b90600052602060002090601f016020900481019282612ef65760008555612f3c565b82601f10612f0f57805160ff1916838001178555612f3c565b82800160010185558215612f3c579182015b82811115612f3c578251825591602001919060010190612f21565b50612f48929150612f4c565b5090565b5b80821115612f485760008155600101612f4d565b6001600160a01b0381168114610dfa57600080fd5b60008060408385031215612f8957600080fd5b8235612f9481612f61565b946020939093013593505050565b6001600160e01b031981168114610dfa57600080fd5b600060208284031215612fca57600080fd5b8135610e4381612fa2565b60005b83811015612ff0578181015183820152602001612fd8565b83811115610b4e5750506000910152565b60008151808452613019816020860160208601612fd5565b601f01601f19169290920160200192915050565b602081526000610e436020830184613001565b60006020828403121561305257600080fd5b5035919050565b6000806000806080858703121561306f57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000606084860312156130a057600080fd5b83356130ab81612f61565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156130fb576130fb6130c0565b6040525050565b60006001600160401b0382111561311b5761311b6130c0565b5060051b60200190565b600082601f83011261313657600080fd5b8135602061314382613102565b60405161315082826130d6565b83815260059390931b850182019282810191508684111561317057600080fd5b8286015b8481101561318b5780358352918301918301613174565b509695505050505050565b60006001600160401b038311156131af576131af6130c0565b6040516131c6601f8501601f1916602001826130d6565b8091508381528484840111156131db57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261320457600080fd5b610e4383833560208501613196565b600080600080600060a0868803121561322b57600080fd5b853561323681612f61565b9450602086013561324681612f61565b935060408601356001600160401b038082111561326257600080fd5b61326e89838a01613125565b9450606088013591508082111561328457600080fd5b61329089838a01613125565b935060808801359150808211156132a657600080fd5b506132b3888289016131f3565b9150509295509295909350565b600080604083850312156132d357600080fd5b8235915060208301356132e581612f61565b809150509250929050565b6000806000806080858703121561330657600080fd5b843561331181612f61565b9350602085013592506040850135915060608501356001600160401b0381111561333a57600080fd5b613346878288016131f3565b91505092959194509250565b6000806040838503121561336557600080fd5b82356001600160401b038082111561337c57600080fd5b818501915085601f83011261339057600080fd5b8135602061339d82613102565b6040516133aa82826130d6565b83815260059390931b85018201928281019150898411156133ca57600080fd5b948201945b838610156133f15785356133e281612f61565b825294820194908201906133cf565b9650508601359250508082111561340757600080fd5b5061341485828601613125565b9150509250929050565b600081518084526020808501945080840160005b8381101561344e57815187529582019590820190600101613432565b509495945050505050565b602081526000610e43602083018461341e565b60006020828403121561347e57600080fd5b8135610e4381612f61565b60008060006060848603121561349e57600080fd5b83356134a981612f61565b925060208401356001600160401b03808211156134c557600080fd5b6134d187838801613125565b935060408601359150808211156134e757600080fd5b506134f486828701613125565b9150509250925092565b8015158114610dfa57600080fd5b6000806040838503121561351f57600080fd5b823561352a81612f61565b915060208301356132e5816134fe565b60006020828403121561354c57600080fd5b81356001600160401b0381111561356257600080fd5b8201601f8101841361357357600080fd5b6116f884823560208401613196565b60008060006060848603121561359757600080fd5b83356135a281612f61565b925060208401356135b281612f61565b929592945050506040919091013590565b600080604083850312156135d657600080fd5b82356135e181612f61565b915060208301356132e581612f61565b600080600080600060a0868803121561360957600080fd5b853561361481612f61565b9450602086013561362481612f61565b9350604086013592506060860135915060808601356001600160401b0381111561364d57600080fd5b6132b3888289016131f3565b6000835161366b818460208801612fd5565b602f60f81b9083019081528351613689816001840160208801612fd5565b64173539b7b760d91b60019290910191820152600601949350505050565b600082516136b9818460208701612fd5565b6917bdb4b23e973539b7b760b11b920191825250600a01919050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156136ff576136ff6136d5565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008282101561374f5761374f6136d5565b500390565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60008160001904831182151516156137cd576137cd6136d5565b500290565b600181811c908216806137e657607f821691505b6020821081141561380757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b6000826138325761383261380d565b500490565b6000826138465761384661380d565b500690565b6000821982111561385e5761385e6136d5565b500190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161389b816017850160208801612fd5565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516138cc816028840160208801612fd5565b01602801949350505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006139c2604083018561341e565b82810360208401526139d4818561341e565b95945050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b600081613a7357613a736136d5565b506000190190565b6001600160a01b0386811682528516602082015260a060408201819052600090613aa79083018661341e565b8281036060840152613ab9818661341e565b90508281036080840152613acd8185613001565b98975050505050505050565b600060208284031215613aeb57600080fd5b8151610e4381612fa2565b600060033d1115613b0f5760046000803e5060005160e01c5b90565b600060443d1015613b205790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715613b4f57505050505090565b8285019150815181811115613b675750505050505090565b843d8701016020828501011115613b815750505050505090565b613b90602082860101876130d6565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613c0b57600080fd5b8151610e43816134fe565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612e8490830184613001565b60008251613c62818460208701612fd5565b919091019291505056fea2646970667358221220e76b56926415b71faa4bd174ae8423e489dd6388dcca8846d86da530c5a2818664736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000100000000000000000000000000b33ac190e67993bf584aad1453bc4ed668ea6072000000000000000000000000e918ecf5eb8457516c7535cc847613625827b5b8000000000000000000000000000000000000000000000000000000000000004368747470733a2f2f697066732e696f2f697066732f516d5861544c555051336844696837676650315066746b6a517965445658794d63347845614c7070396b5a7933500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002768747470733a2f2f7777772e67726174697475646567616e672e696f2f646174612f676966747300000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061027c5760003560e01c8063776414561161014f578063c30f4a5a116100c1578063e63ab1e91161007a578063e63ab1e91461086e578063e8a3d485146108a2578063e985e9c5146108b7578063f242432a14610900578063f2fde38b14610920578063f5298aca1461094057600080fd5b8063c30f4a5a1461076a578063cc33c8751461078a578063d5391393146107ca578063d547741f146107fe578063d620fb541461081e578063d9caed121461084e57600080fd5b806391d148541161011357806391d14854146106a957806395d89b41146106c9578063a217fddf146106f5578063a22cb4651461070a578063a59ac6dd1461072a578063bd85b0391461073d57600080fd5b806377641456146106205780637e1c0c09146106335780638456cb5914610649578063869f75941461065e5780638da5cb5b1461068b57600080fd5b80633cf3e664116101f3578063516fb458116101ac578063516fb4581461053757806351cff8d9146105835780635c975abb146105a35780636a06bf6e146105bb5780636b20c454146105eb578063715018a61461060b57600080fd5b80633cf3e6641461044e5780633f4ba83a1461046e57806347fda41a146104835780634a2cfb54146104a35780634e1273f4146104d75780634f558e791461050457600080fd5b8063156e29f611610245578063156e29f61461036a578063248a9ca31461038a5780632eb2c2d6146103ba5780632f2ff15d146103da57806334aedecd146103fa57806336568abe1461042e57600080fd5b8062fdd58e1461028157806301ffc9a7146102b457806306fdde03146102e45780630e89341c1461032857806311a6314314610348575b600080fd5b34801561028d57600080fd5b506102a161029c366004612f76565b610960565b6040519081526020015b60405180910390f35b3480156102c057600080fd5b506102d46102cf366004612fb8565b6109f9565b60405190151581526020016102ab565b3480156102f057600080fd5b506040805180820190915260128152714769667473206f662047726174697475646560701b60208201525b6040516102ab919061302d565b34801561033457600080fd5b5061031b610343366004613040565b610a0a565b34801561035457600080fd5b50610368610363366004613059565b610a79565b005b34801561037657600080fd5b5061036861038536600461308b565b610b18565b34801561039657600080fd5b506102a16103a5366004613040565b60009081526007602052604090206001015490565b3480156103c657600080fd5b506103686103d5366004613213565b610b54565b3480156103e657600080fd5b506103686103f53660046132c0565b610beb565b34801561040657600080fd5b506102a17f0914bb97ca83e85ef385857d9d418f187ff630589e0c9f44db92976d8e4519cb81565b34801561043a57600080fd5b506103686104493660046132c0565b610c16565b34801561045a57600080fd5b506103686104693660046132f0565b610c94565b34801561047a57600080fd5b50610368610dc7565b34801561048f57600080fd5b506102a161049e366004613040565b610dfd565b3480156104af57600080fd5b506102a17f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a1081565b3480156104e357600080fd5b506104f76104f2366004613352565b610e4a565b6040516102ab9190613459565b34801561051057600080fd5b506102d461051f366004613040565b60009081526009602052604090206003015460ff1690565b34801561054357600080fd5b5061056b7f000000000000000000000000b33ac190e67993bf584aad1453bc4ed668ea607281565b6040516001600160a01b0390911681526020016102ab565b34801561058f57600080fd5b5061036861059e36600461346c565b610f73565b3480156105af57600080fd5b5060055460ff166102d4565b3480156105c757600080fd5b506102a16105d6366004613040565b60009081526009602052604090206002015490565b3480156105f757600080fd5b50610368610606366004613489565b610fd8565b34801561061757600080fd5b5061036861101b565b61036861062e36600461308b565b611081565b34801561063f57600080fd5b506102a160085481565b34801561065557600080fd5b5061036861117c565b34801561066a57600080fd5b506102a1610679366004613040565b60009081526009602052604090205490565b34801561069757600080fd5b506000546001600160a01b031661056b565b3480156106b557600080fd5b506102d46106c43660046132c0565b6111af565b3480156106d557600080fd5b50604080518082019091526003815262474f4760e81b602082015261031b565b34801561070157600080fd5b506102a1600081565b34801561071657600080fd5b5061036861072536600461350c565b6111da565b61036861073836600461308b565b6111e5565b34801561074957600080fd5b506102a1610758366004613040565b60009081526006602052604090205490565b34801561077657600080fd5b5061036861078536600461353a565b61125f565b34801561079657600080fd5b506107aa6107a5366004613040565b611293565b6040805194855260208501939093529183015260608201526080016102ab565b3480156107d657600080fd5b506102a17f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561080a57600080fd5b506103686108193660046132c0565b6112dc565b34801561082a57600080fd5b506102a1610839366004613040565b60009081526009602052604090206001015490565b34801561085a57600080fd5b50610368610869366004613582565b611302565b34801561087a57600080fd5b506102a17f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b3480156108ae57600080fd5b5061031b611360565b3480156108c357600080fd5b506102d46108d23660046135c3565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b34801561090c57600080fd5b5061036861091b3660046135f1565b6113f2565b34801561092c57600080fd5b5061036861093b36600461346c565b611437565b34801561094c57600080fd5b5061036861095b36600461308b565b6114ff565b60006001600160a01b0383166109d15760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526002602090815260408083206001600160a01b03949094168352929052205490565b6000610a0482611542565b92915050565b60008181526009602052604090206003015460609060ff1615610a6057610a3082611567565b610a39836115fb565b604051602001610a4a929190613659565b6040516020818303038152906040529050919050565b610a6982611567565b604051602001610a4a91906136a7565b7f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a10610aa48133611700565b60408051608081018252858152602080820186815282840186815260016060850181815260008c815260099095529584209451855591519184019190915551600283015591516003909101805460ff19169115159190911790556008805491610b0c836136eb565b91905055505050505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610b438133611700565b610b4e848484611764565b50505050565b6001600160a01b038516331480610b705750610b7085336108d2565b610bd75760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016109c8565b610be48585858585611808565b5050505050565b600082815260076020526040902060010154610c078133611700565b610c1183836119b5565b505050565b6001600160a01b0381163314610c865760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109c8565b610c908282611a3b565b5050565b60026001541415610cb75760405162461bcd60e51b81526004016109c890613706565b60026001556040516572656465656d60d01b60208201526bffffffffffffffffffffffff19606086901b166026820152603a8101849052605a8101839052610d95907f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6906106c490610d8f90607a01604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b84611aa2565b610db25760405163574b16a760e11b815260040160405180910390fd5b610dbd848484611764565b5050600180555050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610df28133611700565b610dfa611abe565b50565b60008181526009602052604081205480610e2a5760405163574b16a760e11b815260040160405180910390fd5b600083815260066020526040902054610e43908261373d565b9392505050565b60608151835114610eaf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016109c8565b600083516001600160401b03811115610eca57610eca6130c0565b604051908082528060200260200182016040528015610ef3578160200160208202803683370190505b50905060005b8451811015610f6b57610f3e858281518110610f1757610f17613754565b6020026020010151858381518110610f3157610f31613754565b6020026020010151610960565b828281518110610f5057610f50613754565b6020908102919091010152610f64816136eb565b9050610ef9565b509392505050565b60026001541415610f965760405162461bcd60e51b81526004016109c890613706565b60026001557f0914bb97ca83e85ef385857d9d418f187ff630589e0c9f44db92976d8e4519cb610fc68133611700565b610fd08247611b51565b505060018055565b6001600160a01b038316331480610ff45750610ff483336108d2565b6110105760405162461bcd60e51b81526004016109c89061376a565b610c11838383611c6a565b6000546001600160a01b031633146110755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109c8565b61107f6000611dfb565b565b600260015414156110a45760405162461bcd60e51b81526004016109c890613706565b60026001556000816110c58460009081526009602052604090206002015490565b6110cf91906137b3565b9050806110ef5760405163574b16a760e11b815260040160405180910390fd5b60405163079cc67960e41b81526001600160a01b038581166004830152602482018390527f000000000000000000000000b33ac190e67993bf584aad1453bc4ed668ea607216906379cc679090604401600060405180830381600087803b15801561115957600080fd5b505af115801561116d573d6000803e3d6000fd5b50505050610dbd848484611764565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6111a78133611700565b610dfa611e4b565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610c90338383611ec6565b600260015414156112085760405162461bcd60e51b81526004016109c890613706565b60026001556000816112298460009081526009602052604090206001015490565b61123391906137b3565b905080158061124157508034105b15610db25760405163574b16a760e11b815260040160405180910390fd5b7f850d585eb7f024ccee5e68e55f2c26cc72e1e6ee456acf62135757a5eb9d4a1061128a8133611700565b610c9082611fa7565b6000818152600960205260408120805460018201546002909201548392839283929091906112cd8860009081526006602052604090205490565b93509350935093509193509193565b6000828152600760205260409020600101546112f88133611700565b610c118383611a3b565b600260015414156113255760405162461bcd60e51b81526004016109c890613706565b60026001557f0914bb97ca83e85ef385857d9d418f187ff630589e0c9f44db92976d8e4519cb6113558133611700565b610dbd848484611fba565b6060600a805461136f906137d2565b80601f016020809104026020016040519081016040528092919081815260200182805461139b906137d2565b80156113e85780601f106113bd576101008083540402835291602001916113e8565b820191906000526020600020905b8154815290600101906020018083116113cb57829003601f168201915b5050505050905090565b6001600160a01b03851633148061140e575061140e85336108d2565b61142a5760405162461bcd60e51b81526004016109c89061376a565b610be4858585858561200c565b6000546001600160a01b031633146114915760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109c8565b6001600160a01b0381166114f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109c8565b610dfa81611dfb565b6001600160a01b03831633148061151b575061151b83336108d2565b6115375760405162461bcd60e51b81526004016109c89061376a565b610c1183838361213c565b60006001600160e01b03198216637965db0b60e01b1480610a045750610a0482612241565b606060048054611576906137d2565b80601f01602080910402602001604051908101604052809291908181526020018280546115a2906137d2565b80156115ef5780601f106115c4576101008083540402835291602001916115ef565b820191906000526020600020905b8154815290600101906020018083116115d257829003601f168201915b50505050509050919050565b60608161161f5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156116495780611633816136eb565b91506116429050600a83613823565b9150611623565b6000816001600160401b03811115611663576116636130c0565b6040519080825280601f01601f19166020018201604052801561168d576020820181803683370190505b5090505b84156116f8576116a260018361373d565b91506116af600a86613837565b6116ba90603061384b565b60f81b8183815181106116cf576116cf613754565b60200101906001600160f81b031916908160001a9053506116f1600a86613823565b9450611691565b949350505050565b61170a82826111af565b610c9057611722816001600160a01b03166014612291565b61172d836020612291565b60405160200161173e929190613863565b60408051601f198184030181529082905262461bcd60e51b82526109c89160040161302d565b60008281526009602052604090206003015460ff166117965760405163574b16a760e11b815260040160405180910390fd5b60008281526009602090815260408083205460069092528220549091906117be90849061384b565b90506000821180156117cf57508181115b156117ed5760405163574b16a760e11b815260040160405180910390fd5b610be48585856040518060200160405280600081525061242c565b81518351146118295760405162461bcd60e51b81526004016109c8906138d8565b6001600160a01b03841661184f5760405162461bcd60e51b81526004016109c890613920565b3361185e81878787878761252f565b60005b845181101561194757600085828151811061187e5761187e613754565b60200260200101519050600085838151811061189c5761189c613754565b60209081029190910181015160008481526002835260408082206001600160a01b038e1683529093529190912054909150818110156118ed5760405162461bcd60e51b81526004016109c890613965565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061192c90849061384b565b9250508190555050505080611940906136eb565b9050611861565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516119979291906139af565b60405180910390a46119ad81878787878761253d565b505050505050565b6119bf82826111af565b610c905760008281526007602090815260408083206001600160a01b03851684529091529020805460ff191660011790556119f73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611a4582826111af565b15610c905760008281526007602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000806000611ab185856126a8565b91509150610f6b81612718565b60055460ff16611b075760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109c8565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b80471015611ba15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109c8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611bee576040519150601f19603f3d011682016040523d82523d6000602084013e611bf3565b606091505b5050905080610c115760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109c8565b6001600160a01b038316611c905760405162461bcd60e51b81526004016109c8906139dd565b8051825114611cb15760405162461bcd60e51b81526004016109c8906138d8565b6000339050611cd48185600086866040518060200160405280600081525061252f565b60005b8351811015611d9c576000848281518110611cf457611cf4613754565b602002602001015190506000848381518110611d1257611d12613754565b60209081029190910181015160008481526002835260408082206001600160a01b038c168352909352919091205490915081811015611d635760405162461bcd60e51b81526004016109c890613a20565b60009283526002602090815260408085206001600160a01b038b1686529091529092209103905580611d94816136eb565b915050611cd7565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611ded9291906139af565b60405180910390a450505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60055460ff1615611e915760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016109c8565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b343390565b816001600160a01b0316836001600160a01b03161415611f3a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016109c8565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b8051610c90906004906020840190612ec8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c119084906128d3565b6001600160a01b0384166120325760405162461bcd60e51b81526004016109c890613920565b33612051818787612042886129a5565b61204b886129a5565b8761252f565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156120945760405162461bcd60e51b81526004016109c890613965565b60008581526002602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906120d390849061384b565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46121338288888888886129f0565b50505050505050565b6001600160a01b0383166121625760405162461bcd60e51b81526004016109c8906139dd565b3361219181856000612173876129a5565b61217c876129a5565b6040518060200160405280600081525061252f565b60008381526002602090815260408083206001600160a01b0388168452909152902054828110156121d45760405162461bcd60e51b81526004016109c890613a20565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60006001600160e01b03198216636cdb3d1360e11b148061227257506001600160e01b031982166303a24d0760e21b145b80610a0457506301ffc9a760e01b6001600160e01b0319831614610a04565b606060006122a08360026137b3565b6122ab90600261384b565b6001600160401b038111156122c2576122c26130c0565b6040519080825280601f01601f1916602001820160405280156122ec576020820181803683370190505b509050600360fc1b8160008151811061230757612307613754565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061233657612336613754565b60200101906001600160f81b031916908160001a905350600061235a8460026137b3565b61236590600161384b565b90505b60018111156123dd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061239957612399613754565b1a60f81b8282815181106123af576123af613754565b60200101906001600160f81b031916908160001a90535060049490941c936123d681613a64565b9050612368565b508315610e435760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109c8565b6001600160a01b03841661248c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109c8565b3361249d81600087612042886129a5565b60008481526002602090815260408083206001600160a01b0389168452909152812080548592906124cf90849061384b565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610be4816000878787876129f0565b6119ad868686868686612aba565b6001600160a01b0384163b156119ad5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906125819089908990889088908890600401613a7b565b602060405180830381600087803b15801561259b57600080fd5b505af19250505080156125cb575060408051601f3d908101601f191682019092526125c891810190613ad9565b60015b612678576125d7613af6565b806308c379a0141561261157506125ec613b12565b806125f75750612613565b8060405162461bcd60e51b81526004016109c8919061302d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016109c8565b6001600160e01b0319811663bc197c8160e01b146121335760405162461bcd60e51b81526004016109c890613b9b565b6000808251604114156126df5760208301516040840151606085015160001a6126d387828585612bd4565b94509450505050612711565b82516040141561270957602083015160408401516126fe868383612cc1565b935093505050612711565b506000905060025b9250929050565b600081600481111561272c5761272c613be3565b14156127355750565b600181600481111561274957612749613be3565b14156127975760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109c8565b60028160048111156127ab576127ab613be3565b14156127f95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109c8565b600381600481111561280d5761280d613be3565b14156128665760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109c8565b600481600481111561287a5761287a613be3565b1415610dfa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109c8565b6000612928826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612cf09092919063ffffffff16565b805190915015610c1157808060200190518101906129469190613bf9565b610c115760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109c8565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106129df576129df613754565b602090810291909101015292915050565b6001600160a01b0384163b156119ad5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612a349089908990889088908890600401613c16565b602060405180830381600087803b158015612a4e57600080fd5b505af1925050508015612a7e575060408051601f3d908101601f19168201909252612a7b91810190613ad9565b60015b612a8a576125d7613af6565b6001600160e01b0319811663f23a6e6160e01b146121335760405162461bcd60e51b81526004016109c890613b9b565b612ac8868686868686612cff565b6001600160a01b038516612b4f5760005b8351811015612b4d57828181518110612af457612af4613754565b602002602001015160066000868481518110612b1257612b12613754565b602002602001015181526020019081526020016000206000828254612b37919061384b565b90915550612b469050816136eb565b9050612ad9565b505b6001600160a01b0384166119ad5760005b835181101561213357828181518110612b7b57612b7b613754565b602002602001015160066000868481518110612b9957612b99613754565b602002602001015181526020019081526020016000206000828254612bbe919061373d565b90915550612bcd9050816136eb565b9050612b60565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c0b5750600090506003612cb8565b8460ff16601b14158015612c2357508460ff16601c14155b15612c345750600090506004612cb8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612c88573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612cb157600060019250925050612cb8565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612ce287828885612bd4565b935093505050935093915050565b60606116f88484600085612d67565b60055460ff16156119ad5760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201526b1dda1a5b19481c185d5cd95960a21b60648201526084016109c8565b606082471015612dc85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109c8565b843b612e165760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109c8565b600080866001600160a01b03168587604051612e329190613c50565b60006040518083038185875af1925050503d8060008114612e6f576040519150601f19603f3d011682016040523d82523d6000602084013e612e74565b606091505b5091509150612e84828286612e8f565b979650505050505050565b60608315612e9e575081610e43565b825115612eae5782518084602001fd5b8160405162461bcd60e51b81526004016109c8919061302d565b828054612ed4906137d2565b90600052602060002090601f016020900481019282612ef65760008555612f3c565b82601f10612f0f57805160ff1916838001178555612f3c565b82800160010185558215612f3c579182015b82811115612f3c578251825591602001919060010190612f21565b50612f48929150612f4c565b5090565b5b80821115612f485760008155600101612f4d565b6001600160a01b0381168114610dfa57600080fd5b60008060408385031215612f8957600080fd5b8235612f9481612f61565b946020939093013593505050565b6001600160e01b031981168114610dfa57600080fd5b600060208284031215612fca57600080fd5b8135610e4381612fa2565b60005b83811015612ff0578181015183820152602001612fd8565b83811115610b4e5750506000910152565b60008151808452613019816020860160208601612fd5565b601f01601f19169290920160200192915050565b602081526000610e436020830184613001565b60006020828403121561305257600080fd5b5035919050565b6000806000806080858703121561306f57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000606084860312156130a057600080fd5b83356130ab81612f61565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156130fb576130fb6130c0565b6040525050565b60006001600160401b0382111561311b5761311b6130c0565b5060051b60200190565b600082601f83011261313657600080fd5b8135602061314382613102565b60405161315082826130d6565b83815260059390931b850182019282810191508684111561317057600080fd5b8286015b8481101561318b5780358352918301918301613174565b509695505050505050565b60006001600160401b038311156131af576131af6130c0565b6040516131c6601f8501601f1916602001826130d6565b8091508381528484840111156131db57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261320457600080fd5b610e4383833560208501613196565b600080600080600060a0868803121561322b57600080fd5b853561323681612f61565b9450602086013561324681612f61565b935060408601356001600160401b038082111561326257600080fd5b61326e89838a01613125565b9450606088013591508082111561328457600080fd5b61329089838a01613125565b935060808801359150808211156132a657600080fd5b506132b3888289016131f3565b9150509295509295909350565b600080604083850312156132d357600080fd5b8235915060208301356132e581612f61565b809150509250929050565b6000806000806080858703121561330657600080fd5b843561331181612f61565b9350602085013592506040850135915060608501356001600160401b0381111561333a57600080fd5b613346878288016131f3565b91505092959194509250565b6000806040838503121561336557600080fd5b82356001600160401b038082111561337c57600080fd5b818501915085601f83011261339057600080fd5b8135602061339d82613102565b6040516133aa82826130d6565b83815260059390931b85018201928281019150898411156133ca57600080fd5b948201945b838610156133f15785356133e281612f61565b825294820194908201906133cf565b9650508601359250508082111561340757600080fd5b5061341485828601613125565b9150509250929050565b600081518084526020808501945080840160005b8381101561344e57815187529582019590820190600101613432565b509495945050505050565b602081526000610e43602083018461341e565b60006020828403121561347e57600080fd5b8135610e4381612f61565b60008060006060848603121561349e57600080fd5b83356134a981612f61565b925060208401356001600160401b03808211156134c557600080fd5b6134d187838801613125565b935060408601359150808211156134e757600080fd5b506134f486828701613125565b9150509250925092565b8015158114610dfa57600080fd5b6000806040838503121561351f57600080fd5b823561352a81612f61565b915060208301356132e5816134fe565b60006020828403121561354c57600080fd5b81356001600160401b0381111561356257600080fd5b8201601f8101841361357357600080fd5b6116f884823560208401613196565b60008060006060848603121561359757600080fd5b83356135a281612f61565b925060208401356135b281612f61565b929592945050506040919091013590565b600080604083850312156135d657600080fd5b82356135e181612f61565b915060208301356132e581612f61565b600080600080600060a0868803121561360957600080fd5b853561361481612f61565b9450602086013561362481612f61565b9350604086013592506060860135915060808601356001600160401b0381111561364d57600080fd5b6132b3888289016131f3565b6000835161366b818460208801612fd5565b602f60f81b9083019081528351613689816001840160208801612fd5565b64173539b7b760d91b60019290910191820152600601949350505050565b600082516136b9818460208701612fd5565b6917bdb4b23e973539b7b760b11b920191825250600a01919050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156136ff576136ff6136d5565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008282101561374f5761374f6136d5565b500390565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b60008160001904831182151516156137cd576137cd6136d5565b500290565b600181811c908216806137e657607f821691505b6020821081141561380757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b6000826138325761383261380d565b500490565b6000826138465761384661380d565b500690565b6000821982111561385e5761385e6136d5565b500190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161389b816017850160208801612fd5565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516138cc816028840160208801612fd5565b01602801949350505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006139c2604083018561341e565b82810360208401526139d4818561341e565b95945050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b600081613a7357613a736136d5565b506000190190565b6001600160a01b0386811682528516602082015260a060408201819052600090613aa79083018661341e565b8281036060840152613ab9818661341e565b90508281036080840152613acd8185613001565b98975050505050505050565b600060208284031215613aeb57600080fd5b8151610e4381612fa2565b600060033d1115613b0f5760046000803e5060005160e01c5b90565b600060443d1015613b205790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715613b4f57505050505090565b8285019150815181811115613b675750505050505090565b843d8701016020828501011115613b815750505050505090565b613b90602082860101876130d6565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215613c0b57600080fd5b8151610e43816134fe565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612e8490830184613001565b60008251613c62818460208701612fd5565b919091019291505056fea2646970667358221220e76b56926415b71faa4bd174ae8423e489dd6388dcca8846d86da530c5a2818664736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000100000000000000000000000000b33ac190e67993bf584aad1453bc4ed668ea6072000000000000000000000000e918ecf5eb8457516c7535cc847613625827b5b8000000000000000000000000000000000000000000000000000000000000004368747470733a2f2f697066732e696f2f697066732f516d5861544c555051336844696837676650315066746b6a517965445658794d63347845614c7070396b5a7933500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002768747470733a2f2f7777772e67726174697475646567616e672e696f2f646174612f676966747300000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : contract_uri (string): https://ipfs.io/ipfs/QmXaTLUPQ3hDih7gfP1PftkjQyeDVXyMc4xEaLpp9kZy3P
Arg [1] : token_uri (string): https://www.gratitudegang.io/data/gifts
Arg [2] : gratis (address): 0xb33Ac190E67993BF584aAd1453BC4Ed668eA6072
Arg [3] : admin (address): 0xE918ECf5eb8457516c7535cC847613625827b5B8
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 000000000000000000000000b33ac190e67993bf584aad1453bc4ed668ea6072
Arg [3] : 000000000000000000000000e918ecf5eb8457516c7535cc847613625827b5b8
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [5] : 68747470733a2f2f697066732e696f2f697066732f516d5861544c5550513368
Arg [6] : 44696837676650315066746b6a517965445658794d63347845614c7070396b5a
Arg [7] : 7933500000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000027
Arg [9] : 68747470733a2f2f7777772e67726174697475646567616e672e696f2f646174
Arg [10] : 612f676966747300000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.