Smart accounts are a type of account that can be used to execute user operations onchain.
In this guide, you will learn how to:
Smart accounts currently have the following limitations:
It is assumed you have already completed the Quickstart guide.
An EVM smart account is a smart contract account deployed on an EVM compatible network that provides the ability to batch transactions, sponsor gas, and manage spend permissions.
Smart accounts require an owner account to sign on its behalf.
In this example, we will only create the smart account, and use a CDP EVM account as the owner. Note that the smart contract is not deployed until the following step when you submit the first user operation.
Smart accounts are created with the CREATE2
opcode,
allowing us to access a contract address before it is deployed.
The actual smart contract is not deployed until the first user operation is submitted.
Learn more about account abstraction in the Coinbase Crypto glossary.
After running the above snippet, you should see output similar to the following:
A user operation is a transaction that is executed by a smart account. In this example, we will:
On Base Sepolia, smart account user operations are subsidized, meaning the smart account does not need to be funded with ETH to submit a user operation. On Base mainnet, you will need to fund the smart account with ETH before you can submit a user operation.
After running the above snippet, you should see similar output:
A smart account can batch multiple calls in a single user operation through the calls
field.
In this example, we will:
After running the above snippet, you should see output similar to the following: