Currently if you just want to dump on request, you need to start Devnet with --dump-on <SOMETHING> and --dump-path <PATH>.
Proposal
Add --dump-on request which doesn't require --dump-path to be set.
Additionally, in the /dump endpoint, if no path is specified in the request body (and if none is provided on startup with --dump-path), default to dumping to stdout. This will allow the common pattern of:
Problem
Currently if you just want to dump on request, you need to start Devnet with
--dump-on <SOMETHING>
and--dump-path <PATH>
.Proposal
Add
--dump-on request
which doesn't require--dump-path
to be set.Additionally, in the
/dump
endpoint, if no path is specified in the request body (and if none is provided on startup with--dump-path
), default to dumping to stdout. This will allow the common pattern of:Needed changes
Something should probably be done here: https://github.com/0xSpaceShard/starknet-devnet-rs/blob/1d959080db5520f670ea5253b905c334d0e874e1/crates/starknet-devnet/src/cli.rs#L141-L158
Might be useful: https://docs.rs/clap/latest/clap/struct.Arg.html#method.requires_if