Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.39 KB

TestAndDeployBrownie.md

File metadata and controls

47 lines (33 loc) · 1.39 KB

Python deployment & testing instructions

Testing & Deploying with Brownie

The testing-suite is configured for use with Ganache on a forked bsc - mainnet.

To run the tests:

  1. Install Brownie & Ganache-CLI, if you haven't already.

  2. Sign up for BSCSCAN and generate an API key. This is required for fetching source codes of the mainnet contracts we will be interacting with. Store the API key in the BSCSCAN_TOKEN environment variable.

export BSCSCAN_TOKEN=YourApiToken
  1. Install project dependencies.
pip install -r requirements.txt
  1. Run the tests.
brownie test  test/test_stableoracle_deployed.py -s --network bsc-main-fork

To deploy the contract and initialize the registry:

  1. Create an account and store it in brownie (you'll have to provide your private key or create a new one)
brownie accounts new <id>

Follow the instructions.

  1. Change the source file, replace YOUR ACCOUNT with the id of the account you generated (the ID, not public or private key!!)
me = accounts.load('YOUR_ACCOUNT')
  1. Run the script
brownie run deploy --network bsc-main