PurePolyglot / investigate.py
github-actions[bot]
Automated deployment to Hugging Face
160aacb
Raw
History Blame Contribute Delete
1.13 kB
from web3 import Web3
from web3.middleware import geth_poa_middleware
from config import AppConfig
def investigate_ghost_tx():
print("🕵️‍♂️ X-Raying Block 895346...")
w3 = Web3(Web3.HTTPProvider(AppConfig.PURECHAIN_RPC_URL))
w3.middleware_onion.inject(geth_poa_middleware, layer=0)
if not w3.is_connected():
print("❌ Cannot connect to node.")
return
# Grab the exact block from your logs
block = w3.eth.get_block(895346, full_transactions=True)
print(f"📦 Transactions found in block: {len(block.transactions)}")
for tx in block.transactions:
receipt = w3.eth.get_transaction_receipt(tx.hash)
print("-" * 30)
print(f"🔗 TX Hash: {tx.hash.hex()}")
# Status 1 = Success, Status 0 = Reverted
if receipt.status == 1:
print("✅ Status: SUCCESS (The contract accepted the data)")
else:
print("❌ Status: REVERTED (The contract rejected the data)")
print(f"📜 Logs Emitted: {len(receipt.logs)}")
if __name__ == "__main__":
investigate_ghost_tx()