@@ -37,9 +37,12 @@ pub struct Cli {
3737 pub command : Commands ,
3838}
3939
40- /// Common parameters for key management subcommand.
40+ /// Common parameters for key management in a subcommand.
41+ // TODO: for adapters, this should not be required and for query submit it should
42+ // be. Unfortunately, clap doesn't support this easily so it is handled manually
43+ // within the command execution for submit.
4144#[ derive( clap:: Args , Debug ) ]
42- #[ group( required = true , multiple = false ) ]
45+ #[ group( multiple = false ) ]
4346pub struct KeyManagementParams {
4447 /// Use the Alice development key to sign blob transactions.
4548 ///
@@ -60,9 +63,6 @@ pub struct KeyManagementParams {
6063/// Common parameters for the adapter subcommands.
6164#[ derive( clap:: Args , Debug ) ]
6265pub struct AdapterServerParams {
63- #[ clap( flatten) ]
64- pub key_management : KeyManagementParams ,
65-
6666 /// The address on which the shim should listen for incoming connections from the rollup nodes.
6767 #[ clap( short, long, default_value = "127.0.0.1" , group = "listen" ) ]
6868 pub address : String ,
@@ -108,7 +108,7 @@ pub enum Commands {
108108pub mod serve {
109109 //! CLI definition for the `serve` subcommand.
110110
111- use super :: { AdapterServerParams , SugondatRpcParams } ;
111+ use super :: { AdapterServerParams , KeyManagementParams , SugondatRpcParams } ;
112112 use clap:: Args ;
113113
114114 #[ derive( Debug , Args ) ]
@@ -118,6 +118,9 @@ pub mod serve {
118118
119119 #[ clap( flatten) ]
120120 pub adapter : AdapterServerParams ,
121+
122+ #[ clap( flatten) ]
123+ pub key_management : KeyManagementParams ,
121124 }
122125}
123126
0 commit comments