Tags
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. - Checkout the branch in the GitHub pull request linked in the BIP runbook.
- Change directories into the
protocol
folder. - Rename the
.env-sample
file to.env
and set theFORKING_RPC
,BLOCK_NUMBER
andMAINNET_RPC
environment variables. - 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.
FORKING_RPC
and 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 .env
file: