getMetadata method

Future<RuntimeMetadata> getMetadata({
  1. BlockHash? at,
})

Returns the runtime metadata

Implementation

Future<RuntimeMetadata> getMetadata({BlockHash? at}) async {
  final List<String> params = at != null ? ['0x${hex.encode(at)}'] : const [];
  final response = await _provider.send('state_getMetadata', params);
  return RuntimeMetadata.fromHex(response.result);
}