File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ edition = "2021"
5
5
resolver = " 2"
6
6
7
7
[dependencies ]
8
+ alloy-primitives = { version = " 0.8.12" , default-features = false , features = [" serde" ] }
8
9
anyhow = { version = " 1.0.68" , default-features = false , features = [" std" ] }
9
10
async-trait = " 0.1.71"
10
11
bitcoin = { version = " 0.32.2" , features = [" serde" , " rand" ] }
Original file line number Diff line number Diff line change 1
1
use std:: time:: { Duration , SystemTime } ;
2
2
3
+ use alloy_primitives:: U64 ;
3
4
use anyhow:: { bail, Result } ;
4
5
use jsonrpsee:: {
5
6
core:: client:: ClientT ,
@@ -44,14 +45,16 @@ impl Client {
44
45
Ok ( self
45
46
. client
46
47
. request ( "ledger_getLastScannedL1Height" , rpc_params ! [ ] )
47
- . await ?)
48
+ . await
49
+ . map ( |v : U64 | v. try_into ( ) . expect ( "U64 to u64 must succeed" ) ) ?)
48
50
}
49
51
50
52
pub async fn ledger_get_head_soft_confirmation_height ( & self ) -> Result < u64 > {
51
53
Ok ( self
52
54
. client
53
55
. request ( "ledger_getHeadSoftConfirmationHeight" , rpc_params ! [ ] )
54
- . await ?)
56
+ . await
57
+ . map ( |v : U64 | v. try_into ( ) . expect ( "U64 to u64 must succeed" ) ) ?)
55
58
}
56
59
57
60
pub async fn wait_for_l2_block ( & self , num : u64 , timeout : Option < Duration > ) -> Result < ( ) > {
You can’t perform that action at this time.
0 commit comments