In order to set your environment up in preparation for following the Runbook to test a BIP, follow these steps:
Clone the Beanstalk
GitHub repository and change directories into the new folder.
Suggestion: name the repository based on which BIP you are verifying. BIP-X
will be the name of the directory on your computer after cloning the repository.
git clone [email protected]:BeanstalkFarms/Beanstalk.git BIP-X
cd BIP-X/
Checkout the branch in the GitHub pull request linked in the BIP runbook.
git checkout example-branch
Change directories into the protocol
folder.
cd protocol/
Install all packages.
yarn
Compile the Solidity code.
npx hardhat clean && npx hardhat compile
Fork mainnet locally (need Foundry installed).
anvil --fork-url <https://arb-mainnet.g.alchemy.com/v2/1CQLa5F51IhNe3tAGviuUpzON4Wbbo6I> --chain-id 1337
Open another terminal window in order to run commands against your mainnet fork. At this point you are ready to follow the Runbook for the given BIP.