getStorageSize method

Future<int?> getStorageSize(
  1. StorageKey key,
  2. {BlockHash? at}
)

Returns the size of a storage entry at a block's state.

Implementation

Future<int?> getStorageSize(StorageKey key, {BlockHash? at}) async {
  final List<String> params = ['0x${hex.encode(key)}'];
  if (at != null) {
    params.add('0x${hex.encode(at)}');
  }
  final response = await _provider.send('state_getStorageSize', params);
  return response.result as int?;
}