paritytech / substrate-api-sidecar

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
https://paritytech.github.io/substrate-api-sidecar/dist/
GNU General Public License v3.0
244 stars 151 forks source link

Not able to build with `yarn build` #803

Closed vivekvpandya closed 2 years ago

vivekvpandya commented 2 years ago

I want to run e2e-tests and that is why I need to build substrate-api-sidecar. I am using following command but it generates lots of errors.

vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn build 
rimraf build/
tsc 
src/controllers/AbstractController.ts:135:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash'.
  Types of property 'registry' are incompatible.
    Type 'CodecRegistry' is missing the following properties from type 'Registry': knownTypes, lookup, metadata, unknownTypes, and 13 more.

135    return await this.api.rpc.chain.getBlockHash(blockNumber);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/controllers/AbstractController.ts:209:3 - error TS2322: Type 'BlockHash | BlockHash' is not assignable to type 'BlockHash'.
  Type 'BlockHash' is not assignable to type 'U8aFixed'.

209   return typeof at === 'string'
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
210    ? await this.getHashForBlock(at)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211    : await this.api.rpc.chain.getFinalizedHead();
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/controllers/accounts/AccountsStakingPayoutsController.ts:98:5 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash'.

98     hash,
       ~~~~

src/controllers/accounts/AccountsStakingPayoutsController.ts:131:18 - error TS2352: Conversion of type 'Option<u32>' to type 'BN' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

131    currentEra = (currentEraMaybeOption as BN).toNumber();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/controllers/accounts/AccountsStakingPayoutsController.ts:131:18 - error TS2352: Conversion of type 'Option<u32>' to type 'BN' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'Option<u32>' is missing the following properties from type 'BN': clone, toNumber, toArray, toArrayLike, and 80 more.

131    currentEra = (currentEraMaybeOption as BN).toNumber();
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/controllers/blocks/BlocksController.ts:145:34 - error TS2345: Argument of type 'IU8a' is not assignable to parameter of type 'BlockHash'.

145    await this.service.fetchBlock(hash, historicApi, options)
                                     ~~~~

src/controllers/blocks/BlocksController.ts:223:40 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash | undefined' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash | undefined'.
  Type 'BlockHash' is not assignable to type 'U8aFixed'.

223    await this.service.fetchBlockHeader(hash)
                                           ~~~~

src/controllers/blocks/BlocksTraceController.ts:29:65 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash'.

29   BlocksController.sanitizedSend(res, await this.service.traces(hash));
                                                                   ~~~~

src/controllers/blocks/BlocksTraceController.ts:51:34 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash'.

51    await this.service.operations(hash, historicApi, includeActions)
                                    ~~~~

src/controllers/transaction/TransactionFeeEstimateController.ts:71:51 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash'.

71    await this.service.fetchTransactionFeeEstimate(hash, tx)
                                                     ~~~~

src/main.ts:50:3 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").OverrideBundleType' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").OverrideBundleType'.
  Types of property 'chain' are incompatible.
    Type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").OverrideBundleDefinition> | undefined' is not assignable to type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").OverrideBundleDefinition> | undefined'.
      Type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").OverrideBundleDefinition>' is not assignable to type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").OverrideBundleDefinition>'.
        'string' index signatures are incompatible.
          Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").OverrideBundleDefinition' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").OverrideBundleDefinition'.

50   typesBundle: TYPES_BUNDLE
     ~~~~~~~~~~~

src/main.ts:53:3 - error TS2322: Type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes>' is not assignable to type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes>'.
  'string' index signatures are incompatible.
    Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes'.

53   typesChain: TYPES_CHAIN
     ~~~~~~~~~~

src/main.ts:56:3 - error TS2322: Type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes> | undefined' is not assignable to type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes> | undefined'.
  Type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes>' is not assignable to type 'Record<string, import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes>'.

56   typesSpec: TYPES_SPEC
     ~~~~~~~~~

src/main.ts:59:3 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes | undefined' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes | undefined'.
  Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes'.

59   types: TYPES ? (require(TYPES) as RegistryTypes) : undefined,
     ~~~~~

src/sanitize/sanitizeNumbers.spec.ts:279:28 - error TS2345: Argument of type 'TypeRegistry' is not assignable to parameter of type 'CodecRegistry'.
  Property 'createClassUnsafe' is missing in type 'TypeRegistry' but required in type 'CodecRegistry'.

279    const d = new CodecDate(kusamaRegistry, new Date(1594441868));
                               ~~~~~~~~~~~~~~

  node_modules/@polkadot/types-codec/types/registry.d.ts:46:5
    46     createClassUnsafe<T extends Codec = Codec, K extends string = string>(type: K): CodecClass<T>;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    'createClassUnsafe' is declared here.

src/sanitize/sanitizeNumbers.spec.ts:382:30 - error TS2345: Argument of type 'TypeRegistry' is not assignable to parameter of type 'CodecRegistry'.

382     const uIntTen = new UInt(kusamaRegistry, 10);
                                 ~~~~~~~~~~~~~~

src/sanitize/sanitizeNumbers.spec.ts:386:6 - error TS2345: Argument of type 'TypeRegistry' is not assignable to parameter of type 'CodecRegistry'.

386      kusamaRegistry,
         ~~~~~~~~~~~~~~

src/services/accounts/AccountsAssetsService.ts:43:42 - error TS2345: Argument of type 'StorageKey<[u32]>[]' is not assignable to parameter of type 'StorageKey<[AssetId]>[]'.
  Type 'StorageKey<[u32]>' is not assignable to type 'StorageKey<[AssetId]>'.
    Property '#private' in type 'StorageKey' refers to a different member that cannot be accessed from within type 'StorageKey'.

43    const assetIds = this.extractAssetIds(keys);
                                            ~~~~

src/services/accounts/AccountsAssetsService.ts:130:28 - error TS2339: Property 'balance' does not exist on type 'Codec'.

130      balance: assetBalance.balance,
                               ~~~~~~~

src/services/accounts/AccountsAssetsService.ts:131:29 - error TS2339: Property 'isFrozen' does not exist on type 'Codec'.

131      isFrozen: assetBalance.isFrozen,
                                ~~~~~~~~

src/services/accounts/AccountsAssetsService.ts:133:20 - error TS2339: Property 'sufficient' does not exist on type 'Codec'.

133       assetBalance.sufficient || (assetBalance['isSufficient'] as bool),
                       ~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:44:5 - error TS2352: Conversion of type 'Promise<Codec>' to type 'Promise<Balance>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

44     historicApi.query.balances.freeBalance(address) as Promise<Balance>,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:44:5 - error TS2352: Conversion of type 'Promise<Codec>' to type 'Promise<Balance>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'Codec' is missing the following properties from type 'AbstractInt': #private, isUnsigned, bitLength, isMax, and 85 more.

44     historicApi.query.balances.freeBalance(address) as Promise<Balance>,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:46:5 - error TS2352: Conversion of type 'Promise<Codec>' to type 'Promise<Balance>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

46     historicApi.query.balances.reservedBalance(address) as Promise<Balance>,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:47:5 - error TS2352: Conversion of type 'Promise<Codec>' to type 'Promise<Index>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

47     historicApi.query.system.accountNonce(address) as Promise<Index>,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:47:5 - error TS2352: Conversion of type 'Promise<Codec>' to type 'Promise<Index>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'Codec' is missing the following properties from type 'u32': __UIntType, #private, isUnsigned, bitLength, and 86 more.

