File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -570,6 +570,14 @@ func toBlockNumArg(number *big.Int) string {
570
570
if number .Cmp (pending ) == 0 {
571
571
return "pending"
572
572
}
573
+ finalized := big .NewInt (int64 (rpc .FinalizedBlockNumber ))
574
+ if number .Cmp (finalized ) == 0 {
575
+ return "finalized"
576
+ }
577
+ safe := big .NewInt (int64 (rpc .SafeBlockNumber ))
578
+ if number .Cmp (safe ) == 0 {
579
+ return "safe"
580
+ }
573
581
return hexutil .EncodeBig (number )
574
582
}
575
583
Original file line number Diff line number Diff line change @@ -187,6 +187,14 @@ func toBlockNumArg(number *big.Int) string {
187
187
if number .Cmp (pending ) == 0 {
188
188
return "pending"
189
189
}
190
+ finalized := big .NewInt (int64 (rpc .FinalizedBlockNumber ))
191
+ if number .Cmp (finalized ) == 0 {
192
+ return "finalized"
193
+ }
194
+ safe := big .NewInt (int64 (rpc .SafeBlockNumber ))
195
+ if number .Cmp (safe ) == 0 {
196
+ return "safe"
197
+ }
190
198
return hexutil .EncodeBig (number )
191
199
}
192
200
You can’t perform that action at this time.
0 commit comments