streamingfast / substreams-sink-kv

Substreams KV sink
Apache License 2.0
2 stars 5 forks source link

Improve CLI by including additional flags & default params for `run` #4

Closed DenisCarriere closed 1 year ago

DenisCarriere commented 1 year ago

Would be nice if substreams-sink-kv could provide similar default params as substreams run CLI

current

substreams-sink-kv run <dsn> <endpoint> <manifest> <module> [<start>:<stop>]

$ substreams-sink-kv run badger3://badger_data.db mainnet.eth.streamingfast.io:443 substreams.yaml kv_out

with defaults & flags

substreams-sink-run <dsn> [<manifest>] [<module_name>] [<start>:<stop>] [flags]

$ substreams-sink-kv run badger3://badger_data.db

Default params

New flags

maoueh commented 1 year ago

I introduced a regression while doing 2.1.0 where manifest is now required. I'll fix this tomorrow.

maoueh commented 1 year ago

Endpoint will be mandatory, I don't think it's a good idea to have a default here.

maoueh commented 1 year ago

substreams-sink-kv inject <endpoint> <dsn> is the minimal now. For this, the substreams.yaml must have a sink config defined.

--module <name> can be used when consuming "legacy" definition where no sink config exists.