Transaction Flow
Learn how Abstract processes transactions step-by-step using native account abstraction.
Note: This page outlines the flow of transactions on Abstract, not including how they are batched, sequenced and verified on Ethereum. For a higher-level overview of how transactions are finalized, see Transaction Lifecycle.
Since all accounts on Abstract are smart contracts, all transactions go through the same flow:
Submitting transactions
Transactions are submitted to the network via JSON-RPC
and arrive in the transaction mempool. Since it is up to the smart contract account to determine how to validate transactions,
the from
field can be set to a smart contract address in this step and submitted to the network.
Bootloader processing
The bootloader reads transactions from the mempool and processes them in batches.
Before each transaction starts, the system queries the NonceHolder system contract to check whether the provided nonce has already been used or not. If it has not been used, the process continues. Learn more on handling nonces.
For each transaction, the bootloader reads the tx.from
field and checks if there is any contract code deployed at that address.
If there is no contract code, it assumes the sender account is an EOA and converts it to a
DefaultAccount.
Bootloader system contract
Learn more about the bootloader system contract and it’s role in processing transactions.
Smart contract account validation & execution
The bootloader then calls the following functions on the account deployed at the tx.from
address:
validateTransaction
: Determine whether or not to execute the transaction. Typically, some kind of checks are performed in this step to restrict who can use the account.executeTransaction
: Execute the transaction if validation passed.- Either
payForTransaction
orprepareForPaymaster
: Pay the gas fee or request a paymaster to pay the gas fee for this transaction.
The msg.sender
is set as the bootloader’s contract address for these function calls.
Smart contract wallets
Learn more about how smart contract wallets work and how to build one.
Paymasters (optional)
If a paymaster is set, the bootloader calls the following paymaster functions:
validateAndPayForPaymasterTransaction
: Determine whether or not to pay for the transaction, and if so, pay the calculated gas fee for the transaction.postTransaction
: Optionally run some logic after the transaction has been executed.
The msg.sender
is set as the bootloader’s contract address for these function calls.
Paymasters
Learn more about how paymasters work and how to build one.
Was this page helpful?