Skip to main content
1

Prerequisites

We recommend installing nvm (Node Version Manager) first and then install Node.js with nvm.Install Node.js:
Install pnpm:
2

Setting up your environment

  1. Clone the template project:
  1. Install dependencies:
If pnpm install fails with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED for @safe-global/safe-smart-account, allow its build script by adding the following to package.json, then re-run pnpm install:
  1. Set up .env file. You can use the values below, taken from the README:
If you don’t have a mnemonic, you can generate one using this website or use our default test accounts. We recommend using RPC providers instead of public endpoints for better log access.
  1. Compile contracts:
  1. Run a local Node
The current instructions will run a local node and a local covalidator. If you are using this template against another network, e.g. Base Sepolia, skip this step.
  1. Run tests (against the local node):

Deploying on Base Sepolia

After setting the PRIVATE_KEY_BASE_SEPOLIA and BASE_SEPOLIA_RPC_URL fields in the .env file, run the following command:
Then, you can make sure tests still pass with:

Next Step

Now that you have deployed and tested the contract, let’s understand how it works.