Follow these steps to get this project up and running on your local machine:
-
Clone the repository
Use the following command to clone this repository to your local machine:
git clone [email protected]:zerodevapp/zerodev-examples.git
-
Install dependencies
Navigate to the project directory and install the dependencies:
cd zerodev-examples npm install
-
Setup environment variables
Copy the
.env.example
file to.env
and fill in the required values (most examples only require a few of these env vars)cp .env.example .env
You can find your bundler & paymaster URLs on the ZeroDev dashboard. The examples use ETH Sepolia, so make sure to create a ZeroDev project for ETH Sepolia. If you want to run the examples on another network, make sure to update the
chain
object in the code (some examples use the chain object in ./utils.ts so you'd need to update it there). -
Run the script
Run any of the example scripts using the following command:
npx ts-node path/to/script.ts