Send a USDT0 transfer that costs the user no gas using Stable’s Gas Waiver, and verify that the receipt shows a zero fee.
Gas Waiver lets an application cover gas on behalf of a user. The user signs a transaction with gasPrice = 0, a governance-registered waiver wraps it, and validators execute the call at zero cost to the user. This guide walks through a qualifying transfer, shows how to verify gas was waived, and explains what the waiver does and doesn’t cover.
The user signs the inner transaction with gasPrice = 0.
The submitter is a governance-registered waiver address.
The target to address and method selector are on the waiver’s AllowedTarget policy.
The wrapper is sent to the marker address 0x000000000000000000000000000000000000f333 with value = 0 and gasPrice = 0.
If any of these fails, validators reject the wrapper without executing the inner call. Contract calls not listed in AllowedTarget are not covered. Arbitrary self-serve waivers are not possible; every waiver must be registered through validator governance.
The user signs a standard transaction with gasPrice = 0. In this example the call is a USDT0 transfer, which is a common AllowedTarget for application-covered gas flows.
// config.tsimport { ethers } from "ethers";import "dotenv/config";export const CONFIG = { RPC_URL: "https://rpc.testnet.stable.xyz", CHAIN_ID: 2201, // 988 for mainnet WAIVER_SERVER: "https://waiver.testnet.stable.xyz", USDT0_ADDRESS: "0x78Cf24370174180738C5B8E352B6D14c83a6c9A9",};export const provider = new ethers.JsonRpcProvider(CONFIG.RPC_URL);export const userWallet = new ethers.Wallet(process.env.USER_PRIVATE_KEY!, provider);