pub struct permitCall {
pub owner: Address,
pub spender: Address,
pub value: U256,
pub deadline: U256,
pub v: u8,
pub r: FixedBytes<32>,
pub s: FixedBytes<32>,
}Expand description
@dev Sets value as the allowance of spender over owner’s tokens,
given owner’s signed approval.
IMPORTANT: The same issues {IERC20-approve} has related to transaction ordering also apply here.
Emits an {Approval} event.
Requirements:
spendercannot be the zero address.deadlinemust be a timestamp in the future.v,randsmust be a validsecp256k1signature fromownerover the EIP712-formatted function arguments.- the signature must use
owner’s current nonce (see {nonces}).
For more information on the signature format, see the
https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section].
Function with signature permit(address,address,uint256,uint256,uint8,bytes32,bytes32) and selector 0xd505accf.
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;Fields§
§owner: Address§spender: Address§value: U256§deadline: U256§v: u8§r: FixedBytes<32>§s: FixedBytes<32>Trait Implementations§
Source§impl Clone for permitCall
impl Clone for permitCall
Source§fn clone(&self) -> permitCall
fn clone(&self) -> permitCall
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 moreSource§impl SolCall for permitCall
impl SolCall for permitCall
Source§const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"
const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"
The function’s ABI signature.
Source§type Parameters<'a> = (Address, Address, Uint<256>, Uint<256>, Uint<8>, FixedBytes<32>, FixedBytes<32>)
type Parameters<'a> = (Address, Address, Uint<256>, Uint<256>, Uint<8>, FixedBytes<32>, FixedBytes<32>)
The underlying tuple type which represents this type’s arguments. Read more
Source§type Token<'a> = <<permitCall as SolCall>::Parameters<'a> as SolType>::Token<'a>
type Token<'a> = <<permitCall as SolCall>::Parameters<'a> as SolType>::Token<'a>
The arguments’ corresponding [TokenSeq] type.
Source§type Return = permitReturn
type Return = permitReturn
The function’s return struct.
Source§type ReturnTuple<'a> = ()
type ReturnTuple<'a> = ()
The underlying tuple type which represents this type’s return values. Read more
Source§type ReturnToken<'a> = <<permitCall as SolCall>::ReturnTuple<'a> as SolType>::Token<'a>
type ReturnToken<'a> = <<permitCall as SolCall>::ReturnTuple<'a> as SolType>::Token<'a>
The returns’ corresponding [TokenSeq] type.
Source§fn new<'a>(tuple: <Self::Parameters<'a> as SolType>::RustType) -> Self
fn new<'a>(tuple: <Self::Parameters<'a> as SolType>::RustType) -> Self
Convert from the tuple type used for ABI encoding and decoding.
Source§fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_>
fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_>
Tokenize the call’s return values.
Source§fn abi_decode_returns(data: &[u8]) -> Result<Self::Return>
fn abi_decode_returns(data: &[u8]) -> Result<Self::Return>
ABI decode this call’s return values from the given slice.
Source§fn abi_decode_returns_validate(data: &[u8]) -> Result<Self::Return>
fn abi_decode_returns_validate(data: &[u8]) -> Result<Self::Return>
ABI decode this call’s return values from the given slice, with validation. Read more
§fn abi_encoded_size(&self) -> usize
fn abi_encoded_size(&self) -> usize
The size of the encoded data in bytes, without its selector.
§fn abi_decode_raw(data: &[u8]) -> Result<Self, Error>
fn abi_decode_raw(data: &[u8]) -> Result<Self, Error>
ABI decode this call’s arguments from the given slice, without its
selector.
§fn abi_decode_raw_validate(data: &[u8]) -> Result<Self, Error>
fn abi_decode_raw_validate(data: &[u8]) -> Result<Self, Error>
ABI decode this call’s arguments from the given slice, without its
selector, with validation. Read more
§fn abi_decode(data: &[u8]) -> Result<Self, Error>
fn abi_decode(data: &[u8]) -> Result<Self, Error>
ABI decode this call’s arguments from the given slice, with the
selector.
§fn abi_decode_validate(data: &[u8]) -> Result<Self, Error>
fn abi_decode_validate(data: &[u8]) -> Result<Self, Error>
ABI decode this call’s arguments from the given slice, with the
selector, with validation. Read more
§fn abi_encode_raw(&self, out: &mut Vec<u8>)
fn abi_encode_raw(&self, out: &mut Vec<u8>)
ABI encode the call to the given buffer without its selector.
§fn abi_encode(&self) -> Vec<u8> ⓘ
fn abi_encode(&self) -> Vec<u8> ⓘ
ABI encode the call to the given buffer with its selector.
§fn abi_encode_returns(ret: &Self::Return) -> Vec<u8> ⓘ
fn abi_encode_returns(ret: &Self::Return) -> Vec<u8> ⓘ
ABI encode the call’s return value.
Auto Trait Implementations§
impl Freeze for permitCall
impl RefUnwindSafe for permitCall
impl Send for permitCall
impl Sync for permitCall
impl Unpin for permitCall
impl UnwindSafe for permitCall
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