@@ -9,7 +9,7 @@ use alloy_primitives::{Address, FixedBytes, U256};
99use alloy_sol_types:: Eip712Domain ;
1010use anyhow:: Result ;
1111use clap:: Parser ;
12- use ethers_signers:: { coins_bip39:: English , MnemonicBuilder } ;
12+ use ethers_signers:: { coins_bip39:: English , MnemonicBuilder , Signer } ;
1313use tokio:: signal:: unix:: { signal, SignalKind } ;
1414
1515use log:: { debug, info} ;
@@ -29,8 +29,8 @@ struct Args {
2929 mnemonic : String ,
3030
3131 /// Gateway key derive path to be used to generate key for signing Receipt Aggregate Vouchers.
32- #[ arg( long, env = "TAP_KEY_DERIVE_PATH" ) ]
33- key_derive_path : Option < String > ,
32+ #[ arg( long, default_value = "m/44'/60'/0'/0/0" , env = "TAP_KEY_DERIVE_PATH" ) ]
33+ key_derive_path : String ,
3434
3535 /// Maximum request body size in bytes.
3636 /// Defaults to 10MB.
@@ -90,18 +90,12 @@ async fn main() -> Result<()> {
9090 tokio:: spawn ( metrics:: run_server ( args. metrics_port ) ) ;
9191
9292 // Create a wallet from the mnemonic.
93- let wallet = if let Some ( key_derive_path) = args. key_derive_path . as_deref ( ) {
94- info ! ( "Creating wallet from mnemonic and key derive path..." ) ;
95- MnemonicBuilder :: < English > :: default ( )
96- . phrase ( args. mnemonic . as_str ( ) )
97- . derivation_path ( key_derive_path) ?
98- . build ( ) ?
99- } else {
100- info ! ( "Creating wallet from mnemonic..." ) ;
101- MnemonicBuilder :: < English > :: default ( )
102- . phrase ( args. mnemonic . as_str ( ) )
103- . build ( ) ?
104- } ;
93+ let wallet = MnemonicBuilder :: < English > :: default ( )
94+ . phrase ( args. mnemonic . as_str ( ) )
95+ . derivation_path ( & args. key_derive_path ) ?
96+ . build ( ) ?;
97+
98+ info ! ( "Wallet address: {:#40x}" , wallet. address( ) ) ;
10599
106100 // Create the EIP-712 domain separator.
107101 let domain_separator = create_eip712_domain ( & args) ?;
0 commit comments