-
Notifications
You must be signed in to change notification settings - Fork 22
Setup Environment Variables
Yuichiro Aoki edited this page Jan 25, 2022
·
1 revision
If you want to test your contracts on Ethereum mainnet fork, you'll need an ALCHEMY_MAINNET_RPC_URL
environment variable. You can get one from Alchemy website for free.
Then, you can create a .env file with the following.
ALCHEMY_MAINNET_RPC_URL='<your-own-alchemy-mainnet-rpc-url>'
If you want to deploy your contracts or interact with deployed contracts on Ethereum mainnet, you need to add your PRIVATE_KEY
environment variable, with a private key from your wallet.
PRIVATE_KEY='your-PRIVATE_KEY'
*Note: If using metamask, you'll have to add a 0x
to the start of your private key)