47     historicApi.query.system.accountNonce(address) as Promise<Index>,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:68:6 - error TS2322: Type 'Vec<PalletBalancesBalanceLock>' is not assignable to type 'Vec<BalanceLock>'.
  Property '#private' in type 'Vec' refers to a different member that cannot be accessed from within type 'Vec'.

68      locks,
        ~~~~~

  src/types/responses/AccountBalanceInfo.ts:14:2
    14  locks: Vec<BalanceLock>;
        ~~~~~
    The expected type comes from property 'locks' which is declared here on type 'IAccountBalanceInfo'

src/services/accounts/AccountsBalanceInfoService.ts:99:6 - error TS2322: Type 'Vec<PalletBalancesBalanceLock>' is not assignable to type 'Vec<BalanceLock>'.

99      locks,
        ~~~~~

  src/types/responses/AccountBalanceInfo.ts:14:2
    14  locks: Vec<BalanceLock>;
        ~~~~~
    The expected type comes from property 'locks' which is declared here on type 'IAccountBalanceInfo'

src/services/accounts/AccountsBalanceInfoService.ts:141:12 - error TS2352: Conversion of type 'Codec' to type 'Vec<BalanceLock>' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'Codec' is missing the following properties from type 'Vec<BalanceLock>': #private, Type, indexOf, length, and 31 more.

141    locks = locksAny as Vec<BalanceLock>;
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:142:18 - error TS2352: Conversion of type 'Codec' to type 'AccountData' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'Codec' is missing the following properties from type 'AccountData': free, reserved, miscFrozen, feeFrozen, and 17 more.

142    accountData = accountDataAny as AccountData;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/accounts/AccountsBalanceInfoService.ts:162:5 - error TS2322: Type 'Vec<BalanceLock> | Vec<PalletBalancesBalanceLock>' is not assignable to type 'Vec<BalanceLock>'.
  Type 'Vec<PalletBalancesBalanceLock>' is not assignable to type 'Vec<BalanceLock>'.

162     locks,
        ~~~~~

  src/types/responses/AccountBalanceInfo.ts:14:2
    14  locks: Vec<BalanceLock>;
        ~~~~~
    The expected type comes from property 'locks' which is declared here on type 'IAccountBalanceInfo'

src/services/accounts/AccountsStakingInfoService.ts:59:4 - error TS2322: Type 'AccountId32' is not assignable to type 'AccountId'.
  Types of property 'registry' are incompatible.
    Type 'CodecRegistry' is not assignable to type 'Registry'.

59    controller,
      ~~~~~~~~~~

  src/types/responses/AccountStakingInfo.ts:8:2
    8  controller: AccountId;
       ~~~~~~~~~~
    The expected type comes from property 'controller' which is declared here on type 'IAccountStakingInfo'

src/services/accounts/AccountsStakingPayoutsService.ts:186:36 - error TS2769: No overload matches this call.
  Overload 1 of 4, '(era: EraIndex): Promise<DeriveEraExposure>', gave the following error.
    Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/staking/types").EraIndex' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/staking/types").EraIndex'.
      Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32'.
  Overload 2 of 4, '(era: EraIndex): Promise<Codec | Codec[]>', gave the following error.
    Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/staking/types").EraIndex' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/staking/types").EraIndex'.

186     api.derive.staking.eraExposure(eraIndex),
                                       ~~~~~~~~

  node_modules/@polkadot/types-codec/abstract/AbstractInt.d.ts:12:5
    12     #private;
           ~~~~~~~~
    '#private' is declared here.

src/services/accounts/AccountsStakingPayoutsService.ts:191:25 - error TS2345: Argument of type 'Promise<[DeriveEraExposure, Codec, Codec]>' is not assignable to parameter of type 'Promise<IErasGeneral>'.
  Type '[DeriveEraExposure, Codec, Codec]' is not assignable to type 'IErasGeneral'.
    Type at position 1 in source is not compatible with type at position 1 in target.
      Type 'Codec' is missing the following properties from type 'PalletStakingEraRewardPoints': total, individual, #private, defKeys, and 17 more.

191    allDeriveQuerys.push(eraGeneralTuple);
                            ~~~~~~~~~~~~~~~

src/services/accounts/AccountsVestingInfoService.spec.ts:35:41 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/codec").Codec' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/codec").Codec'.

35   const vecVestingInfo = factory.vecOf([vestingInfo]);
                                           ~~~~~~~~~~~

src/services/blocks/BlocksService.spec.ts:204:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U128").u128 & import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/api-base/types/consts").AugmentedConst<"promise">' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U128").u128 & import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/api-base/types/consts").AugmentedConst<"promise">'.
  Property '#private' is missing in type 'u128 & AugmentedConst<"promise">' but required in type 'u128'.

204    mockHistoricApi.consts.transactionPayment.transactionByteFee =
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@polkadot/types-codec/abstract/AbstractInt.d.ts:12:5
    12     #private;
           ~~~~~~~~
    '#private' is declared here.

src/services/blocks/BlocksService.spec.ts:230:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U128").u128 & import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/api-base/types/consts").AugmentedConst<"promise">' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U128").u128 & import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/api-base/types/consts").AugmentedConst<"promise">'.

230    mockHistoricApi.consts.transactionPayment.transactionByteFee =
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.spec.ts:363:6 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").Registry' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").Registry'.

363      mockHistoricApi.registry
         ~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.spec.ts:370:50 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").Registry' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").Registry'.

370      blocksService['parseGenericCall'](transfer, mockHistoricApi.registry)
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.spec.ts:404:48 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").Registry' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").Registry'.

404      blocksService['parseGenericCall'](batch4, mockHistoricApi.registry)
                                                   ~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.spec.ts:464:47 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").Registry' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").Registry'.

464      blocksService['parseGenericCall'](batch, mockHistoricApi.registry)
                                                  ~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.ts:120:42 - error TS2345: Argument of type 'Vec<AccountId32>' is not assignable to parameter of type 'AccountId[]'.
  The types returned by 'pop()' are incompatible between these types.
    Type 'AccountId32 | undefined' is not assignable to type 'AccountId | undefined'.
      Type 'AccountId32' is not assignable to type 'GenericAccountId'.
        Types of property 'registry' are incompatible.
          Property 'createClassUnsafe' is missing in type 'Registry' but required in type 'CodecRegistry'.

120   const authorId = extractAuthor(digest, validators);
                                             ~~~~~~~~~~

  node_modules/@polkadot/types-codec/types/registry.d.ts:46:5
    46     createClassUnsafe<T extends Codec = Codec, K extends string = string>(type: K): CodecClass<T>;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    'createClassUnsafe' is declared here.

src/services/blocks/BlocksService.ts:127:4 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Block' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Block'.
  Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/generic/Block").GenericBlock' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/generic/Block").GenericBlock'.

127    block,
       ~~~~~

  node_modules/@polkadot/types/codec/Struct.d.ts:24:5
    24     #private;
           ~~~~~~~~
    '#private' is declared here.

src/services/blocks/BlocksService.ts:146:5 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Compact").Compact<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").BlockNumber>' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Compact").Compact<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").BlockNumber>'.
  Property '#private' in type 'Compact' refers to a different member that cannot be accessed from within type 'Compact'.

146     number,
        ~~~~~~

src/services/blocks/BlocksService.ts:156:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Compact").Compact<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").BlockNumber>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Compact").Compact<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").BlockNumber>'.

