"""Offline comparison of the two published explorer responses. No network or wallet access.""" from pathlib import Path import json,sys p=Path(sys.argv[1] if len(sys.argv)>1 else 'eth-gas-observed-fee-20261025.json');d=json.loads(p.read_text(encoding='utf-8'));a,b=[r['fields'] for r in d['providers']] assert a['hash']==b['hash']==d['transaction_hash'] assert a['block_number']==b['block_id']==20000000 assert a['status']=='ok' and a['result']=='success' and b['failed'] is False gas=int(a['gas_used']);price=int(a['gas_price']);fee=gas*price assert gas==int(b['gas_used'])==21000 assert price==int(b['effective_gas_price'])==8765616835 assert fee==int(a['fee']['value'])==int(b['fee'])==d['verified']['fee_wei'] assert price==min(int(a['max_fee_per_gas']),int(a['base_fee_per_gas'])+int(a['max_priority_fee_per_gas'])) assert int(a['gas_limit'])*int(a['max_fee_per_gas'])-fee==d['verified']['budget_minus_fee_wei'] print('MATCH: gas=21000; price=8765616835wei; fee=184077953535000wei =0.000184077953535ETH; execution success reported by both explorers.') print('This validates the saved responses and arithmetic, not an independent chain replay or current fees.')