Chain cli work as chain specific so command run only for 1 chain.
go run *.go generates blockchain chain --RPC
Request RPC node for feel chain info structure:
type ChainInfo struct {
ChainType string `json:"chainType"` // L1 or L2
ChainID *big.Int `json:"chainID"` // Chain ID
Block *seer_common.BlockJson `json:"block"`
}
By requesting eth_getBlock and eth_chainID.
parameters:
Generate definitions for various blockchains
Usage:
seer generates blockchain chain [flags]
Flags:
--chain string The name of the blockchain (required)
--definitions Generate definitions (Optional)
--full Generate all (Optional)
-h, --help help for chain
--interfaces Generate interfaces (Optional)
--migrations Generate migrations (Optional)
--models Generate models (Optional)
--output string The path to the output file(chain Info include lates block and transactions) (Optional)
--rpc string The RPC URL for the blockchain (required)
--subscription Generate subscription type (Optional)
--deploy Generate deploy scripts (Optional)
--output Dump chain info to file.
Each Optional flag decide what will be generated as output:
--definitions
Generate Protobf definitions file for chain(depend on if chain detect L2 fields in RPC response will ad extra field.
Create files:
seer/blockchain/<chain_name_lower>
--interfaces same as seer blockchain generate -n $BLOCKCHAIN --side-chain but side chain dected from RPC
required: Proto definitions must exits in blockchain folder for that chain name
Create files:
seer/blockchain/<chain_name_lower>
Merge moonstreamdb-v3 to seer. Add chain cli.
Chain cli work as chain specific so command run only for 1 chain.
Request RPC node for feel chain info structure:
By requesting
eth_getBlock
andeth_chainID
.parameters:
--output
Dump chain info to file.Each Optional flag decide what will be generated as output:
--definitions
Generate Protobf definitions file for chain(depend on if chain detect L2 fields in RPC response will ad extra field. Create files:
seer/blockchain/<chain_name_lower>
Template: seer/blockchain/common/evm_proto_template.proto.tmpl
--interfaces
same asseer blockchain generate -n $BLOCKCHAIN --side-chain
but side chain dected from RPC required: Proto definitions must exits in blockchain folder for that chain name Create files:seer/blockchain/<chain_name_lower>
--models
generate databases modelsseer/moonstreamdb-v3/moonstreamdbv3
--migrations
create igration files with alembic revisiom --autogenerate -m 'add-seer/moonstreamdb-v3/moonstreamdbv3
--deploy
Generate deploy scriptsseer/deploy
--subscription
Generate subscription resource.
Command examples: