> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gas Sponsorship Setup

> Let your users forget about gas fees and focus on your app.

> [card] 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)](https://docs.dynamic.xyz/docs/javascript/reference/react-quickstart.md) to get started.

> [card] Dynamic Gasless Starter
>
> Want to see smart wallets in action? Check out our [Dynamic Gasless Starter](https://github.com/dynamic-labs/examples/tree/main/starters/nextjs-evm-gasless-zerodev) - a Next.js demo that showcases gasless transactions with email-based wallet creation and token minting, all without users paying gas fees.

## Quickstart

### Prerequisites

* Create a Zerodev account and projects for each network you want to support, as well as a gas policy for each one. Make sure you use [the V1 console](https://console.zerodev.app/create-legacy-project) to configure your project.
* Visit the [Sponsor Gas section of the Dynamic Console](https://console.dynamic.xyz/dashboard/smart-wallets), toggle on Zerodev and add your project IDs.

### Configure Your SDK

Install the package:

> [tab] npm
>
> ```bash Shell theme={"system"}
> npm install @dynamic-labs/ethereum-aa
> ```

> [tab] yarn
>
> ```bash Shell theme={"system"}
> yarn add @dynamic-labs/ethereum-aa
> ```

> [tab] pnpm
>
> ```bash Shell theme={"system"}
> pnpm add @dynamic-labs/ethereum-aa
> ```

> [tab] bun
>
> ```bash Shell theme={"system"}
> bun add @dynamic-labs/ethereum-aa
> ```

## Advanced Usage

You can find more advanced usage examples in our [advanced usage](https://docs.dynamic.xyz/docs/react/smart-wallets/advanced.md) guide.

> [!TIP]
>
> Using server wallets? See [Sponsor Gas for Server Wallets (EVM)](https://docs.dynamic.xyz/docs/node/wallets/server-wallets/gas-sponsorship.md). Using Solana embedded wallets? See [SVM Gas Sponsorship](https://docs.dynamic.xyz/docs/react/smart-wallets/svm-gas-sponsorship.md).

## 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 Dynamic Console 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:

* No need to switch or manage multiple accounts and wallets.
* Users retain their existing EOA and gain smart account functionality.
* The transition is smooth and invisible to the end user.

### Common questions

* Do all chains/networks support 7702?
  No, not all chains/networks support 7702. You can see a list of chains/networks that support 7702 [here](https://swiss-knife.xyz/7702beat).

* When does the delegation (authorization) signing happen?
  The delegation authorization is signed automatically behind the scenes on the first transaction. If a paymaster is used, the paymaster will pay for the transaction.

* How long does the delegation remain active?
  The delegation stays active until the user delegates to a new address.

* How does this work for existing EOAs (e.g. MetaMask)?
  At the moment, delegation is a feature exclusive to embedded wallets. That's because we need to sign the authorization in a very specific way that requires access to the private key. From what we've heard, external wallets like MetaMask are unlikely to expose the `signAuthorization` method, making it unclear how (or if) this flow will work with them.

### Resources

* [EIP-7702 Specification](https://eips.ethereum.org/EIPS/eip-7702)
* [ZeroDev Documentation](https://docs.zerodev.app/)
* [Ithaca Odyssey Testnet](https://www.ithaca.xyz/updates/odyssey)
* [Dynamic Console](https://console.dynamic.xyz/dashboard)

## Using Other Providers

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

> [card]
>
> zkSync
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/zksync.md)

> [card]
>
> Alchemy
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/alchemy.md)

> [card]
>
> Pimlico
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/pimlico.md)

> [card]
>
> Biconomy
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/biconomy.md)

> [card]
>
> Safe
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/safe.md)

> [card]
>
> Rhinestone
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/rhinestone.md)

> [card]
>
> Circle
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/circle.md)

> [card]
>
> Crossmint
>
> [Open](https://docs.dynamic.xyz/docs/react/smart-wallets/smart-wallet-providers/crossmint.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.