eth_getStorageAt RPC 方法
To use the eth_getStorageAt method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.
参数
地址
字符串
必填
正在加载...
职位
字符串
必填
正在加载...
blockNumber
字符串
必填
正在加载...
退货
结果
字符串
正在加载...
请求
1curl https://docs-demo.avalanche-mainnet.quiknode.pro \2-X POST \3-H "Content-Type: application/json" \4--data '{5"method": "eth_getStorageAt",6"params": [7"0x295a70b2de5e3953354a6a8344e616ed314d7251",8"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9",9"0x65a8db"10],11"id": 1,12"jsonrpc": "2.0"13}'14
1curl https://docs-demo.avalanche-mainnet.quiknode.pro \2-X POST \3-H "Content-Type: application/json" \4--data '{5"method": "eth_getStorageAt",6"params": [7"0x295a70b2de5e3953354a6a8344e616ed314d7251",8"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9",9"0x65a8db"10],11"id": 1,12"jsonrpc": "2.0"13}'14
1import { ethers } from "ethers";23(async () => {4const provider = new ethers.JsonRpcProvider('https://docs-demo.avalanche-mainnet.quiknode.pro')5const response = await provider.send('eth_getStorageAt', [6'0x8D97689C9818892B700e27F316cc3E41e17fBeb9',7'0x0',8'latest',9])10console.log(response)11})()
1import { ethers } from "ethers";23(async () => {4const provider = new ethers.JsonRpcProvider('https://docs-demo.avalanche-mainnet.quiknode.pro')5const response = await provider.send('eth_getStorageAt', [6'0x8D97689C9818892B700e27F316cc3E41e17fBeb9',7'0x0',8'latest',9])10console.log(response)11})()
1来源 web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3storage = w3.eth.get_storage_at('0x6C8f2A135f6ed072DE4503Bd7C4999a1a17F824B', 0, 2)4print(storage.hex())
1来源 web3 import Web3, HTTPProvider2w3 = Web3(HTTPProvider('https://docs-demo.avalanche-mainnet.quiknode.pro'))3storage = w3.eth.get_storage_at('0x6C8f2A135f6ed072DE4503Bd7C4999a1a17F824B', 0, 2)4print(storage.hex())