polkadot-js/api

View on GitHub
packages/types/src/metadata/v13/toV14.ts

Summary

Maintainability
B
4 hrs
Test Coverage

File toV14.ts has 263 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright 2017-2024 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0

import type { Text, Type } from '@polkadot/types-codec';
import type { ErrorMetadataV13, EventMetadataV13, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionMetadataV13, MetadataV13, MetadataV14, ModuleConstantMetadataV13, ModuleMetadataV13, PalletCallMetadataV14, PalletConstantMetadataV14, PalletErrorMetadataV14, PalletEventMetadataV14, PalletMetadataV14, PalletStorageMetadataV14, StorageEntryMetadataV14, StorageEntryTypeV14, StorageHasherV13, StorageMetadataV13 } from '../../interfaces/metadata/index.js';
Severity: Minor
Found in packages/types/src/metadata/v13/toV14.ts - About 2 hrs to fix

    Function convertEvents has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function convertEvents (specs: TypeSpec[], registry: Registry, modName: Text, events: EventMetadataV13[], sectionTypes: OverrideModuleType): PalletEventMetadataV14 {
    Severity: Minor
    Found in packages/types/src/metadata/v13/toV14.ts - About 35 mins to fix

      Function convertErrors has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function convertErrors (specs: TypeSpec[], registry: Registry, modName: Text, errors: ErrorMetadataV13[], _sectionTypes: OverrideModuleType): PalletErrorMetadataV14 {
      Severity: Minor
      Found in packages/types/src/metadata/v13/toV14.ts - About 35 mins to fix

        Function convertCalls has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function convertCalls (specs: TypeSpec[], registry: Registry, modName: Text, calls: FunctionMetadataV13[], sectionTypes: OverrideModuleType): PalletCallMetadataV14 {
        Severity: Minor
        Found in packages/types/src/metadata/v13/toV14.ts - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status