Set static metadata to v15 and update typegen to generate runtime apis and use v15 metadata (#5987)

* Set static metadata to v15

* Fix testUtil

* Fix metadata spec

* support metadata files

* lint and fix commented tests

* Fix test

* Add augment static runtime types by metadata

* Fix alias typing for runtime def types

* Cleanup and add remaining generated files

* lint

* Fix typegen for edgecase

* Update polkadot to 1003003

* Fix tests

* Set correct rpc
This commit is contained in:
Tarik Gul
2024-10-18 05:01:08 +03:00
committed by GitHub
parent 1772458304
commit bc199956f3
42 changed files with 160378 additions and 12515 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
import type { QueryableStorage } from '@polkadot/api-base/types';
import type { Compact, Vec } from '@polkadot/types';
import type { AccountId, BlockNumber, Header } from '@polkadot/types/interfaces';
import type { SpCoreSr25519Public } from '@polkadot/types/lookup';
import type { PalletImOnlineSr25519AppSr25519Public } from '@polkadot/types/lookup';
import type { Codec, IOption } from '@polkadot/types/types';
import type { DeriveApi } from '../types.js';
@@ -16,7 +16,7 @@ import { memo, unwrapBlockNumber } from '../util/index.js';
export type BlockNumberDerive = (instanceId: string, api: DeriveApi) => () => Observable<BlockNumber>;
type OptionMapping = IOption<{ account: AccountId } & Codec>;
type OptionNimbus = IOption<{ nimbus: SpCoreSr25519Public } & Codec>;
type OptionNimbus = IOption<{ nimbus: PalletImOnlineSr25519AppSr25519Public } & Codec>;
export function createBlockNumberDerive <T extends { number: Compact<BlockNumber> | BlockNumber }> (fn: (api: DeriveApi) => Observable<T>): BlockNumberDerive {
return (instanceId: string, api: DeriveApi) =>