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-keybackend
Project secret key - for backend usage only. Should not be used in frontend code.
x-client-idfrontend
Project client ID - for frontend usage on authorized domains.
x-ecosystem-idoptional
Ecosystem ID - for ecosystem wallets.
x-ecosystem-partner-idoptional
Ecosystem partner ID - for ecosystem wallets.
Authorizationfrontend
Bearer token (JWT) for user wallet authentication
callsRequired
Array of contract method calls to execute. Each call specifies a contract address, method signature, and optional parameters.
chainIdRequired
The blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
from
The wallet address or ENS name that will send the transaction. If omitted, the project wallet will be used if available.
That's it! All transactions executed by the user will be sponsored via the thirdweb infrastructure.