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
10 changes: 7 additions & 3 deletions slot_diff_attest.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,16 @@ def main() -> None:
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)

try:
try:
v_a = w3.eth.get_storage_at(address, slot, block_identifier=block_a)
v_b = w3.eth.get_storage_at(address, slot, block_identifier=block_b)
if v_a in (None, b"") or v_b in (None, b""): print("❌ Historical storage unavailable (archive node required)."); sys.exit(2)
if v_a in (None, b"") or v_b in (None, b""):
print("❌ Historical storage unavailable (archive node required).", file=sys.stderr)
sys.exit(2)
except Exception as e:
print(f"❌ Storage read failed: {e}"); sys.exit(2)
print(f"❌ Storage read failed: {e}", file=sys.stderr)
sys.exit(2)


leaf_a = leaf_commitment(chain_id, address, slot, block_a, v_a)
leaf_b = leaf_commitment(chain_id, address, slot, block_b, v_b)
Expand Down