Request
curl https://eth.l0vdinfra.com/YOUR_KEY \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"erigon_forks","params":[]}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"genesis": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3",
"heightForks": [
1150000,
1920000
],
"timeForks": [
1681338455,
1710338135
]
}
}
Long arrays and hex strings are shortened in this example.
Params and your endpoint
Parameters
This method takes no parameters.
Returns
object Fork schedule.
genesisstring- Genesis block hash.
heightForksarray- Block numbers of block-based forks.
timeForksarray- Timestamps of time-based forks (Shanghai and later).
When to use it
Check which hard forks the chain has activated and when, e.g. to choose the right transaction type or opcode set.
How to read the result
heightForks are block numbers; timeForks are Unix timestamps for forks scheduled by time.
Tips
- Values are fixed per chain: cache them.
Related methods