add the autoBind features we have in solgun (under api/cmd/solgun see flags.go), goal is to have env variables fill things like rpc-endpoint (which I don’t want to commit as it has an access key to our Infura/whatever RPC endpoint). For the env var, SUBSTREAM would be the binary’s prefix (instead of SOLGUN in that example).
setup using the same init() pattern and viper.GetStuff() fetching of fields (see program_proxy.go for example), instead of the StringVar(&pointer) style, for consistency with the rest of our stack.
setup flags for: --rpc-endpoint , --start-block (shorthand -s, to override the genesis, in which case we fail if we can’t load the state snapshots at that block), --state-store-url (w/ default ./localdata), --blocks-store-url (with default ./localblocks), --irr-indexes-url (w/ default ./localirr)
with an optional positional argument of limit (which becomes the blockCount, and has a default of 1000 like right now)
add the autoBind features we have in solgun (under api/cmd/solgun see flags.go), goal is to have env variables fill things like rpc-endpoint (which I don’t want to commit as it has an access key to our Infura/whatever RPC endpoint). For the env var, SUBSTREAM would be the binary’s prefix (instead of SOLGUN in that example).
setup using the same init() pattern and viper.GetStuff() fetching of fields (see program_proxy.go for example), instead of the StringVar(&pointer) style, for consistency with the rest of our stack.
setup flags for: --rpc-endpoint , --start-block (shorthand -s, to override the genesis, in which case we fail if we can’t load the state snapshots at that block), --state-store-url (w/ default ./localdata), --blocks-store-url (with default ./localblocks), --irr-indexes-url (w/ default ./localirr)
with an optional positional argument of limit (which becomes the blockCount, and has a default of 1000 like right now)