Skip to main content

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.
This guide is currently React only.
This tutorial guides you through using Dynamic as a signer for Circle Smart Accounts. You can refer to this doc to learn more about Circle’s Modular Wallets offering.

Setup

  1. Register a Circle Developer account. In the Configurator section of the Circle Developer Console under Modular Wallets, grab your Client URL, and create a new Client Key.
  2. Register a Dynamic account. Grab your environment ID from the SDK & API keys page of the Dynamic Dashboard.
  3. In the Chains and Networks page of the Dynamic Dashboard, enable the EVM network(s) you want to use with Circle. In this example we use Polygon Amoy, so please make sure that’s enabled.

Code Implementation

For this guide, we’ll be using React and TypeScript. If you don’t already have an app created, check out our Quickstart guide.
  1. You’ll need to install the Circle SDK dependency by running:
  1. Create a .env file in the project directory and add the following environment variables:
Note: If you’re using Next.js, replace REACT_APP_ with NEXT_PUBLIC_ and for Vite, use VITE_.
  1. In src/App.js, replace the value for the environmentId with your own Dynamic environment ID.
  2. Navigate to src/Main.js, and replace the current contents with the following:
  1. Run the app by executing:
Check out the UI; once you sign up/login, you should see the following:
  1. Add a valid address to send to, and an amount that is within your wallet’s balance plus a reasonable gas fee. Click on the “Send” button, and you should see the transaction hash in the UI!

Troubleshooting

Problem: Execution reverted for an unknown reason Solution: This is most likely due to the account not having enough ETH to pay for the transfer, make sure your smart wallet is funded!
Last modified on June 25, 2026