File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ impl FileSigner {
81
81
}
82
82
}
83
83
84
- fn get_evm_public_key ( public_key : & PublicKey ) -> anyhow:: Result < [ u8 ; 20 ] > {
84
+ fn get_evm_address ( public_key : & PublicKey ) -> anyhow:: Result < [ u8 ; 20 ] > {
85
85
let pubkey_uncompressed = public_key. serialize_uncompressed ( ) ;
86
86
let pubkey_hash: [ u8 ; 32 ] = Keccak256 :: new_with_prefix ( & pubkey_uncompressed[ 1 ..] )
87
87
. finalize ( )
@@ -108,7 +108,7 @@ impl Signer for FileSigner {
108
108
async fn get_public_key ( & self ) -> anyhow:: Result < ( PublicKey , [ u8 ; 20 ] ) > {
109
109
let secp = Secp256k1 :: new ( ) ;
110
110
let public_key = self . secret_key . public_key ( & secp) ;
111
- let pubkey_evm = get_evm_public_key ( & public_key) ?;
111
+ let pubkey_evm = get_evm_address ( & public_key) ?;
112
112
Ok ( ( public_key, pubkey_evm) )
113
113
}
114
114
}
@@ -235,7 +235,7 @@ impl Signer for KMSSigner {
235
235
let public_key =
236
236
PublicKey :: from_slice ( decoded_algorithm_identifier. subject_public_key . raw_bytes ( ) )
237
237
. map_err ( |e| anyhow:: anyhow!( "Failed to create PublicKey from KMS: {}" , e) ) ?;
238
- let pubkey_evm = get_evm_public_key ( & public_key) ?;
238
+ let pubkey_evm = get_evm_address ( & public_key) ?;
239
239
240
240
Ok ( ( public_key, pubkey_evm) )
241
241
}
You can’t perform that action at this time.
0 commit comments