ERC-1155
Overview
Max Total Supply
4,143
Holders
1,448
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:
MetaAngelsAdobeAir
Compiler Version
v0.8.12+commit.f00d7308
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.12; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; error AlreadyClaimedEror(); error InvalidProof(); error MintNotEnabled(); /** * @title Meta Angels Specials Contract * @author Gabriel Cebrian (https://twitter.com/gabceb) * @notice This contract handles the distribution of Meta Angels Special Airdrops ERC1155 tokens. */ contract MetaAngelsAdobeAir is ERC1155Supply, Pausable, Ownable { using Strings for uint256; using ECDSA for bytes32; mapping(uint256 => mapping(address => bool)) public claimedPerToken; mapping(uint256 => string) private tokenUris; uint256 public mintToken; bool public mintEnabled; // Used to validate authorized mint addresses address private signerAddress = 0x290Df62917EAb5b06E3c04a583E2250A0B46d55f; constructor() ERC1155("") {} function uri(uint256 tokenId) public view virtual override returns (string memory) { return tokenUris[tokenId]; } /** * Update the base token URI */ function setTokenUri(uint256 tokenId, string calldata _newTokenUri) external onlyOwner { tokenUris[tokenId] = _newTokenUri; } /** * Update the base token URI */ function setMintEnabled(bool _mintEnabled) external onlyOwner { mintEnabled = _mintEnabled; } /** * Update the signer address */ function setSignerAddress(address _signerAddress) external onlyOwner { require(_signerAddress != address(0)); signerAddress = _signerAddress; } /** * Prepare new mint */ function prepareTokenMint( uint256 tokenId, string calldata _newTokenUri, bool setAsActiveMint ) external onlyOwner { tokenUris[tokenId] = _newTokenUri; if (setAsActiveMint) { mintToken = tokenId; } } function verifyAddressSigner(bytes32 messageHash, bytes memory signature) private view returns (bool) { return signerAddress == messageHash.toEthSignedMessageHash().recover(signature); } function mint(bytes32 messageHash, bytes calldata signature, uint256 tokenId) external payable { if (!mintEnabled || tokenId != mintToken) { revert MintNotEnabled(); } if (claimedPerToken[mintToken][msg.sender]) { revert AlreadyClaimedEror(); } if ( keccak256(abi.encode(msg.sender, tokenId)) != messageHash || !verifyAddressSigner(messageHash, signature) ) { revert InvalidProof(); } claimedPerToken[mintToken][msg.sender] = true; _mint(msg.sender, mintToken, 1, ""); } function adminMint(address[] calldata receivers, uint256 tokenId) external payable onlyOwner { for (uint256 i = 0; i < receivers.length; i++) { _mint(receivers[i], tokenId, 1, ""); } } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override whenNotPaused { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155) returns (bool) { return super.supportsInterface(interfaceId); } /** * @notice Allow contract owner to withdraw funds to its own account. */ function withdraw() external onlyOwner { payable(owner()).transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 supply = _totalSupply[id]; require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); unchecked { _totalSupply[id] = supply - amount; } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/Address.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !Address.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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); _; } /** * @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 virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", 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 virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface 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; }
{ "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":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyClaimedEror","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"MintNotEnabled","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":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address[]","name":"receivers","type":"address[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"payable","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":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"claimedPerToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"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":"bytes32","name":"messageHash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_newTokenUri","type":"string"},{"internalType":"bool","name":"setAsActiveMint","type":"bool"}],"name":"prepareTokenMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"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":"bool","name":"_mintEnabled","type":"bool"}],"name":"setMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_newTokenUri","type":"string"}],"name":"setTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260088054610100600160a81b03191674290df62917eab5b06e3c04a583e2250a0b46d55f001790553480156200003957600080fd5b50604080516020810190915260008152620000548162000070565b506004805460ff191690556200006a3362000089565b620001c6565b805162000085906002906020840190620000e3565b5050565b600480546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000f19062000189565b90600052602060002090601f01602090048101928262000115576000855562000160565b82601f106200013057805160ff191683800117855562000160565b8280016001018555821562000160579182015b828111156200016057825182559160200191906001019062000143565b506200016e92915062000172565b5090565b5b808211156200016e576000815560010162000173565b600181811c908216806200019e57607f821691505b60208210811415620001c057634e487b7160e01b600052602260045260246000fd5b50919050565b6127a180620001d66000396000f3fe6080604052600436106101805760003560e01c80635c975abb116100d1578063bd85b0391161008a578063e985e9c511610064578063e985e9c514610473578063f242432a146104bc578063f2fde38b146104dc578063f46a04eb146104fc57600080fd5b8063bd85b03914610419578063d123973014610446578063da8444c81461046057600080fd5b80635c975abb1461036e578063631c1c5a14610386578063715018a6146103995780638456cb59146103ae5780638da5cb5b146103c3578063a22cb465146103f957600080fd5b80632eb2c2d61161013e5780634e1273f4116101185780634e1273f4146102d25780634f558e79146102ff57806357f7789e1461032e5780635b19e9b61461034e57600080fd5b80632eb2c2d6146102885780633ccfd60b146102a85780633f4ba83a146102bd57600080fd5b8062fdd58e1461018557806301ffc9a7146101b8578063046dc166146101e85780630e2d88cf1461020a5780630e89341c146102455780632004ffd914610272575b600080fd5b34801561019157600080fd5b506101a56101a0366004611d56565b61051c565b6040519081526020015b60405180910390f35b3480156101c457600080fd5b506101d86101d3366004611d96565b6105b3565b60405190151581526020016101af565b3480156101f457600080fd5b50610208610203366004611dba565b6105c4565b005b34801561021657600080fd5b506101d8610225366004611dd5565b600560209081526000928352604080842090915290825290205460ff1681565b34801561025157600080fd5b50610265610260366004611e01565b61062f565b6040516101af9190611e67565b34801561027e57600080fd5b506101a560075481565b34801561029457600080fd5b506102086102a3366004611fc3565b6106d1565b3480156102b457600080fd5b50610208610768565b3480156102c957600080fd5b506102086107db565b3480156102de57600080fd5b506102f26102ed36600461206c565b610815565b6040516101af9190612171565b34801561030b57600080fd5b506101d861031a366004611e01565b600090815260036020526040902054151590565b34801561033a57600080fd5b506102086103493660046121c5565b61093e565b34801561035a57600080fd5b50610208610369366004612220565b61098d565b34801561037a57600080fd5b5060045460ff166101d8565b61020861039436600461227d565b6109e5565b3480156103a557600080fd5b50610208610b2d565b3480156103ba57600080fd5b50610208610b67565b3480156103cf57600080fd5b5060045461010090046001600160a01b03166040516001600160a01b0390911681526020016101af565b34801561040557600080fd5b506102086104143660046122cf565b610b9f565b34801561042557600080fd5b506101a5610434366004611e01565b60009081526003602052604090205490565b34801561045257600080fd5b506008546101d89060ff1681565b61020861046e3660046122f9565b610bae565b34801561047f57600080fd5b506101d861048e366004612373565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156104c857600080fd5b506102086104d736600461239d565b610c3d565b3480156104e857600080fd5b506102086104f7366004611dba565b610cc4565b34801561050857600080fd5b50610208610517366004612401565b610d62565b60006001600160a01b03831661058d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006105be82610da5565b92915050565b6004546001600160a01b036101009091041633146105f45760405162461bcd60e51b81526004016105849061241c565b6001600160a01b03811661060757600080fd5b600880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600081815260066020526040902080546060919061064c90612451565b80601f016020809104026020016040519081016040528092919081815260200182805461067890612451565b80156106c55780601f1061069a576101008083540402835291602001916106c5565b820191906000526020600020905b8154815290600101906020018083116106a857829003601f168201915b50505050509050919050565b6001600160a01b0385163314806106ed57506106ed853361048e565b6107545760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610584565b6107618585858585610df5565b5050505050565b6004546001600160a01b036101009091041633146107985760405162461bcd60e51b81526004016105849061241c565b6004546040516001600160a01b0361010090920491909116904780156108fc02916000818181858888f193505050501580156107d8573d6000803e3d6000fd5b50565b6004546001600160a01b0361010090910416331461080b5760405162461bcd60e51b81526004016105849061241c565b610813610fe0565b565b6060815183511461087a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610584565b600083516001600160401b0381111561089557610895611e7a565b6040519080825280602002602001820160405280156108be578160200160208202803683370190505b50905060005b8451811015610936576109098582815181106108e2576108e261248c565b60200260200101518583815181106108fc576108fc61248c565b602002602001015161051c565b82828151811061091b5761091b61248c565b602090810291909101015261092f816124b8565b90506108c4565b509392505050565b6004546001600160a01b0361010090910416331461096e5760405162461bcd60e51b81526004016105849061241c565b6000838152600660205260409020610987908383611ca1565b50505050565b6004546001600160a01b036101009091041633146109bd5760405162461bcd60e51b81526004016105849061241c565b60008481526006602052604090206109d6908484611ca1565b50801561098757505050600755565b60085460ff1615806109f957506007548114155b15610a175760405163447691f760e01b815260040160405180910390fd5b600754600090815260056020908152604080832033845290915290205460ff1615610a5557604051630eaed4a960e41b815260040160405180910390fd5b60408051336020820152908101829052849060600160405160208183030381529060405280519060200120141580610aca5750610ac88484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061107392505050565b155b15610ae8576040516309bde33960e01b815260040160405180910390fd5b60078054600090815260056020908152604080832033808552908352818420805460ff19166001908117909155945482519384019092529282526109879390916110f4565b6004546001600160a01b03610100909104163314610b5d5760405162461bcd60e51b81526004016105849061241c565b6108136000611217565b6004546001600160a01b03610100909104163314610b975760405162461bcd60e51b81526004016105849061241c565b610813611271565b610baa3383836112ec565b5050565b6004546001600160a01b03610100909104163314610bde5760405162461bcd60e51b81526004016105849061241c565b60005b8281101561098757610c2b848483818110610bfe57610bfe61248c565b9050602002016020810190610c139190611dba565b836001604051806020016040528060008152506110f4565b80610c35816124b8565b915050610be1565b6001600160a01b038516331480610c595750610c59853361048e565b610cb75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610584565b61076185858585856113cd565b6004546001600160a01b03610100909104163314610cf45760405162461bcd60e51b81526004016105849061241c565b6001600160a01b038116610d595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610584565b6107d881611217565b6004546001600160a01b03610100909104163314610d925760405162461bcd60e51b81526004016105849061241c565b6008805460ff1916911515919091179055565b60006001600160e01b03198216636cdb3d1360e11b1480610dd657506001600160e01b031982166303a24d0760e21b145b806105be57506301ffc9a760e01b6001600160e01b03198316146105be565b8151835114610e575760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610584565b6001600160a01b038416610e7d5760405162461bcd60e51b8152600401610584906124d3565b33610e8c818787878787611505565b60005b8451811015610f72576000858281518110610eac57610eac61248c565b602002602001015190506000858381518110610eca57610eca61248c565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610f1a5760405162461bcd60e51b815260040161058490612518565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610f57908490612562565b9250508190555050505080610f6b906124b8565b9050610e8f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610fc292919061257a565b60405180910390a4610fd8818787878787611559565b505050505050565b60045460ff166110295760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610584565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006110d6826110d0856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b906116b5565b60085461010090046001600160a01b03908116911614905092915050565b6001600160a01b0384166111545760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610584565b336000611160856116d1565b9050600061116d856116d1565b905061117e83600089858589611505565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906111ae908490612562565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461120e8360008989898961171c565b50505050505050565b600480546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60045460ff16156112b75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610584565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110563390565b816001600160a01b0316836001600160a01b031614156113605760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610584565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166113f35760405162461bcd60e51b8152600401610584906124d3565b3360006113ff856116d1565b9050600061140c856116d1565b905061141c838989858589611505565b6000868152602081815260408083206001600160a01b038c1684529091529020548581101561145d5760405162461bcd60e51b815260040161058490612518565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061149a908490612562565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46114fa848a8a8a8a8a61171c565b505050505050505050565b60045460ff161561154b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610584565b610fd88686868686866117d7565b6001600160a01b0384163b15610fd85760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061159d90899089908890889088906004016125a8565b6020604051808303816000875af19250505080156115d8575060408051601f3d908101601f191682019092526115d591810190612606565b60015b611685576115e4612623565b806308c379a0141561161e57506115f961263f565b806116045750611620565b8060405162461bcd60e51b81526004016105849190611e67565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610584565b6001600160e01b0319811663bc197c8160e01b1461120e5760405162461bcd60e51b8152600401610584906126c8565b60008060006116c48585611950565b91509150610936816119c0565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061170b5761170b61248c565b602090810291909101015292915050565b6001600160a01b0384163b15610fd85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906117609089908990889088908890600401612710565b6020604051808303816000875af192505050801561179b575060408051601f3d908101601f1916820190925261179891810190612606565b60015b6117a7576115e4612623565b6001600160e01b0319811663f23a6e6160e01b1461120e5760405162461bcd60e51b8152600401610584906126c8565b6001600160a01b03851661185e5760005b835181101561185c578281815181106118035761180361248c565b6020026020010151600360008684815181106118215761182161248c565b6020026020010151815260200190815260200160002060008282546118469190612562565b909155506118559050816124b8565b90506117e8565b505b6001600160a01b038416610fd85760005b835181101561120e57600084828151811061188c5761188c61248c565b6020026020010151905060008483815181106118aa576118aa61248c565b602002602001015190506000600360008481526020019081526020016000205490508181101561192d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610584565b60009283526003602052604090922091039055611949816124b8565b905061186f565b6000808251604114156119875760208301516040840151606085015160001a61197b87828585611b7b565b945094505050506119b9565b8251604014156119b157602083015160408401516119a6868383611c68565b9350935050506119b9565b506000905060025b9250929050565b60008160048111156119d4576119d4612755565b14156119dd5750565b60018160048111156119f1576119f1612755565b1415611a3f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610584565b6002816004811115611a5357611a53612755565b1415611aa15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610584565b6003816004811115611ab557611ab5612755565b1415611b0e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610584565b6004816004811115611b2257611b22612755565b14156107d85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610584565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611bb25750600090506003611c5f565b8460ff16601b14158015611bca57508460ff16601c14155b15611bdb5750600090506004611c5f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611c2f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611c5857600060019250925050611c5f565b9150600090505b94509492505050565b6000806001600160ff1b03831681611c8560ff86901c601b612562565b9050611c9387828885611b7b565b935093505050935093915050565b828054611cad90612451565b90600052602060002090601f016020900481019282611ccf5760008555611d15565b82601f10611ce85782800160ff19823516178555611d15565b82800160010185558215611d15579182015b82811115611d15578235825591602001919060010190611cfa565b50611d21929150611d25565b5090565b5b80821115611d215760008155600101611d26565b80356001600160a01b0381168114611d5157600080fd5b919050565b60008060408385031215611d6957600080fd5b611d7283611d3a565b946020939093013593505050565b6001600160e01b0319811681146107d857600080fd5b600060208284031215611da857600080fd5b8135611db381611d80565b9392505050565b600060208284031215611dcc57600080fd5b611db382611d3a565b60008060408385031215611de857600080fd5b82359150611df860208401611d3a565b90509250929050565b600060208284031215611e1357600080fd5b5035919050565b6000815180845260005b81811015611e4057602081850181015186830182015201611e24565b81811115611e52576000602083870101525b50601f01601f19169290920160200192915050565b602081526000611db36020830184611e1a565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715611eb557611eb5611e7a565b6040525050565b60006001600160401b03821115611ed557611ed5611e7a565b5060051b60200190565b600082601f830112611ef057600080fd5b81356020611efd82611ebc565b604051611f0a8282611e90565b83815260059390931b8501820192828101915086841115611f2a57600080fd5b8286015b84811015611f455780358352918301918301611f2e565b509695505050505050565b600082601f830112611f6157600080fd5b81356001600160401b03811115611f7a57611f7a611e7a565b604051611f91601f8301601f191660200182611e90565b818152846020838601011115611fa657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611fdb57600080fd5b611fe486611d3a565b9450611ff260208701611d3a565b935060408601356001600160401b038082111561200e57600080fd5b61201a89838a01611edf565b9450606088013591508082111561203057600080fd5b61203c89838a01611edf565b9350608088013591508082111561205257600080fd5b5061205f88828901611f50565b9150509295509295909350565b6000806040838503121561207f57600080fd5b82356001600160401b038082111561209657600080fd5b818501915085601f8301126120aa57600080fd5b813560206120b782611ebc565b6040516120c48282611e90565b83815260059390931b85018201928281019150898411156120e457600080fd5b948201945b83861015612109576120fa86611d3a565b825294820194908201906120e9565b9650508601359250508082111561211f57600080fd5b5061212c85828601611edf565b9150509250929050565b600081518084526020808501945080840160005b838110156121665781518752958201959082019060010161214a565b509495945050505050565b602081526000611db36020830184612136565b60008083601f84011261219657600080fd5b5081356001600160401b038111156121ad57600080fd5b6020830191508360208285010111156119b957600080fd5b6000806000604084860312156121da57600080fd5b8335925060208401356001600160401b038111156121f757600080fd5b61220386828701612184565b9497909650939450505050565b80358015158114611d5157600080fd5b6000806000806060858703121561223657600080fd5b8435935060208501356001600160401b0381111561225357600080fd5b61225f87828801612184565b9094509250612272905060408601612210565b905092959194509250565b6000806000806060858703121561229357600080fd5b8435935060208501356001600160401b038111156122b057600080fd5b6122bc87828801612184565b9598909750949560400135949350505050565b600080604083850312156122e257600080fd5b6122eb83611d3a565b9150611df860208401612210565b60008060006040848603121561230e57600080fd5b83356001600160401b038082111561232557600080fd5b818601915086601f83011261233957600080fd5b81358181111561234857600080fd5b8760208260051b850101111561235d57600080fd5b6020928301989097509590910135949350505050565b6000806040838503121561238657600080fd5b61238f83611d3a565b9150611df860208401611d3a565b600080600080600060a086880312156123b557600080fd5b6123be86611d3a565b94506123cc60208701611d3a565b9350604086013592506060860135915060808601356001600160401b038111156123f557600080fd5b61205f88828901611f50565b60006020828403121561241357600080fd5b611db382612210565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061246557607f821691505b6020821081141561248657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156124cc576124cc6124a2565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115612575576125756124a2565b500190565b60408152600061258d6040830185612136565b828103602084015261259f8185612136565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906125d490830186612136565b82810360608401526125e68186612136565b905082810360808401526125fa8185611e1a565b98975050505050505050565b60006020828403121561261857600080fd5b8151611db381611d80565b600060033d111561263c5760046000803e5060005160e01c5b90565b600060443d101561264d5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561267c57505050505090565b82850191508151818111156126945750505050505090565b843d87010160208285010111156126ae5750505050505090565b6126bd60208286010187611e90565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061274a90830184611e1a565b979650505050505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209d362421350d52ccee6ac8cd208de670719ec96c38f450892122844da54cd08464736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106101805760003560e01c80635c975abb116100d1578063bd85b0391161008a578063e985e9c511610064578063e985e9c514610473578063f242432a146104bc578063f2fde38b146104dc578063f46a04eb146104fc57600080fd5b8063bd85b03914610419578063d123973014610446578063da8444c81461046057600080fd5b80635c975abb1461036e578063631c1c5a14610386578063715018a6146103995780638456cb59146103ae5780638da5cb5b146103c3578063a22cb465146103f957600080fd5b80632eb2c2d61161013e5780634e1273f4116101185780634e1273f4146102d25780634f558e79146102ff57806357f7789e1461032e5780635b19e9b61461034e57600080fd5b80632eb2c2d6146102885780633ccfd60b146102a85780633f4ba83a146102bd57600080fd5b8062fdd58e1461018557806301ffc9a7146101b8578063046dc166146101e85780630e2d88cf1461020a5780630e89341c146102455780632004ffd914610272575b600080fd5b34801561019157600080fd5b506101a56101a0366004611d56565b61051c565b6040519081526020015b60405180910390f35b3480156101c457600080fd5b506101d86101d3366004611d96565b6105b3565b60405190151581526020016101af565b3480156101f457600080fd5b50610208610203366004611dba565b6105c4565b005b34801561021657600080fd5b506101d8610225366004611dd5565b600560209081526000928352604080842090915290825290205460ff1681565b34801561025157600080fd5b50610265610260366004611e01565b61062f565b6040516101af9190611e67565b34801561027e57600080fd5b506101a560075481565b34801561029457600080fd5b506102086102a3366004611fc3565b6106d1565b3480156102b457600080fd5b50610208610768565b3480156102c957600080fd5b506102086107db565b3480156102de57600080fd5b506102f26102ed36600461206c565b610815565b6040516101af9190612171565b34801561030b57600080fd5b506101d861031a366004611e01565b600090815260036020526040902054151590565b34801561033a57600080fd5b506102086103493660046121c5565b61093e565b34801561035a57600080fd5b50610208610369366004612220565b61098d565b34801561037a57600080fd5b5060045460ff166101d8565b61020861039436600461227d565b6109e5565b3480156103a557600080fd5b50610208610b2d565b3480156103ba57600080fd5b50610208610b67565b3480156103cf57600080fd5b5060045461010090046001600160a01b03166040516001600160a01b0390911681526020016101af565b34801561040557600080fd5b506102086104143660046122cf565b610b9f565b34801561042557600080fd5b506101a5610434366004611e01565b60009081526003602052604090205490565b34801561045257600080fd5b506008546101d89060ff1681565b61020861046e3660046122f9565b610bae565b34801561047f57600080fd5b506101d861048e366004612373565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b3480156104c857600080fd5b506102086104d736600461239d565b610c3d565b3480156104e857600080fd5b506102086104f7366004611dba565b610cc4565b34801561050857600080fd5b50610208610517366004612401565b610d62565b60006001600160a01b03831661058d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006105be82610da5565b92915050565b6004546001600160a01b036101009091041633146105f45760405162461bcd60e51b81526004016105849061241c565b6001600160a01b03811661060757600080fd5b600880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600081815260066020526040902080546060919061064c90612451565b80601f016020809104026020016040519081016040528092919081815260200182805461067890612451565b80156106c55780601f1061069a576101008083540402835291602001916106c5565b820191906000526020600020905b8154815290600101906020018083116106a857829003601f168201915b50505050509050919050565b6001600160a01b0385163314806106ed57506106ed853361048e565b6107545760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610584565b6107618585858585610df5565b5050505050565b6004546001600160a01b036101009091041633146107985760405162461bcd60e51b81526004016105849061241c565b6004546040516001600160a01b0361010090920491909116904780156108fc02916000818181858888f193505050501580156107d8573d6000803e3d6000fd5b50565b6004546001600160a01b0361010090910416331461080b5760405162461bcd60e51b81526004016105849061241c565b610813610fe0565b565b6060815183511461087a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610584565b600083516001600160401b0381111561089557610895611e7a565b6040519080825280602002602001820160405280156108be578160200160208202803683370190505b50905060005b8451811015610936576109098582815181106108e2576108e261248c565b60200260200101518583815181106108fc576108fc61248c565b602002602001015161051c565b82828151811061091b5761091b61248c565b602090810291909101015261092f816124b8565b90506108c4565b509392505050565b6004546001600160a01b0361010090910416331461096e5760405162461bcd60e51b81526004016105849061241c565b6000838152600660205260409020610987908383611ca1565b50505050565b6004546001600160a01b036101009091041633146109bd5760405162461bcd60e51b81526004016105849061241c565b60008481526006602052604090206109d6908484611ca1565b50801561098757505050600755565b60085460ff1615806109f957506007548114155b15610a175760405163447691f760e01b815260040160405180910390fd5b600754600090815260056020908152604080832033845290915290205460ff1615610a5557604051630eaed4a960e41b815260040160405180910390fd5b60408051336020820152908101829052849060600160405160208183030381529060405280519060200120141580610aca5750610ac88484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061107392505050565b155b15610ae8576040516309bde33960e01b815260040160405180910390fd5b60078054600090815260056020908152604080832033808552908352818420805460ff19166001908117909155945482519384019092529282526109879390916110f4565b6004546001600160a01b03610100909104163314610b5d5760405162461bcd60e51b81526004016105849061241c565b6108136000611217565b6004546001600160a01b03610100909104163314610b975760405162461bcd60e51b81526004016105849061241c565b610813611271565b610baa3383836112ec565b5050565b6004546001600160a01b03610100909104163314610bde5760405162461bcd60e51b81526004016105849061241c565b60005b8281101561098757610c2b848483818110610bfe57610bfe61248c565b9050602002016020810190610c139190611dba565b836001604051806020016040528060008152506110f4565b80610c35816124b8565b915050610be1565b6001600160a01b038516331480610c595750610c59853361048e565b610cb75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610584565b61076185858585856113cd565b6004546001600160a01b03610100909104163314610cf45760405162461bcd60e51b81526004016105849061241c565b6001600160a01b038116610d595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610584565b6107d881611217565b6004546001600160a01b03610100909104163314610d925760405162461bcd60e51b81526004016105849061241c565b6008805460ff1916911515919091179055565b60006001600160e01b03198216636cdb3d1360e11b1480610dd657506001600160e01b031982166303a24d0760e21b145b806105be57506301ffc9a760e01b6001600160e01b03198316146105be565b8151835114610e575760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610584565b6001600160a01b038416610e7d5760405162461bcd60e51b8152600401610584906124d3565b33610e8c818787878787611505565b60005b8451811015610f72576000858281518110610eac57610eac61248c565b602002602001015190506000858381518110610eca57610eca61248c565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610f1a5760405162461bcd60e51b815260040161058490612518565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610f57908490612562565b9250508190555050505080610f6b906124b8565b9050610e8f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610fc292919061257a565b60405180910390a4610fd8818787878787611559565b505050505050565b60045460ff166110295760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610584565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006110d6826110d0856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b906116b5565b60085461010090046001600160a01b03908116911614905092915050565b6001600160a01b0384166111545760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610584565b336000611160856116d1565b9050600061116d856116d1565b905061117e83600089858589611505565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906111ae908490612562565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461120e8360008989898961171c565b50505050505050565b600480546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60045460ff16156112b75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610584565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110563390565b816001600160a01b0316836001600160a01b031614156113605760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610584565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166113f35760405162461bcd60e51b8152600401610584906124d3565b3360006113ff856116d1565b9050600061140c856116d1565b905061141c838989858589611505565b6000868152602081815260408083206001600160a01b038c1684529091529020548581101561145d5760405162461bcd60e51b815260040161058490612518565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061149a908490612562565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46114fa848a8a8a8a8a61171c565b505050505050505050565b60045460ff161561154b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610584565b610fd88686868686866117d7565b6001600160a01b0384163b15610fd85760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061159d90899089908890889088906004016125a8565b6020604051808303816000875af19250505080156115d8575060408051601f3d908101601f191682019092526115d591810190612606565b60015b611685576115e4612623565b806308c379a0141561161e57506115f961263f565b806116045750611620565b8060405162461bcd60e51b81526004016105849190611e67565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610584565b6001600160e01b0319811663bc197c8160e01b1461120e5760405162461bcd60e51b8152600401610584906126c8565b60008060006116c48585611950565b91509150610936816119c0565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061170b5761170b61248c565b602090810291909101015292915050565b6001600160a01b0384163b15610fd85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906117609089908990889088908890600401612710565b6020604051808303816000875af192505050801561179b575060408051601f3d908101601f1916820190925261179891810190612606565b60015b6117a7576115e4612623565b6001600160e01b0319811663f23a6e6160e01b1461120e5760405162461bcd60e51b8152600401610584906126c8565b6001600160a01b03851661185e5760005b835181101561185c578281815181106118035761180361248c565b6020026020010151600360008684815181106118215761182161248c565b6020026020010151815260200190815260200160002060008282546118469190612562565b909155506118559050816124b8565b90506117e8565b505b6001600160a01b038416610fd85760005b835181101561120e57600084828151811061188c5761188c61248c565b6020026020010151905060008483815181106118aa576118aa61248c565b602002602001015190506000600360008481526020019081526020016000205490508181101561192d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610584565b60009283526003602052604090922091039055611949816124b8565b905061186f565b6000808251604114156119875760208301516040840151606085015160001a61197b87828585611b7b565b945094505050506119b9565b8251604014156119b157602083015160408401516119a6868383611c68565b9350935050506119b9565b506000905060025b9250929050565b60008160048111156119d4576119d4612755565b14156119dd5750565b60018160048111156119f1576119f1612755565b1415611a3f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610584565b6002816004811115611a5357611a53612755565b1415611aa15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610584565b6003816004811115611ab557611ab5612755565b1415611b0e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610584565b6004816004811115611b2257611b22612755565b14156107d85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610584565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611bb25750600090506003611c5f565b8460ff16601b14158015611bca57508460ff16601c14155b15611bdb5750600090506004611c5f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611c2f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611c5857600060019250925050611c5f565b9150600090505b94509492505050565b6000806001600160ff1b03831681611c8560ff86901c601b612562565b9050611c9387828885611b7b565b935093505050935093915050565b828054611cad90612451565b90600052602060002090601f016020900481019282611ccf5760008555611d15565b82601f10611ce85782800160ff19823516178555611d15565b82800160010185558215611d15579182015b82811115611d15578235825591602001919060010190611cfa565b50611d21929150611d25565b5090565b5b80821115611d215760008155600101611d26565b80356001600160a01b0381168114611d5157600080fd5b919050565b60008060408385031215611d6957600080fd5b611d7283611d3a565b946020939093013593505050565b6001600160e01b0319811681146107d857600080fd5b600060208284031215611da857600080fd5b8135611db381611d80565b9392505050565b600060208284031215611dcc57600080fd5b611db382611d3a565b60008060408385031215611de857600080fd5b82359150611df860208401611d3a565b90509250929050565b600060208284031215611e1357600080fd5b5035919050565b6000815180845260005b81811015611e4057602081850181015186830182015201611e24565b81811115611e52576000602083870101525b50601f01601f19169290920160200192915050565b602081526000611db36020830184611e1a565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715611eb557611eb5611e7a565b6040525050565b60006001600160401b03821115611ed557611ed5611e7a565b5060051b60200190565b600082601f830112611ef057600080fd5b81356020611efd82611ebc565b604051611f0a8282611e90565b83815260059390931b8501820192828101915086841115611f2a57600080fd5b8286015b84811015611f455780358352918301918301611f2e565b509695505050505050565b600082601f830112611f6157600080fd5b81356001600160401b03811115611f7a57611f7a611e7a565b604051611f91601f8301601f191660200182611e90565b818152846020838601011115611fa657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611fdb57600080fd5b611fe486611d3a565b9450611ff260208701611d3a565b935060408601356001600160401b038082111561200e57600080fd5b61201a89838a01611edf565b9450606088013591508082111561203057600080fd5b61203c89838a01611edf565b9350608088013591508082111561205257600080fd5b5061205f88828901611f50565b9150509295509295909350565b6000806040838503121561207f57600080fd5b82356001600160401b038082111561209657600080fd5b818501915085601f8301126120aa57600080fd5b813560206120b782611ebc565b6040516120c48282611e90565b83815260059390931b85018201928281019150898411156120e457600080fd5b948201945b83861015612109576120fa86611d3a565b825294820194908201906120e9565b9650508601359250508082111561211f57600080fd5b5061212c85828601611edf565b9150509250929050565b600081518084526020808501945080840160005b838110156121665781518752958201959082019060010161214a565b509495945050505050565b602081526000611db36020830184612136565b60008083601f84011261219657600080fd5b5081356001600160401b038111156121ad57600080fd5b6020830191508360208285010111156119b957600080fd5b6000806000604084860312156121da57600080fd5b8335925060208401356001600160401b038111156121f757600080fd5b61220386828701612184565b9497909650939450505050565b80358015158114611d5157600080fd5b6000806000806060858703121561223657600080fd5b8435935060208501356001600160401b0381111561225357600080fd5b61225f87828801612184565b9094509250612272905060408601612210565b905092959194509250565b6000806000806060858703121561229357600080fd5b8435935060208501356001600160401b038111156122b057600080fd5b6122bc87828801612184565b9598909750949560400135949350505050565b600080604083850312156122e257600080fd5b6122eb83611d3a565b9150611df860208401612210565b60008060006040848603121561230e57600080fd5b83356001600160401b038082111561232557600080fd5b818601915086601f83011261233957600080fd5b81358181111561234857600080fd5b8760208260051b850101111561235d57600080fd5b6020928301989097509590910135949350505050565b6000806040838503121561238657600080fd5b61238f83611d3a565b9150611df860208401611d3a565b600080600080600060a086880312156123b557600080fd5b6123be86611d3a565b94506123cc60208701611d3a565b9350604086013592506060860135915060808601356001600160401b038111156123f557600080fd5b61205f88828901611f50565b60006020828403121561241357600080fd5b611db382612210565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061246557607f821691505b6020821081141561248657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156124cc576124cc6124a2565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115612575576125756124a2565b500190565b60408152600061258d6040830185612136565b828103602084015261259f8185612136565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906125d490830186612136565b82810360608401526125e68186612136565b905082810360808401526125fa8185611e1a565b98975050505050505050565b60006020828403121561261857600080fd5b8151611db381611d80565b600060033d111561263c5760046000803e5060005160e01c5b90565b600060443d101561264d5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561267c57505050505090565b82850191508151818111156126945750505050505090565b843d87010160208285010111156126ae5750505050505090565b6126bd60208286010187611e90565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061274a90830184611e1a565b979650505050505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212209d362421350d52ccee6ac8cd208de670719ec96c38f450892122844da54cd08464736f6c634300080c0033
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.