- Install nvm: https://github.com/nvm-sh/nvm#installing-and-updating
- Install node:
nvm install 16
(Later versions don't work well with hardhat) - Install yarn:
npm install --global yarn
- Install packages:
yarn
- (Highly recommended) Install the hardhat shorthand.
The unit test suite can be run with hh test
. If you have never compiled the code before, it may be a good idea to run hh compile
first.
- A mainnet fork can be spun up with
yarn hardhat-fork
. - After spinning up the mainnet fork, in another terminal run
hh run scripts/steal_assets.ts --network localhost
to give CryptoPunks and USDC to the first hardhat account.