import { getRPCUrl, ChainId } from "@bgd-labs/rpc-env";
const url = getRPCUrl(ChainId.mainnet, "[YOUR_ALCHEMY_KEY]");
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.
The supported environment variables are documented in this test.
- uses: bgd-labs/action-rpc-env@main
with:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
env:
RPC_POLYGON: "https://rpc.polygon.com"