Pay with Native
This page details the process of paying the gas of user operations (UserOps) using native tokens.
Last updated
This page details the process of paying the gas of user operations (UserOps) using native tokens.
Last updated
Native token payments are currently restricted to testnets as part of our staging environment. For this functionality, please use staging Gelato Bundler RPC as bundler transport. Checkout testnets listed .
After reading this page:
You'll know how to pay gas for UserOps using native tokens.
You'll learn about how to use Zerodev Kernel and Safe as an smart account to pay gas .
You'll see some code which will help you send a Non-Sponsored UserOp within minutes.
This method doesn’t require a paymaster, making it a straightforward and direct way to send UserOps while paying with native tokens from your smart account.
createKernelAccount
from @zerodev/sdk
createKernelAccountClient
adding Gelato Bundler RPCWhen using the Gelato Bundler, it's essential to use a specialized gas estimation method when creating the kernelClient.
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 .
Explore the complete example code that demonstrates how to pay using native tokens while using Gelato Bundler with the ZeroDev Kernel , as well as how to integrate with a Safe account .