Marketplace has launched, further enabling blockchain developers! Learn more

Contents

eth_getStorageAt RPC method

The eth_getStorageAt EVM method is only supported on the Avalanche C-Chain.

Parameters:

  1. Address - The address to check for storage.
  2. Quantity - Integer of the position in storage.
  3. Quantity | Tag - (optional) Integer block number, or the string 'latest, 'earliest' or 'pending, see the default block parameter

Returns:

  1. Result - the value at this storage position.

Code Examples:

To use the eth_getStorageAt EVM method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

const ethers = require("ethers");
(async () => {
  const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/");
  const storage = await provider.getStorageAt(
    "0x8D97689C9818892B700e27F316cc3E41e17fBeb9",
    "0x0",
    "0x2",
    "latest"
  );
  console.log(storage);
})();
Ready to get started? Create a free account