EVM Gas Sponsorship is an enterprise-only feature. Contact us to learn more about upgrading your plan.
EVM Gas Sponsorship works only with V3 MPC embedded wallets (the wallets Dynamic creates for your users). It does not work with external wallets like MetaMask.
Quick start
This is everything you need to sponsor a transaction. The SDK handles the underlying setup for you automatically.Turn on gas sponsorship in the dashboard
- Go to the Dynamic Dashboard
- Navigate to Settings → Embedded Wallets
- Make sure the EVM chains you want to sponsor are enabled
- Toggle on EVM Gas Sponsorship
Send a sponsored transaction
Call That’s it — the user pays no gas, and you didn’t have to think about delegation or relayers.
sendSponsoredTransaction with the user’s wallet and a list of calls (what you want the transaction to do). It signs, sends, waits for the transaction to land on-chain, and returns the transaction hash.What goes in calls
Each entry in the calls array describes one action the transaction should perform. Most apps only need a single call.
| Field | Type | Description |
|---|---|---|
target | Hex | The address you’re sending to (a recipient or a contract). |
data | Hex | The action to run on the target. Use 0x for a plain native-token transfer. |
value | bigint | Amount of native token (in wei) to send with the call. Use parseEther to convert from a human-readable amount. |
React example
In React, useuseWalletAccounts to get the user’s embedded wallet, then call sendSponsoredTransaction from a button handler. The try/catch shows the user a friendly message if sponsorship fails (see Error handling).
Error handling
If sponsorship can’t go through,sendSponsoredTransaction throws a SponsorTransactionError. There is no silent fallback — if it throws, the transaction did not happen. Wrap the call in a try/catch so you can show the user a message and decide what to do next.
SponsorTransactionError is thrown when:
- The sponsorship API rejects the request (sponsorship not enabled, chain not supported, or a paymaster limit was hit)
- The transaction ended in a terminal failure status (
FAILED,CANCELED,EXPIRED,REJECTED) - The request times out after 60 seconds
- The wallet doesn’t support sponsored transactions (e.g. an external wallet rather than a V3 MPC embedded wallet)
Advanced usage
Everything below is optional. Reach for it only when you need more control than the quick start gives you — custom UI, pre-signing, or managing the one-time delegation step yourself.How it works under the hood
When you callsendSponsoredTransaction, the SDK:
- Builds an EIP-712 intent describing the batch of calls and a deadline
- Signs the intent with the user’s embedded wallet (and, if delegation is needed, an EIP-7702 authorization for the wallet’s EOA)
- Relays the signed intent to Dynamic’s sponsorship backend
- Polls the relayer until the request reaches a terminal state, then returns the on-chain transaction hash
Supported chains
Dynamic operates relayers on the following EVM chains. Mainnet| Chain | Chain ID |
|---|---|
| Ethereum Mainnet | 1 |
| Base | 8453 |
| Chain | Chain ID |
|---|---|
| Ethereum Sepolia | 11155111 |
| Base Sepolia | 84532 |
Splitting sign and send
Reuse a pre-signed intent (for example, to send it from a different process) by callingsignSponsoredTransaction first and passing the result to sendSponsoredTransaction:
validForSeconds:
Reusing a nonce
By default each signed intent gets a fresh single-use bitmap nonce. Passnonce (a bigint, matching the nonce on the signed result) to reuse one across intents — sign several intents with the same nonce so at most one can ever land on-chain (cancel-replace). The value is used as-is, with no on-chain validation:
nonce works the same way on relaySponsoredTransaction and sendSponsoredTransaction.
Managing EIP-7702 delegation yourself
Before a wallet can submit a sponsored transaction, its EOA must be delegated to the Dynamic relayer contract via an EIP-7702 authorization. The quick start handles this automatically on the first transaction. These three helpers exist for when you want explicit control over the delegation step.When
sendSponsoredTransaction is called on a wallet that hasn’t been delegated yet, the SDK signs an EIP-7702 authorization automatically and attaches it to the first call. You only need these helpers when you want explicit control over the delegation step.Checking delegation status
Useis7702DelegationActive to check whether delegation is already active on the wallet’s current network. Results are cached per wallet + chain in an in-memory registry, so repeated calls are cheap:
Signing an authorization
sign7702Authorization signs an EIP-7702 authorization for the Dynamic delegation contract using the wallet’s active network (or an explicit chainId override). Pass the result to signSponsoredTransaction or sendSponsoredTransaction to attach it to the next sponsored call:
Activating delegation up-front
For flows that want delegation persisted on-chain before the first user-facing sponsored transaction (e.g. during onboarding), callactivate7702Delegation. It sends an empty sponsored transaction that only carries the EIP-7702 authorization, then returns the on-chain transaction hash. Subsequent sponsored transactions no longer need to include an authorization:
authorization to activate7702Delegation to reuse one obtained from sign7702Authorization.
Polling the relay status yourself
For custom UI (e.g. a progress bar acrossSUBMITTED → CONFIRMED), call getEVMSponsoredTransactionStatus directly on the requestId returned by relaySponsoredTransaction:
status is one of PENDING, SENT, SUBMITTED, CONFIRMED, FAILED, CANCELED, EXPIRED, or REJECTED. transactionHash is set once the relay broadcasts the transaction.
For the common “wait until done” case, use waitForSponsoredTransaction — it polls every 2 seconds and resolves on CONFIRMED (timeout: 60s):
Limitations
| Limitation | Details |
|---|---|
| Wallet type | Embedded wallets only (V3 MPC) |
| Mechanism | EIP-7702 delegation to the Dynamic relayer contract |
| Intent validity | 10 minutes by default; configurable via validForSeconds |
| Polling timeout | waitForSponsoredTransaction resolves or throws within 60 seconds |
| Batching | One signed intent per sendSponsoredTransaction call; each intent can contain multiple calls |
Related functions
- isEvmGasSponsorshipEnabled — check whether the dashboard toggle is on for the current project
- EVM Gas Sponsorship Quickstart — the ZeroDev / ERC-4337 alternative for smart accounts
- SVM Gas Sponsorship — the Solana equivalent
Helpers
sign7702Authorization— sign an EIP-7702 authorization for the Dynamic delegation contractis7702DelegationActive— check whether delegation is active for a wallet on its current networkactivate7702Delegation— activate delegation on-chain via a single empty sponsored transaction