Learn how to leverage the Base Paymaster for seamless, gasless transactions on the Coinbase Cloud Developer Platform.
0x83bd615eb93eE1336acA53e185b03B54fF4A17e8
, and add the function mintTo(address)
.max USD
to $0.05
max UserOperation
to 1
$0.07
so that once the entire paymaster has sponsored $0.07 worth of gas (across all users), no more sponsorship occurs unless you raise the limit.
viem
and permissionless
:
.env
file in the sponsored_transactions
directory. In the .env
, you’ll add the rpcURL for your paymaster and the private keys for your accounts:
https://api.developer.coinbase.com/rpc/v1/base/<SPECIAL-KEY>
Navigate to the Paymaster Tool and select the Configuration
tab at the top of the screen to obtain your RPC URL.index.js
file. For product, we highly recommend using a proxy service..env
files to a public repo!index.js
index.js
.
node index.js
from your project root.
balanceOf
function:
mintTo
) for sponsorship.permissionless
, viem
, and Foundry-generated private keys.Next Steps
- Use a proxy service for better endpoint security.
- Deploy your own contracts and allowlist them.
- Experiment with bundling multiple calls into a single sponsored transaction.