Go to the gas sponsorship tab in the Privy
Dashboard, and enable gas sponsorship for
your application.
2
Configure chains
Select which chains you want to enable sponsorship for. Sponsored requests
may only come from the chains that you have configured. Want support for more networks? Reach out to us!
3
Send transaction requests
Apps must use TEE execution in order to use our native gas sponsorship feature. Learn how to migrate here!
Ethereum (React)
Solana (React)
Ethereum (REST API)
Ethereum (Node SDK)
Ethereum (Rust SDK)
Solana (REST API)
Solana (Node SDK)
Solana (Rust SDK)
With the React SDK, use the useSendTransaction hook with sponsor: true:
import {useSendTransaction, useWallets} from '@privy-io/react-auth';const {sendTransaction} = useSendTransaction();const {wallets} = useWallets();sendTransaction( { to: '0xE3070d3e4309afA3bC9a6b057685743CF42da77C', value: 100000 }, { sponsor: true // Enable gas sponsorship });
With the React SDK, use the useSignAndSendTransaction hook with sponsor: true:
import {useSignAndSendTransaction, useWallets} from '@privy-io/react-auth/solana';const {signAndSendTransaction} = useSignAndSendTransaction();const {wallets} = useWallets();const selectedWallet = wallets[0];// Create your transaction (example using @solana/kit)const transaction = new Uint8Array([/* your encoded transaction */]);const result = await signAndSendTransaction({ transaction: transaction, wallet: selectedWallet, options: { sponsor: true // Enable gas sponsorship }});console.log('Transaction sent with signature:', result.signature);
Allow transactions from the clientTo sponsor transactions from your client-side application, enable this setting in your gas sponsorship dashboard configuration. When disabled, transactions can only be sponsored from your server.
Gas sponsored transactions share the same path and interfaces as our other RPC requests. Learn
more about sending transactions here.
You must also include the sponsor: true parameter for transactions to be sponsored.
Gas sponsored transactions share the same path and interfaces as our other RPC requests. Learn
more about sending transactions here.
You must also include the sponsor: true parameter for transactions to be sponsored.
Certain flows that require on-chain ECDSA signature verification such as Permit2 are not supported
by EIP-7702 upgraded wallets. We recommend using an approval based flow where possible.
Learn how gas-sponsored transactions work and how to track transaction status with webhooks
Security best practices
Protect your application from gas sponsorship abuse with rate limiting and threat mitigation
strategies
Transactions return immediatelyGas-sponsored transactions return immediately after broadcast without waiting for confirmation. Learn how to track transaction status with webhooks in the transaction management guide.
Secure your implementation before productionGas sponsorship requires protection against abuse to prevent drainage of your balance. Review the security best practices before deploying to production.