PalletMetadataV16 constructor

PalletMetadataV16({
  1. required String name,
  2. PalletStorageMetadataV16? storageV16,
  3. PalletCallMetadataV16? callsV16,
  4. PalletEventMetadataV16? eventV16,
  5. required List<PalletConstantMetadataV16> constantsV16,
  6. PalletErrorMetadataV16? errorV16,
  7. required List<PalletAssociatedTypeMetadata> associatedTypes,
  8. required List<PalletViewFunctionMetadata> viewFunctions,
  9. required int index,
  10. List<String> docs = const <String>[],
  11. required ItemDeprecationInfo deprecationInfo,
})

Implementation

PalletMetadataV16({
  required super.name,
  this.storageV16,
  this.callsV16,
  this.eventV16,
  required this.constantsV16,
  this.errorV16,
  required this.associatedTypes,
  required this.viewFunctions,
  required super.index,
  this.docs = const <String>[],
  required this.deprecationInfo,
}) : super(
       // Provide base class compatibility by wrapping V16 types
       storage: null,
       calls: callsV16 != null ? PalletCallMetadata(type: callsV16.type) : null,
       event: eventV16 != null ? PalletEventMetadata(type: eventV16.type) : null,
       constants: constantsV16
           .map(
             (c) =>
                 PalletConstantMetadata(name: c.name, type: c.type, value: c.value, docs: c.docs),
           )
           .toList(),
       error: errorV16 != null ? PalletErrorMetadata(type: errorV16.type) : null,
     );