diff --git a/slot_diff_attest.py b/slot_diff_attest.py index 98e6a58..252f082 100644 --- a/slot_diff_attest.py +++ b/slot_diff_attest.py @@ -140,9 +140,14 @@ def main() -> None: chain_id = w3.eth.chain_id tip = w3.eth.block_number print(f"🌐 Connected chainId={chain_id}, tip={tip}") - if block_a > tip or block_b > tip: print(f"⚠️ Requested block beyond tip {tip}; clamping upper bound."); block_b = min(block_b, tip) + if block_a > tip or block_b > tip: + print(f"⚠️ Requested block beyond tip {tip}; clamping upper bound.", file=sys.stderr) + block_b = min(block_b, tip) + if block_b > tip: - print(f"⚠️ block_b {block_b} > tip {tip}; clamping."); block_b = tip + print(f"⚠️ block_b {block_b} > tip {tip}; clamping.", file=sys.stderr) + block_b = tip + if not w3.eth.get_code(address): print("⚠️ Target has no contract code — likely an EOA (reads will be zero).") if not code: print("❌ Target has no contract code (EOA)."); sys.exit(2)