By default, this dApp runs on a local testnet, of which parameters are defined in .env
, .env.local
(priorized when developing) or .env.production
(used in npm run build). The local testnet needs to be ran separately, but can be left to run without restarts.
vanilladefi/contracts
: https://github.com/vanilladefi/contractsnpm install
inside the newly cloned contracts repocp .secrets.env.example .secrets.env
and edit the API_KEYs into .secrets.env
npm run node:mainnet-fork
. This runs a local Hardhat testnet in localhost:8545
with chainid 1 , creates test accounts with 10k ETH each and deploys the Vanilla contracts automatically.localhost:8545
-network, from 1337 to 1 To use the test accounts in Metamask, you need to import one of the accounts by its private key to a wallet of your choosing. These accounts will be the same on every run, so you only need to do this once per machine.
npm run node:test-accounts
to get a list of Hardhat test-accountsnpm install
npm run dev
env.local
with NEXT_PUBLIC_CHAIN_ID=1
npm run dev
The app should be now accessible at localhost:3000
.