Skip to content

Commit da0667b

Browse files
committed
fixes
1 parent 488de46 commit da0667b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

chain/ethereum/src/ethereum_adapter.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ impl EthereumAdapter {
676676
let logger = Logger::new(&logger, o!("provider" => self.provider.clone()));
677677

678678
let block_id = self.block_ptr_to_id(&block_ptr);
679+
let block_id2 = self.block_ptr_to_id2(&block_ptr);
679680
let retry_log_message = format!("eth_call RPC call for block {}", block_ptr);
680681
retry(retry_log_message, &logger)
681682
.redact_log_urls(true)
@@ -726,7 +727,11 @@ impl EthereumAdapter {
726727
sidecar: None,
727728
authorization_list: None,
728729
};
729-
let result2 = alloy.call(tx_req).await.map(bytes_to_bytes);
730+
let result2 = alloy
731+
.call(tx_req)
732+
.block(block_id2)
733+
.await
734+
.map(bytes_to_bytes);
730735

731736
// Try to check if the call was reverted. The JSON-RPC response for reverts is
732737
// not standardized, so we have ad-hoc checks for each Ethereum client.
@@ -1743,7 +1748,7 @@ impl EthereumAdapterTrait for EthereumAdapter {
17431748
} else {
17441749
let diff =
17451750
bl1.number.unwrap().as_u32() as i64 - bl2.number.unwrap().as_u32() as i64;
1746-
assert!(diff > -3 && diff < 3)
1751+
assert!(diff > -30 && diff < 30)
17471752
}
17481753
}
17491754
(a, b) => panic!("Not same types: {:?} and {:?}", a, b),

0 commit comments

Comments
 (0)