Using 1Balance
This page details the process of sponsoring user operations (UserOps) using 1Balance.
Last updated
This page details the process of sponsoring user operations (UserOps) using 1Balance.
Last updated
After reading this page:
You'll know how to Sponsor UserOps using 1Balance payment method.
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.
Sign up on the Gelato App to establish an account. This account is the foundation for setting up relay tasks and managing gas sponsorships.
Within your Gelato account, create a relay app on the specific network where you plan to sponsor UserOps. This step enables sponsored transactions on your chosen chain. Checkout supported networks here.
After creating the relay app, navigate to its dashboard to locate your Sponsor API Key. This key links your Gelato setup with 1Balance for gas sponsorship. Learn more.
Add funds to your 1Balance account according to your target environment:
Mainnets: Deposit USDC.
Testnets: Deposit Sepolia ETH.
Since 1Balance is deployed on Polygon, you can deposit USDC in one step, and deposits from other networks are supported via Circle CCTP. Learn more.
You can directly integrate 1Balance sponsoring with the Gelato Bundler using Bundler API endpoints, or you can integrate the Gelato Bundler with the ZeroDev SDK as given in example code below.
createKernelAccount
from @zerodev/sdk
createKernelAccountClient
adding Gelato Bundler RPC with sponsorApiKeyAfter instantiating the kernelClient, dispatch your UserOperation by explicitly setting both maxFeePerGas
and maxPriorityFeePerGas
to 0.
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.
Multi-Network Gas Sponsorship Sponsor gas fees on any network supported by Gelato.
Effortless Fund Management Deposit USDC on Polygon in one simple step, with additional support for deposits from other networks via Circle CCTP.
User-Friendly Interface Easily manage your funds and sponsorship through an intuitive dashboard.
Explore the complete example code that demonstrates how to sponsor UserOps using 1Balance with the ZeroDev Kernel here, as well as how to integrate with a Safe account here.