EVM Features
Gas Sponsorship
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
.env
file:
Navigate to the CDP Portal to find or create your wallet secret, walletid, and client api key
All user operations on Base Sepolia are sponsored by default. For mainnet, you can specify a paymaster of your choice as follows:
You get up to $100 in free credits on CDP and you can apply for additional gas credits as you scale.
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
.env
file - Verify you’re on the correct network before proceeding with transactions