Using Zerodev Paymaster
This page details the process of sponsoring user operations (UserOps) using Gelato bundler and Zerodev paymaster.
Last updated
This page details the process of sponsoring user operations (UserOps) using Gelato bundler and Zerodev paymaster.
Last updated
Sponsored payments using Zerodev paymaster are currently restricted to testnets as part of our staging environment. For this functionality, please use staging Gelato Bundler RPC as bundler transport. Checket tesnets listed here.
After Reading this page:
You'll know how to Sponsor UserOps using Zerodev paymaster.
You'll learn about how to use Zerodev Kernel and Safe Account with 1Balance.
You'll see some code which will help you send a Sponsored UserOp within minutes.
Register on the ZeroDev dashboard to access the tools necessary for managing and sponsoring gas fees in your projects.
After signing in, create a new project and choose the network you plan to operate on (e.g., Ethereum, Polygon). This ensures that all settings and configurations match your target chain.
Within your project’s dashboard, locate and copy the Paymaster URL. This endpoint is essential for integrating the sponsorship service into your application.
In the project settings, configure gas policies to establish rate limits for sponsored transactions. These policies help control resource usage, prevent abuse, and maintain efficient operations. For example, you might set daily or monthly request limits to manage overall costs. Checkout more about gas policies here.
createKernelAccount
from @zerodev/sdk
createZeroDevPaymasterClient
createKernelAccountClient
adding Gelato Bundler RPC with Zerodev paymasterWhen using the Gelato Bundler with ZeroDev Paymaster, it's essential to use a specialized gas estimation method when creating the kernelClient. This tailored approach ensures that gas calculations are optimized for sponsored transactions with Gelato Bundler.
The userOpHash, when using the Gelato Bundler, is equivalent to the Task ID. This Task ID can be easily debugged through the Relay API, providing a streamlined method for troubleshooting and monitoring the status of transactions. Checkout here.
Explore the complete example code that demonstrates how to sponsor UserOps using Zerodev Paymaster with the ZeroDev Kernel here, as well as how to integrate with a Safe account here.