pub struct UserOperation {
pub sender: [u8; 20],
pub nonce: Uint256,
pub init_code: Vec<u8>,
pub call_data: Vec<u8>,
pub call_gas_limit: Uint256,
pub verification_gas_limit: Uint256,
pub pre_verification_gas: Uint256,
pub max_fee_per_gas: Uint256,
pub max_priority_fee_per_gas: Uint256,
pub paymaster_and_data: Vec<u8>,
pub signature: Vec<u8>,
}Expand description
An ERC-4337 UserOperation (v0.6 format).
Fields§
§sender: [u8; 20]Smart account address.
nonce: Uint256Anti-replay nonce (key + sequence) as uint256.
init_code: Vec<u8>Factory + factoryData for account creation (empty if account exists).
call_data: Vec<u8>Encoded function call on the smart account.
call_gas_limit: Uint256Gas limit for the execution phase (uint256).
verification_gas_limit: Uint256Gas for validation (validateUserOp + validatePaymasterUserOp) (uint256).
pre_verification_gas: Uint256Gas paid for the bundle tx overhead (uint256).
max_fee_per_gas: Uint256Maximum fee per gas (EIP-1559) (uint256).
max_priority_fee_per_gas: Uint256Maximum priority fee per gas (uint256).
paymaster_and_data: Vec<u8>Paymaster address + data (empty if self-paying).
signature: Vec<u8>Signature over the UserOp hash.
Implementations§
Trait Implementations§
Source§impl Clone for UserOperation
impl Clone for UserOperation
Source§fn clone(&self) -> UserOperation
fn clone(&self) -> UserOperation
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 Debug for UserOperation
impl Debug for UserOperation
Source§impl PartialEq for UserOperation
impl PartialEq for UserOperation
impl Eq for UserOperation
impl StructuralPartialEq for UserOperation
Auto Trait Implementations§
impl Freeze for UserOperation
impl RefUnwindSafe for UserOperation
impl Send for UserOperation
impl Sync for UserOperation
impl Unpin for UserOperation
impl UnsafeUnpin for UserOperation
impl UnwindSafe for UserOperation
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