eth_getStorageAt - Optimism
Example code for the eth_getStorageAt json-rpc method. Сomplete guide on how to use eth_getStorageAt json-rpc in GetBlock.io Web3 documentation.
Parameters
Parameter
Type
Description
Required
Request Sample
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0x4200000000000000000000000000000000000006", "0x0", "latest"],
"id": "getblock.io"
}'const axios = require('axios');
const url = 'https://go.getblock.io/<ACCESS-TOKEN>/';
const payload = {
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0x4200000000000000000000000000000000000006", "0x0", "latest"],
"id": "getblock.io"
};
axios.post(url, payload, {
headers: { 'Content-Type': 'application/json' }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": "0x577261707065642045746865720000000000000000000000000000000000001a"
}Response Parameters
Use Case
Error Handling
Error Code
Description
Web3 Integration
Last updated
Was this helpful?