UserOperation
The key data structure of account abstraction.
Overview
A UserOperation is the key data structure of account abstraction. It represents a new type of transaction that is generated by the user and processed by the EntryPoint contract and verified by the Account contract.
Similar to a regular transaction it contains a sender
, nonce
, callData
and a signature
among other fields. It's important to note that a UserOperation is not stored on chain. A UserOperation represents the intention of a User to perform a transaction, from this intention an actual transaction is derived. A UserOperation is sent to a Bundler who listens for UserOperations, bundles them, using signature aggregation if possible, and passes them to the EntryPoint for execution.
Unlike an VeChain transaction, the signature in a UserOperation can be arbitrary thus unlocking more functionality than a traditional transaction. For example a signature can use a different algorithm, it can incorporate threshold signatures for multi-signature functionality or can even incorporate social recovery mechanisms allowing the user to recover their account if their main key-pair is lost or stolen.
UserOperation Fields
A table describing each UserOperation field can be found below.
Field | Type | Description |
---|---|---|
|
| The account making the operation |
|
| Anti-replay parameter; also used as the salt for first-time account creation |
|
| The initCode of the account (needed if and only if the account is not yet on-chain and needs to be created) |
|
| The data to pass to the |
|
| The amount of gas to allocate the main execution call |
|
| The amount of gas to allocate for the verification step |
|
| The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata |
|
| Maximum fee per gas (similar to EIP-1559 |
|
| Maximum priority fee per gas (similar to EIP-1559 |
|
| Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction) |
|
| Data passed into the account along with the nonce during the verification step |
More detailed information about UserOperations and its fields can be found here.
Last updated