Use gas sponsorship
Overview
This guides walks you through the process of implementing gas sponsorship using Ronin Waypoint. The process involves allowlisting your game's smart contract, obtaining a payer wallet from Sky Mavis, and sending transactions using the Ronin Waypoint SDK.
Prerequisites
- For conceptual information, see About gas sponsorship.
- Have a smart contract that you want to sponsor gas for deployed to Ronin. For more information, see Deploy a smart contract.
Steps
Step 1. Provide gas sponsorship information
-
Contact your Sky Mavis point of contact to apply for the "Local studio gas sponsorship" program.
-
Using the provided template, provide the following information:
- The number of free gas transactions you want to sponsor.
- The contract address.
- The contract function names that you want to sponsor.
- The start and end date for the sponsorship.
-
Submit the provided template to Sky Mavis so that we can enable gas sponsorship for your smart contract in the system.
-
Depending on the agreement, Sky Mavis will either provide you with a payer wallet, or you will use your own wallet to sponsor gas.
Step 2. Integrate the Ronin Waypoint SDK to send transactions
-
Using the Ronin Waypoint SDK, integrate the functions to send transactions to your allowlisted smart contract as follows:
- Web SDK: use
RoninWaypointWallet
provider with standard Ethereum libraries such as Ethers.js, web3.js, or viem. - Unity SDK: use
SendTransaction
andOnCallContract
functions. - Android SDK: use
sendTransaction
andcallContract
functions. - iOS SDK: use
sendTransaction
andcallContract
functions. - React Native SDK: use
sendTransaction
andcallContract
functions.
- Web SDK: use
-
When a user initiates a transaction that invokes the allowlisted smart contract function, Ronin Waypoint automatically applies the gas voucher, indicating that the transaction is sponsored in the transaction pop-up.
Step 3. Monitor payer wallet balance
If the payer is provided by Sky Mavis, you can monitor its balance in the Ronin app. If you are using your own wallet, ensure that it has sufficient balance (at least 0.02 RON).