Skip to content

Instantly share code, notes, and snippets.

View yacademy's full-sized avatar

yAcademy yacademy

View GitHub Profile
@yacademy
yacademy / check_timestamps.py
Created August 16, 2024 03:11
Blockchain timestamp anomaly testing script
import subprocess
# Set these parameters specific to the chain you are testing
oldest_block = 19522700
newest_block = 19523700
rpc_url = "https://eth.llamarpc.com"
max_seconds_diff_trigger = 12
first_timestamp = int(subprocess.run(["cast", "block", "-f", "timestamp", str(oldest_block), "--rpc-url", rpc_url], capture_output=True, text = True).stdout)