Transactions

Sponsor gas

Sponsor gas fees for transactions using EIP-7702 or ERC-4337. Thirdweb will handle the gas fees for you.

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.

POST /v1/contracts/write
Host: api.thirdweb.com
Content-Type: application/json
x-secret-key: <your-project-secret-key>
{
"from": "0x...", // your user or server wallet **EOA address** address
"chainId": "1", // your chain id
"calls": [{
"contractAddress": "0x...",
"method": "function transfer(address to, uint256 amount)",
"params": ["0x...", "1000000000000000000"],
}],
}

That's it! All transactions executed by the user will be sponsored via the thirdweb infrastructure.