File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
crates/rbuilder/src/utils Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
use alloy_consensus:: SignableTransaction ;
2
- use alloy_primitives:: { Address , PrimitiveSignature , B256 , U256 } ;
2
+ use alloy_primitives:: { Address , PrimitiveSignature as Signature , B256 , U256 } ;
3
3
use reth_primitives:: { public_key_to_address, Recovered , Transaction , TransactionSigned } ;
4
4
use secp256k1:: { Message , SecretKey , SECP256K1 } ;
5
5
@@ -20,12 +20,12 @@ impl Signer {
20
20
Ok ( Self { address, secret } )
21
21
}
22
22
23
- pub fn sign_message ( & self , message : B256 ) -> Result < PrimitiveSignature , secp256k1:: Error > {
23
+ pub fn sign_message ( & self , message : B256 ) -> Result < Signature , secp256k1:: Error > {
24
24
let s = SECP256K1
25
25
. sign_ecdsa_recoverable ( & Message :: from_digest_slice ( & message[ ..] ) ?, & self . secret ) ;
26
26
let ( rec_id, data) = s. serialize_compact ( ) ;
27
27
28
- let signature = PrimitiveSignature :: new (
28
+ let signature = Signature :: new (
29
29
U256 :: try_from_be_slice ( & data[ ..32 ] ) . expect ( "The slice has at most 32 bytes" ) ,
30
30
U256 :: try_from_be_slice ( & data[ 32 ..64 ] ) . expect ( "The slice has at most 32 bytes" ) ,
31
31
i32:: from ( rec_id) != 0 ,
You can’t perform that action at this time.
0 commit comments