EIP712WithNonce
EIP712WithNonce
NonceUsed
InvalidNonce
_nonces
DOMAIN_SEPARATOR
Domain Separator as defined in EIP712
Name | Type | Description |
---|---|---|
[0] | bytes32 | keccak256(typeHash, nameHash, versionHash, block.chainid, address(this)) |
getNonce
Gets nonce for the from address in the "default" timeline
For a detailed explanation: https://github.com/amxx/permit#out-of-order-execution
Name | Type | Description |
---|---|---|
from | address | address |
Name | Type | Description |
---|---|---|
[0] | uint256 | nonce |
getNonce
Gets nonce for the from address in the specified timeline
For a detailed explanation: https://github.com/amxx/permit#out-of-order-execution
Name | Type | Description |
---|---|---|
from | address | address |
timeline | uint256 | where the nonce lives |
Name | Type | Description |
---|---|---|
[0] | uint256 | nonce |
_verifyAndConsumeNonce
Extract timeline from nonce, iterates it to consume it, checks for replay protection.
emits NonceUsed(user, timeline, nonce). WARNING: Failed transactions would not consume a nonce, since the reverted transaction won't be able to save in storage.
Name | Type | Description |
---|---|---|
user | address | address sending the nonce. |
fullNonce | uint256 | nonce and timeline info in uint256 space |