Skip to main content

optimism_outputAtBlock

POST

This method is used to retrieve the output root at a specific block. Users can call it by providing the block number in hexadecimal format, and a successful call returns the output root for that block. The output root is an important element representing the state of Optimism and can be used to verify the state of a specific block.
param[0]
blockNumberstringrequired
Block number indicates the sequential order of a block. Block numbers are expressed as hexadecimal strings.
Responses
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://base-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "optimism_outputAtBlock",
"params": [
"0x7C664D5"
]
}'