Skip to content

bgd-labs/action-rpc-env

Repository files navigation

NodeJS: @bgd-labs/rpc-env

NPM Version

Usage

import { getRPCUrl, ChainId } from "@bgd-labs/rpc-env";

const url = getRPCUrl(ChainId.mainnet, "[YOUR_ALCHEMY_KEY]");

Action: action-rpc-env

This action iterates over the supported chain ids and sets the corresponding env var.

Inputs

ALCHEMY_API_KEY

Alchemy API key

If given, the action substitute missing RPC_URLs with one constructed from the given key.

Supported Environment Variables

The supported environment variables are documented in this test.

Usage

- uses: bgd-labs/action-rpc-env@main
  with:
    ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
  env:
    RPC_POLYGON: "https://rpc.polygon.com"