IERC3009
Inherits: IStatefulERC712
Author: M^0 Labs
The interface as defined by EIP-3009: https://eips.ethereum.org/EIPS/eip-3009
Functions
transferWithAuthorization
Execute a transfer with a signed authorization.
Parameters
from
address
Payer's address (Authorizer).
to
address
Payee's address.
value
uint256
Amount to be transferred.
validAfter
uint256
The time after which this is valid (unix time).
validBefore
uint256
The time before which this is valid (unix time).
nonce
bytes32
Unique nonce.
signature
bytes
A byte array ECDSA/secp256k1 signature (encoded r, s, v).
transferWithAuthorization
Execute a transfer with a signed authorization.
Parameters
from
address
Payer's address (Authorizer).
to
address
Payee's address.
value
uint256
Amount to be transferred.
validAfter
uint256
The time after which this is valid (unix time).
validBefore
uint256
The time before which this is valid (unix time).
nonce
bytes32
Unique nonce.
r
bytes32
An ECDSA/secp256k1 signature parameter.
vs
bytes32
An ECDSA/secp256k1 short signature parameter.
transferWithAuthorization
Execute a transfer with a signed authorization.
Parameters
from
address
Payer's address (Authorizer).
to
address
Payee's address.
value
uint256
Amount to be transferred.
validAfter
uint256
The time after which this is valid (unix time).
validBefore
uint256
The time before which this is valid (unix time).
nonce
bytes32
Unique nonce.
v
uint8
v of the signature.
r
bytes32
r of the signature.
s
bytes32
s of the signature.
receiveWithAuthorization
Receive a transfer with a signed authorization from the payer.
This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks. (See security considerations)
Parameters
from
address
Payer's address (Authorizer).
to
address
Payee's address.
value
uint256
Amount to be transferred.
validAfter
uint256
The time after which this is valid (unix time).
validBefore
uint256
The time before which this is valid (unix time).
nonce
bytes32
Unique nonce.
signature
bytes
A byte array ECDSA/secp256k1 signature (encoded r, s, v).
receiveWithAuthorization
Receive a transfer with a signed authorization from the payer.
This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks. (See security considerations)
Parameters
from
address
Payer's address (Authorizer).
to
address
Payee's address.
value
uint256
Amount to be transferred.
validAfter
uint256
The time after which this is valid (unix time).
validBefore
uint256
The time before which this is valid (unix time).
nonce
bytes32
Unique nonce.
r
bytes32
An ECDSA/secp256k1 signature parameter.
vs
bytes32
An ECDSA/secp256k1 short signature parameter.
receiveWithAuthorization
Receive a transfer with a signed authorization from the payer.
This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks. (See security considerations)
Parameters
from
address
Payer's address (Authorizer).
to
address
Payee's address.
value
uint256
Amount to be transferred.
validAfter
uint256
The time after which this is valid (unix time).
validBefore
uint256
The time before which this is valid (unix time).
nonce
bytes32
Unique nonce.
v
uint8
v of the signature.
r
bytes32
r of the signature.
s
bytes32
s of the signature.
cancelAuthorization
Attempt to cancel an authorization.
Parameters
authorizer
address
Authorizer's address.
nonce
bytes32
Nonce of the authorization.
signature
bytes
A byte array ECDSA/secp256k1 signature (encoded r, s, v).
cancelAuthorization
Attempt to cancel an authorization.
Parameters
authorizer
address
Authorizer's address.
nonce
bytes32
Nonce of the authorization.
r
bytes32
An ECDSA/secp256k1 signature parameter.
vs
bytes32
An ECDSA/secp256k1 short signature parameter.
cancelAuthorization
Attempt to cancel an authorization.
Parameters
authorizer
address
Authorizer's address.
nonce
bytes32
Nonce of the authorization.
v
uint8
v of the signature.
r
bytes32
r of the signature.
s
bytes32
s of the signature.
authorizationState
Returns the state of an authorization.
Nonces are randomly generated 32-byte data unique to the authorizer's address
Parameters
authorizer
address
Authorizer's address.
nonce
bytes32
Nonce of the authorization.
Returns
<none>
bool
True if the nonce is used.
TRANSFER_WITH_AUTHORIZATION_TYPEHASH
Returns transferWithAuthorization
typehash.
RECEIVE_WITH_AUTHORIZATION_TYPEHASH
Returns receiveWithAuthorization
typehash.
CANCEL_AUTHORIZATION_TYPEHASH
Returns cancelAuthorization
typehash.
Events
AuthorizationCanceled
Emitted when an authorization has been canceled.
Parameters
authorizer
address
Authorizer's address.
nonce
bytes32
Nonce of the canceled authorization.
AuthorizationUsed
Emitted when an authorization has been used.
Parameters
authorizer
address
Authorizer's address.
nonce
bytes32
Nonce of the used authorization.
Errors
AuthorizationAlreadyUsed
Emitted when an authorization has already been used.
Parameters
authorizer
address
Authorizer's address.
nonce
bytes32
Nonce of the used authorization.
AuthorizationExpired
Emitted when an authorization is expired.
Parameters
timestamp
uint256
Timestamp at which the transaction was submitted.
validBefore
uint256
Timestamp before which the authorization would have been valid.
AuthorizationNotYetValid
Emitted when an authorization is not yet valid.
Parameters
timestamp
uint256
Timestamp at which the transaction was submitted.
validAfter
uint256
Timestamp after which the authorization will be valid.
CallerMustBePayee
Emitted when the caller of receiveWithAuthorization
is not the payee.
Parameters
caller
address
Caller's address.
payee
address
Payee's address.