ERC-20
Overview
Max Total Supply
4,069,569,208,423.569847731667580508 NAKAS
Holders
5,646
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
1,000,000 NAKASValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Minimal Proxy Contract for 0x303a41300baeb37a1028af017b17b8a6edc3066a
Contract Name:
TokenERC20
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 490 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 { ITokenERC20 } from "../interfaces/token/ITokenERC20.sol";import "../interfaces/IThirdwebContract.sol";import "../extension/interface/IPlatformFee.sol";import "../extension/interface/IPrimarySale.sol";// Tokenimport "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";// Securityimport "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";// Signature utilsimport "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";// Meta transactionsimport "../openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol";// Utils
1234567891011121314151617181920212223242526// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;/*** @title ERC20 interface* @dev see https://github.com/ethereum/EIPs/issues/20*/interface IERC20 {function totalSupply() external view returns (uint256);function balanceOf(address who) external view returns (uint256);function allowance(address owner, address spender) external view returns (uint256);function transfer(address to, uint256 value) external returns (bool);function approve(address spender, uint256 value) external returns (bool);function transferFrom(address from,address to,uint256 value) external returns (bool);event Transfer(address indexed from, address indexed to, uint256 value);
12345678910111213141516171819// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;/*** Thirdweb's `PlatformFee` is a contract extension to be used with any base contract. It exposes functions for setting and reading* the recipient of platform fee and the platform fee basis points, and lets the inheriting contract perform conditional logic* that uses information about platform fees, if desired.*/interface IPlatformFee {/// @dev Returns the platform fee bps and recipient.function getPlatformFeeInfo() external view returns (address, uint16);/// @dev Lets a module admin update the fees on primary sales.function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external;/// @dev Emitted when fee on primary sales is updated.event PlatformFeeInfoUpdated(address indexed platformFeeRecipient, uint256 platformFeeBps);}
12345678910111213141516171819// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;/*** Thirdweb's `Primary` is a contract extension to be used with any base contract. It exposes functions for setting and reading* the recipient of primary sales, and lets the inheriting contract perform conditional logic that uses information about* primary sales, if desired.*/interface IPrimarySale {/// @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;/// @dev Emitted when a new sale recipient is set.event PrimarySaleRecipientUpdated(address indexed recipient);}
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.0;interface IWETH {function deposit() external payable;function withdraw(uint256 amount) external;function transfer(address to, uint256 value) external returns (bool);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.11;import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol";interface ITokenERC20 is IERC20MetadataUpgradeable {/*** @notice The body of a request to mint tokens.** @param to The receiver of the tokens to mint.* @param primarySaleRecipient The receiver of the primary sale funds from the mint.* @param quantity The quantity of tpkens to mint.* @param price Price to pay for minting with the signature.* @param currency The currency in which the price per token must be paid.* @param validityStartTimestamp The unix timestamp after which the request is valid.* @param validityEndTimestamp The unix timestamp after which the request expires.* @param uid A unique identifier for the request.*/struct MintRequest {address to;address primarySaleRecipient;uint256 quantity;uint256 price;address currency;uint128 validityStartTimestamp;uint128 validityEndTimestamp;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;// Helper interfacesimport { IWETH } from "../interfaces/IWETH.sol";import "../openzeppelin-presets/token/ERC20/utils/SafeERC20.sol";library CurrencyTransferLib {using SafeERC20 for IERC20;/// @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) {
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 (last updated v4.5.0) (utils/Address.sol)pragma solidity ^0.8.0;/*** @dev Collection of functions related to the address type*/library TWAddress {/*** @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.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) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)pragma solidity ^0.8.0;import "../../../../eip/interface/IERC20.sol";import "../../../../lib/TWAddress.sol";/*** @title SafeERC20* @dev Wrappers around ERC20 operations that throw on failure (when the token* contract returns false). Tokens that return no value (and instead revert or* throw on failure) are also supported, non-reverting calls are assumed to be* successful.* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.*/library SafeERC20 {using TWAddress for address;function safeTransfer(IERC20 token,address to,uint256 value) internal {_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
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 (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 (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 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);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol)pragma solidity ^0.8.0;/*** @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.** _Available since v4.5._*/interface IVotesUpgradeable {/*** @dev Emitted when an account changes their delegate.*/event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);/*** @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.*/event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);/*** @dev Returns the current amount of votes that `account` has.*/function getVotes(address account) external view returns (uint256);/**
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 (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 (last updated v4.5.0) (token/ERC20/ERC20.sol)pragma solidity ^0.8.0;import "./IERC20Upgradeable.sol";import "./extensions/IERC20MetadataUpgradeable.sol";import "../../utils/ContextUpgradeable.sol";import "../../proxy/utils/Initializable.sol";/*** @dev Implementation of the {IERC20} interface.** This implementation is agnostic to the way tokens are created. This means* that a supply mechanism has to be added in a derived contract using {_mint}.* For a generic mechanism see {ERC20PresetMinterPauser}.** TIP: For a detailed writeup see our guide* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How* to implement supply mechanisms].** We have followed general OpenZeppelin Contracts guidelines: functions revert* instead returning `false` on failure. This behavior is nonetheless* conventional and does not conflict with the expectations of ERC20* applications.*
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.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)pragma solidity ^0.8.0;import "../ERC20Upgradeable.sol";import "../../../utils/ContextUpgradeable.sol";import "../../../proxy/utils/Initializable.sol";/*** @dev Extension of {ERC20} that allows token holders to destroy both their own* tokens and those that they have an allowance for, in a way that can be* recognized off-chain (via event analysis).*/abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable {function __ERC20Burnable_init() internal onlyInitializing {}function __ERC20Burnable_init_unchained() internal onlyInitializing {}/*** @dev Destroys `amount` tokens from the caller.** See {ERC20-_burn}.*/function burn(uint256 amount) public virtual {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)pragma solidity ^0.8.0;import "./draft-ERC20PermitUpgradeable.sol";import "../../../utils/math/MathUpgradeable.sol";import "../../../governance/utils/IVotesUpgradeable.sol";import "../../../utils/math/SafeCastUpgradeable.sol";import "../../../utils/cryptography/ECDSAUpgradeable.sol";import "../../../proxy/utils/Initializable.sol";/*** @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,* and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.** NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.** This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either* by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting* power can be queried through the public accessors {getVotes} and {getPastVotes}.** By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it* requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.** _Available since v4.2._
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)pragma solidity ^0.8.0;import "../IERC20Upgradeable.sol";/*** @dev Interface for the optional metadata functions from the ERC20 standard.** _Available since v4.1._*/interface IERC20MetadataUpgradeable is IERC20Upgradeable {/*** @dev Returns the name of the token.*/function name() external view returns (string memory);/*** @dev Returns the symbol of the token.*/function symbol() external view returns (string memory);/*** @dev Returns the decimals places of the token.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-ERC20Permit.sol)pragma solidity ^0.8.0;import "./draft-IERC20PermitUpgradeable.sol";import "../ERC20Upgradeable.sol";import "../../../utils/cryptography/draft-EIP712Upgradeable.sol";import "../../../utils/cryptography/ECDSAUpgradeable.sol";import "../../../utils/CountersUpgradeable.sol";import "../../../proxy/utils/Initializable.sol";/*** @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].** Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by* presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't* need to send a transaction, and thus is not required to hold Ether at all.** _Available since v3.4._*/abstract contract ERC20PermitUpgradeable is Initializable, ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {using CountersUpgradeable for CountersUpgradeable.Counter;mapping(address => CountersUpgradeable.Counter) private _nonces;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].** Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't* need to send a transaction, and thus is not required to hold Ether at all.*/interface IERC20PermitUpgradeable {/*** @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,* given ``owner``'s signed approval.** IMPORTANT: The same issues {IERC20-approve} has related to transaction* ordering also apply here.** Emits an {Approval} event.** Requirements:** - `spender` cannot be the zero address.
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/Counters.sol)pragma solidity ^0.8.0;/*** @title Counters* @author Matt Condon (@shrugs)* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number* of elements in a mapping, issuing ERC721 ids, or counting request ids.** Include with `using Counters for Counters.Counter;`*/library CountersUpgradeable {struct Counter {// This variable should never be directly accessed by users of the library: interactions must be restricted to// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add// this feature: see https://github.com/ethereum/solidity/issues/4637uint256 _value; // default: 0}function current(Counter storage counter) internal view returns (uint256) {return counter._value;}function increment(Counter storage counter) internal {
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: 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/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 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 {}
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);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)pragma solidity ^0.8.0;/*** @dev Standard math utilities missing in the Solidity language.*/library MathUpgradeable {/*** @dev Returns the largest of two numbers.*/function max(uint256 a, uint256 b) internal pure returns (uint256) {return a >= b ? a : b;}/*** @dev Returns the smallest of two numbers.*/function min(uint256 a, uint256 b) internal pure returns (uint256) {return a < b ? a : b;}/*** @dev Returns the average of two numbers. The result is rounded towards* zero.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)pragma solidity ^0.8.0;/*** @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow* checks.** Downcasting from uint256/int256 in Solidity does not revert on overflow. This can* easily result in undesired exploitation or bugs, since developers usually* assume that overflows raise errors. `SafeCast` restores this intuition by* reverting the transaction when such an operation overflows.** Using this library instead of the unchecked operations eliminates an entire* class of bugs, so it's recommended to use it always.** Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing* all math on `uint256` and `int256` and then downcasting.*/library SafeCastUpgradeable {/*** @dev Returns the downcasted uint224 from uint256, reverting on* overflow (when the input is greater than largest uint224).** Counterpart to Solidity's `uint224` operator.
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{"optimizer": {"enabled": true,"runs": 490},"evmVersion": "london","remappings": [":@chainlink/contracts/src/=node_modules/@chainlink/contracts/src/",":@ds-test/=lib/ds-test/src/",":@openzeppelin/=node_modules/@openzeppelin/",":@std/=lib/forge-std/src/",":contracts/=contracts/",":ds-test/=lib/ds-test/src/",":erc721a-upgradeable/=node_modules/erc721a-upgradeable/",":erc721a/=node_modules/erc721a/",":forge-std/=lib/forge-std/src/"],"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"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":"address","name":"mintedTo","type":"address"},{"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"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"primarySaleRecipient","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"price","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 ITokenERC20.MintRequest","name":"mintRequest","type":"tuple"}],"name":"TokensMintedWithSignature","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint32","name":"pos","type":"uint32"}],"name":"checkpoints","outputs":[{"components":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint224","name":"votes","type":"uint224"}],"internalType":"struct ERC20VotesUpgradeable.Checkpoint","name":"","type":"tuple"}],"stateMutability":"view","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":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"account","type":"address"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"_platformFeeRecipient","type":"address"},{"internalType":"uint256","name":"_platformFeeBps","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"amount","type":"uint256"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"primarySaleRecipient","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"price","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 ITokenERC20.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":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","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":"string","name":"_uri","type":"string"}],"name":"setContractURI","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":"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":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"primarySaleRecipient","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"price","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 ITokenERC20.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.