Sponsor gas fees using EIP-7702, enabling gasless transactions and improving user experience.
EIP-7702 is the default execution mode in the thirdweb API for your user and server wallets.
Example sponsored contract write request:
x-secret-key
backend
Project secret key - for backend usage only. Should not be used in frontend code.
x-client-id
frontend
Project client ID - for frontend usage on authorized domains.
x-ecosystem-id
optional
Ecosystem ID - for ecosystem wallets.
x-ecosystem-partner-id
optional
Ecosystem partner ID - for ecosystem wallets.
Authorization
frontend
Bearer token (JWT) for user wallet authentication
calls
Required
Array of contract method calls to execute. Each call specifies a contract address, method signature, and optional parameters.
chainId
Required
The blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
from
Required
The wallet address or ENS name that will send the transaction.
That's it! All transactions executed by the user will be sponsored via the thirdweb infrastructure.