- Node (v14.15.x)
- Yarn (Javascript Package Manager)
- Ganache CLI
Dark Forest is built and tested using Node.js v14.15.x and might not run properly on other Node.js versions. We recommend using NVM to switch between multiple Node.js version on your machine.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install
After the installation is finished, you can run node --version to verify that you are running v14.15.x
Refer to Yarn's official documentation for the installation guide.
After you have Yarn installed, run the following commands in the root director install the remaining dev depencies:
yarn global add ganache-cli
yarn install
All of our smartcontract related code are located in the /eth directory.
/eth/contractscontains the smartcontract code written in solidity/eth/testcontains the test for the smartcontract written in Javascript
Navigate to the /eth folder and run the following commands:
yarn install
yarn test
First, run oz init in the eth directory (press ENTER to accept defaults - typechain support is irrelevant).
Next, open a separate terminal and run a local blockchain with ganache-cli.
Finally, in your original terminal, run yarn run deploy:dev.