proxy/eth_getStorageAt - 获取指定地址及序号的存储
使用proxy模块的eth_getStorageAt方法获取指定以太坊地址及序号的状态存储值。
API调用
GET|POST /api
查询|表单参数:
- module:proxy
- action:eth_getStorageAt
- address:要查询的以太坊地址
- position:存储位置
- tag:区块编号,latest表示最新区块
- apikey:etherscan API密钥
API返回结果
返回结果为一个JSON对象,主要字段如下:
- jsonrpc:RPC版本号,2.0
- id:RPC请求编号
- result:调用结果,该位置存储的值
- error:错误信息
示例代码
以curl为例的调用代码如下,也可以点击这里查看浏览器中的运行结果:
~$ curl https://api.etherscan.io/api?module=proxy&action=eth_getStorageAt&address=0x6e03d9cce9d60f3e9f2597e13cd4c54c55330cfd&position=0x0&tag=latest&apikey=YourApiKeyToken
返回结果如下:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000003d0768da09ce77d25e2d998e6a7b6ed4b9116c2d"
}