156     number,
        ~~~~~~

  src/types/responses/Block.ts:10:2
    10  number: Compact<BlockNumber>;
        ~~~~~~
    The expected type comes from property 'number' which is declared here on type 'IBlock'

src/services/blocks/BlocksService.ts:158:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Hash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Hash'.

158     parentHash,
        ~~~~~~~~~~

  src/types/responses/Block.ts:12:2
    12  parentHash: Hash;
        ~~~~~~~~~~
    The expected type comes from property 'parentHash' which is declared here on type 'IBlock'

src/services/blocks/BlocksService.ts:159:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Hash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Hash'.

159     stateRoot,
        ~~~~~~~~~

  src/types/responses/Block.ts:13:2
    13  stateRoot: Hash;
        ~~~~~~~~~
    The expected type comes from property 'stateRoot' which is declared here on type 'IBlock'

src/services/blocks/BlocksService.ts:160:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Hash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Hash'.

160     extrinsicsRoot,
        ~~~~~~~~~~~~~~

  src/types/responses/Block.ts:14:2
    14  extrinsicsRoot: Hash;
        ~~~~~~~~~~~~~~
    The expected type comes from property 'extrinsicsRoot' which is declared here on type 'IBlock'

src/services/blocks/BlocksService.ts:161:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").AccountId | undefined' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").AccountId | undefined'.
  Type 'AccountId' is not assignable to type 'GenericAccountId'.

161     authorId,
        ~~~~~~~~

  src/types/responses/Block.ts:15:2
    15  authorId: AccountId | undefined;
        ~~~~~~~~
    The expected type comes from property 'authorId' which is declared here on type 'IBlock'

src/services/blocks/BlocksService.ts:162:5 - error TS2322: Type '{ type: "ChangesTrieSignal" | "Consensus" | "PreRuntime" | "Seal" | "SealV0" | "Other" | "AuthoritiesChange" | "ChangesTrieRoot" | "RuntimeEnvironmentUpdated"; index: number; value: Codec; }[]' is not assignable to type 'ILog[]'.
  Type '{ type: "ChangesTrieSignal" | "Consensus" | "PreRuntime" | "Seal" | "SealV0" | "Other" | "AuthoritiesChange" | "ChangesTrieRoot" | "RuntimeEnvironmentUpdated"; index: number; value: Codec; }' is not assignable to type 'ILog'.
    The types of 'value.hash.registry' are incompatible between these types.
      Type 'CodecRegistry' is not assignable to type 'Registry'.

162     logs,
        ~~~~

  src/types/responses/Block.ts:16:2
    16  logs: ILog[];
        ~~~~
    The expected type comes from property 'logs' which is declared here on type 'IBlock'

src/services/blocks/BlocksService.ts:181:5 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Hash' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Hash'.

181     parentHash,
        ~~~~~~~~~~

src/services/blocks/BlocksService.ts:307:40 - error TS2345: Argument of type '{ number: Compact<BlockNumber>; hash: BlockHash; parentHash: Hash; stateRoot: Hash; extrinsicsRoot: Hash; authorId: AccountId | undefined; ... 4 more ...; finalized: boolean | undefined; }' is not assignable to parameter of type 'IBlock'.
  Types of property 'number' are incompatible.
    Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Compact").Compact<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").BlockNumber>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Compact").Compact<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").BlockNumber>'.

307   this.blockStore.set(hash.toString(), response);
                                           ~~~~~~~~

src/services/blocks/BlocksService.ts:309:3 - error TS2322: Type '{ number: Compact<BlockNumber>; hash: BlockHash; parentHash: Hash; stateRoot: Hash; extrinsicsRoot: Hash; authorId: AccountId | undefined; ... 4 more ...; finalized: boolean | undefined; }' is not assignable to type 'IBlock'.

309   return response;
      ~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.ts:324:3 - error TS2741: Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Header' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Header'.

324   return header;
      ~~~~~~~~~~~~~~

  node_modules/@polkadot/types/codec/Struct.d.ts:24:5
    24     #private;
           ~~~~~~~~
    '#private' is declared here.

src/services/blocks/BlocksService.ts:620:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Hash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Hash'.

620    parentParentHash = (await api.rpc.chain.getHeader(parentHash)).parentHash;
       ~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.ts:637:4 - error TS2322: Type 'Vec<FrameSystemEventRecord>' is not assignable to type 'string | Vec<EventRecord>'.
  Type 'Vec<FrameSystemEventRecord>' is not assignable to type 'Vec<EventRecord>'.
    Property '#private' in type 'Vec' refers to a different member that cannot be accessed from within type 'Vec'.

637    return await historicApi.query.system.events();
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksService.ts:652:3 - error TS2322: Type 'Vec<AccountId32> | Vec<AccountId32>' is not assignable to type 'Vec<AccountId32>'.
  Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").AccountId32>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").AccountId32>'.
    Property '#private' in type 'Vec' refers to a different member that cannot be accessed from within type 'Vec'.

652   return historicApi.query.session
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
653    ? await historicApi.query.session.validators()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
654    : ([] as unknown as Vec<AccountId32>);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksTraceService.ts:59:5 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/state/types").BlockTrace' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/state/types").BlockTrace'.
  Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/state/types").BlockTrace' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/state/types").BlockTrace'.

59     traceResponse.asBlockTrace
       ~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@polkadot/types/codec/Struct.d.ts:24:5
    24     #private;
           ~~~~~~~~
    '#private' is declared here.

src/services/blocks/BlocksTraceService.ts:98:41 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/state/types").BlockTrace' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/state/types").BlockTrace'.

98     BlocksTraceService.formatBlockTrace(traceResponse.asBlockTrace),
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/blocks/BlocksTraceService.ts:99:5 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").Registry' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").Registry'.
  The types of 'knownTypes.types' are incompatible between these types.
    Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes | undefined' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes | undefined'.
      Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/registry").RegistryTypes' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").RegistryTypes'.
        'string' index signatures are incompatible.
          Type 'string | Record<string, string> | CodecClass<Codec> | { _enum: string[] | Record<string, number> | Record<string, string | null>; } | { ...; }' is not assignable to type 'string | Constructor<Codec> | Record<string, string> | { _enum: string[] | Record<string, number> | Record<string, string | null>; } | { ...; }'.
            Type 'CodecClass<Codec>' is not assignable to type 'string | Constructor<Codec> | Record<string, string> | { _enum: string[] | Record<string, number> | Record<string, string | null>; } | { ...; }'.
              Type 'CodecClass<Codec>' is not assignable to type 'Constructor<Codec>'.
                Types of parameters 'registry' and 'registry' are incompatible.
                  Type 'Registry' is not assignable to type 'CodecRegistry'.

99     historicApi.registry
       ~~~~~~~~~~~~~~~~~~~~

src/services/node/NodeNetworkService.ts:27:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/system/types").NodeRole>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/system/types").NodeRole>'.
  Property '#private' in type 'Vec' refers to a different member that cannot be accessed from within type 'Vec'.

27    nodeRoles,
      ~~~~~~~~~

  src/types/responses/NodeNetwork.ts:5:2
    5  nodeRoles: Vec<NodeRole>;
       ~~~~~~~~~
    The expected type comes from property 'nodeRoles' which is declared here on type 'INodeNetwork'

src/services/node/NodeNetworkService.ts:28:4 - error TS2741: Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U64").u64' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U64").u64'.

28    numPeers,
      ~~~~~~~~

  node_modules/@polkadot/types/codec/AbstractInt.d.ts:14:5
    14     #private;
           ~~~~~~~~
    '#private' is declared here.
  src/types/responses/NodeNetwork.ts:6:2
    6  numPeers: u64;
       ~~~~~~~~
    The expected type comes from property 'numPeers' which is declared here on type 'INodeNetwork'

