diff --git a/packages/api/src/augment/tx.ts b/packages/api/src/augment/tx.ts index a1a660c517..e5d0785530 100644 --- a/packages/api/src/augment/tx.ts +++ b/packages/api/src/augment/tx.ts @@ -4413,24 +4413,6 @@ declare module '@polkadot/api/types/submittable' { * # **/ vest: AugmentedSubmittable<() => SubmittableExtrinsic, []>; - /** - * Unlock any vested funds of a `target` account. - * - * The dispatch origin for this call must be _Signed_. - * - * - `target`: The account whose vested funds should be unlocked. Must have funds still - * locked under this pallet. - * - * Emits either `VestingCompleted` or `VestingUpdated`. - * - * # - * - `O(1)`. - * - DbWeight: 3 Reads, 3 Writes - * - Reads: Vesting Storage, Balances Locks, Target Account - * - Writes: Vesting Storage, Balances Locks, Target Account - * # - **/ - vestOther: AugmentedSubmittable<(target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic, [LookupSource]>; /** * Create a vested transfer. * @@ -4450,6 +4432,24 @@ declare module '@polkadot/api/types/submittable' { * # **/ vestedTransfer: AugmentedSubmittable<(target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: VestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic, [LookupSource, VestingInfo]>; + /** + * Unlock any vested funds of a `target` account. + * + * The dispatch origin for this call must be _Signed_. + * + * - `target`: The account whose vested funds should be unlocked. Must have funds still + * locked under this pallet. + * + * Emits either `VestingCompleted` or `VestingUpdated`. + * + * # + * - `O(1)`. + * - DbWeight: 3 Reads, 3 Writes + * - Reads: Vesting Storage, Balances Locks, Target Account + * - Writes: Vesting Storage, Balances Locks, Target Account + * # + **/ + vestOther: AugmentedSubmittable<(target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic, [LookupSource]>; /** * Generic tx **/ diff --git a/packages/typegen/src/generate/consts.ts b/packages/typegen/src/generate/consts.ts index 1f3213bb00..ddf86ad809 100644 --- a/packages/typegen/src/generate/consts.ts +++ b/packages/typegen/src/generate/consts.ts @@ -24,7 +24,6 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, }, {}); const modules = meta.asLatest.modules - .sort(compareName) .filter((mod) => mod.constants.length > 0) .map(({ constants, name }) => { if (!isStrict) { @@ -32,7 +31,6 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, } const items = constants - .sort(compareName) .map(({ docs, name, type }) => { const returnType = formatType(allDefs, type.toString(), imports); @@ -43,13 +41,15 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, name: stringCamelCase(name), type: returnType }; - }); + }) + .sort(compareName); return { items, name: stringCamelCase(name) }; - }); + }) + .sort(compareName); const types = [ ...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({ diff --git a/packages/typegen/src/generate/errors.ts b/packages/typegen/src/generate/errors.ts index 80167a9882..292bcc1e28 100644 --- a/packages/typegen/src/generate/errors.ts +++ b/packages/typegen/src/generate/errors.ts @@ -19,17 +19,17 @@ function generateForMeta (meta: Metadata, dest: string, isStrict: boolean): void const imports = createImports({}); const modules = meta.asLatest.modules - .sort(compareName) .filter((mod) => mod.errors.length > 0) .map(({ errors, name }) => ({ items: errors - .sort(compareName) .map(({ docs, name }) => ({ docs, name: name.toString() - })), + })) + .sort(compareName), name: stringCamelCase(name) - })); + })) + .sort(compareName); const types = [ { diff --git a/packages/typegen/src/generate/events.ts b/packages/typegen/src/generate/events.ts index 23d0a10f42..a2f0c91e6f 100644 --- a/packages/typegen/src/generate/events.ts +++ b/packages/typegen/src/generate/events.ts @@ -24,7 +24,6 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, }, {}); const modules = meta.asLatest.modules - .sort(compareName) .filter((mod) => mod.events.isSome) .map(({ events, name }) => ({ items: events @@ -40,9 +39,10 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, name: name.toString(), type: types.join(', ') }; - }), + }).sort(compareName), name: stringCamelCase(name) - })); + })) + .sort(compareName); const types = [ ...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({ diff --git a/packages/typegen/src/generate/query.ts b/packages/typegen/src/generate/query.ts index dfa154a0ed..e521580787 100644 --- a/packages/typegen/src/generate/query.ts +++ b/packages/typegen/src/generate/query.ts @@ -101,7 +101,6 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr .filter((mod) => !mod.storage.isNone) .map(({ name, storage }) => { const items = storage.unwrap().items - .sort(compareName) .map((storageEntry) => { const [args, params, returnType] = entrySignature(allDefs, registry, storageEntry, imports); @@ -113,13 +112,15 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr params, returnType }; - }); + }) + .sort(compareName); return { items, name: stringCamelCase(name) }; - }); + }) + .sort(compareName); imports.typesTypes.Observable = true; diff --git a/packages/typegen/src/generate/tx.ts b/packages/typegen/src/generate/tx.ts index a2eeca9907..d4a552f7f0 100644 --- a/packages/typegen/src/generate/tx.ts +++ b/packages/typegen/src/generate/tx.ts @@ -37,13 +37,11 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr }, {}); const modules = meta.asLatest.modules - .sort(compareName) .filter(({ calls }) => calls.unwrapOr([]).length !== 0) .map(({ calls, name }) => { setImports(allDefs, imports, ['Call', 'Extrinsic', 'SubmittableExtrinsic']); const items = calls.unwrap() - .sort(compareName) .map(({ args, docs, name }) => { const params = args .map(({ name, type }) => { @@ -62,13 +60,15 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr name: stringCamelCase(name), params }; - }); + }) + .sort(compareName); return { items, name: stringCamelCase(name) }; - }); + }) + .sort(compareName); const types = [ ...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({