fromMetadata static method

ChainInfo fromMetadata(
  1. DecodedMetadata metadata, [
  2. LegacyTypes? legacyTypes
])

Implementation

static ChainInfo fromMetadata(DecodedMetadata metadata,
    [LegacyTypes? legacyTypes]) {
  if (metadata.isPreV14) {
    assertion(legacyTypes != null,
        'Legacy types are required for metadata versions below 14');
    return LegacyParser(metadata, legacyTypes!).getChainInfo();
  }
  return V14Parser(metadata).getChainInfo();
}