Overview
Smart Accounts unlock the ability for developers to sponsor gas on their users’ transactions. With the CDP SDK, it’s simple to integrate any paymaster URL and cover gas costs for all transactions originating from your smart accounts. You can refer to this guide on how to set up a CDP Paymaster. You could also use any provider of your choice.Benefits:
- Removes the friction of requiring users to hold ETH
- Enables users to interact with your app immediately
- Provides a more familiar Web2-like experience for new users
- Allows you to subsidize or fully cover transaction costs for your users
- Gives you control over which transactions you want to sponsor
Prerequisites
- A Coinbase Developer Platform account
- The following environment variables in your
.envfile:
Gas sponsorship with EIP-7702 delegated accounts
If you’re using EIP-7702 delegation to upgrade an existing EOA with smart account capabilities, gas sponsorship works the same way — pass apaymasterUrl to sendUserOperation on the delegated account.
The account must have completed EIP-7702 delegation before sending user operations. See the EIP-7702 Delegation guide for the full delegation flow.
Common Issues
- If transactions fail, verify your gas estimates
- If paymaster fails, check your paymaster client and network configuration
- Make sure your environment variables are properly set in your
.envfile - Verify you’re on the correct network before proceeding with transactions
Additional Resources
- Paymaster Documentation
- Account Abstraction Basics
- Get started with Coinbase Developer Platform
- EIP-7702 Delegation