A command line tool that wraps Optimisms superchain-registry repository.
The superchain-registry-cli
is designed to simplify interactions with the superchain-registry, providing a user-friendly command line interface for developers and operators.
- Ensure you have Go installed on your system.
- Install
superchain-registry-cli
:go install github.com/blmalone/superchain-registry-cli/sure@latest
- Optionally, install
jq
for JSON processing:brew install jq
on macOS
After installation, run sure --help
for a full breakdown of the available functionality.
-
List all chains in the superchain (default is mainnet):
sure list sure ls --json sure ls --target sepolia
-
Get all addresses for a chain:
sure get-addresses --chain op sure ga -c op sure ga -c op -tg sepolia
-
Get a specific address by name (fuzzy match on
--address-name
):sure ga -c zora --address-name l1 # all addresses containing "l1" - not case sensitive sure ga -c zora -an L1CrossDomainMessengerProxy
-
Get all addresses for a given name across the superchain (fuzzy match on
--address-name
):sure ga -an L1StandardBridge
-
Usage with cast:
cast call $(sure ga -c op -an L1Standard --json | jq -r '.op.addrs.L1StandardBridgeProxy') "version()(string)" # When you know there will be only one address cast call $(sure ga -c op -an L1Standard --json | jq -r '.op.addrs | to_entries | .[0].value') "version()(string)"
Contributions are welcome! Fork this repository and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.