Closed calvinrp closed 1 month ago
Nevermind, it works. But it is order dependent...
Confirmed the behavior after I modified the default to TestNet.
avs-toolkit-cli --target local deploy contracts --artifacts-path ./artifacts --operators wasmatic
vs.
avs-toolkit-cli deploy contracts --artifacts-path ./artifacts --operators wasmatic --target local
So you need to supply the top-level args first, otherwise it will give you an error that the flag is not supported:
error: unexpected argument '--target' found
Top-level args: https://github.com/Lay3rLabs/avs-toolkit/blob/main/tools/cli/src/args.rs#L12-L37
We need the subcommands to support the
--target
to switch between thelocal
andtest
.Typically a good way to do this is a
struct CommonArgs
and then use aflatten
to put in the subcommand arg structs.https://github.com/Lay3rLabs/avs-toolkit/blob/main/tools/cli/src/args.rs#L12-L14