getStorage method
Gets an element from the storage of the contract with the specified
address
at the specified position
.
See https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getstorageat for
more details.
This function allows specifying a custom block mined in the past to get
historical data. By default, BlockNum.current will be used.
Implementation
Future<Uint8List> getStorage(
EthereumAddress address,
BigInt position, {
BlockNum? atBlock,
}) {
final blockParam = _getBlockParam(atBlock);
return makeRPCCall<String>('eth_getStorageAt', [
address.hex,
'0x${position.toRadixString(16)}',
blockParam,
]).then(hexToBytes);
}