When working with Brownie and private key environment variables, you'll need to make sure a few things are set.
- In your
.env file, you have your
PRIVATE_KEY variable set correctly. If using a
.env file, it should look something like:
If you exported your private key from metamask, you'll want to append a
0x to the start of your key.
- You'll want to make sure your
brownie-config.yaml is set to include a
.env file, if that's what you're using to set your environment variable.
- Then finally, you'll want your environment variable set correctly in your
brownie-config.yaml, something like:
Where you are using the appropriate $ and bracket syntax.