You will need the following properly installed on your computer:
Install yarn (or use NPM if you prefer):
brew install yarn
Install Truffle:
yarn global add truffle
Ensure you have truffle 5. Running truffle version
should output look something like:
Truffle v5.0.21 (core: 5.0.21)
Solidity v0.5.0 (solc-js)
Node v10.13.0
Web3.js v1.0.0-beta.37
Install Vyper with a virtualenv
Once your virtualenv is activated, running vyper --version
should output:
0.1.0b10
Install project dependencies
yarn
In order to run the mainlocal
network, set up a local ganache chain that is a fork of Ethereum's mainnet. The easiet way is to create an Infura project. Then run:
ganache-cli --fork https://mainnet.infura.io/v3/{your-infura-project-id}@8159055
This will fork the mainnet at block 8159055, allowing you to interact with mainnet contracts and storage (e.g. the MakerDAO system). When using Truffle, make sure to run:
truffle console --network mainlocal
Otherwise, running truffle develop
will spin up a separate ganache instance.