From f61ec5aa50bb4fd53b862c9f3caa2bbf0d642d97 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Thu, 28 Sep 2023 14:17:14 +0000 Subject: [PATCH] feat: add dmpQueue event section --- --- a/tests/src/util/playgrounds/unique.dev.ts +++ b/tests/src/util/playgrounds/unique.dev.ts @@ -9,7 +9,7 @@ import {IKeyringPair} from '@polkadot/types/types'; import {EventRecord} from '@polkadot/types/interfaces'; import {ICrossAccountId, ILogger, IPovInfo, ISchedulerOptions, ITransactionResult, TSigner} from './types'; -import {FrameSystemEventRecord, XcmV2TraitsError} from '@polkadot/types/lookup'; +import {FrameSystemEventRecord, XcmV2TraitsError, XcmV3TraitsOutcome} from '@polkadot/types/lookup'; import {SignerOptions, VoidFn} from '@polkadot/api/types'; import {Pallets} from '..'; import {spawnSync} from 'child_process'; @@ -260,6 +260,12 @@ outcome: eventData(data, 1), })); }; + + static DmpQueue = class extends EventSection('dmpQueue') { + static ExecutedDownward = this.Method('ExecutedDownward', data => ({ + outcome: eventData(data, 1), + })); + }; } // eslint-disable-next-line @typescript-eslint/naming-convention @@ -559,6 +565,12 @@ super(logger, options); this.wait = new WaitGroup(this); } + + getSudo() { + // eslint-disable-next-line @typescript-eslint/naming-convention + const SudoHelperType = SudoHelper(this.helperBase); + return this.clone(SudoHelperType) as DevRelayHelper; + } } export class DevWestmintHelper extends WestmintHelper { @@ -968,6 +980,31 @@ ], }; } + + makeTransactProgram(info: {weightMultiplier: number, call: string}) { + return { + V3: [ + { + UnpaidExecution: { + weightLimit: 'Unlimited', + checkOrigin: null, + }, + }, + { + Transact: { + originKind: 'Superuser', + requireWeightAtMost: { + refTime: info.weightMultiplier * 200000000, + proofSize: info.weightMultiplier * 3000, + }, + call: { + encoded: info.call, + }, + }, + }, + ], + }; + } } class MoonbeamAccountGroup { @@ -1501,4 +1538,4 @@ ); } }; -} \ No newline at end of file +} -- gitstuff