Thirdweb
Learn how to use thirdweb to build applications on Abstract.
Prerequisites
Prerequisites
Ensure you have the following installed on your machine:
- Node.js v18.0.0 or later.
1. Create a new project
Create a new React or React Native project using the thirdweb CLI.
Select your preferences when prompted by the CLI, or use the recommended setup below.
Recommended application setup
Recommended application setup
We recommend selecting the following options when prompted by the thirdweb CLI:
Change directory into the newly created project:
(Replace my-abstract-app
with your created project name.)
2. Set up a Thirdweb API key
On the thirdweb dashboard, create your
account (or sign in), and copy your project’s Client ID from the
Settings section. Ensure that localhost
is included in the allowed domains.
Create an .env.local
file and add your client ID as an environment variable:
Start the development server and navigate to http://localhost:3000
in your browser to view the application.
3. Connect the app to Abstract
Import the Abstract chain from the thirdweb/chains
package:
Use the Abstract chain import as the value for the chain
property wherever required.
Learn more on the official thirdweb documentation.