Move to @pezkuwi/dev 0.86 (eslint 10 toolchain)

- @pezkuwi/dev, dev-test, dev-ts ^0.86.3; disable directives renamed
  for the new rule names, or removed where the rule no longer reports
- rethrown errors carry the original as `cause` (13 sites)
- optional chains where a guard expression tested the same value
- Init: the registry cache settles with the creator's own promise,
  dropping the entry in finally(), instead of re-wrapping it
- Combinator: a typed call instead of `Function`
- checkTypes.manual: synchronous checks run outside Promise.all
- sortValues, createTypeUnsafe: initial values that were never read
- typegen util: load docs.js for its side effect (it registers the
  `docs` Handlebars partial) now that its types are re-exported
  type-only
- MockProvider keeps its Header assertion: the package's own build
  does not load api-augment, so createType returns a plain Codec there
- Decorate keeps `delete queue[i]`: the hole marks a fired queue and
  later indexes must not shift
This commit is contained in:
Satoshi Qazi Muhammed authored and SatoshiQaziMuhammed committed 2026-10-09 16:32:37 +04:00
1 parent 8c9af013b5
commit 5835a5383c
166 files changed
+2757 -3731

No files matched your search

+3 -3
View File
@@ -39,9 +39,9 @@
"test:one": "pezkuwi-dev-run-test --env node"
},
"devDependencies": {
"@pezkuwi/dev": "^0.85.12",
"@pezkuwi/dev-test": "^0.85.12",
"@pezkuwi/dev-ts": "^0.85.12",
"@pezkuwi/dev": "^0.86.3",
"@pezkuwi/dev-test": "^0.86.3",
"@pezkuwi/dev-ts": "^0.86.3",
"@pezkuwi/typegen": "workspace:*",
"@types/node": "^22.10.5",
"@types/yargs": "^17.0.35"
+2 -2
View File
@@ -4,7 +4,7 @@
import type { Observable } from 'rxjs';
import type { AnyFunction, Callback, Codec } from '@pezkuwi/types/types';
export type Push<T extends readonly unknown[], V> = [...T, V]
export type Push<T extends readonly unknown[], V> = [...T, V];
export type DropLast<T extends readonly unknown[]> = T extends readonly [...infer U, any?] ? U : [...T];
@@ -71,7 +71,7 @@ type AsCodec<R> = R extends Codec
export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface EmptyBase<_> {
// this is use to allow use to have unused vars in augmented interfaces,
// so intentionally left empty
+1 -1
View File
@@ -17,7 +17,7 @@ export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface AugmentedCalls<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
+1 -1
View File
@@ -11,7 +11,7 @@ export interface AugmentedConst<_ extends ApiTypes> {
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface AugmentedConsts<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
+1 -1
View File
@@ -8,7 +8,7 @@ export type AugmentedError<_ extends ApiTypes> = IsError;
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface AugmentedErrors<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
+1 -1
View File
@@ -9,7 +9,7 @@ export type AugmentedEvent<_ extends ApiTypes, T extends AnyTuple = AnyTuple, N
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface AugmentedEvents<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
+10 -10
View File
@@ -2,15 +2,15 @@
// SPDX-License-Identifier: Apache-2.0
// These are augmented, do an augmentation export
export * from '@pezkuwi/api-base/types/calls';
export * from '@pezkuwi/api-base/types/consts';
export * from '@pezkuwi/api-base/types/errors';
export * from '@pezkuwi/api-base/types/events';
export * from '@pezkuwi/api-base/types/storage';
export * from '@pezkuwi/api-base/types/submittable';
export type * from '@pezkuwi/api-base/types/calls';
export type * from '@pezkuwi/api-base/types/consts';
export type * from '@pezkuwi/api-base/types/errors';
export type * from '@pezkuwi/api-base/types/events';
export type * from '@pezkuwi/api-base/types/storage';
export type * from '@pezkuwi/api-base/types/submittable';
// normal exports
export * from './api.js';
export * from './base.js';
export * from './derive.js';
export * from './rpc.js';
export type * from './api.js';
export type * from './base.js';
export type * from './derive.js';
export type * from './rpc.js';
+2 -2
View File
@@ -26,10 +26,10 @@ export type DecoratedRpcSection<ApiType extends ApiTypes, Section> = {
[M in keyof Section]: Section[M] extends AnyFunction
? RpcMethodResult<ApiType, Section[M]>
: never
}
};
export type RawRpcType<ApiType extends ApiTypes> = (method: string, ...params: unknown[]) => ApiType extends 'rxjs' ? Observable<AnyJson> : Promise<AnyJson>;
export type DecoratedRpc<ApiType extends ApiTypes, AllSections> = {
[S in keyof AllSections]: DecoratedRpcSection<ApiType, AllSections[S]>
} & RawRpcType<ApiType>
} & RawRpcType<ApiType>;
+2 -2
View File
@@ -30,7 +30,7 @@ export interface StorageEntryPromiseOverloadsAt {
}
// This is the most generic typings we can have for a storage entry function
export type GenericStorageEntryFunction = (...args: unknown[]) => Observable<Codec>
export type GenericStorageEntryFunction = (...args: unknown[]) => Observable<Codec>;
export type QueryableStorageEntry<ApiType extends ApiTypes, A extends AnyTuple = AnyTuple> =
ApiType extends 'rxjs'
@@ -106,7 +106,7 @@ export type AugmentedQueryDoubleMap<ApiType extends ApiTypes, F extends AnyFunct
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface AugmentedQueries<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
+1 -1
View File
@@ -100,7 +100,7 @@ export interface SubmittableExtrinsicFunction<ApiType extends ApiTypes, A extend
// augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface AugmentedSubmittables<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented
}
+2 -2
View File
@@ -141,7 +141,7 @@ describe('Abi', (): void => {
const abi = new Abi(abiJson);
const eventRecordHex =
'0x0001000000080360951b8baf569bca905a279c12d6ce17db7cdce23a42563870ef585129ce5dc64d010001d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000c0045726332303a3a5472616e7366657200000000000000000000000000000000da2d695d3b5a304e0039e7fc4419c34fa0c1f239189c99bb72a6484f1634782b2b00c7d40fe6d84d660f3e6bed90f218e022a0909f7e1a7ea35ada8b6e003564';
'0x0001000000080360951b8baf569bca905a279c12d6ce17db7cdce23a42563870ef585129ce5dc64d010001d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000c0045726332303a3a5472616e7366657200000000000000000000000000000000da2d695d3b5a304e0039e7fc4419c34fa0c1f239189c99bb72a6484f1634782b2b00c7d40fe6d84d660f3e6bed90f218e022a0909f7e1a7ea35ada8b6e003564';
const record = registry.createType('EventRecord', eventRecordHex);
const decodedEvent = abi.decodeEvent(record);
@@ -173,7 +173,7 @@ describe('Abi', (): void => {
const abi = new Abi(abiJson);
const eventRecordHex =
'0x00010000000803da17150e96b3955a4db6ad35ddeb495f722f9c1d84683113bfb096bf3faa30f2490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000cb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cbd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
'0x00010000000803da17150e96b3955a4db6ad35ddeb495f722f9c1d84683113bfb096bf3faa30f2490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000cb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cbd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
const record = registry.createType('EventRecord', eventRecordHex);
const decodedEvent = abi.decodeEvent(record);
+2 -2
View File
@@ -18,7 +18,7 @@ interface AbiJson {
[key: string]: unknown;
}
type EventOf<M> = M extends {spec: { events: Vec<infer E>}} ? E : never
type EventOf<M> = M extends { spec: { events: Vec<infer E> } } ? E : never;
export type ContractMetadataSupported = ContractMetadataV4 | ContractMetadataV5 | ContractMetadataV6;
type ContractEventSupported = EventOf<ContractMetadataSupported>;
@@ -87,7 +87,7 @@ function parseJson (json: Record<string, unknown>, chainProperties?: ChainProper
const revive = isRevive(json);
const typeName = revive ? 'ContractReviveProjectInfo' : 'ContractProjectInfo';
const info = registry.createType(typeName, json) as unknown as ContractProjectInfo;
const info = registry.createType(typeName, json);
const metadata = getMetadata(registry, json as unknown as AbiJson);
const lookup = registry.createType('PortableRegistry', { types: metadata.types }, true);
+1 -1
View File
@@ -26,7 +26,7 @@ export class CodeSubmittableResult<ApiType extends ApiTypes> extends Submittable
readonly blueprint?: Blueprint<ApiType> | undefined;
readonly contract?: Contract<ApiType> | undefined;
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType> | undefined, contract?: Contract<ApiType> | undefined) {
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType>, contract?: Contract<ApiType>) {
super(result);
this.blueprint = blueprint;
+3 -3
View File
@@ -23,9 +23,9 @@ export interface AbiParam {
type: TypeDef;
}
export type AbiMessageParam = AbiParam
export type AbiMessageParam = AbiParam;
export interface AbiEventParam extends AbiParam{
export interface AbiEventParam extends AbiParam {
indexed: boolean;
}
@@ -57,7 +57,7 @@ export interface AbiMessage {
export type AbiConstructor = AbiMessage;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
export type InterfaceContractCalls = Record<string, Function>;
export interface ContractCallOutcome {
+1 -1
View File
@@ -3,7 +3,7 @@
import type { Observable } from 'rxjs';
import type { AccountId, Address, Balance } from '@pezkuwi/types/interfaces';
import type{ PezpalletElectionsPhragmenSeatHolder } from '@pezkuwi/types/lookup';
import type { PezpalletElectionsPhragmenSeatHolder } from '@pezkuwi/types/lookup';
import type { Codec } from '@pezkuwi/types/types';
import type { Option } from '@pezkuwi/types-codec';
import type { DeriveAccountFlags, DeriveApi } from '../types.js';
+2 -2
View File
@@ -213,12 +213,12 @@ export function hasIdentityMulti (instanceId: string, api: DeriveApi): (accountI
map(([identities, supers]) =>
identities.map((identityOfOpt, index): DeriveHasIdentity => {
const superOfOpt = supers[index];
const parentId = superOfOpt && superOfOpt.isSome
const parentId = superOfOpt?.isSome
? superOfOpt.unwrap()[0].toString()
: undefined;
let display: string | undefined;
if (identityOfOpt && identityOfOpt.isSome) {
if (identityOfOpt?.isSome) {
const value = dataAsString(identityCompat(identityOfOpt).info.display);
if (value && !isHex(value)) {
@@ -43,7 +43,7 @@ function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<
*/
export function listNodes (instanceId: string, api: DeriveApi): (bag: PezpalletBagsListListBag | null) => Observable<PezpalletBagsListListNode[]> {
return memo(instanceId, (bag: PezpalletBagsListListBag | null): Observable<PezpalletBagsListListNode[]> =>
bag && bag.head.isSome
bag?.head.isSome
? traverseLinks(api, bag.head.unwrap())
: of([])
);
+2 -2
View File
@@ -22,7 +22,7 @@ interface AccountType { isFrameAccountData: boolean }
type DeriveCustomAccount = DeriveApi['derive'] & Record<string, {
customAccount?: DeriveApi['query']['balances']['account']
}>
}>;
function zeroBalance (api: DeriveApi) {
return api.registry.createType('Balance');
@@ -145,7 +145,7 @@ function querySystemAccount (api: DeriveApi, accountId: AccountId): Observable<R
const isFrameType = !!(infoOrTuple as PezframeSystemAccountInfo).data.frozen;
if (isFrameType) {
const { flags, free, frozen, reserved } = (data as unknown as PezpalletBalancesAccountData);
const { flags, free, frozen, reserved } = data as unknown as PezpalletBalancesAccountData;
return [
nonce,
+2 -2
View File
@@ -25,7 +25,7 @@ interface AllLocked {
type DeriveCustomLocks = DeriveApi['derive'] & Record<string, {
customLocks?: DeriveApi['query']['balances']['locks']
}>
}>;
const VESTING_ID = '0x76657374696e6720';
@@ -38,7 +38,7 @@ function calcLocked (api: DeriveApi, bestNumber: BlockNumber, locks: (PezpalletB
if (Array.isArray(locks)) {
// only get the locks that are valid until passed the current block
lockedBreakdown = (locks as BalanceLockTo212[]).filter(({ until }): boolean => !until || (bestNumber && until.gt(bestNumber)));
allLocked = lockedBreakdown.some(({ amount }) => amount && amount.isMax());
allLocked = lockedBreakdown.some(({ amount }) => amount?.isMax());
vestingLocked = api.registry.createType('Balance', lockedBreakdown.filter(({ id }) => id.eq(VESTING_ID)).reduce((result: BN, { amount }) => result.iadd(amount), new BN(0)));
// get the maximum of the locks according to https://github.com/pezkuwichain/bizinikiwi/blob/master/srml/balances/src/lib.rs#L699
@@ -48,7 +48,7 @@ export function subscribeFinalizedHeads (instanceId: string, api: DeriveApi): ()
const startHash = header.parentHash;
header.createdAtHash = header.hash as unknown as typeof header.createdAtHash;
prevHash = header.hash as unknown as Hash;
prevHash = header.hash;
return endHash === null || startHash.eq(endHash)
? of(header)
@@ -19,7 +19,7 @@ type Result = [(Hash | Uint8Array | string)[], (Option<Proposal> | null)[], Opti
function parse (api: DeriveApi, [hashes, proposals, votes]: Result): DeriveCollectiveProposal[] {
return proposals.map((o, index): DeriveCollectiveProposal => ({
hash: api.registry.createType('Hash', hashes[index]),
proposal: o && o.isSome
proposal: o?.isSome
? o.unwrap()
: null,
votes: votes[index].unwrapOr(null)
+1 -1
View File
@@ -35,7 +35,7 @@ type DeriveAllSections<AllSections> = {
[S in keyof AllSections]: DeriveSection<AllSections[S]>
};
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface ExactDerive extends DeriveAllSections<typeof derive> {
// keep empty, allows for augmentation
}
@@ -22,7 +22,7 @@ function mapResult ([result, validators, heartbeats, numBlocks]: Result): Derive
const hasMessage = !heartbeats[index].isEmpty;
const prev = result[validatorId];
if (!prev || prev.hasMessage !== hasMessage || !prev.blockCount.eq(blockCount)) {
if (prev?.hasMessage !== hasMessage || !prev.blockCount.eq(blockCount)) {
result[validatorId] = {
blockCount,
hasMessage,
-4
View File
@@ -3,10 +3,6 @@
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
import type { ExactDerive } from './index.js';
import { from, Observable } from 'rxjs';
+1 -1
View File
@@ -68,7 +68,7 @@ function queryBabe (api: DeriveApi): Observable<[DeriveSessionInfo, ResultSlotsF
])
),
map(([info, [currentSlot, epochIndex, genesisSlot, optStartIndex]]): [DeriveSessionInfo, ResultSlotsFlat] => [
info, [currentSlot, epochIndex, genesisSlot, optStartIndex && optStartIndex.isSome ? optStartIndex.unwrap() : api.registry.createType('SessionIndex', 1)]
info, [currentSlot, epochIndex, genesisSlot, optStartIndex?.isSome ? optStartIndex.unwrap() : api.registry.createType('SessionIndex', 1)]
])
);
}
@@ -13,7 +13,7 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
import { memo } from '../util/index.js';
type ResultSuspend = Option<ITuple<[BalanceOf, PezpalletSocietyBidKind]>>;
type Result = [PezpalletSocietyBid[], ResultSuspend[]]
type Result = [PezpalletSocietyBid[], ResultSuspend[]];
function getPrev (api: DeriveApi): Observable<DeriveSocietyCandidate[]> {
return api.query.society.candidates<Vec<PezpalletSocietyBid>>().pipe(
+1 -1
View File
@@ -11,7 +11,7 @@ import { combineLatest, map, of } from 'rxjs';
import { memo } from '../util/index.js';
type Result = [Vec<PezpalletSocietyBid>, Option<AccountId> | undefined, Option<AccountId>, Option<AccountId>, u32 | undefined, BalanceOf]
type Result = [Vec<PezpalletSocietyBid>, Option<AccountId> | undefined, Option<AccountId>, Option<AccountId>, u32 | undefined, BalanceOf];
/**
* @name info
+2 -2
View File
@@ -62,7 +62,7 @@ function filterRewards (stashIds: AccountId[], eras: number[], claimedRewards: [
const overviewPerEra = overviewData[id.toString()];
return eras.map((era) => {
if (rewardsPerEra && rewardsPerEra.has(era) && overviewPerEra && overviewPerEra.has(era)) {
if (rewardsPerEra && rewardsPerEra.has(era) && overviewPerEra?.has(era)) {
const rewards = rewardsPerEra.get(era) as unknown as u32[];
const pageCount = overviewPerEra.get(era) as unknown as u32;
@@ -109,7 +109,7 @@ function getLedgers (api: DeriveApi, optIds: (Option<AccountId> | null)[], { wit
let offset = -1;
return optIds.map((o): Option<PezpalletStakingStakingLedger> =>
o && o.isSome
o?.isSome
? optLedgers[++offset] || emptyLed
: emptyLed
);
+1 -1
View File
@@ -16,7 +16,7 @@ export function createApiWithAugmentations (): ApiPromise {
registry
});
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
api.injectMetadata(metadata, true, registry);
return api;
+1 -1
View File
@@ -27,7 +27,7 @@ type Result = [
function parseActive (id: ParaId, active: Active): DeriveTeyrchainActive | null {
const found = active.find(([paraId]) => paraId === id);
if (found && found[1].isSome) {
if (found?.[1].isSome) {
const [collatorId, retriable] = found[1].unwrap();
return objectSpread<DeriveTeyrchainActive>(
+3 -3
View File
@@ -8,11 +8,11 @@ import type { ITuple } from '@pezkuwi/types/types';
export type ParaInfoResult = Option<ParaInfo>;
export type PendingSwap = Option<ParaId>;
export type Active = Vec<ITuple<[ParaId, Option<ITuple<[CollatorId, Retriable]>>]>>;
export type RetryQueue = Vec<Vec<ITuple<[ParaId, CollatorId]>>>
export type SelectedThreads = Vec<Vec<ITuple<[ParaId, CollatorId]>>>
export type RetryQueue = Vec<Vec<ITuple<[ParaId, CollatorId]>>>;
export type SelectedThreads = Vec<Vec<ITuple<[ParaId, CollatorId]>>>;
export type Code = Bytes;
export type Heads = Bytes;
export type RelayDispatchQueue = Vec<UpwardMessage>
export type RelayDispatchQueue = Vec<UpwardMessage>;
export type RelayDispatchQueueSize = ITuple<[u32, u32]>;
export type DidUpdate = Option<Vec<ParaId>>;
@@ -26,8 +26,8 @@ function parseResult (api: DeriveApi, { allIds, allProposals, approvalIds, counc
// FIXME `approveProposal` and `rejectProposal` have been removed in bizinikiwi and released in 1.14
// in favor of `spend`. See: https://github.com/pezkuwichain/pezkuwi-sdk/pull/3820
proposal && (
(api.tx.treasury['approveProposal'] && api.tx.treasury['approveProposal'].is(proposal)) ||
(api.tx.treasury['rejectProposal'] && api.tx.treasury['rejectProposal'].is(proposal))
(api.tx.treasury['approveProposal']?.is(proposal)) ||
(api.tx.treasury['rejectProposal']?.is(proposal))
)
);
+1 -1
View File
@@ -82,7 +82,7 @@ function babeOrAuraPeriod (api: DeriveApi): BN | undefined {
(api.consts['aura'] as unknown as Aura)?.['slotDuration'] ||
api.consts.timestamp?.minimumPeriod.muln(2);
return period && period.isZero && !period.isZero() ? period : undefined;
return period?.isZero && !period.isZero() ? period : undefined;
}
/**
+12 -12
View File
@@ -8,18 +8,18 @@ import type { PezpalletBountiesBounty, PezpalletTreasuryProposal } from '@pezkuw
import type { BN } from '@pezkuwi/util';
import type { ExactDerive } from './derive.js';
export * from './accounts/types.js';
export * from './bagsList/types.js';
export * from './balances/types.js';
export * from './council/types.js';
export * from './crowdloan/types.js';
export * from './democracy/types.js';
export * from './elections/types.js';
export * from './session/types.js';
export * from './society/types.js';
export * from './staking/types.js';
export * from './teyrchains/types.js';
export * from './type/types.js';
export type * from './accounts/types.js';
export type * from './bagsList/types.js';
export type * from './balances/types.js';
export type * from './council/types.js';
export type * from './crowdloan/types.js';
export type * from './democracy/types.js';
export type * from './elections/types.js';
export type * from './session/types.js';
export type * from './society/types.js';
export type * from './staking/types.js';
export type * from './teyrchains/types.js';
export type * from './type/types.js';
export interface DeriveApi extends ApiInterfaceRx {
derive: ExactDerive;
+12 -10
View File
@@ -56,7 +56,7 @@ const l = logger('api/init');
let instanceCounter = 0;
function getAtQueryFn<ApiType extends ApiTypes> (api: ApiDecoration<ApiType>, { method, section }: StorageEntry): AugmentedQuery<'rxjs', GenericStorageEntryFunction, AnyTuple> {
return assertReturn(api.rx.query[section] && api.rx.query[section][method], () => `query.${section}.${method} is not available in this version of the metadata`);
return assertReturn(api.rx.query[section]?.[method], () => `query.${section}.${method} is not available in this version of the metadata`);
}
export abstract class Decorate<ApiType extends ApiTypes> extends Events {
@@ -728,7 +728,6 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decorated.is = (other: IMethod<AnyTuple>) =>
method.is(other);
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return this._decorateFunctionMeta(method as unknown as MetaDecoration, decorated as unknown as MetaDecoration) as unknown as SubmittableExtrinsicFunction<ApiType>;
}
@@ -760,13 +759,13 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
map((api) => getAtQueryFn(api, creator)));
// Disable this where it occurs for each field we are decorating
/* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
const decorated: AugmentedQuery<'rxjs', GenericStorageEntryFunction, AnyTuple> & MetaDecoration = this._decorateStorageCall(creator, decorateMethod);
decorated.creator = creator;
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
decorated.at = decorateMethod((blockHash: Hash, ...args: unknown[]): Observable<Codec> =>
getQueryAt(blockHash).pipe(
switchMap((q) => q(...args))));
@@ -787,7 +786,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decorated.size = decorateMethod((...args: unknown[]): Observable<u64> =>
this._rpcCore.state.getStorageSize(getArgs(args)));
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
decorated.sizeAt = decorateMethod((blockHash: Hash | Uint8Array | string, ...args: unknown[]): Observable<u64> =>
getQueryAt(blockHash).pipe(
switchMap((q) =>
@@ -799,7 +798,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
memo(this.#instanceId, (...args: unknown[]): Observable<[StorageKey, Codec][]> =>
this._retrieveMapEntries(creator, null, args)));
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
decorated.entriesAt = decorateMethod(
memo(this.#instanceId, (blockHash: Hash | Uint8Array | string, ...args: unknown[]): Observable<[StorageKey, Codec][]> =>
getQueryAt(blockHash).pipe(
@@ -813,7 +812,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
memo(this.#instanceId, (...args: unknown[]): Observable<StorageKey[]> =>
this._retrieveMapKeys(creator, null, args)));
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
decorated.keysAt = decorateMethod(
memo(this.#instanceId, (blockHash: Hash | Uint8Array | string, ...args: unknown[]): Observable<StorageKey[]> =>
getQueryAt(blockHash).pipe(
@@ -833,7 +832,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
);
}
/* eslint-enable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
return this._decorateFunctionMeta(creator as unknown as MetaDecoration, decorated) as unknown as QueryableStorageEntry<ApiType>;
}
@@ -842,7 +841,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
const getArgs = (args: unknown[]): unknown[] => extractStorageArgs(registry, creator, args);
// Disable this where it occurs for each field we are decorating
/* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
const decorated: AugmentedQuery<'rxjs', GenericStorageEntryFunction, AnyTuple> & MetaDecoration = decorateMethod((...args: unknown[]): Observable<Codec> =>
this._rpcCore.state.getStorage(getArgs(args), blockHash));
@@ -893,7 +892,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
);
}
/* eslint-enable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
return this._decorateFunctionMeta(creator as unknown as MetaDecoration, decorated) as unknown as QueryableStorageEntry<ApiType>;
}
@@ -924,6 +923,9 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
// (anything after this will be added to a new queue)
const calls = queue[queueIdx][1];
// The hole marks this queue as fired (see the check above);
// removing the entry instead would shift every later index.
// eslint-disable-next-line @typescript-eslint/no-array-delete
delete queue[queueIdx];
resolve(calls);
+2 -10
View File
@@ -151,16 +151,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
if (isUndefined(waiting)) {
// nothing waiting, construct new
waiting = this.#waitingRegistries[key] = new Promise<VersionedRegistry<ApiType>>((resolve, reject): void => {
creator()
.then((registry): void => {
delete this.#waitingRegistries[key];
resolve(registry);
})
.catch((error): void => {
delete this.#waitingRegistries[key];
reject(error);
});
waiting = this.#waitingRegistries[key] = creator().finally((): void => {
delete this.#waitingRegistries[key];
});
}
+8 -7
View File
@@ -115,7 +115,7 @@ async function query (api: ApiPromise, pairs: TestKeyringMapBizinikiwi): Promise
const bal2 = await api.query.balances.totalIssuance('WRONG_ARG'); // bal2 is Codec (wrong args)
const override = await api.query.balances.totalIssuance<Header>(); // override is still available
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
const oldBal = await api.query.balances.totalIssuance.at('abcd');
// For older queries we can cast with `<Balance>` (newer chain have multi typed)
@@ -144,7 +144,7 @@ async function queryExtra (api: ApiPromise): Promise<void> {
});
// at queries
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
const events = await api.query.system.events.at('0x12345');
console.log(`Received ${events.length} events:`);
@@ -221,7 +221,7 @@ async function rpc (api: ApiPromise): Promise<void> {
});
// deprecated methods
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
await api.rpc.state.getPairs('123');
}
@@ -304,17 +304,18 @@ async function main (): Promise<void> {
const api = await ApiPromise.create();
const pairs = createTestPairs();
consts(api);
errors(api);
events(api);
types(api);
await Promise.all([
calls(api),
consts(api),
derive(api),
errors(api),
events(api),
query(api, pairs),
queryExtra(api),
queryMulti(api, pairs),
rpc(api),
types(api),
tx(api, pairs),
at(api)
]);
+1 -1
View File
@@ -150,7 +150,7 @@ export class ApiPromise extends ApiBase<'promise'> {
public static create (options?: ApiOptions): Promise<ApiPromise> {
const instance = new ApiPromise(options);
if (options && options.throwOnConnect) {
if (options?.throwOnConnect) {
return instance.isReadyOrError;
}
+2 -4
View File
@@ -22,7 +22,6 @@ export class Combinator<T extends unknown[] = unknown[]> {
constructor (fns: (CombinatorFunction | [CombinatorFunction, ...unknown[]])[], callback: CombinatorCallback<T>) {
this.#callback = callback;
// eslint-disable-next-line @typescript-eslint/no-floating-promises, @typescript-eslint/require-await
this.#subscriptions = fns.map(async (input, index): UnsubscribePromise => {
const [fn, ...args] = Array.isArray(input)
? input
@@ -31,9 +30,8 @@ export class Combinator<T extends unknown[] = unknown[]> {
this.#fired.push(false);
this.#fns.push(fn);
// Not quite 100% how to have a variable number at the front here
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/ban-types
return (fn as Function)(...args, this._createCallback(index));
// the leading arguments vary per function, the callback is always last
return (fn as (...params: unknown[]) => UnsubscribePromise)(...args, this._createCallback(index));
});
}
@@ -93,7 +93,6 @@ describe('Combinator', (): void => {
// eslint-disable-next-line jest/expect-expect
it('unsubscribes as required', async (): Promise<void> => {
await new Promise<void>((resolve) => {
// eslint-disable-next-line @typescript-eslint/require-await
const mocker = () => Promise.resolve(resolve);
const combinator = new Combinator([
mocker,
+1 -1
View File
@@ -106,7 +106,7 @@ function decorateSubscribe<M extends DecorateFn<CodecReturnType<M>>> (method: M,
* @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent
*/
export function toPromiseMethod<M extends DecorateFn<CodecReturnType<M>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads {
const needsCallback = !!(options?.methodName && options.methodName.includes('subscribe'));
const needsCallback = !!(options?.methodName?.includes('subscribe'));
return function (...args: unknown[]): Promise<CodecReturnType<M>> | UnsubscribePromise {
const [actualArgs, resultCb] = extractArgs(args, needsCallback);
+1 -3
View File
@@ -1,8 +1,6 @@
// Copyright 2017-2026 @pezkuwi/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable no-dupe-class-members */
import type { Observable } from 'rxjs';
import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo, SignerPayload } from '@pezkuwi/types/interfaces';
import type { Callback, Codec, CodecClass, ISubmittableResult, SignatureOptions } from '@pezkuwi/types/types';
@@ -365,7 +363,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
const ext = this.registry.createTypeUnsafe<Extrinsic>('Extrinsic', [result.signedTransaction]);
const newSignerPayload = this.registry.createTypeUnsafe<SignerPayload>('SignerPayload', [objectSpread({}, {
address,
assetId: ext.assetId && ext.assetId.isSome ? ext.assetId.toHex() : null,
assetId: ext.assetId?.isSome ? ext.assetId.toHex() : null,
blockHash: payload.blockHash,
blockNumber: header ? header.number : 0,
era: ext.era.toHex(),
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2026 @pezkuwi/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from '@pezkuwi/api-base/types/calls';
export type * from '@pezkuwi/api-base/types/calls';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2026 @pezkuwi/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from '@pezkuwi/api-base/types/consts';
export type * from '@pezkuwi/api-base/types/consts';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2026 @pezkuwi/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from '@pezkuwi/api-base/types/errors';
export type * from '@pezkuwi/api-base/types/errors';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2026 @pezkuwi/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from '@pezkuwi/api-base/types/events';
export type * from '@pezkuwi/api-base/types/events';
+14 -14
View File
@@ -25,20 +25,20 @@ export type { Signer, SignerResult } from '@pezkuwi/types/types';
export { ApiBase } from '../base/index.js';
// all starred
// eslint-disable-next-line import/export
export * from '@pezkuwi/api/types/calls';
// eslint-disable-next-line import/export
export * from '@pezkuwi/api/types/consts';
// eslint-disable-next-line import/export
export * from '@pezkuwi/api/types/errors';
// eslint-disable-next-line import/export
export * from '@pezkuwi/api/types/events';
// eslint-disable-next-line import/export
export * from '@pezkuwi/api/types/storage';
// eslint-disable-next-line import/export
export * from '@pezkuwi/api/types/submittable';
// eslint-disable-next-line import/export
export * from '@pezkuwi/api-base/types';
// eslint-disable-next-line import-x/export
export type * from '@pezkuwi/api/types/calls';
// eslint-disable-next-line import-x/export
export type * from '@pezkuwi/api/types/consts';
// eslint-disable-next-line import-x/export
export type * from '@pezkuwi/api/types/errors';
// eslint-disable-next-line import-x/export
export type * from '@pezkuwi/api/types/events';
// eslint-disable-next-line import-x/export
export type * from '@pezkuwi/api/types/storage';
// eslint-disable-next-line import-x/export
export type * from '@pezkuwi/api/types/submittable';
// eslint-disable-next-line import-x/export
export type * from '@pezkuwi/api-base/types';
// A smaller interface of ApiRx, used in derive and in SubmittableExtrinsic
export interface ApiInterfaceRx extends ApiInterfaceBase {
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2026 @pezkuwi/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from '@pezkuwi/api-base/types/storage';
export type * from '@pezkuwi/api-base/types/storage';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2026 @pezkuwi/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from '@pezkuwi/api-base/types/submittable';
export type * from '@pezkuwi/api-base/types/submittable';
+5 -5
View File
@@ -29,7 +29,7 @@ interface StorageChangeSetJSON {
type MemoizedRpcInterfaceMethod = Memoized<RpcInterfaceMethod> & {
raw: Memoized<RpcInterfaceMethod>;
meta: DefinitionRpc;
}
};
interface Options {
isPedantic?: boolean;
@@ -295,11 +295,11 @@ export class RpcCore {
}
};
}).pipe(
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
publishReplay(1), // create a Replay(1)
isDelayed
? refCountDelay() // Unsubscribe after delay
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
: refCount()
);
};
@@ -418,7 +418,7 @@ export class RpcCore {
? this._formatStorageSet(registry, (result as StorageChangeSetJSON).block, keys, (result as StorageChangeSetJSON).changes)
: registry.createType('StorageChangeSet', result);
} else if (rpc.type === 'Vec<StorageChangeSet>') {
const jsonSet = (result as StorageChangeSetJSON[]);
const jsonSet = result as StorageChangeSetJSON[];
const count = jsonSet.length;
const mapped = new Array<[Hash, Codec[]]>(count);
@@ -529,7 +529,7 @@ export class RpcCore {
: input
], { blockHash, isFallback: isEmpty && !!meta.fallback, isOptional: meta.modifier.isOptional, isPedantic: this.#isPedantic && !meta.modifier.isOptional });
} catch (error) {
throw new Error(`Unable to decode storage ${key.section || 'unknown'}.${key.method || 'unknown'}:${entryNum}: ${(error as Error).message}`);
throw new Error(`Unable to decode storage ${key.section || 'unknown'}.${key.method || 'unknown'}:${entryNum}: ${(error as Error).message}`, { cause: error });
}
}
}
+2 -5
View File
@@ -43,11 +43,10 @@ describe('methodSend', (): void => {
it('checks for mismatched parameters', async (): Promise<void> => {
// private method
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const method = (rpc as any)._createMethodSend('test', 'bleh', methods.bleh);
await new Promise<boolean>((resolve) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
method(1).subscribe(
(): void => undefined,
(error: Error): void => {
@@ -59,14 +58,12 @@ describe('methodSend', (): void => {
it('calls the provider with the correct parameters', async (): Promise<void> => {
// private method
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const method = (rpc as any)._createMethodSend('test', 'blah', methods.blah);
await new Promise<boolean>((resolve) => {
// Args are length-prefixed, because it's a Bytes
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access
method(new Uint8Array([2 << 2, 0x12, 0x34])).subscribe((): void => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(provider.send).toHaveBeenCalledWith('test_blah', ['0x1234'], false);
resolve(true);
});
+2 -2
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// augmented, do an augmentation export
export * from '@pezkuwi/rpc-core/types/jsonrpc';
export type * from '@pezkuwi/rpc-core/types/jsonrpc';
// normal exports
export * from './base.js';
export type * from './base.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2026 @pezkuwi/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line @typescript-eslint/no-empty-interface
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface RpcInterface {
// augmented
}
+2 -2
View File
@@ -42,10 +42,10 @@ export function drr ({ delay, skipChange = false, skipTimeout = false }: Options
skipChange
? tap(NOOP)
: distinctUntilChanged<T>(CMP),
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
publishReplay(1),
skipTimeout
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
? refCount()
: refCountDelay(delay)
);
+1 -1
View File
@@ -16,7 +16,7 @@ type ObsFn <T> = (...params: unknown[]) => Observable<T>;
// 1. creates a memo of the inner fn -> Observable, removing when unsubscribed
// 2. wraps the observable in a drr() (which includes an unsub delay)
/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
export function memo <T> (instanceId: string, inner: Function): Memoized<ObsFn<T>> {
const options = { getInstanceId: () => instanceId };
const cached = memoize(
+1 -1
View File
@@ -18,7 +18,7 @@ export function refCountDelay <T> (delay = 1750): MonoTypeOperatorFunction<T> {
if (state === 1) {
scheduler.unsubscribe();
} else {
// eslint-disable-next-line deprecation/deprecation
// eslint-disable-next-line @typescript-eslint/no-deprecated
connection = (source as ConnectableObservable<T>).connect();
}
@@ -127,7 +127,7 @@ class InnerChecker {
};
responsePassThrough = (jsonRpcResponse: string): string | null => {
let parsedResponse: {id: string, result?: SmoldotHealth, params?: { subscription: string }};
let parsedResponse: { id: string, result?: SmoldotHealth, params?: { subscription: string } };
try {
parsedResponse = JSON.parse(jsonRpcResponse) as { id: string, result?: SmoldotHealth };
@@ -69,8 +69,8 @@ describe('RpcError', (): void => {
});
describe('stack traces', (): void => {
// eslint-disable-next-line @typescript-eslint/ban-types
let captureStackTrace: (targetObject: Record<string, any>, constructorOpt?: Function | undefined) => void;
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
let captureStackTrace: (targetObject: Record<string, any>, constructorOpt?: Function) => void;
beforeEach((): void => {
captureStackTrace = Error.captureStackTrace;
+1 -1
View File
@@ -36,7 +36,7 @@ export class RpcCoder {
#id = 0;
public decodeResponse <T> (response?: JsonRpcResponse<T>): T {
if (!response || response.jsonrpc !== '2.0') {
if (response?.jsonrpc !== '2.0') {
throw new Error('Invalid jsonrpc field in decoded object');
}
+3 -5
View File
@@ -1,8 +1,6 @@
// Copyright 2017-2026 @pezkuwi/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable camelcase */
import type { Header } from '@pezkuwi/types/interfaces';
import type { Codec, Registry } from '@pezkuwi/types/types';
import type { ProviderInterface, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types.js';
@@ -53,12 +51,9 @@ export class MockProvider implements ProviderInterface {
private prevNumber = new BN(-1);
private requests: Record<string, (...params: any[]) => unknown> = {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
chain_getBlock: () => this.registry.createType('SignedBlock', rpcSignedBlock.result).toJSON(),
chain_getBlockHash: () => '0x1234000000000000000000000000000000000000000000000000000000000000',
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
chain_getFinalizedHead: () => this.registry.createType('Header', rpcHeader.result).hash,
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
chain_getHeader: () => this.registry.createType('Header', rpcHeader.result).toJSON(),
rpc_methods: () => this.registry.createType('RpcMethods').toJSON(),
state_getKeys: () => [],
@@ -236,6 +231,9 @@ export class MockProvider implements ProviderInterface {
this.prevNumber = blockNumber;
// Needed in this package's own build, where api-augment is not loaded and
// createType returns a plain Codec; the repository-wide lint sees it augmented.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
return header as unknown as Header;
}
+1 -1
View File
@@ -6,7 +6,7 @@ import type { Server } from 'mock-socket';
export type Global = typeof globalThis & {
WebSocket: typeof WebSocket;
fetch: any;
}
};
export interface Mock {
body: Record<string, Record<string, unknown>>;
@@ -79,7 +79,6 @@ describe('send', (): void => {
.send('test_body', ['param'])
.then((): void => {
expect(
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(mock.body as any).test_body
).toEqual('{"id":1,"jsonrpc":"2.0","method":"test_body","params":["param"]}');
})
+1 -1
View File
@@ -64,7 +64,7 @@ function entrySignature (lookup: PortableRegistry, allDefs: Record<string, Modul
throw new Error(`Expected Plain or Map type, found ${storageEntry.type.type}`);
} catch (error) {
throw new Error(`entrySignature: Cannot create signature for query ${section}.${storageEntry.name.toString()}:: ${(error as Error).message}`);
throw new Error(`entrySignature: Cannot create signature for query ${section}.${storageEntry.name.toString()}:: ${(error as Error).message}`, { cause: error });
}
}
+1 -1
View File
@@ -150,7 +150,7 @@ function tsResultGetter (registry: Registry, definitions: Record<string, ModuleT
/** @internal */
function tsResult (registry: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports): string {
const [okDef, errorDef] = (def.sub as TypeDef[]);
const [okDef, errorDef] = def.sub as TypeDef[];
const inner = [
tsResultGetter(registry, definitions, def.name, 'Err', errorDef, imports),
tsResultGetter(registry, definitions, def.name, 'Ok', okDef, imports)
+1 -1
View File
@@ -8,7 +8,7 @@ export type ExtraTypes = Record<string, Record<string, {
types: Record<string, any>;
}>>;
export function getDeprecationNotice<T extends { isDeprecated: boolean; asDeprecated: { note: Text; since: Option<Text> }}> (deprecationInfo: T, name: string, label?: string): string {
export function getDeprecationNotice<T extends { isDeprecated: boolean; asDeprecated: { note: Text; since: Option<Text> } }> (deprecationInfo: T, name: string, label?: string): string {
let deprecationNotice = '@deprecated';
if (deprecationInfo.isDeprecated) {
+5 -9
View File
@@ -122,8 +122,8 @@ function docsVecToMarkdown (docLines: Vec<Text>, indent = 0): string {
? `${md}\n\n` // empty line
: /^[*-]/.test(docLine.trimStart()) && !md.endsWith('\n\n')
? `${md}\n\n${docLine}` // line calling for a preceding linebreak
: `${md} ${docLine.replace(/^#{1,3} /, '#### ')} `
, '')
: `${md} ${docLine.replace(/^#{1,3} /, '#### ')} `,
'')
.replace(/#### <weight>/g, '<weight>')
.replace(/<weight>(.|\n)*?<\/weight>/g, '')
.replace(/#### Weight:/g, 'Weight:');
@@ -166,7 +166,6 @@ function renderPage (page: Page): string {
.filter((key) => !['link', 'name'].includes(key))
.forEach((bullet) => {
md += `\n- **${bullet}**: ${
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
item[bullet] instanceof Vec
? docsVecToMarkdown(item[bullet], 2).toString()
: item[bullet]
@@ -232,7 +231,6 @@ function addRpc (_runtimeDesc: string, rpcMethods?: string[]): string {
}
const args = method.params.map(({ isOptional, name, type }: DefinitionRpcParam): string => {
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
return name + (isOptional ? '?' : '') + ': `' + type + '`';
}).join(', ');
const type = '`' + method.type + '`';
@@ -311,7 +309,6 @@ function runtimeSections (registry: Registry) {
.sort(([a], [b]) => a.localeCompare(b))
.forEach(([methodName, { description, params, type }]): void => {
const args = params.map(({ name, type }): string => {
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
return name + ': `' + type + '`';
}).join(', ');
@@ -356,7 +353,7 @@ function addLegacyRuntime (_runtimeDesc: string, _registry: Registry, apis?: Api
const apiHash = blake2AsHex(apiName, 64);
const api = apis.find(([hash]) => hash === apiHash);
if (!api || api[1] !== version) {
if (api?.[1] !== version) {
return;
}
} else if (index) {
@@ -373,7 +370,6 @@ function addLegacyRuntime (_runtimeDesc: string, _registry: Registry, apis?: Api
.sort(([a], [b]) => a.localeCompare(b))
.forEach(([methodName, { description, params, type }]): void => {
const args = params.map(({ name, type }): string => {
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
return name + ': `' + type + '`';
}).join(', ');
@@ -629,9 +625,9 @@ function extractDeriveExample (tags: Spec[]) {
return;
}
if (line.source.indexOf('```') !== -1 && !inCodeBlock.found) {
if (line.source.includes('```') && !inCodeBlock.found) {
inCodeBlock.found = true;
} else if (line.source.indexOf('```') !== -1 && inCodeBlock.found) {
} else if (line.source.includes('```') && inCodeBlock.found) {
inCodeBlock.done = true;
}
+3 -4
View File
@@ -139,7 +139,7 @@ export function exportInterface (lookupIndex = -1, name = '', base: string, body
}
function singleParamNotation (registry: Registry, wrapper: string, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean): string {
const sub = (typeDef.sub as TypeDef);
const sub = typeDef.sub as TypeDef;
const lookupName = rebrandTypeName(sub.lookupName || '');
setImports(definitions, imports, [wrapper, lookupName]);
@@ -148,7 +148,7 @@ function singleParamNotation (registry: Registry, wrapper: string, typeDef: Type
}
function dualParamsNotation (registry: Registry, wrapper: string, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean): string {
const [a, b] = (typeDef.sub as TypeDef[]);
const [a, b] = typeDef.sub as TypeDef[];
const aLookupName = rebrandTypeName(a.lookupName || '');
const bLookupName = rebrandTypeName(b.lookupName || '');
@@ -254,7 +254,7 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
},
[TypeDefInfo.VecFixed]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
const sub = (typeDef.sub as TypeDef);
const sub = typeDef.sub as TypeDef;
if (sub.type === 'u8') {
// Use lookupName if available (e.g., PezspCoreCryptoAccountId32) instead of generic U8aFixed
@@ -318,7 +318,6 @@ export function isInlineStruct (type: string): boolean {
* Correctly format a given type
*/
/** @internal */
// eslint-disable-next-line @typescript-eslint/ban-types
export function formatType (registry: Registry, definitions: Record<string, ModuleTypes>, type: AnyString | TypeDef, imports: TypeImports, withShortcut = false): string {
let typeDef: TypeDef;
+5 -1
View File
@@ -1,9 +1,13 @@
// Copyright 2017-2026 @pezkuwi/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
// docs.js exports only types, but registers the `docs` Handlebars partial
// when loaded; the type-only re-export below does not load it.
import './docs.js';
export * from './assert.js';
export * from './derived.js';
export * from './docs.js';
export type * from './docs.js';
export * from './file.js';
export * from './formatting.js';
export * from './imports.js';
-1
View File
@@ -139,7 +139,6 @@ export abstract class AbstractInt extends BN implements INumber {
/**
* @description Compares the value of the input to see if there is a match
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
public override eq (other?: unknown): boolean {
// Here we are actually overriding the built-in .eq to take care of both
// number and BN inputs (no `.eqn` needed) - numbers will be converted
@@ -16,7 +16,7 @@ describe('Compact', (): void => {
describe('constructor', (): void => {
it('fails on > MAX_SAFE_INTEGER', (): void => {
// eslint-disable-next-line @typescript-eslint/no-loss-of-precision, no-loss-of-precision
// eslint-disable-next-line no-loss-of-precision
expect(() => new Compact(registry, 'u128', 9007199254740999)).toThrow(/integer <= Number.MAX_SAFE_INTEGER/);
});
-1
View File
@@ -60,7 +60,6 @@ export class Compact<T extends INumber> implements ICompact<T> {
public static with<O extends INumber> (Type: CodecClass<O> | string): CodecClass<Compact<O>> {
let definition: CodecClass<O> | undefined;
// eslint-disable-next-line no-return-assign
const setDefinition = <T> (d: CodecClass<T>) =>
(definition = d as unknown as CodecClass<O>) as unknown as CodecClass<T>;
+1 -1
View File
@@ -133,7 +133,7 @@ function decodeFromJSON (registry: Registry, def: TypesDef, key: string, value?:
try {
return createFromValue(registry, def, Object.values(def)[index].index, value);
} catch (error) {
throw new Error(`Enum(${key}):: ${(error as Error).message}`);
throw new Error(`Enum(${key}):: ${(error as Error).message}`, { cause: error });
}
}
+1 -1
View File
@@ -27,7 +27,7 @@ function decodeTuple (registry: Registry, result: Codec[], value: Exclude<AnyTup
? entry
: new Types[i](registry, entry);
} catch (error) {
throw new Error(`Tuple: failed on ${i}:: ${(error as Error).message}`);
throw new Error(`Tuple: failed on ${i}:: ${(error as Error).message}`, { cause: error });
}
}
+2 -2
View File
@@ -13,9 +13,9 @@ describe('UInt', (): void => {
const registry = new TypeRegistry();
it('fails on > MAX_SAFE_INTEGER and float', (): void => {
// eslint-disable-next-line @typescript-eslint/no-loss-of-precision, no-loss-of-precision
// eslint-disable-next-line no-loss-of-precision
expect(() => new UInt(registry, 9007199254740999)).toThrow(/integer <= Number.MAX_SAFE_INTEGER/);
// eslint-disable-next-line @typescript-eslint/no-loss-of-precision, no-loss-of-precision
// eslint-disable-next-line no-loss-of-precision
expect(() => new UInt(registry, -9007199254740999)).toThrow(/integer <= Number.MAX_SAFE_INTEGER/);
expect(() => new UInt(registry, 9.123)).toThrow(/integer <= Number.MAX_SAFE_INTEGER/);
});
-2
View File
@@ -38,7 +38,6 @@ export function decodeVec<T extends Codec> (registry: Registry, result: T[], val
for (let i = 0; i < count; i++) {
// 26/08/2022 this is actually a false positive - after recent eslint upgdates
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const entry = value[i];
try {
@@ -88,7 +87,6 @@ export class Vec<T extends Codec> extends AbstractArray<T> {
public static with<O extends Codec> (Type: CodecClass<O> | string): CodecClass<Vec<O>> {
let definition: CodecClass<O> | undefined;
// eslint-disable-next-line no-return-assign
const setDefinition = <T> (d: CodecClass<T>) =>
(definition = d as unknown as CodecClass<O>) as unknown as CodecClass<T>;
@@ -33,7 +33,6 @@ export class VecFixed<T extends Codec> extends AbstractArray<T> {
public static with<O extends Codec> (Type: CodecClass<O> | string, length: number): CodecClass<VecFixed<O>> {
let definition: CodecClass<O> | undefined;
// eslint-disable-next-line no-return-assign
const setDefinition = <T> (d: CodecClass<T>) =>
(definition = d as unknown as CodecClass<O>) as unknown as CodecClass<T>;
@@ -18,7 +18,7 @@ function decodeSetFromU8a<V extends Codec> (registry: Registry, ValClass: CodecC
const [decodedLength] = decodeU8aVec(registry, result, u8a, offset, ValClass);
for (let i = 0; i < count; i++) {
output.add(result[i] as unknown as V);
output.add(result[i]);
}
return [ValClass, output, decodedLength];
@@ -76,7 +76,7 @@ describe('Type', (): void => {
registry,
new Text(registry, ' Box<Proposal> ')
).toString()
).toEqual('Proposal'); // eslint-disable-line
).toEqual('Proposal');
});
it('unwraps compact', (): void => {
+1 -1
View File
@@ -12,7 +12,7 @@ describe('Bool', (): void => {
const registry = new TypeRegistry();
describe('decode', (): void => {
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
const testDecode = (type: string, input: Uint8Array | boolean | Boolean | Bool | number, expected: boolean): void =>
it(`can decode from ${type}`, (): void => {
expect(new Bool(registry, input).toJSON()).toBe(expected);
@@ -198,9 +198,7 @@ describe('Struct', (): void => {
})
)(registry, { txt: 'foo', u32: 0x123456 });
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
expect((struct as any).txt.toString()).toEqual('foo');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
expect((struct as any).u32.toNumber()).toEqual(0x123456);
});
+1 -1
View File
@@ -77,7 +77,7 @@ function decodeStructFromObject (registry: Registry, [Types, keys]: Definition,
// ignore
}
throw new Error(`Struct: failed on ${jsonKey}: ${type}:: ${(error as Error).message}`);
throw new Error(`Struct: failed on ${jsonKey}: ${type}:: ${(error as Error).message}`, { cause: error });
}
}
@@ -7,7 +7,6 @@
import { formatDecimal, formatNumber } from '@pezkuwi/util';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type ExecFn = (...params: any[]) => unknown;
const NUM_PAD = 16;
+3 -3
View File
@@ -11,13 +11,13 @@ export type AnyFunction = (...args: any[]) => any;
export type AnyNumber = BN | bigint | Uint8Array | number | string;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
export type AnyFloat = Number | number | Uint8Array | string;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
export type AnyString = String | string;
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
export type AnyBool = Boolean | boolean;
export type AnyTuple = Codec[];
+4 -4
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2026 @pezkuwi/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './codec.js';
export * from './helpers.js';
export * from './interfaces.js';
export * from './registry.js';
export type * from './codec.js';
export type * from './helpers.js';
export type * from './interfaces.js';
export type * from './registry.js';
+1 -1
View File
@@ -66,7 +66,7 @@ export interface IStruct<K = string, V extends Codec = Codec> extends Map<K, V>,
toArray (): Codec[];
}
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
export interface IText extends String, Codec {
// nothing additional
}
+3 -3
View File
@@ -55,7 +55,7 @@ export function decodeU8a <T extends Codec = Codec> (registry: Registry, result:
i++;
}
} catch (error) {
throw new Error(formatFailure(registry, 'decodeU8a', result, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i]));
throw new Error(formatFailure(registry, 'decodeU8a', result, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i]), { cause: error });
}
return [result, offset];
@@ -85,7 +85,7 @@ export function decodeU8aStruct (registry: Registry, result: [string, Codec][],
i++;
}
} catch (error) {
throw new Error(formatFailure(registry, 'decodeU8aStruct', result, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i]));
throw new Error(formatFailure(registry, 'decodeU8aStruct', result, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i]), { cause: error });
}
return [result, offset];
@@ -116,7 +116,7 @@ export function decodeU8aVec <T extends Codec = Codec> (registry: Registry, resu
i++;
}
} catch (error) {
throw new Error(formatFailure(registry, 'decodeU8aVec', result, error as Error, u8a.subarray(offset), i, count, Type));
throw new Error(formatFailure(registry, 'decodeU8aVec', result, error as Error, u8a.subarray(offset), i, count, Type), { cause: error });
}
return [offset, offset - startAt];
+1 -2
View File
@@ -34,11 +34,10 @@ function isNumberLike (arg: SortArg): arg is BN | bigint | number {
/** @internal */
function sortArray (a: Uint8Array | Codec[] | number[], b: Uint8Array | Codec[] | number[]): number {
// Vec, Tuple, Bytes etc.
let sortRes = 0;
const minLen = Math.min(a.length, b.length);
for (let i = 0; i < minLen; ++i) {
sortRes = sortAsc(a[i], b[i]);
const sortRes = sortAsc(a[i], b[i]);
if (sortRes !== 0) {
return sortRes;
+2 -3
View File
@@ -120,7 +120,7 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
Clazz.prototype.toRawType = function (): string {
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call
return `Linkage<${this.next.toRawType(true)}>`;
};
@@ -155,7 +155,6 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
[TypeDefInfo.Result]: (_registry: Registry, value: TypeDef): CodecClass<Codec> => {
const [Ok, Err] = getTypeClassArray(value);
// eslint-disable-next-line @typescript-eslint/no-use-before-define
return Result.with({ Err, Ok });
},
@@ -233,7 +232,7 @@ export function constructTypeClass<T extends Codec = Codec> (registry: Registry,
return Type as CodecClass<T>;
} catch (error) {
throw new Error(`Unable to construct class from ${stringify(typeDef)}: ${(error as Error).message}`);
throw new Error(`Unable to construct class from ${stringify(typeDef)}: ${(error as Error).message}`, { cause: error });
}
}
+1 -1
View File
@@ -70,7 +70,7 @@ function initType<T extends Codec> (registry: Registry, Type: CodecClass, params
// runtime error.
export function createTypeUnsafe<T extends Codec = Codec, K extends string = string> (registry: Registry, type: K, params: unknown[] = [], options: CreateOptions = {}): T {
let Clazz: CodecClass | null = null;
let firstError: Error | null = null;
let firstError: Error;
try {
Clazz = createClassUnsafe(registry, type);
+1 -1
View File
@@ -7,5 +7,5 @@ import './augmentRegistry.js';
export type { CodecCreateOptions as CreateOptions } from '@pezkuwi/types-codec/types';
// all starred
export * from './lookup.js';
export type * from './lookup.js';
export * from './types.js';
@@ -1,8 +1,6 @@
// Copyright 2017-2026 @pezkuwi/types-known authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable sort-keys */
import type { OverrideVersionedType } from '@pezkuwi/types/types';
export const versioned: OverrideVersionedType[] = [
-2
View File
@@ -1,8 +1,6 @@
// Copyright 2017-2026 @pezkuwi/types-known authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable sort-keys */
import type { OverrideVersionedType } from '@pezkuwi/types/types';
export const versioned: OverrideVersionedType[] = [
@@ -1,14 +1,11 @@
// Copyright 2017-2026 @pezkuwi/types-known authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable sort-keys */
import type { OverrideVersionedType } from '@pezkuwi/types/types';
import { mapXcmTypes } from '@pezkuwi/types-create';
// structs need to be in order
/* eslint-disable sort-keys */
const sharedTypes = {
DispatchErrorModule: 'DispatchErrorModuleU8',
-2
View File
@@ -1,8 +1,6 @@
// Copyright 2017-2026 @pezkuwi/types-known authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable sort-keys */
import type { OverrideVersionedType } from '@pezkuwi/types/types';
export const versioned: OverrideVersionedType[] = [
@@ -35,7 +35,7 @@ for (const chain of keys) {
// SPDX-License-Identifier: Apache-2.0
// Auto-generated from on-chain data & manual definitions, do not edit
/* eslint-disable quotes, comma-spacing */
/* eslint-disable @stylistic/quotes, @stylistic/comma-spacing */
import type { ChainUpgradesExpanded } from '../types.js';
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// Auto-generated from on-chain data & manual definitions, do not edit
/* eslint-disable quotes, comma-spacing */
import type { ChainUpgradesExpanded } from '../types.js';
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// Auto-generated from on-chain data & manual definitions, do not edit
/* eslint-disable quotes, comma-spacing */
import type { ChainUpgradesExpanded } from '../types.js';
-1
View File
@@ -4,7 +4,6 @@
// Be able to import json in TS
// https://stackoverflow.com/questions/49996456/importing-json-file-in-typescript
declare module '*.json' {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const value: any;
export default value;
@@ -1,8 +1,6 @@
// Copyright 2017-2026 @pezkuwi/types-support authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable */
// cargo run --release -- purge-chain -y --dev && cargo run --release -- --dev
export default '0x6d6574610e7d02000c1c73705f636f72651863727970746f2c4163636f756e7449643332000004000401205b75383b2033325d0000040000032000000008000800000503000c08306672616d655f73797374656d2c4163636f756e74496e666f08144e6f6e636501102c4163636f756e74446174610114001401146e6f6e63651001144e6f6e6365000124636f6e73756d657273100120526566436f756e7400012470726f766964657273100120526566436f756e7400012c73756666696369656e7473100120526566436f756e740001106461746114012c4163636f756e74446174610000100000050500140c3c70616c6c65745f62616c616e6365731474797065732c4163636f756e7444617461041c42616c616e63650118001001106672656518011c42616c616e6365000120726573657276656418011c42616c616e636500011866726f7a656e18011c42616c616e6365000114666c6167731c01284578747261466c61677300001800000507001c0c3c70616c6c65745f62616c616e636573147479706573284578747261466c61677300000400180110753132380000200c346672616d655f737570706f7274206469737061746368405065724469737061746368436c6173730404540124000c01186e6f726d616c2401045400012c6f7065726174696f6e616c240104540001246d616e6461746f7279240104540000240c2873705f77656967687473247765696768745f76321857656967687400000801207265665f74696d6528010c75363400012870726f6f665f73697a6528010c7536340000280000062c002c000005060030083c7072696d69746976655f74797065731048323536000004000401205b75383b2033325d000034000002080038102873705f72756e74696d651c67656e65726963186469676573741844696765737400000401106c6f67733c013c5665633c4469676573744974656d3e00003c000002400040102873705f72756e74696d651c67656e6572696318646967657374284469676573744974656d0001142850726552756e74696d650800440144436f6e73656e737573456e67696e654964000034011c5665633c75383e00060024436f6e73656e7375730800440144436f6e73656e737573456e67696e654964000034011c5665633c75383e000400105365616c0800440144436f6e73656e737573456e67696e654964000034011c5665633c75383e000500144f74686572040034011c5665633c75383e0000006452756e74696d65456e7669726f6e6d656e74557064617465640008000044000003040000000800480000024c004c08306672616d655f73797374656d2c4576656e745265636f7264080445015004540130000c01147068617365ac011450686173650001146576656e7450010445000118746f70696373b001185665633c543e0000500858636f6e7472616374735f6e6f64655f72756e74696d653052756e74696d654576656e7400011c1853797374656d04005401706672616d655f73797374656d3a3a4576656e743c52756e74696d653e0000001c5574696c697479040078015470616c6c65745f7574696c6974793a3a4576656e740002002042616c616e636573040084017c70616c6c65745f62616c616e6365733a3a4576656e743c52756e74696d653e000400485472616e73616374696f6e5061796d656e7404008c01a870616c6c65745f7472616e73616374696f6e5f7061796d656e743a3a4576656e743c52756e74696d653e000600105375646f040090016c70616c6c65745f7375646f3a3a4576656e743c52756e74696d653e00070024436f6e747261637473040098018070616c6c65745f636f6e7472616374733a3a4576656e743c52756e74696d653e000800184173736574730400a4017470616c6c65745f6173736574733a3a4576656e743c52756e74696d653e00090000540c306672616d655f73797374656d1870616c6c6574144576656e740404540001184045787472696e7369635375636365737304013464697370617463685f696e666f5801304469737061746368496e666f00000490416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c656408013864697370617463685f6572726f7264013444697370617463684572726f7200013464697370617463685f696e666f5801304469737061746368496e666f00010450416e2065787472696e736963206661696c65642e2c436f64655570646174656400020450603a636f6465602077617320757064617465642e284e65774163636f756e7404011c6163636f756e74000130543a3a4163636f756e7449640003046841206e6577206163636f756e742077617320637265617465642e344b696c6c65644163636f756e7404011c6163636f756e74000130543a3a4163636f756e74496400040458416e206163636f756e7420776173207265617065642e2052656d61726b656408011873656e646572000130543a3a4163636f756e7449640001106861736830011c543a3a48617368000504704f6e206f6e2d636861696e2072656d61726b2068617070656e65642e04704576656e7420666f72207468652053797374656d2070616c6c65742e580c346672616d655f737570706f7274206469737061746368304469737061746368496e666f00000c0118776569676874240118576569676874000114636c6173735c01344469737061746368436c617373000120706179735f6665656001105061797300005c0c346672616d655f737570706f7274206469737061746368344469737061746368436c61737300010c184e6f726d616c0000002c4f7065726174696f6e616c000100244d616e6461746f727900020000600c346672616d655f737570706f727420646973706174636810506179730001080c596573000000084e6f0001000064082873705f72756e74696d653444697370617463684572726f72000138144f746865720000003043616e6e6f744c6f6f6b7570000100244261644f726967696e000200184d6f64756c65040068012c4d6f64756c654572726f7200030044436f6e73756d657252656d61696e696e670004002c4e6f50726f76696465727300050040546f6f4d616e79436f6e73756d65727300060014546f6b656e04006c0128546f6b656e4572726f720007002841726974686d65746963040070013c41726974686d657469634572726f72000800345472616e73616374696f6e616c04007401485472616e73616374696f6e616c4572726f7200090024457868617573746564000a0028436f7272757074696f6e000b002c556e617661696c61626c65000c0038526f6f744e6f74416c6c6f776564000d000068082873705f72756e74696d652c4d6f64756c654572726f72000008011Line truncated
@@ -1,8 +1,6 @@
// Copyright 2017-2026 @pezkuwi/types-support authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable */
// cargo run --release -- purge-chain -y --dev && cargo run --release -- --dev
export default '0x6d6574610ec50e000c1c73705f636f72651863727970746f2c4163636f756e7449643332000004000401205b75383b2033325d0000040000032000000008000800000503000c08306672616d655f73797374656d2c4163636f756e74496e666f08144e6f6e636501102c4163636f756e74446174610114001401146e6f6e63651001144e6f6e6365000124636f6e73756d657273100120526566436f756e7400012470726f766964657273100120526566436f756e7400012c73756666696369656e7473100120526566436f756e740001106461746114012c4163636f756e74446174610000100000050500140c3c70616c6c65745f62616c616e6365731474797065732c4163636f756e7444617461041c42616c616e63650118001001106672656518011c42616c616e6365000120726573657276656418011c42616c616e636500011866726f7a656e18011c42616c616e6365000114666c6167731c01284578747261466c61677300001800000507001c0c3c70616c6c65745f62616c616e636573147479706573284578747261466c61677300000400180110753132380000200000050000240c346672616d655f737570706f7274206469737061746368405065724469737061746368436c6173730404540128000c01186e6f726d616c2801045400012c6f7065726174696f6e616c280104540001246d616e6461746f7279280104540000280c2873705f77656967687473247765696768745f76321857656967687400000801207265665f74696d652c010c75363400012870726f6f665f73697a652c010c75363400002c000006300030000005060034083c7072696d69746976655f74797065731048323536000004000401205b75383b2033325d00003800000208003c102873705f72756e74696d651c67656e65726963186469676573741844696765737400000401106c6f677340013c5665633c4469676573744974656d3e000040000002440044102873705f72756e74696d651c67656e6572696318646967657374284469676573744974656d0001142850726552756e74696d650800480144436f6e73656e737573456e67696e654964000038011c5665633c75383e00060024436f6e73656e7375730800480144436f6e73656e737573456e67696e654964000038011c5665633c75383e000400105365616c0800480144436f6e73656e737573456e67696e654964000038011c5665633c75383e000500144f74686572040038011c5665633c75383e0000006452756e74696d65456e7669726f6e6d656e745570646174656400080000480000030400000008004c00000250005008306672616d655f73797374656d2c4576656e745265636f7264080445015404540134000c011470686173650508011450686173650001146576656e7454010445000118746f706963731d0501185665633c543e000054084c6b69746368656e73696e6b5f72756e74696d653052756e74696d654576656e74000111011853797374656d04005801706672616d655f73797374656d3a3a4576656e743c52756e74696d653e0000001c5574696c69747904007c015470616c6c65745f7574696c6974793a3a4576656e740001001c496e6469636573040088017870616c6c65745f696e64696365733a3a4576656e743c52756e74696d653e0005002042616c616e63657304008c017c70616c6c65745f62616c616e6365733a3a4576656e743c52756e74696d653e000600485472616e73616374696f6e5061796d656e7404009401a870616c6c65745f7472616e73616374696f6e5f7061796d656e743a3a4576656e743c52756e74696d653e00070038417373657454785061796d656e74040098019c70616c6c65745f61737365745f74785f7061796d656e743a3a4576656e743c52756e74696d653e000800604173736574436f6e76657273696f6e54785061796d656e740400a001c870616c6c65745f61737365745f636f6e76657273696f6e5f74785f7061796d656e743a3a4576656e743c52756e74696d653e00090068456c656374696f6e50726f76696465724d756c746950686173650400a401d070616c6c65745f656c656374696f6e5f70726f76696465725f6d756c74695f70686173653a3a4576656e743c52756e74696d653e000a001c5374616b696e670400bc017870616c6c65745f7374616b696e673a3a4576656e743c52756e74696d653e000b001c53657373696f6e0400d4015470616c6c65745f73657373696f6e3a3a4576656e74000c002444656d6f63726163790400d8018070616c6c65745f64656d6f63726163793a3a4576656e743c52756e74696d653e000d001c436f756e63696c0400ec01fc70616c6c65745f636f6c6c6563746976653a3a4576656e743c52756e74696d652c2070616c6c65745f636f6c6c6563746976653a3a496e7374616e6365313e000e0048546563686e6963616c436f6d6d69747465650400f001fc70616c6c65745f636f6c6c6563746976653a3a4576656e743c52756e74696d652c2070616c6c65745f636f6c6c6563746976653a3a496e7374616e6365323e000f0024456c656374696f6e730400f401a470616c6c65745f656c656374696f6e735f70687261676d656e3a3a4576656e743c52756e74696d653e0010004c546563686e6963616c4d656d626572736869700400010101fc70616c6c65745f6d656d626572736869703a3a4576656e743c52756e74696d652c2070616c6c65745f6d656d626572736869703a3a496e7374616e6365313e0011001c4772616e64706104000501015470616c6c65745f6772616e6470613a3a4576656e7400120020547265617375727904001501017c70616c6c65745f74726561737572793a3a4576656e743c52756e74696d653e0013002441737365745261746504001901018470616c6c65745f61737365745f726174653a3a4576656e743c52756e74696d653e00140024436f6e74726163747304002101018070616c6c65745f636f6e7472616374733a3a4576656e743c52756e74696d653e001500105375646f04002d01016c70616c6c65745f7375646f3a3a4576656e743c52756e74696d653e00160020496d4f6e6c696e6504003101018070616c6c65745f696d5f6f6e6c696e653a3a4576656e743c52756e74696d653e001700204f6666656e63657304005101015870616c6c65745f6f6666656e6365733a3a4576656e74001900204964656e7469747904005901017c70616c6c65745f6964656e746974793a3a4576656e743c52756e74696d653e001c001c536f636965747904006101017870616c6c65745f736f63696574793a3a4576656e743c52756e74696d653e001d00205265636f7665727904006d01017c70616c6c65745f7265636f766572793a3a4576656e743c52756e74696d653e001e001c566573746Line truncated
Loaded 100 of 166 files, more files were not shown because too many files have changed in this diff. Show more