🏗️

How to Setup Environment

Tags

In order to set your environment up in preparation for following the Runbook to test a BIP, follow these steps:

  1. Clone the Beanstalk GitHub repository and change directories into the new folder.
  2. 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 git@github.com:BeanstalkFarms/Beanstalk.git BIP-X
    cd BIP-X/
  3. Checkout the branch in the GitHub pull request linked in the BIP runbook.
  4. git checkout example-branch
  5. Change directories into the protocol folder.
  6. cd protocol/
  7. Install all packages.
  8. yarn
  9. Compile the Solidity code.
  10. npx hardhat clean && npx hardhat compile
  11. Fork mainnet locally (need Foundry installed).
  12. anvil --fork-url https://arb-mainnet.g.alchemy.com/v2/1CQLa5F51IhNe3tAGviuUpzON4Wbbo6I --chain-id 1337
  13. 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.
How to Setup Environment