Environment Variable Configuration
Set Environment Variable
Environment | RPC URL |
---|---|
Local | http://localhost:8545 |
Polygon Amoy | https://rpc-amoy.polygon.technology/ |
Polygon POS | https://polygon-rpc.com |
NOTE: These are the public examples. You still need to use a node provider like [Alchemy][alchemy-url] or [Infura][infura-url]
- Set the RPC URL
- Choose the RPC URL that corresponds with the desired environment.
- Export it to zsh
- Set the Chain ID that corresponds with the desired environment.
- Export it to zsh
- Export it to zsh
- Set the gas price needed for the desired environment.(20 is a good number to use generally)
- Export it to zsh
- Export it to zsh
- Open the .env file in the root directory and set the address and private key for the protocol contract owner. Use the following predefined variables:
- DEPLOYMENT_OWNER
- DEPLOYMENT_OWNER_KEY
- Set the Rule Processor Address to make the connection with the protocol(if not deploying the protocol)
- For local deployments, the Rule Processor address can be found in previous steps, otherwise consult the [Deployment Directory][deploymentDirectory-url] for the target chain.
- Export it to zsh
- Set the Application Admin Address
- This is the initial owner and/or Application Administrator. It is suggested that this address be reused during the initial deployment process. The environment variable is reused for each deployment.
- Export it to zsh
- Set the Application Admin Private Key
- This is the private key for the initial owner and/or Application Administrator. This should correspond to the Application Admin Address set in Step 4. NOTE: This account needs to have sufficient funds to cover deployment costs.
- Export it to zsh
- Repeat steps 3 and 4 for each [admin role][admin-roles].