Appearance
Solidity API
ERC20PermitInternal
derived from https://github.com/soliditylabs/ERC20-Permit (MIT license)
EIP712_TYPE_HASH
solidity
bytes32 EIP712_TYPE_HASH_DOMAIN_SEPARATOR
solidity
function _DOMAIN_SEPARATOR() internal view returns (bytes32 domainSeparator)return the EIP-712 domain separator unique to contract and chain
Return Values
| Name | Type | Description |
|---|---|---|
| domainSeparator | bytes32 | domain separator |
_nonces
solidity
function _nonces(address owner) internal view returns (uint256)get the current ERC2612 nonce for the given address
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | current nonce |
_version
solidity
function _version() internal view virtual returns (string version)query signing domain version
Return Values
| Name | Type | Description |
|---|---|---|
| version | string | signing domain version |
_permit
solidity
function _permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) internal virtualapprove spender to transfer tokens held by owner via signature
this function may be vulnerable to approval replay attacks
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | holder of tokens and signer of permit |
| spender | address | beneficiary of approval |
| amount | uint256 | quantity of tokens to approve |
| deadline | uint256 | |
| v | uint8 | secp256k1 'v' value |
| r | bytes32 | secp256k1 'r' value |
| s | bytes32 | secp256k1 's' value |
_setName
solidity
function _setName(string name) internal virtualset new token name and invalidate cached domain separator
_domain separator is not immediately recalculated, and will ultimately depend on the output of the name view function
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The new name to set for the token |