// SPDX-License-Identifier: MITpragmasolidity ^0.8.0;import"../interfaces/IAccessControl.sol";
import"./Context.sol";
import"./Strings.sol";
import"./ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/abstractcontractAccessControlisContext, IAccessControl, ERC165{
structRoleData {
mapping(address=>bool) members;
bytes32 adminRole;
}
mapping(bytes32=> RoleData) private _roles;
bytes32publicconstant DEFAULT_ADMIN_ROLE =0x00;
/**
* @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._
*/eventRoleAdminChanged(bytes32indexed role, bytes32indexed previousAdminRole, bytes32indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {_setupRole}.
*/eventRoleGranted(bytes32indexed role, addressindexed account, addressindexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/eventRoleRevoked(bytes32indexed role, addressindexed account, addressindexed sender);
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/modifieronlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/functionsupportsInterface(bytes4 interfaceId) publicviewvirtualoverridereturns (bool) {
return interfaceId ==type(IAccessControl).interfaceId||super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/functionhasRole(bytes32 role, address account) publicviewoverridereturns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/function_checkRole(bytes32 role, address account) internalview{
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/functiongetRoleAdmin(bytes32 role) publicviewoverridereturns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/functiongrantRole(bytes32 role, address account) publicvirtualoverrideonlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/functionrevokeRole(bytes32 role, address account) publicvirtualoverrideonlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/functionrenounceRole(bytes32 role, address account) publicvirtualoverride{
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*/function_setupRole(bytes32 role, address account) internalvirtual{
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/function_setRoleAdmin(bytes32 role, bytes32 adminRole) internalvirtual{
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
function_grantRole(bytes32 role, address account) private{
if (!hasRole(role, account)) {
_roles[role].members[account] =true;
emit RoleGranted(role, account, _msgSender());
}
}
function_revokeRole(bytes32 role, address account) private{
if (hasRole(role, account)) {
_roles[role].members[account] =false;
emit RoleRevoked(role, account, _msgSender());
}
}
}
Contract Source Code
File 2 of 16: Context.sol
// SPDX-License-Identifier: MITpragmasolidity ^0.8.0;/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/abstractcontractContext{
function_msgSender() internalviewvirtualreturns (address) {
returnmsg.sender;
}
function_msgData() internalviewvirtualreturns (bytescalldata) {
returnmsg.data;
}
}
Contract Source Code
File 3 of 16: ERC165.sol
// SPDX-License-Identifier: MITpragmasolidity ^0.8.0;import"../interfaces/IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/abstractcontractERC165isIERC165{
/**
* @dev See {IERC165-supportsInterface}.
*/functionsupportsInterface(bytes4 interfaceId) publicviewvirtualoverridereturns (bool) {
return interfaceId ==type(IERC165).interfaceId;
}
}
Contract Source Code
File 4 of 16: EdenToken.sol
// SPDX-License-Identifier: MITpragmasolidity ^0.8.0;import"./interfaces/IEdenToken.sol";
import"./lib/AccessControl.sol";
/**
* @title EdenToken
* @dev ERC-20 with minting + add-ons to allow for offchain signing
* See EIP-712, EIP-2612, and EIP-3009 for details
*/contractEdenTokenisAccessControl, IEdenToken{
/// @notice EIP-20 token name for this tokenstringpublicoverride name ="Eden";
/// @notice EIP-20 token symbol for this tokenstringpublicoverride symbol ="EDEN";
/// @notice EIP-20 token decimals for this tokenuint8publicoverrideconstant decimals =18;
/// @notice Total number of tokens in circulationuint256publicoverride totalSupply;
/// @notice Max total supplyuint256publicconstantoverride maxSupply =250_000_000e18; // 250 million/// @notice Minter rolebytes32publicconstant MINTER_ROLE =keccak256("MINTER_ROLE");
/// @notice Address which may change token metadataaddresspublicoverride metadataManager;
/// @dev Allowance amounts on behalf of othersmapping (address=>mapping (address=>uint256)) publicoverride allowance;
/// @dev Official record of token balanceOf for each accountmapping (address=>uint256) publicoverride balanceOf;
/// @notice The EIP-712 typehash for the contract's domain/// keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")bytes32publicconstantoverride DOMAIN_TYPEHASH =0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;
/// @notice The EIP-712 version hash/// keccak256("1");bytes32publicconstantoverride VERSION_HASH =0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;
/// @notice The EIP-712 typehash for permit (EIP-2612)/// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");bytes32publicconstantoverride PERMIT_TYPEHASH =0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
/// @notice The EIP-712 typehash for transferWithAuthorization (EIP-3009)/// keccak256("TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)");bytes32publicconstantoverride TRANSFER_WITH_AUTHORIZATION_TYPEHASH =0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267;
/// @notice The EIP-712 typehash for receiveWithAuthorization (EIP-3009)/// keccak256("ReceiveWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)")bytes32publicconstantoverride RECEIVE_WITH_AUTHORIZATION_TYPEHASH =0xd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8;
/// @notice A record of states for signing / validating signaturesmapping (address=>uint) publicoverride nonces;
/// @dev authorizer address > nonce > state (true = used / false = unused)mapping (address=>mapping (bytes32=>bool)) public authorizationState;
/**
* @notice Construct a new Eden token
* @param _admin Default admin role
*/constructor(address _admin) {
metadataManager = _admin;
emit MetadataManagerChanged(address(0), metadataManager);
_setupRole(DEFAULT_ADMIN_ROLE, _admin);
}
/**
* @notice Change the metadataManager address
* @param newMetadataManager The address of the new metadata manager
* @return true if successful
*/functionsetMetadataManager(address newMetadataManager) externaloverridereturns (bool) {
require(msg.sender== metadataManager, "Eden::setMetadataManager: only MM can change MM");
emit MetadataManagerChanged(metadataManager, newMetadataManager);
metadataManager = newMetadataManager;
returntrue;
}
/**
* @notice Mint new tokens
* @param dst The address of the destination account
* @param amount The number of tokens to be minted
* @return Boolean indicating success of mint
*/functionmint(address dst, uint256 amount) externaloverridereturns (bool) {
require(hasRole(MINTER_ROLE, msg.sender), "Eden::mint: only minters can mint");
require(totalSupply + amount <= maxSupply, "Eden::mint: exceeds max supply");
require(dst !=address(0), "Eden::mint: cannot transfer to the zero address");
totalSupply = totalSupply + amount;
balanceOf[dst] = balanceOf[dst] + amount;
emit Transfer(address(0), dst, amount);
returntrue;
}
/**
* @notice Burn tokens
* @param amount The number of tokens to burn
* @return Boolean indicating success of burn
*/functionburn(uint256 amount) externaloverridereturns (bool) {
balanceOf[msg.sender] = balanceOf[msg.sender] - amount;
totalSupply = totalSupply - amount;
emit Transfer(msg.sender, address(0), amount);
returntrue;
}
/**
* @notice Update the token name and symbol
* @param tokenName The new name for the token
* @param tokenSymbol The new symbol for the token
* @return true if successful
*/functionupdateTokenMetadata(stringmemory tokenName, stringmemory tokenSymbol) externaloverridereturns (bool) {
require(msg.sender== metadataManager, "Eden::updateTokenMeta: only MM can update token metadata");
name = tokenName;
symbol = tokenSymbol;
emit TokenMetaUpdated(name, symbol);
returntrue;
}
/**
* @notice Approve `spender` to transfer up to `amount` from `src`
* @dev This will overwrite the approval amount for `spender`
* and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
* It is recommended to use increaseAllowance and decreaseAllowance instead
* @param spender The address of the account which may transfer tokens
* @param amount The number of tokens that are approved (2^256-1 means infinite)
* @return Whether or not the approval succeeded
*/functionapprove(address spender, uint256 amount) externaloverridereturns (bool) {
_approve(msg.sender, spender, amount);
returntrue;
}
/**
* @notice Increase the allowance by a given amount
* @param spender Spender's address
* @param addedValue Amount of increase in allowance
* @return True if successful
*/functionincreaseAllowance(address spender, uint256 addedValue)
externaloverridereturns (bool)
{
_approve(
msg.sender,
spender,
allowance[msg.sender][spender] + addedValue
);
returntrue;
}
/**
* @notice Decrease the allowance by a given amount
* @param spender Spender's address
* @param subtractedValue Amount of decrease in allowance
* @return True if successful
*/functiondecreaseAllowance(address spender, uint256 subtractedValue)
externaloverridereturns (bool)
{
_approve(
msg.sender,
spender,
allowance[msg.sender][spender] - subtractedValue
);
returntrue;
}
/**
* @notice Triggers an approval from owner to spender
* @param owner The address to approve from
* @param spender The address to be approved
* @param value The number of tokens that are approved (2^256-1 means infinite)
* @param deadline The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/functionpermit(address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) externaloverride{
require(deadline >=block.timestamp, "Eden::permit: signature expired");
bytes32 encodeData =keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline));
_validateSignedData(owner, encodeData, v, r, s);
_approve(owner, spender, value);
}
/**
* @notice Transfer `amount` tokens from `msg.sender` to `dst`
* @param dst The address of the destination account
* @param amount The number of tokens to transfer
* @return Whether or not the transfer succeeded
*/functiontransfer(address dst, uint256 amount) externaloverridereturns (bool) {
_transferTokens(msg.sender, dst, amount);
returntrue;
}
/**
* @notice Transfer `amount` tokens from `src` to `dst`
* @param src The address of the source account
* @param dst The address of the destination account
* @param amount The number of tokens to transfer
* @return Whether or not the transfer succeeded
*/functiontransferFrom(address src, address dst, uint256 amount) externaloverridereturns (bool) {
address spender =msg.sender;
uint256 spenderAllowance = allowance[src][spender];
if (spender != src && spenderAllowance !=type(uint256).max) {
uint256 newAllowance = spenderAllowance - amount;
allowance[src][spender] = newAllowance;
emit Approval(src, spender, newAllowance);
}
_transferTokens(src, dst, amount);
returntrue;
}
/**
* @notice Transfer tokens with a signed authorization
* @param from Payer's address (Authorizer)
* @param to Payee's address
* @param value Amount to be transferred
* @param validAfter The time after which this is valid (unix time)
* @param validBefore The time before which this is valid (unix time)
* @param nonce Unique nonce
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/functiontransferWithAuthorization(addressfrom,
address to,
uint256 value,
uint256 validAfter,
uint256 validBefore,
bytes32 nonce,
uint8 v,
bytes32 r,
bytes32 s
) externaloverride{
require(block.timestamp> validAfter, "Eden::transferWithAuth: auth not yet valid");
require(block.timestamp< validBefore, "Eden::transferWithAuth: auth expired");
require(!authorizationState[from][nonce], "Eden::transferWithAuth: auth already used");
bytes32 encodeData =keccak256(abi.encode(TRANSFER_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce));
_validateSignedData(from, encodeData, v, r, s);
authorizationState[from][nonce] =true;
emit AuthorizationUsed(from, nonce);
_transferTokens(from, to, value);
}
/**
* @notice Receive a transfer with a signed authorization from the payer
* @dev This has an additional check to ensure that the payee's address matches
* the caller of this function to prevent front-running attacks.
* @param from Payer's address (Authorizer)
* @param to Payee's address
* @param value Amount to be transferred
* @param validAfter The time after which this is valid (unix time)
* @param validBefore The time before which this is valid (unix time)
* @param nonce Unique nonce
* @param v v of the signature
* @param r r of the signature
* @param s s of the signature
*/functionreceiveWithAuthorization(addressfrom,
address to,
uint256 value,
uint256 validAfter,
uint256 validBefore,
bytes32 nonce,
uint8 v,
bytes32 r,
bytes32 s
) externaloverride{
require(to ==msg.sender, "Eden::receiveWithAuth: caller must be the payee");
require(block.timestamp> validAfter, "Eden::receiveWithAuth: auth not yet valid");
require(block.timestamp< validBefore, "Eden::receiveWithAuth: auth expired");
require(!authorizationState[from][nonce], "Eden::receiveWithAuth: auth already used");
bytes32 encodeData =keccak256(abi.encode(RECEIVE_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce));
_validateSignedData(from, encodeData, v, r, s);
authorizationState[from][nonce] =true;
emit AuthorizationUsed(from, nonce);
_transferTokens(from, to, value);
}
/**
* @notice EIP-712 Domain separator
* @return Separator
*/functiongetDomainSeparator() publicviewoverridereturns (bytes32) {
returnkeccak256(
abi.encode(
DOMAIN_TYPEHASH,
keccak256(bytes(name)),
VERSION_HASH,
block.chainid,
address(this)
)
);
}
/**
* @notice Recovers address from signed data and validates the signature
* @param signer Address that signed the data
* @param encodeData Data signed by the address
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/function_validateSignedData(address signer, bytes32 encodeData, uint8 v, bytes32 r, bytes32 s) internalview{
bytes32 digest =keccak256(
abi.encodePacked(
"\x19\x01",
getDomainSeparator(),
encodeData
)
);
address recoveredAddress =ecrecover(digest, v, r, s);
// Explicitly disallow authorizations for address(0) as ecrecover returns address(0) on malformed messagesrequire(recoveredAddress !=address(0) && recoveredAddress == signer, "Eden::validateSig: invalid signature");
}
/**
* @notice Approval implementation
* @param owner The address of the account which owns tokens
* @param spender The address of the account which may transfer tokens
* @param amount The number of tokens that are approved (2^256-1 means infinite)
*/function_approve(address owner, address spender, uint256 amount) internal{
require(owner !=address(0), "Eden::_approve: approve from the zero address");
require(spender !=address(0), "Eden::_approve: approve to the zero address");
allowance[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @notice Transfer implementation
* @param from The address of the account which owns tokens
* @param to The address of the account which is receiving tokens
* @param value The number of tokens that are being transferred
*/function_transferTokens(addressfrom, address to, uint256 value) internal{
require(to !=address(0), "Eden::_transferTokens: cannot transfer to the zero address");
balanceOf[from] = balanceOf[from] - value;
balanceOf[to] = balanceOf[to] + value;
emit Transfer(from, to, value);
}
}
// SPDX-License-Identifier: MITpragmasolidity ^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}.
*/interfaceIERC165{
/**
* @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.
*/functionsupportsInterface(bytes4 interfaceId) externalviewreturns (bool);
}
Contract Source Code
File 7 of 16: IERC20.sol
// SPDX-License-Identifier: MITpragmasolidity ^0.8.0;/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/interfaceIERC20{
/**
* @dev Returns the amount of tokens in existence.
*/functiontotalSupply() externalviewreturns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/functionbalanceOf(address account) externalviewreturns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/functiontransfer(address recipient, uint256 amount) externalreturns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/functionallowance(address owner, address spender) externalviewreturns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/functionapprove(address spender, uint256 amount) externalreturns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/functiontransferFrom(address sender,
address recipient,
uint256 amount
) externalreturns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/eventTransfer(addressindexedfrom, addressindexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/eventApproval(addressindexed owner, addressindexed spender, uint256 value);
}
// SPDX-License-Identifier: MITpragmasolidity ^0.8.0;import"./IERC20.sol";
interfaceIERC20MetadataisIERC20{
/**
* @dev Returns the name of the token.
*/functionname() externalviewreturns (stringmemory);
/**
* @dev Returns the symbol of the token.
*/functionsymbol() externalviewreturns (stringmemory);
/**
* @dev Returns the decimals places of the token.
*/functiondecimals() externalviewreturns (uint8);
}