src/services/node/NodeNetworkService.ts:29:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Bool").bool' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Bool").bool'.
  Types of property 'registry' are incompatible.
    Type 'CodecRegistry' is not assignable to type 'Registry'.

29    isSyncing,
      ~~~~~~~~~

  src/types/responses/NodeNetwork.ts:7:2
    7  isSyncing: Bool;
       ~~~~~~~~~
    The expected type comes from property 'isSyncing' which is declared here on type 'INodeNetwork'

src/services/node/NodeNetworkService.ts:30:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Bool").bool' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Bool").bool'.

30    shouldHavePeers,
      ~~~~~~~~~~~~~~~

  src/types/responses/NodeNetwork.ts:8:2
    8  shouldHavePeers: Bool;
       ~~~~~~~~~~~~~~~
    The expected type comes from property 'shouldHavePeers' which is declared here on type 'INodeNetwork'

src/services/node/NodeNetworkService.ts:31:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Text").Text' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Text").Text'.
  Property '#private' in type 'Text' refers to a different member that cannot be accessed from within type 'Text'.

31    localPeerId,
      ~~~~~~~~~~~

  src/types/responses/NodeNetwork.ts:9:2
    9  localPeerId: Text;
       ~~~~~~~~~~~
    The expected type comes from property 'localPeerId' which is declared here on type 'INodeNetwork'

src/services/node/NodeNetworkService.ts:32:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Text").Text>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Text").Text>'.
  Property '#private' in type 'Vec' refers to a different member that cannot be accessed from within type 'Vec'.

32    localListenAddresses,
      ~~~~~~~~~~~~~~~~~~~~

  src/types/responses/NodeNetwork.ts:10:2
    10  localListenAddresses: Vec<Text>;
        ~~~~~~~~~~~~~~~~~~~~
    The expected type comes from property 'localListenAddresses' which is declared here on type 'INodeNetwork'

src/services/node/NodeNetworkService.ts:33:4 - error TS2322: Type 'string | import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/system/types").PeerInfo>' is not assignable to type 'string | import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/system/types").PeerInfo>'.
  Type 'Vec<PeerInfo>' is not assignable to type 'string | Vec<PeerInfo>'.
    Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/system/types").PeerInfo>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Vec").Vec<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/system/types").PeerInfo>'.
      Property '#private' in type 'Vec' refers to a different member that cannot be accessed from within type 'Vec'.

33    peersInfo,
      ~~~~~~~~~

  src/types/responses/NodeNetwork.ts:11:2
    11  peersInfo: string | Vec<PeerInfo>;
        ~~~~~~~~~
    The expected type comes from property 'peersInfo' which is declared here on type 'INodeNetwork'

src/services/node/NodeVersionService.ts:15:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Text").Text' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Text").Text'.

15    clientVersion,
      ~~~~~~~~~~~~~

  src/types/responses/NodeVersion.ts:4:2
    4  clientVersion: Text;
       ~~~~~~~~~~~~~
    The expected type comes from property 'clientVersion' which is declared here on type 'INodeVersion'

src/services/node/NodeVersionService.ts:16:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Text").Text' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Text").Text'.

16    clientImplName,
      ~~~~~~~~~~~~~~

  src/types/responses/NodeVersion.ts:5:2
    5  clientImplName: Text;
       ~~~~~~~~~~~~~~
    The expected type comes from property 'clientImplName' which is declared here on type 'INodeVersion'

src/services/node/NodeVersionService.ts:17:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Text").Text' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Text").Text'.

17    chain,
      ~~~~~

  src/types/responses/NodeVersion.ts:6:2
    6  chain: Text;
       ~~~~~
    The expected type comes from property 'chain' which is declared here on type 'INodeVersion'

src/services/pallets/PalletsAssetsService.ts:34:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Option").Option<import("@polkadot/types/lookup").PalletAssetsAssetDetails>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Option").Option<import("@polkadot/types/lookup").PalletAssetsAssetDetails>'.
  Property '#private' in type 'Option' refers to a different member that cannot be accessed from within type 'Option'.

34    assetInfo,
      ~~~~~~~~~

  src/types/responses/Assets.ts:9:2
    9  assetInfo: Option<PalletAssetsAssetDetails>;
       ~~~~~~~~~
    The expected type comes from property 'assetInfo' which is declared here on type 'IAssetInfo'

src/services/pallets/PalletsStakingProgressService.ts:66:50 - error TS2339: Property 'map' does not exist on type 'Codec'.

