pub struct ReceiveWithAuthorization {
pub from: [u8; 20],
pub to: [u8; 20],
pub value: [u8; 32],
pub valid_after: u64,
pub valid_before: u64,
pub nonce: [u8; 32],
}Expand description
EIP-3009 ReceiveWithAuthorization for pull-based token transfers.
Fields§
§from: [u8; 20]Token holder (sender).
to: [u8; 20]Recipient (must be msg.sender that calls the contract).
value: [u8; 32]Transfer amount (32-byte big-endian uint256).
valid_after: u64Earliest valid timestamp.
valid_before: u64Latest valid timestamp.
nonce: [u8; 32]Unique nonce (32 bytes).
Implementations§
Source§impl ReceiveWithAuthorization
impl ReceiveWithAuthorization
Sourcepub fn struct_hash(&self) -> [u8; 32]
pub fn struct_hash(&self) -> [u8; 32]
Compute the struct hash.
Sourcepub fn sign(
&self,
signer: &EthereumSigner,
domain_separator: &[u8; 32],
) -> Result<EthereumSignature, SignerError>
pub fn sign( &self, signer: &EthereumSigner, domain_separator: &[u8; 32], ) -> Result<EthereumSignature, SignerError>
Sign this authorization.
Trait Implementations§
Source§impl Clone for ReceiveWithAuthorization
impl Clone for ReceiveWithAuthorization
Source§fn clone(&self) -> ReceiveWithAuthorization
fn clone(&self) -> ReceiveWithAuthorization
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReceiveWithAuthorization
impl RefUnwindSafe for ReceiveWithAuthorization
impl Send for ReceiveWithAuthorization
impl Sync for ReceiveWithAuthorization
impl Unpin for ReceiveWithAuthorization
impl UnsafeUnpin for ReceiveWithAuthorization
impl UnwindSafe for ReceiveWithAuthorization
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more