Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
7,812 UFO
Holders
7,723
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 |
---|
Minimal Proxy Contract for 0x33524da1fb4bebaf2c9046407a6944d6e16b460f
Contract Name:
TokenERC1155
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;// Interfaceimport { ITokenERC1155 } from "../interfaces/token/ITokenERC1155.sol";// Tokenimport "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";// Signature utilsimport "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";// Access Control + securityimport "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";// Utilsimport "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol";import "../lib/CurrencyTransferLib.sol";import "../lib/FeeType.sol";import "../openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol";// Helper interfacesimport "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";
1234567891011121314151617181920212223242526// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";import "../IThirdwebContract.sol";import "../IThirdwebPlatformFee.sol";import "../IThirdwebPrimarySale.sol";import "../IThirdwebRoyalty.sol";import "../IThirdwebOwnable.sol";/*** `SignatureMint1155` is an ERC 1155 contract. It lets anyone mint NFTs by producing a mint request* and a signature (produced by an account with MINTER_ROLE, signing the mint request).*/interface ITokenERC1155 isIThirdwebContract,IThirdwebOwnable,IThirdwebRoyalty,IThirdwebPrimarySale,IThirdwebPlatformFee,IERC1155Upgradeable{/*** @notice The body of a request to mint NFTs.** @param to The receiver of the NFTs to mint.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)pragma solidity ^0.8.0;import "./IERC1155Upgradeable.sol";import "./IERC1155ReceiverUpgradeable.sol";import "./extensions/IERC1155MetadataURIUpgradeable.sol";import "../../utils/AddressUpgradeable.sol";import "../../utils/ContextUpgradeable.sol";import "../../utils/introspection/ERC165Upgradeable.sol";import "../../proxy/utils/Initializable.sol";/*** @dev Implementation of the basic standard multi-token.* See https://eips.ethereum.org/EIPS/eip-1155* Originally based on code by Enjin: https://github.com/enjin/erc-1155** _Available since v3.1._*/contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {using AddressUpgradeable for address;// Mapping from token ID to account balancesmapping(uint256 => mapping(address => uint256)) private _balances;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)pragma solidity ^0.8.0;import "../StringsUpgradeable.sol";/*** @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.** These functions can be used to verify that a message was signed by the holder* of the private keys of a given address.*/library ECDSAUpgradeable {enum RecoverError {NoError,InvalidSignature,InvalidSignatureLength,InvalidSignatureS,InvalidSignatureV}function _throwError(RecoverError error) private pure {if (error == RecoverError.NoError) {return; // no error: do nothing} else if (error == RecoverError.InvalidSignature) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)pragma solidity ^0.8.0;import "./ECDSAUpgradeable.sol";import "../../proxy/utils/Initializable.sol";/*** @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.** The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,* thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding* they need in their contracts using a combination of `abi.encode` and `keccak256`.** This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA* ({_hashTypedDataV4}).** The implementation of the domain separator was designed to be as efficient as possible while still properly updating* the chain id to protect against replay attacks on an eventual fork of the chain.** NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].** _Available since v3.4._
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)pragma solidity ^0.8.0;import "./IAccessControlEnumerableUpgradeable.sol";import "./AccessControlUpgradeable.sol";import "../utils/structs/EnumerableSetUpgradeable.sol";import "../proxy/utils/Initializable.sol";/*** @dev Extension of {AccessControl} that allows enumerating the members of each role.*/abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {function __AccessControlEnumerable_init() internal onlyInitializing {}function __AccessControlEnumerable_init_unchained() internal onlyInitializing {}using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;/*** @dev See {IERC165-supportsInterface}.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)pragma solidity ^0.8.0;import "../proxy/utils/Initializable.sol";/*** @dev Contract module that helps prevent reentrant calls to a function.** Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier* available, which can be applied to functions to make sure there are no nested* (reentrant) calls to them.** Note that because there is a single `nonReentrant` guard, functions marked as* `nonReentrant` may not call one another. This can be worked around by making* those functions `private`, and then adding `external` `nonReentrant` entry* points to them.** TIP: If you would like to learn more about reentrancy and alternative ways* to protect against it, check out our blog post* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].*/abstract contract ReentrancyGuardUpgradeable is Initializable {// Booleans are more expensive than uint256 or any type that takes up a full// word because each write operation emits an extra SLOAD to first read the// slot's contents, replace the bits taken up by the boolean, and then write
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)pragma solidity ^0.8.0;/*** @dev String operations.*/library StringsUpgradeable {bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";/*** @dev Converts a `uint256` to its ASCII `string` decimal representation.*/function toString(uint256 value) internal pure returns (string memory) {// Inspired by OraclizeAPI's implementation - MIT licence// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.solif (value == 0) {return "0";}uint256 temp = value;uint256 digits;while (temp != 0) {digits++;temp /= 10;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (utils/Multicall.sol)pragma solidity ^0.8.0;import "./AddressUpgradeable.sol";import "../proxy/utils/Initializable.sol";/*** @dev Provides a function to batch together multiple calls in a single external call.** _Available since v4.1._*/abstract contract MulticallUpgradeable is Initializable {function __Multicall_init() internal onlyInitializing {}function __Multicall_init_unchained() internal onlyInitializing {}/*** @dev Receives and executes a batch of function calls on this contract.*/function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {results = new bytes[](data.length);for (uint256 i = 0; i < data.length; i++) {results[i] = _functionDelegateCall(address(this), data[i]);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;// Helper interfacesimport { IWETH } from "../interfaces/IWETH.sol";import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";library CurrencyTransferLib {/// @dev The address interpreted as native token of the chain.address public constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;/// @dev Transfers a given amount of currency.function transferCurrency(address _currency,address _from,address _to,uint256 _amount) internal {if (_amount == 0) {return;}if (_currency == NATIVE_TOKEN) {safeTransferNativeToken(_to, _amount);} else {safeTransferERC20(_currency, _from, _to, _amount);
12345678// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;library FeeType {uint256 internal constant PRIMARY_SALE = 0;uint256 internal constant MARKET_SALE = 1;uint256 internal constant SPLIT = 2;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.0 (metatx/ERC2771Context.sol)pragma solidity ^0.8.11;import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";/*** @dev Context variant with ERC2771 support.*/abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable {mapping(address => bool) private _trustedForwarder;function __ERC2771Context_init(address[] memory trustedForwarder) internal onlyInitializing {__Context_init_unchained();__ERC2771Context_init_unchained(trustedForwarder);}function __ERC2771Context_init_unchained(address[] memory trustedForwarder) internal onlyInitializing {for (uint256 i = 0; i < trustedForwarder.length; i++) {_trustedForwarder[trustedForwarder[i]] = true;}}function isTrustedForwarder(address forwarder) public view virtual returns (bool) {
12345678910111213141516171819202122232425// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)pragma solidity ^0.8.0;import "./IERC165Upgradeable.sol";/*** @dev Interface for the NFT Royalty Standard.** A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal* support for royalty payments across all NFT marketplaces and ecosystem participants.** _Available since v4.5._*/interface IERC2981Upgradeable is IERC165Upgradeable {/*** @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of* exchange. The royalty amount is denominated and should be payed in that same unit of exchange.*/function royaltyInfo(uint256 tokenId, uint256 salePrice)externalviewreturns (address receiver, uint256 royaltyAmount);}
123456// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;interface ITWFee {function getFeeInfo(address _proxy, uint256 _type) external view returns (address recipient, uint256 bps);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)pragma solidity ^0.8.0;import "../../utils/introspection/IERC165Upgradeable.sol";/*** @dev Required interface of an ERC1155 compliant contract, as defined in the* https://eips.ethereum.org/EIPS/eip-1155[EIP].** _Available since v3.1._*/interface IERC1155Upgradeable is IERC165Upgradeable {/*** @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.*/event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);/*** @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all* transfers.*/event TransferBatch(address indexed operator,address indexed from,
12345678910111213141516171819// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;interface IThirdwebContract {/// @dev Returns the module type of the contract.function contractType() external pure returns (bytes32);/// @dev Returns the version of the contract.function contractVersion() external pure returns (uint8);/// @dev Returns the metadata URI of the contract.function contractURI() external view returns (string memory);/*** @dev Sets contract URI for the storefront-level metadata of the contract.* Only module admin can call this function.*/function setContractURI(string calldata _uri) external;}
12345678910// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;interface IThirdwebPlatformFee {/// @dev Returns the platform fee bps and recipient.function getPlatformFeeInfo() external view returns (address platformFeeRecipient, uint16 platformFeeBps);/// @dev Lets a module admin update the fees on primary sales.function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external;}
12345678910// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;interface IThirdwebPrimarySale {/// @dev The adress that receives all primary sales value.function primarySaleRecipient() external view returns (address);/// @dev Lets a module admin set the default recipient of all primary sales.function setPrimarySaleRecipient(address _saleRecipient) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";interface IThirdwebRoyalty is IERC2981Upgradeable {struct RoyaltyInfo {address recipient;uint256 bps;}/// @dev Returns the royalty recipient and fee bps.function getDefaultRoyaltyInfo() external view returns (address, uint16);/// @dev Lets a module admin update the royalty bps and recipient.function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external;/// @dev Lets a module admin set the royalty recipient for a particular token Id.function setRoyaltyInfoForToken(uint256 tokenId,address recipient,uint256 bps) external;/// @dev Returns the royalty recipient for a particular token Id.function getRoyaltyInfoForToken(uint256 tokenId) external view returns (address, uint16);
12345678910// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;interface IThirdwebOwnable {/// @dev Returns the owner of the contract.function owner() external view returns (address);/// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin.function setOwner(address _newOwner) external;}
12345678910111213141516171819202122232425// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC165 standard, as defined in the* https://eips.ethereum.org/EIPS/eip-165[EIP].** Implementers can declare support of contract interfaces, which can then be* queried by others ({ERC165Checker}).** For an implementation, see {ERC165}.*/interface IERC165Upgradeable {/*** @dev Returns true if this contract implements the interface defined by* `interfaceId`. See the corresponding* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]* to learn more about how these ids are created.** This function call must use less than 30 000 gas.*/function supportsInterface(bytes4 interfaceId) external view returns (bool);}
123456// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)pragma solidity ^0.8.0;import "../utils/introspection/IERC165Upgradeable.sol";
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)pragma solidity ^0.8.0;import "../../utils/introspection/IERC165Upgradeable.sol";/*** @dev _Available since v3.1._*/interface IERC1155ReceiverUpgradeable is IERC165Upgradeable {/*** @dev Handles the receipt of a single ERC1155 token type. This function is* called at the end of a `safeTransferFrom` after the balance has been updated.** NOTE: To accept the transfer, this must return* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`* (i.e. 0xf23a6e61, or its own function selector).** @param operator The address which initiated the transfer (i.e. msg.sender)* @param from The address which previously owned the token* @param id The ID of the token being transferred* @param value The amount of tokens being transferred* @param data Additional data with no specified format* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed*/
12345678910111213141516171819202122// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)pragma solidity ^0.8.0;import "../IERC1155Upgradeable.sol";/*** @dev Interface of the optional ERC1155MetadataExtension interface, as defined* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].** _Available since v3.1._*/interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {/*** @dev Returns the URI for token type `id`.** If the `\{id\}` substring is present in the URI, it must be replaced by* clients with the actual token type ID.*/function uri(uint256 id) external view returns (string memory);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library AddressUpgradeable {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed* ====*
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)pragma solidity ^0.8.0;import "../proxy/utils/Initializable.sol";/*** @dev Provides information about the current execution context, including the* sender of the transaction and its data. While these are generally available* via msg.sender and msg.data, they should not be accessed in such a direct* manner, since when dealing with meta-transactions the account sending and* paying for execution may not be the actual sender (as far as an application* is concerned).** This contract is only required for intermediate, library-like contracts.*/abstract contract ContextUpgradeable is Initializable {function __Context_init() internal onlyInitializing {}function __Context_init_unchained() internal onlyInitializing {}function _msgSender() internal view virtual returns (address) {return msg.sender;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)pragma solidity ^0.8.0;import "./IERC165Upgradeable.sol";import "../../proxy/utils/Initializable.sol";/*** @dev Implementation of the {IERC165} interface.** Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check* for the additional interface id that will be supported. For example:** ```solidity* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);* }* ```** Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.*/abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {function __ERC165_init() internal onlyInitializing {}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)pragma solidity ^0.8.0;import "../../utils/AddressUpgradeable.sol";/*** @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.** 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 initialize the implementation contract, you can either invoke the* initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)pragma solidity ^0.8.0;import "./IAccessControlUpgradeable.sol";/*** @dev External interface of AccessControlEnumerable declared to support ERC165 detection.*/interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {/*** @dev Returns one of the accounts that have `role`. `index` must be a* value between 0 and {getRoleMemberCount}, non-inclusive.** Role bearers are not sorted in any particular way, and their ordering may* change at any point.** WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure* you perform all queries on the same block. See the following* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]* for more information.*/function getRoleMember(bytes32 role, uint256 index) external view returns (address);/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)pragma solidity ^0.8.0;import "./IAccessControlUpgradeable.sol";import "../utils/ContextUpgradeable.sol";import "../utils/StringsUpgradeable.sol";import "../utils/introspection/ERC165Upgradeable.sol";import "../proxy/utils/Initializable.sol";/*** @dev Contract module that allows children to implement role-based access* control mechanisms. This is a lightweight version that doesn't allow enumerating role* members except through off-chain means by accessing the contract event logs. Some* applications may benefit from on-chain enumerability, for those cases see* {AccessControlEnumerable}.** Roles are referred to by their `bytes32` identifier. These should be exposed* in the external API and be unique. The best way to achieve this is by* using `public constant` hash digests:** ```* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");* ```*
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)pragma solidity ^0.8.0;/*** @dev Library for managing* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive* types.** Sets have the following properties:** - Elements are added, removed, and checked for existence in constant time* (O(1)).* - Elements are enumerated in O(n). No guarantees are made on the ordering.** ```* contract Example {* // Add the library methods* using EnumerableSet for EnumerableSet.AddressSet;** // Declare a set state variable* EnumerableSet.AddressSet private mySet;* }* ```*
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)pragma solidity ^0.8.0;/*** @dev External interface of AccessControl declared to support ERC165 detection.*/interface IAccessControlUpgradeable {/*** @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`** `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite* {RoleAdminChanged} not being emitted signaling this.** _Available since v3.1._*/event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);/*** @dev Emitted when `account` is granted `role`.** `sender` is the account that originated the contract call, an admin role* bearer except when using {AccessControl-_setupRole}.*/event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
12345678910// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;interface IWETH {function deposit() external payable;function withdraw(uint256 amount) external;function transfer(address to, uint256 value) external returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC20 standard as defined in the EIP.*/interface IERC20Upgradeable {/*** @dev Returns the amount of tokens in existence.*/function totalSupply() external view returns (uint256);/*** @dev Returns the amount of tokens owned by `account`.*/function balanceOf(address account) external view returns (uint256);/*** @dev Moves `amount` tokens from the caller's account to `to`.** Returns a boolean value indicating whether the operation succeeded.** Emits a {Transfer} event.*/
12345678910111213141516171819202122{"metadata": {"bytecodeHash": "none"},"optimizer": {"enabled": true,"runs": 800},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
[{"inputs":[{"internalType":"address","name":"_thirdwebFee","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRoyaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRoyaltyBps","type":"uint256"}],"name":"DefaultRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"platformFeeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"platformFeeBps","type":"uint256"}],"name":"PlatformFeeInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"PrimarySaleRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"royaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltyBps","type":"uint256"}],"name":"RoyaltyForToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mintedTo","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenIdMinted","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"},{"indexed":false,"internalType":"uint256","name":"quantityMinted","type":"uint256"}],"name":"TokensMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":true,"internalType":"address","name":"mintedTo","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenIdMinted","type":"uint256"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"royaltyRecipient","type":"address"},{"internalType":"uint256","name":"royaltyBps","type":"uint256"},{"internalType":"address","name":"primarySaleRecipient","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint128","name":"validityStartTimestamp","type":"uint128"},{"internalType":"uint128","name":"validityEndTimestamp","type":"uint128"},{"internalType":"bytes32","name":"uid","type":"bytes32"}],"indexed":false,"internalType":"struct ITokenERC1155.MintRequest","name":"mintRequest","type":"tuple"}],"name":"TokensMintedWithSignature","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractType","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDefaultRoyaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPlatformFeeInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRoyaltyInfoForToken","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_defaultAdmin","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"address[]","name":"_trustedForwarders","type":"address[]"},{"internalType":"address","name":"_primarySaleRecipient","type":"address"},{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint128","name":"_royaltyBps","type":"uint128"},{"internalType":"uint128","name":"_platformFeeBps","type":"uint128"},{"internalType":"address","name":"_platformFeeRecipient","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"royaltyRecipient","type":"address"},{"internalType":"uint256","name":"royaltyBps","type":"uint256"},{"internalType":"address","name":"primarySaleRecipient","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint128","name":"validityStartTimestamp","type":"uint128"},{"internalType":"uint128","name":"validityEndTimestamp","type":"uint128"},{"internalType":"bytes32","name":"uid","type":"bytes32"}],"internalType":"struct ITokenERC1155.MintRequest","name":"_req","type":"tuple"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"mintWithSignature","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenIdToMint","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":"platformFeeBps","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primarySaleRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"uint256","name":"","type":"uint256"}],"name":"saleRecipientForToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint256","name":"_royaltyBps","type":"uint256"}],"name":"setDefaultRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_platformFeeRecipient","type":"address"},{"internalType":"uint256","name":"_platformFeeBps","type":"uint256"}],"name":"setPlatformFeeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_saleRecipient","type":"address"}],"name":"setPrimarySaleRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_bps","type":"uint256"}],"name":"setRoyaltyInfoForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"thirdwebFee","outputs":[{"internalType":"contract ITWFee","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"royaltyRecipient","type":"address"},{"internalType":"uint256","name":"royaltyBps","type":"uint256"},{"internalType":"address","name":"primarySaleRecipient","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint128","name":"validityStartTimestamp","type":"uint128"},{"internalType":"uint128","name":"validityEndTimestamp","type":"uint128"},{"internalType":"bytes32","name":"uid","type":"bytes32"}],"internalType":"struct ITokenERC1155.MintRequest","name":"_req","type":"tuple"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
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.