We can store our private keys in a .env file allowing our code to reference them as variables for quick testing and easy switching between wallets.
create .env file in project folder. input as follows, the name of the variable is up to you to define (here it is PRIVATE_KEY)
dotenv: .env
tells brownie which file to look at for pulling env variables, when running scripts
wallets variables
stores list of wallets, each one pulling a different PK from env. ${PK}
We will reference wallets like so:
Last updated 3 years ago