66    unappliedSlashes: unappliedSlashesAtActiveEra.map((slash) =>
                                                    ~~~

src/services/pallets/PalletsStakingProgressService.ts:66:55 - error TS7006: Parameter 'slash' implicitly has an 'any' type.

66    unappliedSlashes: unappliedSlashesAtActiveEra.map((slash) =>
                                                         ~~~~~

src/services/pallets/PalletsStakingProgressService.ts:161:40 - error TS2339: Property 'isNone' does not exist on type 'Codec'.

161   if (activeEraStartSessionIndexOption.isNone) {
                                           ~~~~~~

src/services/pallets/PalletsStakingProgressService.ts:167:37 - error TS2339: Property 'unwrap' does not exist on type 'Codec'.

167    activeEraStartSessionIndexOption.unwrap();
                                        ~~~~~~

src/services/pallets/PalletsStorageService.ts:96:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/types/codec").Codec' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/codec").Codec'.

96    value,
      ~~~~~

  src/types/responses/PalletStorageItem.ts:8:2
    8  value: Codec;
       ~~~~~
    The expected type comes from property 'value' which is declared here on type 'IPalletStorageItem'

src/services/pallets/PalletsStorageService.ts:178:3 - error TS2322: Type 'MetadataV13 | MetadataLatest' is not assignable to type 'MetadataV13 | MetadataV14'.
  Type 'MetadataV13' is not assignable to type 'MetadataV13 | MetadataV14'.
    Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/metadata/types").MetadataV13' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/metadata/types").MetadataV13'.

178   return chosenMetadata;
      ~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@polkadot/types/codec/Struct.d.ts:24:5
    24     #private;
           ~~~~~~~~
    '#private' is declared here.

src/services/paras/ParasService.ts:55:38 - error TS2344: Type 'Option<FundInfo>' does not satisfy the constraint 'Codec'.
  The types of 'hash.registry' are incompatible between these types.
    Type 'Registry' is not assignable to type 'CodecRegistry'.

55    historicApi.query.crowdloan.funds<Option<FundInfo>>(paraId),
                                        ~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:66:12 - error TS2339: Property 'isSome' does not exist on type 'Codec'.

66   if (fund.isSome) {
              ~~~~~~

src/services/paras/ParasService.ts:67:20 - error TS2339: Property 'unwrap' does not exist on type 'Codec'.

67    fundInfo = fund.unwrap();
                      ~~~~~~

src/services/paras/ParasService.ts:104:64 - error TS2344: Type '[ParaId]' does not satisfy the constraint 'Codec[]'.
  Type 'ParaId' is not assignable to type 'Codec'.
    Types of property 'hash' are incompatible.
      Type 'CodecHash' is not assignable to type 'IU8a'.

104    historicApi.query.crowdloan.funds.entries<Option<FundInfo>, [ParaId]>(),
                                                                   ~~~~~~~~

src/services/paras/ParasService.ts:137:5 - error TS2344: Type 'Vec<Option<ITuple<[AccountId, BalanceOf]>>>' does not satisfy the constraint 'Codec'.
  Types of property 'hash' are incompatible.
    Type 'CodecHash' is not assignable to type 'IU8a'.

137     Vec<Option<ITuple<[AccountId, BalanceOf]>>>
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:140:43 - error TS2344: Type 'Option<ParaLifecycle>' does not satisfy the constraint 'Codec'.
  Types of property 'hash' are incompatible.
    Type 'CodecHash' is not assignable to type 'IU8a'.

140    historicApi.query.paras.paraLifecycles<Option<ParaLifecycle>>(paraId),
                                              ~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:150:14 - error TS2339: Property 'length' does not exist on type 'Codec'.

150   if (leases.length) {
                 ~~~~~~

src/services/paras/ParasService.ts:156:29 - error TS2339: Property 'reduce' does not exist on type 'Codec'.

156    leasesFormatted = leases.reduce((acc, curLeaseOpt, idx) => {
                                ~~~~~~

src/services/paras/ParasService.ts:156:37 - error TS7006: Parameter 'acc' implicitly has an 'any' type.

156    leasesFormatted = leases.reduce((acc, curLeaseOpt, idx) => {
                                        ~~~

src/services/paras/ParasService.ts:156:42 - error TS7006: Parameter 'curLeaseOpt' implicitly has an 'any' type.

156    leasesFormatted = leases.reduce((acc, curLeaseOpt, idx) => {
                                             ~~~~~~~~~~~

src/services/paras/ParasService.ts:156:55 - error TS7006: Parameter 'idx' implicitly has an 'any' type.

156    leasesFormatted = leases.reduce((acc, curLeaseOpt, idx) => {
                                                          ~~~

src/services/paras/ParasService.ts:176:24 - error TS2339: Property 'isSome' does not exist on type 'Codec'.

176   if (paraLifecycleOpt.isSome && paraLifecycleOpt.unwrap().isOnboarding) {
                           ~~~~~~

src/services/paras/ParasService.ts:176:51 - error TS2339: Property 'unwrap' does not exist on type 'Codec'.

176   if (paraLifecycleOpt.isSome && paraLifecycleOpt.unwrap().isOnboarding) {
                                                      ~~~~~~

src/services/paras/ParasService.ts:179:6 - error TS2344: Type 'Option<ParaGenesisArgs>' does not satisfy the constraint 'Codec'.
  Types of property 'hash' are incompatible.
    Type 'CodecHash' is not assignable to type 'IU8a'.

179      Option<ParaGenesisArgs>
         ~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:182:24 - error TS2339: Property 'isSome' does not exist on type 'Codec'.

182    if (paraGenesisArgs.isSome) {
                           ~~~~~~

src/services/paras/ParasService.ts:183:36 - error TS2339: Property 'unwrap' does not exist on type 'Codec'.

183     onboardingAs = paraGenesisArgs.unwrap().parachain.isTrue
                                       ~~~~~~

src/services/paras/ParasService.ts:191:4 - error TS2740: Type 'Codec' is missing the following properties from type 'Option<ParaLifecycle>': #private, isNone, isSome, value, and 3 more.

191    paraLifecycle: paraLifecycleOpt,
       ~~~~~~~~~~~~~

  src/types/responses/Paras.ts:72:2
    72  paraLifecycle: Option<ParaLifecycle>;
        ~~~~~~~~~~~~~
    The expected type comes from property 'paraLifecycle' which is declared here on type 'ILeaseInfo'

src/services/paras/ParasService.ts:211:43 - error TS2344: Type 'Option<Vec<BlockNumber>>' does not satisfy the constraint 'Codec'.
  Types of property 'hash' are incompatible.
    Type 'CodecHash' is not assignable to type 'IU8a'.

211    historicApi.query.auctions.auctionInfo<Option<Vec<BlockNumber>>>(),
                                              ~~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:213:46 - error TS2344: Type 'BlockNumber' does not satisfy the constraint 'Codec'.

213    historicApi.query.auctions.auctionCounter<BlockNumber>(),
                                                 ~~~~~~~~~~~

src/services/paras/ParasService.ts:217:24 - error TS2352: Conversion of type 'Codec' to type 'BlockNumber' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

217   const endingPeriod = historicApi.consts.auctions
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~
218    .endingPeriod as BlockNumber;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:225:22 - error TS2339: Property 'isSome' does not exist on type 'Codec'.

225   if (auctionInfoOpt.isSome) {
                         ~~~~~~

src/services/paras/ParasService.ts:226:50 - error TS2339: Property 'unwrap' does not exist on type 'Codec'.

226    [leasePeriodIndex, beginEnd] = auctionInfoOpt.unwrap();
                                                     ~~~~~~

src/services/paras/ParasService.ts:230:48 - error TS2344: Type 'Option<WinningData>' does not satisfy the constraint 'Codec'.
  Types of property 'hash' are incompatible.
    Type 'CodecHash' is not assignable to type 'IU8a'.

230     ? await historicApi.query.auctions.winning<Option<WinningData>>(
                                                   ~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:233:48 - error TS2344: Type 'Option<WinningData>' does not satisfy the constraint 'Codec'.

233     : await historicApi.query.auctions.winning<Option<WinningData>>(
                                                   ~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:238:19 - error TS2339: Property 'isSome' does not exist on type 'Codec'.

238    if (winningOpt.isSome) {
                      ~~~~~~

src/services/paras/ParasService.ts:239:57 - error TS2345: Argument of type 'IOption<BlockNumber>' is not assignable to parameter of type 'BN'.
  Type 'null' is not assignable to type 'BN'.

239     const ranges = this.enumerateLeaseSets(historicApi, leasePeriodIndex);
                                                            ~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:242:26 - error TS2339: Property 'unwrap' does not exist on type 'Codec'.

242     winning = winningOpt.unwrap().map((bid, idx) => {
                             ~~~~~~

src/services/paras/ParasService.ts:242:40 - error TS7006: Parameter 'bid' implicitly has an 'any' type.

242     winning = winningOpt.unwrap().map((bid, idx) => {
                                           ~~~

src/services/paras/ParasService.ts:242:45 - error TS7006: Parameter 'idx' implicitly has an 'any' type.

242     winning = winningOpt.unwrap().map((bid, idx) => {
                                                ~~~

src/services/paras/ParasService.ts:259:16 - error TS2531: Object is possibly 'null'.

259    finishEnd = beginEnd.add(endingPeriod);
                   ~~~~~~~~

src/services/paras/ParasService.ts:264:13 - error TS2531: Object is possibly 'null'.

264     phase = beginEnd.gt(blockNumber) ? 'startPeriod' : 'endPeriod';
                ~~~~~~~~

src/services/paras/ParasService.ts:275:5 - error TS2352: Conversion of type 'Codec' to type 'u32' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

275    (historicApi.consts.auctions.leasePeriodsPerSlot as u32)?.toNumber() ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:288:4 - error TS2322: Type 'IOption<BlockNumber>' is not assignable to type 'IOption<AbstractInt>'.
  Property '#private' is missing in type 'u32' but required in type 'AbstractInt'.

288    beginEnd,
       ~~~~~~~~

  node_modules/@polkadot/types-codec/abstract/AbstractInt.d.ts:12:5
    12     #private;
           ~~~~~~~~
    '#private' is declared here.
  src/types/responses/Paras.ts:106:2
    106  beginEnd: IOption<AbstractInt>;
         ~~~~~~~~
    The expected type comes from property 'beginEnd' which is declared here on type 'IAuctionsCurrent'

src/services/paras/ParasService.ts:292:4 - error TS2740: Type 'Codec' is missing the following properties from type 'AbstractInt': #private, isUnsigned, bitLength, isMax, and 85 more.

292    auctionIndex: auctionCounter,
       ~~~~~~~~~~~~

  src/types/responses/Paras.ts:121:2
    121  auctionIndex: AbstractInt;
         ~~~~~~~~~~~~
    The expected type comes from property 'auctionIndex' which is declared here on type 'IAuctionsCurrent'

src/services/paras/ParasService.ts:322:6 - error TS2344: Type '[ParaId]' does not satisfy the constraint 'Codec[]'.

322      [ParaId]
         ~~~~~~~~

src/services/paras/ParasService.ts:333:23 - error TS2352: Conversion of type 'Codec' to type 'BlockNumber' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

333   const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber;
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:364:66 - error TS2344: Type '[ParaId]' does not satisfy the constraint 'Codec[]'.

364    historicApi.query.paras.paraLifecycles.entries<ParaLifecycle, [ParaId]>(),
                                                                     ~~~~~~~~

src/services/paras/ParasService.ts:372:52 - error TS2344: Type 'ParaGenesisArgs' does not satisfy the constraint 'Codec'.
  Types of property 'hash' are incompatible.
    Type 'CodecHash' is not assignable to type 'IU8a'.

372      await historicApi.query.paras.paraGenesisArgs<ParaGenesisArgs>(
                                                       ~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:375:36 - error TS2339: Property 'parachain' does not exist on type 'Codec'.

375     onboardingAs = paraGenesisArgs.parachain.isTrue
                                       ~~~~~~~~~

src/services/paras/ParasService.ts:407:23 - error TS2352: Conversion of type 'Codec' to type 'BlockNumber' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

407   const leasePeriod = historicApi.consts.slots.leasePeriod as BlockNumber;
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:409:5 - error TS2352: Conversion of type 'Codec' to type 'BlockNumber' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

409    (historicApi.consts.slots.leaseOffset as BlockNumber) || BN_ZERO;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/paras/ParasService.ts:480:5 - error TS2352: Conversion of type 'Codec' to type 'u32' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

480    (historicApi.consts.auctions.leasePeriodsPerSlot as u32)?.toNumber() ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/services/runtime/RuntimeMetadataService.ts:17:3 - error TS2739: Type 'Metadata' is missing the following properties from type 'Metadata': #private, #private

17   return metadata;
     ~~~~~~~~~~~~~~~~

src/services/runtime/RuntimeSpecService.ts:30:4 - error TS2741: Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

30    authoringVersion,
      ~~~~~~~~~~~~~~~~

  node_modules/@polkadot/types/codec/AbstractInt.d.ts:14:5
    14     #private;
           ~~~~~~~~
    '#private' is declared here.
  src/types/responses/RuntimeSpec.ts:8:2
    8  authoringVersion: u32;
       ~~~~~~~~~~~~~~~~
    The expected type comes from property 'authoringVersion' which is declared here on type 'IRuntimeSpec'

src/services/runtime/RuntimeSpecService.ts:31:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

31    transactionVersion,
      ~~~~~~~~~~~~~~~~~~

  src/types/responses/RuntimeSpec.ts:9:2
    9  transactionVersion: u32;
       ~~~~~~~~~~~~~~~~~~
    The expected type comes from property 'transactionVersion' which is declared here on type 'IRuntimeSpec'

src/services/runtime/RuntimeSpecService.ts:32:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

32    implVersion,
      ~~~~~~~~~~~

  src/types/responses/RuntimeSpec.ts:10:2
    10  implVersion: u32;
        ~~~~~~~~~~~
    The expected type comes from property 'implVersion' which is declared here on type 'IRuntimeSpec'

src/services/runtime/RuntimeSpecService.ts:33:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/native/Text").Text' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/Text").Text'.

33    specName,
      ~~~~~~~~

  src/types/responses/RuntimeSpec.ts:11:2
    11  specName: Text;
        ~~~~~~~~
    The expected type comes from property 'specName' which is declared here on type 'IRuntimeSpec'

src/services/runtime/RuntimeSpecService.ts:34:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

34    specVersion,
      ~~~~~~~~~~~

  src/types/responses/RuntimeSpec.ts:12:2
    12  specVersion: u32;
        ~~~~~~~~~~~
    The expected type comes from property 'specVersion' which is declared here on type 'IRuntimeSpec'

src/services/runtime/RuntimeSpecService.ts:35:4 - error TS2741: Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/system/types").ChainType' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/system/types").ChainType'.

35    chainType,
      ~~~~~~~~~

  node_modules/@polkadot/types/codec/Enum.d.ts:14:5
    14     #private;
           ~~~~~~~~
    '#private' is declared here.
  src/types/responses/RuntimeSpec.ts:13:2
    13  chainType: ChainType;
        ~~~~~~~~~
    The expected type comes from property 'chainType' which is declared here on type 'IRuntimeSpec'

src/services/runtime/RuntimeSpecService.ts:36:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/system/types").ChainProperties' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/system/types").ChainProperties'.
  Types of property 'ss58Format' are incompatible.
    Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/base/Option").Option<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32>' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/codec/Option").Option<import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32>'.
      Property '#private' in type 'Option' refers to a different member that cannot be accessed from within type 'Option'.

36    properties,
      ~~~~~~~~~~

  src/types/responses/RuntimeSpec.ts:14:2
    14  properties: ChainProperties;
        ~~~~~~~~~~
    The expected type comes from property 'properties' which is declared here on type 'IRuntimeSpec'

src/services/transaction/TransactionDryRunService.ts:46:5 - error TS2322: Type '{ resultType: TransactionResultType; result: DispatchOutcome; } | { resultType: TransactionResultType; result: InvalidTransaction | UnknownTransaction; validityErrorType: ValidityErrorType; }' is not assignable to type '{ resultType: TransactionResultType; result: TransactionResult; validityErrorType?: ValidityErrorType | undefined; }'.
  Type '{ resultType: TransactionResultType; result: DispatchOutcome; }' is not assignable to type '{ resultType: TransactionResultType; result: TransactionResult; validityErrorType?: ValidityErrorType | undefined; }'.
    Types of property 'result' are incompatible.
      Type 'DispatchOutcome' is not assignable to type 'TransactionResult'.
        Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/system/types").DispatchOutcome' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/system/types").DispatchOutcome'.

46     dryRunResult,
       ~~~~~~~~~~~~

  node_modules/@polkadot/types/codec/Enum.d.ts:14:5
    14     #private;
           ~~~~~~~~
    '#private' is declared here.
  src/types/responses/TransactionDryRun.ts:26:2
    26  dryRunResult: {
        ~~~~~~~~~~~~
    The expected type comes from property 'dryRunResult' which is declared here on type 'ITransactionDryRun'

src/services/transaction/TransactionFeeEstimateService.ts:21:4 - error TS2741: Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/payment/types").RuntimeDispatchInfo' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/payment/types").RuntimeDispatchInfo'.

21    return await api.rpc.payment.queryInfo(transaction, hash);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@polkadot/types/codec/Struct.d.ts:24:5
    24     #private;
           ~~~~~~~~
    '#private' is declared here.

src/services/transaction/TransactionMaterialService.ts:34:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash'.

34     genesisHash,
       ~~~~~~~~~~~

  src/types/responses/TransactionMaterial.ts:9:2
    9  genesisHash: BlockHash;
       ~~~~~~~~~~~
    The expected type comes from property 'genesisHash' which is declared here on type 'ITransactionMaterial'

src/services/transaction/TransactionMaterialService.ts:37:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

37     specVersion: version.specVersion,
       ~~~~~~~~~~~

  src/types/responses/TransactionMaterial.ts:12:2
    12  specVersion: u32;
        ~~~~~~~~~~~
    The expected type comes from property 'specVersion' which is declared here on type 'ITransactionMaterial'

src/services/transaction/TransactionMaterialService.ts:38:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

38     txVersion: version.transactionVersion,
       ~~~~~~~~~

  src/types/responses/TransactionMaterial.ts:13:2
    13  txVersion: u32;
        ~~~~~~~~~
    The expected type comes from property 'txVersion' which is declared here on type 'ITransactionMaterial'

src/services/transaction/TransactionMaterialService.ts:60:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/chain/types").BlockHash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/chain/types").BlockHash'.

60    genesisHash,
      ~~~~~~~~~~~

  src/types/responses/TransactionMaterial.ts:9:2
    9  genesisHash: BlockHash;
       ~~~~~~~~~~~
    The expected type comes from property 'genesisHash' which is declared here on type 'ITransactionMaterial'

src/services/transaction/TransactionMaterialService.ts:63:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

63    specVersion: version.specVersion,
      ~~~~~~~~~~~

  src/types/responses/TransactionMaterial.ts:12:2
    12  specVersion: u32;
        ~~~~~~~~~~~
    The expected type comes from property 'specVersion' which is declared here on type 'ITransactionMaterial'

src/services/transaction/TransactionMaterialService.ts:64:4 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types-codec/primitive/U32").u32' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/primitive/U32").u32'.

64    txVersion: version.transactionVersion,
      ~~~~~~~~~

  src/types/responses/TransactionMaterial.ts:13:2
    13  txVersion: u32;
        ~~~~~~~~~
    The expected type comes from property 'txVersion' which is declared here on type 'ITransactionMaterial'

src/services/transaction/TransactionSubmitService.ts:34:5 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/runtime/types").Hash' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/runtime/types").Hash'.

34     hash,
       ~~~~

  src/services/transaction/TransactionSubmitService.ts:12:58
    12  async submitTransaction(transaction: string): Promise<{ hash: Hash }> {
                                                                ~~~~
    The expected type comes from property 'hash' which is declared here on type '{ hash: Hash; }'

src/test-helpers/registries/kusamaRegistry.ts:17:20 - error TS2345: Argument of type 'RegistryTypes' is not assignable to parameter of type 'Constructor<Codec> | RegistryTypes'.
  Type 'RegistryTypes' is not assignable to type 'Constructor<Codec>'.
    Type 'RegistryTypes' provides no match for the signature 'new (registry: Registry, ...args: any[]): Codec'.

17  registry.register(getSpecTypes(registry, 'Kusama', 'kusama', 2008));
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/test-helpers/registries/kusamaRegistry.ts:17:33 - error TS2345: Argument of type 'TypeRegistry' is not assignable to parameter of type 'Registry'.
  Type 'TypeRegistry' is missing the following properties from type 'Registry': getUnsafe, createClassUnsafe

17  registry.register(getSpecTypes(registry, 'Kusama', 'kusama', 2008));
                                   ~~~~~~~~

src/test-helpers/registries/kusamaRegistry.ts:41:20 - error TS2345: Argument of type 'RegistryTypes' is not assignable to parameter of type 'Constructor<Codec> | RegistryTypes'.
  Type 'RegistryTypes' is not assignable to type 'Constructor<Codec>'.

41  registry.register(getSpecTypes(registry, 'Kusama', 'kusama', specVersion));
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/test-helpers/registries/kusamaRegistry.ts:41:33 - error TS2345: Argument of type 'TypeRegistry' is not assignable to parameter of type 'Registry'.

41  registry.register(getSpecTypes(registry, 'Kusama', 'kusama', specVersion));
                                   ~~~~~~~~

src/test-helpers/registries/polkadotRegistry.ts:21:3 - error TS2345: Argument of type 'RegistryTypes' is not assignable to parameter of type 'Constructor<Codec> | RegistryTypes'.
  Type 'RegistryTypes' is not assignable to type 'Constructor<Codec>'.

21   getSpecTypes(registry, 'Polkadot', 'polkadot', specVersion)
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/test-helpers/registries/polkadotRegistry.ts:21:16 - error TS2345: Argument of type 'TypeRegistry' is not assignable to parameter of type 'Registry'.

21   getSpecTypes(registry, 'Polkadot', 'polkadot', specVersion)
                  ~~~~~~~~

src/test-helpers/registries/rococoRegistry.ts:14:20 - error TS2345: Argument of type 'RegistryTypes' is not assignable to parameter of type 'Constructor<Codec> | RegistryTypes'.
  Type 'RegistryTypes' is not assignable to type 'Constructor<Codec>'.

14  registry.register(getSpecTypes(registry, 'Rococo', 'rococo', 228));
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/test-helpers/registries/rococoRegistry.ts:14:33 - error TS2345: Argument of type 'TypeRegistry' is not assignable to parameter of type 'Registry'.

14  registry.register(getSpecTypes(registry, 'Rococo', 'rococo', 228));
                                   ~~~~~~~~

src/test-helpers/typeFactory.ts:37:3 - error TS2322: Type 'TypeRegistry' is not assignable to type 'Registry'.

37   registry,
     ~~~~~~~~

src/test-helpers/typeFactory.ts:40:21 - error TS2345: Argument of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/metadata/Metadata").Metadata' is not assignable to parameter of type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/metadata/Metadata").Metadata'.
  Type 'Metadata' is missing the following properties from type 'Metadata': #private, #private, getT

40  api.injectMetadata(expandedMetadata, true);
                       ~~~~~~~~~~~~~~~~

src/test-helpers/typeFactory.ts:58:3 - error TS2322: Type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/types/registry").Registry' is not assignable to type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/types/registry").Registry'.

58   this.#registry = this.#api.registry;
     ~~~~~~~~~~~~~~

src/test-helpers/typeFactory.ts:80:22 - error TS2345: Argument of type 'StorageEntryMetadataLatest' is not assignable to parameter of type 'StorageEntryMetadataV14'.
  Property '#private' is missing in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/rpc-core/node_modules/@polkadot/types/interfaces/metadata/types").StorageEntryMetadataV14' but required in type 'import("/home/vivek/dev/substrate-api-sidecar/node_modules/@polkadot/types/interfaces/metadata/types").StorageEntryMetadataV14'.

80   return key.setMeta(storageEntry.creator.meta);
                        ~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@polkadot/types/codec/Struct.d.ts:24:5
    24     #private;
           ~~~~~~~~
    '#private' is declared here.

Found 148 errors.
TarikGul commented 2 years ago

Hey @vivekvpandya, Thanks for filing the issue.

Just to go over for clarity, the steps to get sidecar running are:

git clone <sidecar repo>
cd substrate-api-sidecar
yarn install
yarn build

a) This could be a local typescript mismatch of versions. Sidecar currently inherits 4.4.3 from @substrate/dev. I will change this so it explicitly defines it inside of the root repo. yarn why typescript

b) This could also be a mismatch of polkadot-js deps. I set resolutions to avoid this issue but as a sanity check you could always run yarn why @polkadot/<package-to-check>, and see if they match the resolutions set in the package.json.

Note: For the e2e-tests I updated the readme in #799, it just hasnt gone through yet. Currently the chains we support for the e2e-tests are

polkadot
kusama
westend
statemine
vivekvpandya commented 2 years ago

@TarikGul as per #799 , does it mean that we can run e2e-test without building them?

vivekvpandya commented 2 years ago

I am still getting the error. polkadots-js resolutions match in package.json

vivek@vivek-ThinkPad-E14-Gen-3:~/dev$ cd substrate-api-sidecar/
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/api
├─ @polkadot/api-derive@npm:7.0.1
│  └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/apps-config@npm:0.98.2-164
│  └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
│
├─ @substrate/api-sidecar@workspace:.
│  └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
│
└─ moonbeam-types-bundle@npm:2.0.2
   └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/apps-config
└─ @substrate/api-sidecar@workspace:.
   └─ @polkadot/apps-config@npm:0.98.2-164 (via npm:0.98.2-164)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/util0crypto
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/util-crypto
├─ @polkadot/api-derive@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/api@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/keyring@npm:8.2.2 [5c474]
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/rpc-provider@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/types@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @subsocial/utils@npm:0.6.5
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
└─ @substrate/api-sidecar@workspace:.
   └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/x-rxjs
└─ @substrate/api-sidecar@workspace:.
   └─ @polkadot/x-rxjs@npm:6.11.1 (via npm:^6.11.1)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/api
├─ @polkadot/api-derive@npm:7.0.1
│  └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/apps-config@npm:0.98.2-164
│  └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
│
├─ @substrate/api-sidecar@workspace:.
│  └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
│
└─ moonbeam-types-bundle@npm:2.0.2
   └─ @polkadot/api@npm:7.0.1 (via npm:7.0.1)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/keyring
├─ @digitalnative/type-definitions@npm:1.1.26
│  └─ @polkadot/keyring@npm:8.2.2 [5c474] (via npm:8.2.2 [5c474])
│
├─ @polkadot/api@npm:7.0.1
│  └─ @polkadot/keyring@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/rpc-provider@npm:7.0.1
│  └─ @polkadot/keyring@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/types@npm:7.0.1
│  └─ @polkadot/keyring@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @snowfork/snowbridge-types@npm:0.2.6
│  └─ @polkadot/keyring@npm:8.2.2 [5c474] (via npm:8.2.2 [5c474])
│
├─ moonbeam-types-bundle@npm:2.0.2
│  └─ @polkadot/keyring@npm:8.2.2 [5c474] (via npm:8.2.2 [5c474])
│
└─ pontem-types-bundle@npm:1.0.15
   └─ @polkadot/keyring@npm:8.2.2 [5c474] (via npm:8.2.2 [5c474])
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/networks
├─ @polkadot/apps-config@npm:0.98.2-164
│  └─ @polkadot/networks@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/types-known@npm:7.0.1
│  └─ @polkadot/networks@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/util-crypto@npm:8.2.2
│  └─ @polkadot/networks@npm:8.2.2 (via npm:8.2.2)
│
└─ @polkadot/util-crypto@npm:8.2.2 [0d4b9]
   └─ @polkadot/networks@npm:8.2.2 (via npm:8.2.2)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/types
├─ @darwinia/types-known@npm:2.7.2
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @digitalnative/type-definitions@npm:1.1.26
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @phala/typedefs@npm:0.2.29
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/api-augment@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/api-base@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/api-derive@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/api@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/apps-config@npm:0.98.2-164
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/rpc-augment@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/rpc-core@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/rpc-provider@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/types-augment@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @polkadot/types-known@npm:7.0.1
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @snowfork/snowbridge-types@npm:0.2.6
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ @subsocial/types@npm:0.6.5
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
├─ moonbeam-types-bundle@npm:2.0.2
│  └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
│
└─ pontem-types-bundle@npm:1.0.15
   └─ @polkadot/types@npm:7.0.1 (via npm:7.0.1)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/types-known
├─ @polkadot/api@npm:7.0.1
│  └─ @polkadot/types-known@npm:7.0.1 (via npm:7.0.1)
│
└─ @subsocial/types@npm:0.6.5
   └─ @polkadot/types-known@npm:7.0.1 (via npm:7.0.1)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/util
├─ @darwinia/types-known@npm:2.7.2
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/api-augment@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/api-base@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/api-derive@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/api@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/apps-config@npm:0.98.2-164
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/keyring@npm:8.2.2 [5c474]
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/rpc-augment@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/rpc-core@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/rpc-provider@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/types-augment@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/types-codec@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/types-create@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/types-known@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/types-support@npm:6.9.2
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
├─ @polkadot/types-support@npm:7.0.1
│  └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
│
└─ @polkadot/types@npm:7.0.1
   └─ @polkadot/util@npm:8.2.2 (via npm:8.2.2)
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/util-crypto
├─ @polkadot/api-derive@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/api@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/keyring@npm:8.2.2 [5c474]
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/rpc-provider@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @polkadot/types@npm:7.0.1
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
├─ @subsocial/utils@npm:0.6.5
│  └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
│
└─ @substrate/api-sidecar@workspace:.
   └─ @polkadot/util-crypto@npm:8.2.2 [0d4b9] (via npm:8.2.2 [0d4b9])
vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why @polkadot/wasm-crypto
├─ @polkadot/util-crypto@npm:8.2.2
│  └─ @polkadot/wasm-crypto@npm:4.5.1 (via npm:4.5.1)
│
└─ @polkadot/util-crypto@npm:8.2.2 [0d4b9]
   └─ @polkadot/wasm-crypto@npm:4.5.1 [c646e] (via npm:4.5.1 [c646e])
vivekvpandya commented 2 years ago

typescript versions

vivek@vivek-ThinkPad-E14-Gen-3:~/dev/substrate-api-sidecar$ yarn why typescript
├─ @substrate/dev@npm:0.5.6
│  └─ typescript@patch:typescript@npm%3A4.5.4#~builtin<compat/typescript>::version=4.5.4&hash=ddd1e8 (via patch:typescript@^4.4.3#~builtin<compat/typescript>)
│
├─ confmgr@npm:1.0.7
│  └─ typescript@patch:typescript@npm%3A4.3.5#~builtin<compat/typescript>::version=4.3.5&hash=ddd1e8 (via patch:typescript@4.3.5#~builtin<compat/typescript>)
│
├─ moonbeam-types-bundle@npm:2.0.2
│  └─ typescript@patch:typescript@npm%3A4.5.4#~builtin<compat/typescript>::version=4.5.4&hash=ddd1e8 (via patch:typescript@^4.5.2#~builtin<compat/typescript>)
│
└─ pontem-types-bundle@npm:1.0.15
   └─ typescript@patch:typescript@npm%3A4.5.4#~builtin<compat/typescript>::version=4.5.4&hash=ddd1e8 (via patch:typescript@^4.4.3#~builtin<compat/typescript>)
TarikGul commented 2 years ago

@TarikGul as per #799 , does it mean that we can run e2e-test without building them?

Yes exactly, the script takes care of all of that, this is taken care of here.

So I looked at all the version's you have running and it all checks out.

Just to make sure in the pulled down version you have this line on the top of main.js

import '@polkadot/api-augment';

Without that, these errors will show up but shouldn't when it's there.

vivekvpandya commented 2 years ago

Thanks! @TarikGul closing this now.