Create Gas Sponsor
Create a gas sponsor with custom business logic.
A FunWallet can pay for gas in ERC-20s, in the chain's base token (ETH, MATIC, etc.), or via a sponsor. Custom business logic can be created for different sponsor rules.
These tutorials describe how to create a sponsor address. The end result of these advanced guides is a sponsor that can be utalized identically to the Gas Behavior guides.
End result
const { configureEnvironment } = require("fun-wallet")const YOUR_SPONSOR_ADDRESS = "YOUR_SPONSOR_ADDRESS" // See how to configure this address below!const sponsorGas = async () => {await configureEnvironment({gasSponsor: {sponsorAddress: YOUR_SPONSOR_ADDRESS,token: "usdc"}})}sponsorGas()