Gas Sponsorship Setup - Dynamic

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.

Dynamic Gasless Starter

Want to see smart wallets in action? Check out our Dynamic Gasless Starter - a Next.js demo that showcases gasless transactions with email-based wallet creation and token minting, all without users paying gas fees.

Quickstart

Prerequisites

Configure Your SDK

Install the package:

Shell

npm install @dynamic-labs/ethereum-aa

Shell

yarn add @dynamic-labs/ethereum-aa

Shell

pnpm add @dynamic-labs/ethereum-aa

Shell

bun add @dynamic-labs/ethereum-aa

Advanced Usage

You can find more advanced usage examples in our advanced usage guide.

Using server wallets? See Sponsor Gas for Server Wallets (EVM). Using Solana embedded wallets? See SVM Gas Sponsorship.

Note on 7702

EIP-7702 is the default for enabling gas sponsorship using Dynamic & Zerodev, but you can switch back to 4337 if you want using the dashboard settings.

Why use 7702?

EIP-7702 introduces a new transaction type that allows a wallet to delegate execution to an address with a deployed smart account. This means:

Common questions

Resources

Using Other Providers

Dynamic supports a large number of providers and we have guides for each one:

zkSync

Alchemy

Pimlico

Biconomy

Safe

Rhinestone

Circle

Crossmint