chains config generator
Get chain information for forge/foundry when deploying
chains cli
The chains cli is command line a utility for getting chain information for forge/foundry when deploying.
installing
1. install cli utility
yarn global add @zoralabs/chains
npm install -g @zoralabs/chains
2. setup dotfiles
(see configuration file below)
mkdir ~/.chains/
echo '{"alchemyApiKey": "API_KEY"}' >> ~/.chains/config.json
using
chains zora --rpc
chains rpc optimism
chains explorer optimism
Loads private/custom configuration information from ~/.chains/
:
Configuration file format and naming:
$chain_name.json
-> {"rpcUrl": "https://alchemyapi.io/y/$alchemyApiKey", "etherscanApiKey": "ETHERSCAN_API_KEY"}
- eg:
zora.json
-> {"rpcUrl": "https://rpc.zora.energy/"}
config.json
-> {"alchemyApiKey": ""}
(infura and tenderly coming soon)
chains npm package
The chains npm package is an importable module that returns chain information for forge/foundry when deploying.
installing
yarn add @zoralabs/chains
npm install @zoralabs/chains
using
import { getChain } from "@zoralabs/chains";
const chain = await getChain("zora-sepolia");
console.log(chain);