In order to set your environment up in preparation for following the Runbook to test a BIP, follow these steps:
- Clone the
- Checkout the branch in the GitHub pull request linked in the .BIP Runbooks
- Change directories into the
- Rename the
.envand set the
- Install all packages.
- Compile the Solidity code.
- Fork mainnet locally.
- 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.
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 firstname.lastname@example.org:BeanstalkFarms/Beanstalk.git BIP-X
git checkout example-branch
mv .env-sample .env
MAINNET_RPC should be set to the same RPC URL; we recommend getting an API key on Alchemy (this will be provided to BCM Signers). Choose a
BLOCK_NUMBER after the facets being added/changed have already been deployed and before they are added to Beanstalk. This means if you are testing a BIP during the Voting Period, you can go to Etherscan and pick any recent block number. The following is an example
FORKING_RPC=https://eth-mainnet.g.alchemy.com/v2/api-key BLOCK_NUMBER=16300774 MAINNET_RPC=https://eth-mainnet.g.alchemy.com/v2/api-key ETHERSCAN_KEY=
npx hardhat compile
npx hardhat node