Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions slot_diff_attest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down