Introducing Magma - the simple and robust command-line tool for generating and evaluating Lava specifications. Onboard new chains with ease, for both EVM and Cosmos SDK chains.
- Copy the repo
- Export GO path into working directory:
export GOPATH=$(go env GOPATH)
export GOBIN=$GOPATH/bin
export PATH="/opt/homebrew/opt/libpq/bin:$GOPATH:$GOBIN:$PATH"
export DOCKER_DEFAULT_PLATFORM=linux/amd64
- Install dependencies:
go install
Run CLI command with sample input.yaml
file:
magma gen-evm-spec input.yaml --chain-name <CHAIN_NAME> --chain-idx <CHAIN_IDX>
Run CLI command with a valid Chain node endpoint. The program will automatically: - Fetch supported API methods - Handle spec inheritence (Base Chain imports) - Detect & discard ignored methods
magma gen-cosmos-spec grpc.osmosis.zone:9090 --chain-name Osmosis --chain-idx COS3
Generated spec will be written into output.json
file (default)