ChainInfo.fromMetadata constructor

ChainInfo.fromMetadata(
  1. Uint8List metadataBytes
)

Create ChainInfo from raw metadata bytes

Implementation

factory ChainInfo.fromMetadata(Uint8List metadataBytes) {
  final input = Input.fromBytes(metadataBytes);
  final prefixed = RuntimeMetadataPrefixed.codec.decode(input);
  return ChainInfo.fromRuntimeMetadataPrefixed(prefixed);
}