When working on multichain projects it is a tedious task to setup private RPCs and managing them in your local environment or github actions. This repository is a suite of tools to streamline the handling of RPC environment variables, by automating the creation and injection of environment variables following a common naming scheme
This action iterates over the supported chain ids and sets the corresponding env var.
Alchemy API key
If given, the action substitute missing RPC_URLs with one constructed from the given key.
Quicknode API key and endpoint name
If given, the action substitute missing RPC_URLs with one constructed from the given token & name pair.
The supported environment variables are documented in this test.
- uses: bgd-labs/action-rpc-env@main
with:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
QUICKNODE_TOKEN: ${{ secrets.QUICKNODE_TOKEN }}
QUICKNODE_ENDPOINT_NAME: ${{ secrets.QUICKNODE_ENDPOINT_NAME }}
env:
RPC_POLYGON: "https://rpc.polygon.com"