How to use Gelato’s Gas Tank for all your relaying needs
Please go to https://app.gelato.cloud/one-balance and log in with your wallet. Deposit SEP for testnets via Sepolia, or USDC on Polygon for production networks and generate an API key based on your needs. Once you have your API key, you are ready to send sponsoredCall and sponsoredCallERC2771 requests.
You will have to generate two separate API keys if using both testnets and production i.e. one API key for testnets, one API key for production networks.
Gelato Gas Tank is a new flexible and bespoke payment system built from the ground up exclusively for Gelato customers. Gelato Gas Tank allows for customers to deposit on any chain they prefer, whilst using that balance to cover their relay costs regardless of target chain.
For example, a user can top up their Gelato Gas Tank using USDC on Polygon. This USDC balance will now be used to cover all gas costs and fees for any relay call, regardless of the underlying chain.
Therefore, a user could request relay calls on Ethereum mainnet, and Gelato will query their Gas Tank to see if they possess enough equivalent USDC to cover the costs for this call. If the balance is sufficient, Gelato will go ahead and relay the message on-chain.
After the transaction is successful, Gelato can use the transaction receipts to charge you exactly the amount that the transaction costs plus a nominal fee. This makes Gelato Gas Tank much more friendly on your wallet than payment based on a priori gas simulation which can be uncertain at best, and lead to consistent overcharging in the worst case.
Go to https://app.gelato.cloud/one-balance and log in with your wallet. Make sure to be connected to the Sepolia network for testing or Polygon for production networks.
Note: You will have to generate two separate API keys if using both testnets and production i.e. one API key for testnets, one API key for production networks.
Deposit SEP/USDC using the Gas Tank tab.
Create a Relay App, under the Relay tab:
Give your target contract address, or use the any contract address.
If your contract is not verified via Etherscan, paste in a manual ABI to specify which function you want to call using relay.
Once you have successfully created a relay app, you can go ahead and copy your API key, which will be valid across all testnets for sponsoredCall, and sponsoredCallERC2771.