From 2ca7895420b4efb60e8632f4e4d72a53eb617657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Fri, 29 Aug 2025 03:23:04 +0100 Subject: [PATCH 01/18] Rename test account module Also, create new `testAccounts` object. --- packages/networks/src/chains/acala.ts | 2 +- packages/networks/src/chains/assethub.ts | 3 +- packages/networks/src/chains/astar.ts | 2 +- packages/networks/src/chains/bridgehub.ts | 2 +- packages/networks/src/chains/collectives.ts | 2 +- packages/networks/src/chains/coretime.ts | 2 +- packages/networks/src/chains/hydration.ts | 2 +- packages/networks/src/chains/integritee.ts | 2 +- packages/networks/src/chains/moonbeam.ts | 2 +- packages/networks/src/chains/people.ts | 2 +- packages/networks/src/chains/polkadot.ts | 3 +- packages/networks/src/index.ts | 2 +- .../{defaultAccounts.ts => testAccounts.ts} | 35 ++++++++++++++++++- 13 files changed, 48 insertions(+), 13 deletions(-) rename packages/networks/src/{defaultAccounts.ts => testAccounts.ts} (56%) diff --git a/packages/networks/src/chains/acala.ts b/packages/networks/src/chains/acala.ts index d7d28a754..07a664e70 100644 --- a/packages/networks/src/chains/acala.ts +++ b/packages/networks/src/chains/acala.ts @@ -1,5 +1,5 @@ -import { defaultAccounts } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts } from '../testAccounts.js' const custom = { acala: { diff --git a/packages/networks/src/chains/assethub.ts b/packages/networks/src/chains/assethub.ts index ae61fa3a4..70a900a3e 100644 --- a/packages/networks/src/chains/assethub.ts +++ b/packages/networks/src/chains/assethub.ts @@ -1,5 +1,5 @@ -import { defaultAccounts, defaultAccountsSr25519 } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts, defaultAccountsSr25519, testAccounts } from '../testAccounts.js' const custom = { assetHubPolkadot: { @@ -47,6 +47,7 @@ const getInitStorages = (config: typeof custom.assetHubPolkadot | typeof custom. account: [ [[defaultAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], [[defaultAccountsSr25519.alice.address], { providers: 1, data: { free: 1000e10 } }], + [[testAccounts.alice.address], { providers: 1, data: { free: 110000n * 10n ** 10n } }], ], }, Assets: { diff --git a/packages/networks/src/chains/astar.ts b/packages/networks/src/chains/astar.ts index 0b8dee925..a27798a53 100644 --- a/packages/networks/src/chains/astar.ts +++ b/packages/networks/src/chains/astar.ts @@ -1,5 +1,5 @@ -import { defaultAccounts } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts } from '../testAccounts.js' const custom = { astar: { diff --git a/packages/networks/src/chains/bridgehub.ts b/packages/networks/src/chains/bridgehub.ts index 3f9c31ee2..a0a4ec075 100644 --- a/packages/networks/src/chains/bridgehub.ts +++ b/packages/networks/src/chains/bridgehub.ts @@ -1,5 +1,5 @@ -import { defaultAccounts, defaultAccountsSr25519 } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' const custom = { bridgeHubPolkadot: { diff --git a/packages/networks/src/chains/collectives.ts b/packages/networks/src/chains/collectives.ts index 16ddcfd58..6ca0b14bd 100644 --- a/packages/networks/src/chains/collectives.ts +++ b/packages/networks/src/chains/collectives.ts @@ -1,5 +1,5 @@ -import { defaultAccounts, defaultAccountsSr25519 } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' const custom = { collectivesPolkadot: { diff --git a/packages/networks/src/chains/coretime.ts b/packages/networks/src/chains/coretime.ts index bc30eb8a2..b646d29a0 100644 --- a/packages/networks/src/chains/coretime.ts +++ b/packages/networks/src/chains/coretime.ts @@ -1,5 +1,5 @@ -import { defaultAccounts, defaultAccountsSr25519 } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' const custom = { coretimePolkadot: { diff --git a/packages/networks/src/chains/hydration.ts b/packages/networks/src/chains/hydration.ts index 2bbc4dadd..277cc0d9d 100644 --- a/packages/networks/src/chains/hydration.ts +++ b/packages/networks/src/chains/hydration.ts @@ -1,5 +1,5 @@ -import { defaultAccounts } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts } from '../testAccounts.js' const custom = { hydration: { diff --git a/packages/networks/src/chains/integritee.ts b/packages/networks/src/chains/integritee.ts index c4320ca40..0544c27d2 100644 --- a/packages/networks/src/chains/integritee.ts +++ b/packages/networks/src/chains/integritee.ts @@ -1,5 +1,5 @@ -import { defaultAccounts, defaultAccountsSr25519 } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' const custom = { integriteePolkadot: { diff --git a/packages/networks/src/chains/moonbeam.ts b/packages/networks/src/chains/moonbeam.ts index c49c45ed6..ea2ad4ee8 100644 --- a/packages/networks/src/chains/moonbeam.ts +++ b/packages/networks/src/chains/moonbeam.ts @@ -1,5 +1,5 @@ -import { defaultAccounts } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts } from '../testAccounts.js' const custom = { moonbeam: { diff --git a/packages/networks/src/chains/people.ts b/packages/networks/src/chains/people.ts index 8302292a1..e91645c6b 100644 --- a/packages/networks/src/chains/people.ts +++ b/packages/networks/src/chains/people.ts @@ -1,5 +1,5 @@ -import { defaultAccounts, defaultAccountsSr25519 } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' const custom = { peoplePolkadot: { diff --git a/packages/networks/src/chains/polkadot.ts b/packages/networks/src/chains/polkadot.ts index 1805fc721..cc351e274 100644 --- a/packages/networks/src/chains/polkadot.ts +++ b/packages/networks/src/chains/polkadot.ts @@ -1,5 +1,5 @@ -import { defaultAccounts, defaultAccountsSr25519 } from '../defaultAccounts.js' import { defineChain } from '../defineChain.js' +import { defaultAccounts, defaultAccountsSr25519, testAccounts } from '../testAccounts.js' const custom = { polkadot: { @@ -15,6 +15,7 @@ const getInitStorages = () => ({ Account: [ [[defaultAccounts.alice.address], { providers: 1, data: { free: 1000 * 1e10 } }], [[defaultAccountsSr25519.alice.address], { providers: 1, data: { free: 1000 * 1e10 } }], + [[testAccounts.alice.address], { providers: 1, data: { free: 1000 * 1e10 } }], ], }, ParasDisputes: { diff --git a/packages/networks/src/index.ts b/packages/networks/src/index.ts index 01cdd234c..241a5fa4a 100644 --- a/packages/networks/src/index.ts +++ b/packages/networks/src/index.ts @@ -1,4 +1,4 @@ export * from './captureSnapshot.js' export * from './createNetwork.js' -export * from './defaultAccounts.js' +export * from './testAccounts.js' export * from './types.js' diff --git a/packages/networks/src/defaultAccounts.ts b/packages/networks/src/testAccounts.ts similarity index 56% rename from packages/networks/src/defaultAccounts.ts rename to packages/networks/src/testAccounts.ts index 28c4fbfa9..d4c041279 100644 --- a/packages/networks/src/defaultAccounts.ts +++ b/packages/networks/src/testAccounts.ts @@ -1,6 +1,6 @@ import { testingPairs } from '@acala-network/chopsticks-testing' -import type { Keyring } from '@polkadot/keyring' +import { Keyring } from '@polkadot/keyring' import type { KeyringInstance, KeyringPair } from '@polkadot/keyring/types' import { cryptoWaitReady } from '@polkadot/util-crypto' @@ -36,3 +36,36 @@ export const defaultAccounts: DefaultAccounts = testingPairs() as DefaultAccount export const defaultAccountsSr25519: DefaultAccounts = (await cryptoWaitReady().then(() => testingPairs('sr25519'), )) as DefaultAccounts + +/** + * Type of object containing test accounts without eth keypairs. + */ +export type TestAccounts = { + alice: KeyringPair + bob: KeyringPair + charlie: KeyringPair + dave: KeyringPair + eve: KeyringPair + ferdie: KeyringPair + keyring: Keyring +} + +/** + * Fresh test accounts with seeds different from those used by PJS. + * + * These accounts use fresh seeds to avoid conflicts with existing dev accounts + * that may have been used in testnets. + */ +export const testAccounts: TestAccounts = await cryptoWaitReady().then(() => { + const keyring = new Keyring({ type: 'sr25519' }) + + return { + alice: keyring.addFromUri('//fresh_alice'), + bob: keyring.addFromUri('//fresh_bob'), + charlie: keyring.addFromUri('//fresh_charlie'), + dave: keyring.addFromUri('//fresh_dave'), + eve: keyring.addFromUri('//fresh_eve'), + ferdie: keyring.addFromUri('//fresh_ferdie'), + keyring, + } +}) From c18c5554788d9805594228a3821b092b10d5d1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Mon, 1 Sep 2025 13:55:29 +0100 Subject: [PATCH 02/18] Update test accounts and scheduling in tests To run these tests in post-migration Asset Hubs, the scheduling technique used to coerce execution of extrinsics with origins other than signed must change to allow use of non-local block providers. Also, when running these tests in testnets, some of the default dev accounts have dirty states, so this commit begins the move to fresh accounts in E2E. Lastly, in some locations `scheduleInlineCallWithOrigin` was used without an `await` before it, which led to occasionally wrong behavior. --- packages/networks/src/chains/assethub.ts | 2 +- packages/shared/src/governance.ts | 4 +- packages/shared/src/helpers/index.ts | 33 +- packages/shared/src/scheduler.ts | 38 +- packages/shared/src/staking.ts | 420 +++++++++++++---------- packages/shared/src/vesting.ts | 4 +- vitest.config.mts | 1 + 7 files changed, 291 insertions(+), 211 deletions(-) diff --git a/packages/networks/src/chains/assethub.ts b/packages/networks/src/chains/assethub.ts index 70a900a3e..c942a8bef 100644 --- a/packages/networks/src/chains/assethub.ts +++ b/packages/networks/src/chains/assethub.ts @@ -47,7 +47,7 @@ const getInitStorages = (config: typeof custom.assetHubPolkadot | typeof custom. account: [ [[defaultAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], [[defaultAccountsSr25519.alice.address], { providers: 1, data: { free: 1000e10 } }], - [[testAccounts.alice.address], { providers: 1, data: { free: 110000n * 10n ** 10n } }], + [[testAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], ], }, Assets: { diff --git a/packages/shared/src/governance.ts b/packages/shared/src/governance.ts index 13a945442..604cf16ed 100644 --- a/packages/shared/src/governance.ts +++ b/packages/shared/src/governance.ts @@ -546,7 +546,7 @@ export async function referendumLifecycleTest< // Cancel the referendum using the scheduler pallet to simulate a root origin - scheduleInlineCallWithOrigin(client, cancelRefCall.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelRefCall.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -795,7 +795,7 @@ export async function referendumLifecycleKillTest< * Kill the referendum using the scheduler pallet to simulate a root origin for the call. */ - scheduleInlineCallWithOrigin(client, killRefCall.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, killRefCall.method.toHex(), { system: 'Root' }) await client.dev.newBlock() diff --git a/packages/shared/src/helpers/index.ts b/packages/shared/src/helpers/index.ts index 8533d21e1..5bf7d67a8 100644 --- a/packages/shared/src/helpers/index.ts +++ b/packages/shared/src/helpers/index.ts @@ -1,7 +1,7 @@ import type { StorageValues } from '@acala-network/chopsticks' import { sendTransaction, setupCheck } from '@acala-network/chopsticks-testing' -import { defaultAccounts } from '@e2e-test/networks' +import { Chain, defaultAccounts } from '@e2e-test/networks' import type { ApiPromise } from '@polkadot/api' import type { KeyringPair } from '@polkadot/keyring/types' @@ -10,6 +10,8 @@ import type { HexString } from '@polkadot/util/types' import { assert, expect } from 'vitest' +import { match } from 'ts-pattern' + const { check, checkEvents, checkHrmp, checkSystemEvents, checkUmp } = setupCheck({ expectFn: (x: any) => ({ toMatchSnapshot(msg?: string): void { @@ -89,12 +91,22 @@ export function objectCmp( } } +/** + * This enum is used when scheduling calls, to know whether the scheduling is: + * 1. on a relay chain, using an RPC call to get the current block number, or + * 2. on a system parachain, using that parachain's last known relay chain block number. + */ +export type RelayOrPara = 'Relay' | 'Para' + /** * Given a PJS client and a call, modify the `scheduler` pallet's `agenda` storage to execute the extrinsic in the next * block. * * The call can be either an inline call or a lookup call, which in the latter case *must* have been noted * in the storage of the chain's `preimage` pallet with a `notePreimage` extrinsic. + * + * @param relayOrPara Whether the call is being scheduled on a parachain. This parachain's runtime *must* have the + * scheduler pallet available. */ export async function scheduleCallWithOrigin( client: { @@ -112,14 +124,17 @@ export async function scheduleCallWithOrigin( } }, origin: any, + relayOrPara: RelayOrPara = 'Relay', ) { - const number = (await client.api.rpc.chain.getHeader()).number.toNumber() + const scheduledBlock = await match(relayOrPara) + .with('Relay', async () => (await client.api.rpc.chain.getHeader()).number.toNumber() + 1) + .otherwise(async () => (await client.api.query.parachainSystem.lastRelayChainBlockNumber()).toNumber()) await client.dev.setStorage({ Scheduler: { agenda: [ [ - [number + 1], + [scheduledBlock], [ { call, @@ -145,8 +160,9 @@ export async function scheduleInlineCallWithOrigin( }, encodedCall: HexString, origin: any, + relayOrPara: RelayOrPara = 'Relay', ) { - await scheduleCallWithOrigin(client, { Inline: encodedCall }, origin) + await scheduleCallWithOrigin(client, { Inline: encodedCall }, origin, relayOrPara) } /** @@ -162,8 +178,9 @@ export async function scheduleLookupCallWithOrigin( }, lookupCall: { hash: any; len: any }, origin: any, + isParachain: RelayOrPara = 'Relay', ) { - await scheduleCallWithOrigin(client, { Lookup: lookupCall }, origin) + await scheduleCallWithOrigin(client, { Lookup: lookupCall }, origin, isParachain) } /** @@ -336,3 +353,9 @@ export async function setValidatorsStorage( }, }) } + +export interface TestConfig { + testSuiteName: string + addressEncoding: number + relayOrPara: RelayOrPara +} diff --git a/packages/shared/src/scheduler.ts b/packages/shared/src/scheduler.ts index ab9f320db..aea69f9a9 100644 --- a/packages/shared/src/scheduler.ts +++ b/packages/shared/src/scheduler.ts @@ -124,7 +124,7 @@ export async function cancelScheduledTaskBadOriginTest< const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 2, null, 0, call) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -170,7 +170,7 @@ export async function cancelNamedScheduledTaskBadOriginTest< const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, currBlockNumber + 2, null, 0, call) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -215,7 +215,7 @@ export async function scheduledCallExecutes< let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 2, null, 0, adjustIssuanceTx) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) const oldTotalIssuance = await client.api.query.balances.totalIssuance() @@ -276,7 +276,7 @@ export async function scheduledNamedCallExecutes< let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, currBlockNumber + 2, null, 0, adjustIssuanceTx) - scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) const oldTotalIssuance = await client.api.query.balances.totalIssuance() @@ -335,7 +335,7 @@ export async function cancelScheduledTask< let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 3, null, 0, adjustIssuanceTx) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() currBlockNumber += 1 @@ -346,7 +346,7 @@ export async function cancelScheduledTask< const cancelTx = client.api.tx.scheduler.cancel(currBlockNumber + 2, 0) - scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() currBlockNumber += 1 @@ -387,7 +387,7 @@ export async function cancelScheduledNamedTask< let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, currBlockNumber + 3, null, 0, adjustIssuanceTx) - scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() currBlockNumber += 1 @@ -398,7 +398,7 @@ export async function cancelScheduledNamedTask< const cancelTx = client.api.tx.scheduler.cancelNamed(taskId) - scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() currBlockNumber += 1 @@ -439,7 +439,7 @@ export async function scheduleTaskAfterDelay< let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleTx = client.api.tx.scheduler.scheduleAfter(1, null, 0, adjustIssuanceTx) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() currBlockNumber += 1 @@ -505,7 +505,7 @@ export async function scheduleNamedTaskAfterDelay< let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleNamedTx = client.api.tx.scheduler.scheduleNamedAfter(taskId, 1, null, 0, adjustIssuanceTx) - scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() currBlockNumber += 1 @@ -583,7 +583,7 @@ export async function scheduledOverweightCallFails< let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 2, null, 0, withWeightTx) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -813,7 +813,7 @@ async function testPeriodicTask< ) { const [client] = await setupNetworks(chain) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) const initialTotalIssuance = await client.api.query.balances.totalIssuance() const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) @@ -1123,7 +1123,7 @@ export async function scheduleWithRetryConfig< // Schedule the task first const scheduleTx = client.api.tx.scheduler.schedule(initialBlockNumber + 3, null, 1, failingTx) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) // Move to scheduling block await client.dev.newBlock() @@ -1140,7 +1140,7 @@ export async function scheduleWithRetryConfig< retryConfig.totalRetries, retryConfig.period, ) - scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -1176,7 +1176,7 @@ export async function scheduleWithRetryConfig< }) const cancelRetryTx = client.api.tx.scheduler.cancelRetry([initialBlockNumber + 6, 0]) - scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -1240,7 +1240,7 @@ export async function scheduleNamedWithRetryConfig< // Schedule the named task first const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, initialBlockNumber + 3, null, 1, failingTx) - scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) // Move to scheduling block await client.dev.newBlock() @@ -1253,7 +1253,7 @@ export async function scheduleNamedWithRetryConfig< // Set retry configuration const setRetryTx = client.api.tx.scheduler.setRetryNamed(taskId, retryConfig.totalRetries, retryConfig.period) - scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -1293,7 +1293,7 @@ export async function scheduleNamedWithRetryConfig< }) let cancelRetryTx = client.api.tx.scheduler.cancelRetryNamed(taskId) - scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -1347,7 +1347,7 @@ export async function scheduleNamedWithRetryConfig< // Cancel the retry configuration with `cancelRetry` cancelRetryTx = client.api.tx.scheduler.cancelRetry([initialBlockNumber + 9, 0]) - scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index 0a5b8d4df..22837762c 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -1,6 +1,6 @@ import { sendTransaction } from '@acala-network/chopsticks-testing' -import { type Chain, defaultAccountsSr25519 } from '@e2e-test/networks' +import { type Chain, testAccounts } from '@e2e-test/networks' import { type Client, type RootTestTree, setupNetworks } from '@e2e-test/shared' import type { SubmittableExtrinsic } from '@polkadot/api/types' @@ -13,7 +13,14 @@ import { encodeAddress } from '@polkadot/util-crypto' import { assert, expect } from 'vitest' import BN from 'bn.js' -import { check, checkEvents, checkSystemEvents, expectPjsEqual, scheduleInlineCallWithOrigin } from './helpers/index.js' +import { + check, + checkEvents, + checkSystemEvents, + expectPjsEqual, + scheduleInlineCallWithOrigin, + type TestConfig, +} from './helpers/index.js' /// ------- /// Helpers @@ -112,9 +119,10 @@ async function validateNoBondedFundsFailureTest< TInitStorages extends Record> | undefined, >(chain: Chain) { const [client] = await setupNetworks(chain) + // 1e7 is 1% commission const validateTx = client.api.tx.staking.validate({ commission: 1e7, blocked: false }) - await sendTransaction(validateTx.signAsync(defaultAccountsSr25519.alice)) + await sendTransaction(validateTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -148,8 +156,8 @@ async function nominateNoBondedFundsFailureTest< const [client] = await setupNetworks(chain) // The empty list of targets is only checked *after* the extrinsic's origin, as it should, // so anything can be given here. - const nominateTx = client.api.tx.staking.nominate([defaultAccountsSr25519.alice.address]) - await sendTransaction(nominateTx.signAsync(defaultAccountsSr25519.alice)) + const nominateTx = client.api.tx.staking.nominate([testAccounts.alice.address]) + await sendTransaction(nominateTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -193,7 +201,7 @@ async function nominateNoBondedFundsFailureTest< async function stakingLifecycleTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) /// /// Generate validators, and fund them. @@ -204,13 +212,17 @@ async function stakingLifecycleTest< const validators: KeyringPair[] = [] for (let i = 0; i < validatorCount; i++) { - const validator = defaultAccountsSr25519.keyring.addFromUri(`//Validator_${i}`) + const validator = testAccounts.keyring.addFromUri(`//Validator_${i}`) validators.push(validator) } + const minValBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + const ed = client.api.consts.balances.existentialDeposit.toBigInt() + await client.dev.setStorage({ System: { - account: validators.map((v) => [[v.address], { providers: 1, data: { free: 10000e10 } }]), + // Min val bond + 10 for fees + account: validators.map((v) => [[v.address], { providers: 1, data: { free: minValBond + ed * 10n } }]), }, }) @@ -219,7 +231,7 @@ async function stakingLifecycleTest< /// for (const [index, validator] of validators.entries()) { - const bondTx = client.api.tx.staking.bond(5000e10, { Staked: null }) + const bondTx = client.api.tx.staking.bond(minValBond, { Staked: null }) const bondEvents = await sendTransaction(bondTx.signAsync(validator)) await client.dev.newBlock() @@ -253,7 +265,7 @@ async function stakingLifecycleTest< /// Bond another account's funds /// - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice await client.dev.setStorage({ System: { @@ -306,8 +318,8 @@ async function stakingLifecycleTest< expect(nominations.suppressed.isFalse).toBeTruthy() expect(nominations.targets.length).toBe(validators.length) - const targets = nominations.targets.map((t) => encodeAddress(t.toString(), addressEncoding)) - expect(validators.every((v) => targets.includes(encodeAddress(v.address, addressEncoding)))).toBe(true) + const targets = nominations.targets.map((t) => encodeAddress(t.toString(), testConfig.addressEncoding)) + expect(validators.every((v) => targets.includes(encodeAddress(v.address, testConfig.addressEncoding)))).toBe(true) /// /// Chill one of the validators @@ -333,8 +345,8 @@ async function stakingLifecycleTest< // Check that the chilled validator is *still* in the nominations. // Its previous call to `validate` would only have taken effect in the next era, as will the // posterior call to `chill`. - const targetsPostChill = nominations.targets.map((t) => encodeAddress(t.toString(), addressEncoding)) - expect(targetsPostChill.every((v) => targets.includes(encodeAddress(v, addressEncoding)))).toBe(true) + const targetsPostChill = nominations.targets.map((t) => encodeAddress(t.toString(), testConfig.addressEncoding)) + expect(targetsPostChill.every((v) => targets.includes(encodeAddress(v, testConfig.addressEncoding)))).toBe(true) /// /// Chilled validator wishes to remove all its nominations @@ -360,8 +372,10 @@ async function stakingLifecycleTest< expect(nominationsPostKick.targets.length).toBe(validators.length - 1) // Check that the kicked nominator's nominations *no longer* include the validator who kicked them. - const targetsPostKick = nominationsPostKick.targets.map((t) => encodeAddress(t.toString(), addressEncoding)) - expect(targetsPostKick.includes(encodeAddress(validators[0].address, addressEncoding))).toBe(false) + const targetsPostKick = nominationsPostKick.targets.map((t) => + encodeAddress(t.toString(), testConfig.addressEncoding), + ) + expect(targetsPostKick.includes(encodeAddress(validators[0].address, testConfig.addressEncoding))).toBe(false) /// /// Chilled validator wishes to validate again, but this time it blocks itself @@ -432,16 +446,19 @@ async function stakingLifecycleTest< async function forceUnstakeTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice - const bob = defaultAccountsSr25519.bob + const alice = testAccounts.alice + const bob = testAccounts.bob + + const minNominatorBond = (await client.api.query.staking.minNominatorBond()).toBigInt() + const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: 100000e10 } }], - [[bob.address], { providers: 1, data: { free: 100000e10 } }], + [[alice.address], { providers: 1, data: { free: minValidatorBond + minValidatorBond / 10n } }], + [[bob.address], { providers: 1, data: { free: minNominatorBond + minNominatorBond / 10n } }], ], }, }) @@ -450,9 +467,10 @@ async function forceUnstakeTest< /// Bond funds for both Alice and Bob /// - const bondTx = client.api.tx.staking.bond(10000e10, { Staked: null }) - await sendTransaction(bondTx.signAsync(alice)) - await sendTransaction(bondTx.signAsync(bob)) + const bondTx1 = client.api.tx.staking.bond(minValidatorBond, { Staked: null }) + await sendTransaction(bondTx1.signAsync(alice)) + const bondTx2 = client.api.tx.staking.bond(minNominatorBond, { Staked: null }) + await sendTransaction(bondTx2.signAsync(bob)) await client.dev.newBlock() @@ -472,9 +490,6 @@ async function forceUnstakeTest< /// Force unstake Bob, first with a signed origin (which *must* fail), and then a `Root` origin. /// - const slashingSpans = await client.api.query.staking.slashingSpans(bob.address) - expect(slashingSpans.isNone).toBeTruthy() - // Bob can have no slashing spans recorded as a fresh nominator, so `force_unstake`'s second argument is 0. const forceUnstakeTx = client.api.tx.staking.forceUnstake(bob.address, 0) @@ -491,7 +506,7 @@ async function forceUnstakeTest< let nominatorPrefs = await client.api.query.staking.nominators(bob.address) assert(nominatorPrefs.isSome) - scheduleInlineCallWithOrigin(client, forceUnstakeTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, forceUnstakeTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -511,7 +526,7 @@ async function fastUnstakeTest< TInitStorages extends Record> | undefined, >(chain: Chain, addressEncoding: number) { const [client] = await setupNetworks(chain) - const kr = defaultAccountsSr25519 + const kr = testAccounts const alice = kr.alice const bob = kr.bob const charlie = kr.charlie @@ -597,9 +612,9 @@ async function fastUnstakeTest< async function setMinCommission< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice await client.dev.setStorage({ System: { @@ -649,7 +664,7 @@ async function setMinCommission< ] for (const [origin, inc] of originsAndIncrements) { - scheduleInlineCallWithOrigin(client, setMinCommissionCall(inc).method.toHex(), origin) + await scheduleInlineCallWithOrigin(client, setMinCommissionCall(inc).method.toHex(), origin, testConfig.relayOrPara) await client.dev.newBlock() @@ -683,9 +698,9 @@ async function setMinCommission< async function setStakingConfigsTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice await client.dev.setStorage({ System: { @@ -746,7 +761,12 @@ async function setStakingConfigsTest< const inc = 10 - scheduleInlineCallWithOrigin(client, setStakingConfigsCall(inc).method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin( + client, + setStakingConfigsCall(inc).method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() @@ -799,18 +819,20 @@ async function setStakingConfigsTest< async function forceApplyValidatorCommissionTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) /// Create some Sr25519 accounts and fund them - const alice = defaultAccountsSr25519.alice - const bob = defaultAccountsSr25519.bob + const alice = testAccounts.alice + const bob = testAccounts.bob + + const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: 100000e10 } }], - [[bob.address], { providers: 1, data: { free: 100000e10 } }], + [[alice.address], { providers: 1, data: { free: (minValidatorBond * 15n) / 10n } }], + [[bob.address], { providers: 1, data: { free: 100e10 } }], ], }, }) @@ -821,7 +843,7 @@ async function forceApplyValidatorCommissionTest< /// Create validator with the current minimum commission /// - const bondTx = client.api.tx.staking.bond(10000e10, { Staked: null }) + const bondTx = client.api.tx.staking.bond(minValidatorBond, { Staked: null }) await sendTransaction(bondTx.signAsync(alice)) await client.dev.newBlock() @@ -853,7 +875,12 @@ async function forceApplyValidatorCommissionTest< { Noop: null }, ) - scheduleInlineCallWithOrigin(client, setStakingConfigsTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin( + client, + setStakingConfigsTx.method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() @@ -887,15 +914,9 @@ async function forceApplyValidatorCommissionTest< async function modifyValidatorCountTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice - - await client.dev.setStorage({ - System: { - account: [[[alice.address], { providers: 1, data: { free: 100000e10 } }]], - }, - }) + const alice = testAccounts.alice /// /// `setValidatorCount` @@ -916,7 +937,12 @@ async function modifyValidatorCountTest< /// Run the call with a `Root` origin - await scheduleInlineCallWithOrigin(client, setValidatorCountCall(100).method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin( + client, + setValidatorCountCall(100).method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() @@ -950,7 +976,12 @@ async function modifyValidatorCountTest< /// Run the call with a `Root` origin - scheduleInlineCallWithOrigin(client, increaseValidatorCountCall(100).method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin( + client, + increaseValidatorCountCall(100).method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() @@ -979,7 +1010,12 @@ async function modifyValidatorCountTest< /// Run the call with a `Root` origin - scheduleInlineCallWithOrigin(client, scaleValidatorCountCall(10).method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin( + client, + scaleValidatorCountCall(10).method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() @@ -1005,12 +1041,12 @@ async function modifyValidatorCountTest< async function chillOtherTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) /// Rquired information for this test, to set appropriate thresholds later - const minNominatorBond = await client.api.query.staking.minNominatorBond() - const minValidatorBond = await client.api.query.staking.minValidatorBond() + const minNominatorBond = (await client.api.query.staking.minNominatorBond()).toBigInt() + const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() const minValidatorCommission = await client.api.query.staking.minCommission() @@ -1030,20 +1066,25 @@ async function chillOtherTest< { Noop: null }, ) - scheduleInlineCallWithOrigin(client, setStakingConfigsCall.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin( + client, + setStakingConfigsCall.method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() /// Setup a validator and a nominator, as the account that'll be calling `chill_other` - const alice = defaultAccountsSr25519.alice - const bob = defaultAccountsSr25519.bob - const charlie = defaultAccountsSr25519.charlie + const alice = testAccounts.alice + const bob = testAccounts.bob + const charlie = testAccounts.charlie await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: 100000e10 } }], + [[alice.address], { providers: 1, data: { free: minValidatorBond + minValidatorBond / 10n } }], [[bob.address], { providers: 1, data: { free: 100000e10 } }], [[charlie.address], { providers: 1, data: { free: 100000e10 } }], ], @@ -1053,9 +1094,9 @@ async function chillOtherTest< /// Alice and Bob bond funds according to their desired roles. const nomBondTx = client.api.tx.staking.bond(minNominatorBond, { Staked: null }) + await sendTransaction(nomBondTx.signAsync(bob)) const valBondTx = client.api.tx.staking.bond(minValidatorBond, { Staked: null }) await sendTransaction(valBondTx.signAsync(alice)) - await sendTransaction(nomBondTx.signAsync(bob)) await client.dev.newBlock() @@ -1080,8 +1121,8 @@ async function chillOtherTest< const noop = { Noop: null } const remove = { Remove: null } - const setNominatorBond = { Set: minNominatorBond.toNumber() + 1 } - const setValidatorBond = { Set: minValidatorBond.toNumber() + 1 } + const setNominatorBond = { Set: minNominatorBond + 1n } + const setValidatorBond = { Set: minValidatorBond + 1n } // Nominator/validator limits can be set to the current count; since the chill threshold will be set to 75%, // this will allow the use of `chill_other`. @@ -1116,7 +1157,7 @@ async function chillOtherTest< const successfulCall = setStakingConfigsCalls.pop() for (const call of setStakingConfigsCalls) { - scheduleInlineCallWithOrigin(client, call.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, call.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -1146,7 +1187,7 @@ async function chillOtherTest< /// To end the test, sucessfully run `chill_other` with the appropriate staking configuration limits all set, /// and observe that Bob is forcibly chilled. - scheduleInlineCallWithOrigin(client, successfulCall!.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, successfulCall!.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -1181,35 +1222,22 @@ async function unappliedSlashTest< TInitStorages extends Record> | undefined, >(chain: Chain) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.keyring.createFromUri('//fresh_alice') - const bob = defaultAccountsSr25519.keyring.createFromUri('//fresh_bob') - const charlie = defaultAccountsSr25519.keyring.createFromUri('//fresh_charlie') - const dave = defaultAccountsSr25519.keyring.createFromUri('//fresh_dave') - - const eraChangeBlock = await locateEraChange(client) - if (eraChangeBlock === undefined) { - // This test only makes sense to run if there's an active era. - console.warn('Unable to find era change block, skipping unapplied slash test') - return - } - - // Go to the block just before the one in which the era changes, in order to modify the staking ledger with the - // accounts that will be slashed. - // If this isn't done, the slash will not be applied. - await client.dev.setHead(eraChangeBlock - 1) + const alice = testAccounts.alice + const bob = testAccounts.bob + const charlie = testAccounts.charlie + const dave = testAccounts.dave const balances = 10000e10 await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: balances } }], [[bob.address], { providers: 1, data: { free: balances } }], [[charlie.address], { providers: 1, data: { free: balances } }], ], }, }) - const bondAmount = balances / 10 + const bondAmount = (await client.api.query.staking.minNominatorBond()).toNumber() const slashAmount = bondAmount / 2 const bondTx = client.api.tx.staking.bond(bondAmount, { Staked: null }) @@ -1220,6 +1248,13 @@ async function unappliedSlashTest< await client.dev.newBlock() const activeEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() + const slashKey = [ + alice.address, + // perbill, not relevant for the test + 0, + // page index, not relevant either + 0, + ] // Insert a slash into storage. The accounts named here as validators/nominators need not have called // `validate`/`nominate` - they must only exist in the staking ledger as having bonded funds. @@ -1227,22 +1262,20 @@ async function unappliedSlashTest< Staking: { UnappliedSlashes: [ [ - [activeEra + 1], - [ - { - validator: alice.address, - // Less than the bonded funds. - own: slashAmount, - others: [ - // Exactly the bonded funds. - [bob.address, slashAmount * 2], - // More than the bonded funds. - [charlie.address, slashAmount * 3], - ], - reporters: [dave.address], - payout: bondAmount, - }, - ], + [activeEra, slashKey], + { + validator: alice.address, + // Less than the bonded funds. + own: slashAmount, + others: [ + // Exactly the bonded funds. + [bob.address, slashAmount * 2], + // More than the bonded funds. + [charlie.address, slashAmount * 3], + ], + reporter: dave.address, + payout: bondAmount, + }, ], ], }, @@ -1256,21 +1289,6 @@ async function unappliedSlashTest< expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') - await client.dev.setStorage({ - ParasDisputes: { - $removePrefix: ['disputes', 'included'], - }, - Dmp: { - $removePrefix: ['downwardMessageQueues'], - }, - Staking: { - $removePrefix: ['erasStakersOverview', 'erasStakersPaged', 'erasStakers'], - }, - Session: { - $removePrefix: ['nextKeys'], - }, - }) - await client.dev.newBlock() await checkSystemEvents(client, { section: 'staking', method: 'Slashed' }).toMatchSnapshot('staking slash events') @@ -1304,12 +1322,12 @@ async function unappliedSlashTest< async function cancelDeferredSlashTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, origin: any) { +>(chain: Chain, origin: any, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice - const bob = defaultAccountsSr25519.bob - const charlie = defaultAccountsSr25519.charlie - const dave = defaultAccountsSr25519.dave + const alice = testAccounts.alice + const bob = testAccounts.bob + const charlie = testAccounts.charlie + const dave = testAccounts.dave const eraChangeBlock = await locateEraChange(client) if (eraChangeBlock === undefined) { @@ -1374,7 +1392,7 @@ async function cancelDeferredSlashTest< expect(slash.length).toBe(1) const cancelDeferredSlashTx = client.api.tx.staking.cancelDeferredSlash(activeEra + 1, [0]) - scheduleInlineCallWithOrigin(client, cancelDeferredSlashTx.method.toHex(), origin) + await scheduleInlineCallWithOrigin(client, cancelDeferredSlashTx.method.toHex(), origin, testConfig.relayOrPara) // Check stakers' bonded funds before the slash would be applied. @@ -1436,7 +1454,7 @@ async function cancelDeferredSlashTestBadOrigin< TInitStorages extends Record> | undefined, >(chain: Chain) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice const cancelDeferredSlashTx = client.api.tx.staking.cancelDeferredSlash(0, [0]) const cancelDeferredSlashEvents = await sendTransaction(cancelDeferredSlashTx.signAsync(alice)) @@ -1478,8 +1496,8 @@ async function cancelDeferredSlashTestBadOrigin< async function cancelDeferredSlashTestAsRoot< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { - await cancelDeferredSlashTest(chain, { system: 'Root' }) +>(chain: Chain, testConfig: TestConfig) { + await cancelDeferredSlashTest(chain, { system: 'Root' }, testConfig) } /** @@ -1498,8 +1516,8 @@ async function cancelDeferredSlashTestAsRoot< async function cancelDeferredSlashTestAsAdmin< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { - await cancelDeferredSlashTest(chain, { Origins: 'StakingAdmin' }) +>(chain: Chain, testConfig: TestConfig) { + await cancelDeferredSlashTest(chain, { Origins: 'StakingAdmin' }, testConfig) } /** @@ -1508,9 +1526,15 @@ async function cancelDeferredSlashTestAsAdmin< async function setInvulnerablesTestBadOrigin< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice + + const invulnerables = (await client.api.query.staking.invulnerables()) + .toArray() + .map((addr) => encodeAddress(addr.toString(), testConfig.addressEncoding)) + + assert(!invulnerables.includes(alice.address)) const setInvulnerablesTx = client.api.tx.staking.setInvulnerables([alice.address]) const setInvulnerablesEvents = await sendTransaction(setInvulnerablesTx.signAsync(alice)) @@ -1522,7 +1546,7 @@ async function setInvulnerablesTestBadOrigin< method: 'ExtrinsicFailed', }).toMatchSnapshot('set invulnerables events with bad signed origin') - let events = await client.api.query.system.events() + const events = await client.api.query.system.events() const [ev] = events.filter((record) => { const { event } = record @@ -1535,7 +1559,12 @@ async function setInvulnerablesTestBadOrigin< // Try it with `StakingAdmin` origin, which is still not enough on Polkadot/Kusama. - scheduleInlineCallWithOrigin(client, setInvulnerablesTx.method.toHex(), { Origins: 'StakingAdmin' }) + await scheduleInlineCallWithOrigin( + client, + setInvulnerablesTx.method.toHex(), + { Origins: 'StakingAdmin' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() @@ -1543,17 +1572,11 @@ async function setInvulnerablesTestBadOrigin< .redact({ redactKeys: /task/ }) .toMatchSnapshot('events when setting invulnerables with bad staking admin origin') - events = await client.api.query.system.events() - - const [ev_] = events.filter((record) => { - const { event } = record - return event.section === 'scheduler' - }) + const invulnerables2 = (await client.api.query.staking.invulnerables()) + .toArray() + .map((addr) => encodeAddress(addr.toString(), testConfig.addressEncoding)) - assert(client.api.events.scheduler.Dispatched.is(ev_.event)) - const e = ev_.event.data - expect(e.result.isErr).toBeTruthy() - expect(e.result.asErr.isBadOrigin).toBeTruthy() + expect(invulnerables2).toEqual(invulnerables) } /** @@ -1572,7 +1595,7 @@ async function setInvulnerablesTestBadOrigin< async function setInvulnerablesTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) // @@ -1594,25 +1617,26 @@ async function setInvulnerablesTest< // Fund accounts // - const alice = defaultAccountsSr25519.alice - const bob = defaultAccountsSr25519.bob - const charlie = defaultAccountsSr25519.charlie - const dave = defaultAccountsSr25519.dave + const alice = testAccounts.alice + const bob = testAccounts.bob + const charlie = testAccounts.charlie + const dave = testAccounts.dave + + const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + const bondAmount = minValidatorBond + minValidatorBond / 10n - const balances = 10000e10 await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: balances } }], - [[bob.address], { providers: 1, data: { free: balances } }], - [[charlie.address], { providers: 1, data: { free: balances } }], + [[alice.address], { providers: 1, data: { free: bondAmount } }], + [[bob.address], { providers: 1, data: { free: bondAmount } }], + [[charlie.address], { providers: 1, data: { free: bondAmount } }], ], }, }) // Bond funds for each validator - const bondAmount = balances / 10 - const bondTx = client.api.tx.staking.bond(bondAmount, { Staked: null }) + const bondTx = client.api.tx.staking.bond(minValidatorBond, { Staked: null }) await sendTransaction(bondTx.signAsync(alice)) await sendTransaction(bondTx.signAsync(bob)) await sendTransaction(bondTx.signAsync(charlie)) @@ -1631,19 +1655,24 @@ async function setInvulnerablesTest< // Sort the addresses to make the test simpler. const invulnerables = [alice.address, bob.address, charlie.address].map((addr) => - encodeAddress(addr.toString(), addressEncoding), + encodeAddress(addr.toString(), testConfig.addressEncoding), ) invulnerables.sort() // Set them as invulnerable using Root origin const setInvulnerablesTx = client.api.tx.staking.setInvulnerables(invulnerables) - scheduleInlineCallWithOrigin(client, setInvulnerablesTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin( + client, + setInvulnerablesTx.method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) await client.dev.newBlock() // Verify the invulnerables were set correctly const queriedInvulnerables = (await client.api.query.staking.invulnerables()).map((addr) => - encodeAddress(addr.toString(), addressEncoding), + encodeAddress(addr.toString(), testConfig.addressEncoding), ) expect(queriedInvulnerables).toEqual(invulnerables) @@ -1656,7 +1685,7 @@ async function setInvulnerablesTest< const activeEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() - const slashAmount = bondAmount / 2 + const slashAmount = minValidatorBond / 2n // Insert a slash into storage. The accounts named here as validators/nominators need not have called // `validate`/`nominate` - they must only exist in the staking ledger as having bonded funds. @@ -1679,9 +1708,9 @@ async function setInvulnerablesTest< own: slashAmount, others: [ // Exactly the bonded funds. - [bob.address, slashAmount * 2], + [bob.address, slashAmount * 2n], // More than the bonded funds. - [charlie.address, slashAmount * 3], + [charlie.address, slashAmount * 3n], ], reporters: [dave.address], payout: bondAmount, @@ -1719,10 +1748,10 @@ async function setInvulnerablesTest< expect(bobFundsPostSlash.data.toJSON()).toMatchSnapshot('bob funds post slash') expect(charlieFundsPostSlash.data.toJSON()).toMatchSnapshot('charlie funds post slash') - expect(aliceFundsPostSlash.data.reserved.toNumber()).toBe(aliceFundsPreSlash.data.reserved.toNumber() - slashAmount) - expect(bobFundsPostSlash.data.reserved.toNumber()).toBe(bobFundsPreSlash.data.reserved.toNumber() - bondAmount) - expect(charlieFundsPostSlash.data.reserved.toNumber()).toBe( - charlieFundsPreSlash.data.reserved.toNumber() - bondAmount, + expect(aliceFundsPostSlash.data.reserved.toBigInt()).toBe(aliceFundsPreSlash.data.reserved.toBigInt() - slashAmount) + expect(bobFundsPostSlash.data.reserved.toBigInt()).toBe(bobFundsPreSlash.data.reserved.toBigInt() - bondAmount) + expect(charlieFundsPostSlash.data.reserved.toBigInt()).toBe( + charlieFundsPreSlash.data.reserved.toBigInt() - bondAmount, ) } @@ -1733,7 +1762,7 @@ async function setInvulnerablesTest< export function slashingTests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { return { kind: 'describe', label: 'slashing tests', @@ -1751,12 +1780,12 @@ export function slashingTests< { kind: 'test', label: 'cancel deferred slash as root', - testFn: async () => await cancelDeferredSlashTestAsRoot(chain), + testFn: async () => await cancelDeferredSlashTestAsRoot(chain, testConfig), }, { kind: 'test', label: 'cancel deferred slash as admin', - testFn: async () => await cancelDeferredSlashTestAsAdmin(chain), + testFn: async () => await cancelDeferredSlashTestAsAdmin(chain, testConfig), }, ], } @@ -1765,7 +1794,7 @@ export function slashingTests< export function baseStakingE2ETests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, testConfig: { testSuiteName: string; addressEncoding: number }): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { return { kind: 'describe', label: 'base staking tests', @@ -1783,63 +1812,75 @@ export function baseStakingE2ETests< { kind: 'test' as const, label: 'staking lifecycle', - testFn: async () => await stakingLifecycleTest(chain, testConfig.addressEncoding), + testFn: async () => await stakingLifecycleTest(chain, testConfig), }, { kind: 'test' as const, label: 'test force unstaking of nominator', - testFn: async () => await forceUnstakeTest(chain), - }, - { - kind: 'test' as const, - label: 'test fast unstake', - testFn: async () => await fastUnstakeTest(chain, testConfig.addressEncoding), + testFn: async () => await forceUnstakeTest(chain, testConfig), }, { kind: 'test' as const, label: 'set minimum validator commission', - testFn: async () => await setMinCommission(chain), + testFn: async () => await setMinCommission(chain, testConfig), }, { kind: 'test' as const, label: 'set staking configs', - testFn: async () => await setStakingConfigsTest(chain), + testFn: async () => await setStakingConfigsTest(chain, testConfig), }, { kind: 'test' as const, label: 'force apply validator commission', - testFn: async () => await forceApplyValidatorCommissionTest(chain), + testFn: async () => await forceApplyValidatorCommissionTest(chain, testConfig), }, { kind: 'test' as const, label: 'modify validator count', - testFn: async () => await modifyValidatorCountTest(chain), + testFn: async () => await modifyValidatorCountTest(chain, testConfig), }, { kind: 'test' as const, label: 'chill other', - testFn: async () => await chillOtherTest(chain), + testFn: async () => await chillOtherTest(chain, testConfig), }, { kind: 'test' as const, label: 'set invulnerables with bad origin', - testFn: async () => await setInvulnerablesTestBadOrigin(chain), + testFn: async () => await setInvulnerablesTestBadOrigin(chain, testConfig), }, { kind: 'test' as const, label: 'set invulnerables with root origin', - testFn: async () => await setInvulnerablesTest(chain, testConfig.addressEncoding), + testFn: async () => await setInvulnerablesTest(chain, testConfig), }, ], } } -export function fullStakingTests< +export function fastUnstakeTests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, testConfig: { testSuiteName: string; addressEncoding: number }): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { + return { + kind: 'describe', + label: 'fast unstake', + children: [ + { + kind: 'test', + label: 'test fast unstake', + testFn: async () => await fastUnstakeTest(chain, testConfig.addressEncoding), + }, + ], + } +} + +export function stakingTests< + TCustom extends Record | undefined, + TInitStorages extends Record> | undefined, +>(chain: Chain, testConfig: TestConfig): RootTestTree { const basalTestTree = baseStakingE2ETests(chain, testConfig) - const slashingTestTree = slashingTests(chain) + const slashingTestTree = slashingTests(chain, testConfig) return { kind: 'describe' as const, @@ -1847,3 +1888,18 @@ export function fullStakingTests< children: [basalTestTree, slashingTestTree], } } + +export function fullStakingTests< + TCustom extends Record | undefined, + TInitStorages extends Record> | undefined, +>(chain: Chain, testConfig: TestConfig): RootTestTree { + const basalTestTree = baseStakingE2ETests(chain, testConfig) + const slashingTestTree = slashingTests(chain, testConfig) + const fastUnstakeTestTree = fastUnstakeTests(chain, testConfig) + + return { + kind: 'describe' as const, + label: testConfig.testSuiteName, + children: [basalTestTree, slashingTestTree, fastUnstakeTestTree], + } +} diff --git a/packages/shared/src/vesting.ts b/packages/shared/src/vesting.ts index bcb4730ad..48c6c2fd8 100644 --- a/packages/shared/src/vesting.ts +++ b/packages/shared/src/vesting.ts @@ -266,7 +266,7 @@ async function testForceVestedTransferAndRemoval< startingBlock: currBlockNumber - 1, }) - scheduleInlineCallWithOrigin(client, forceVestingTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, forceVestingTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() @@ -301,7 +301,7 @@ async function testForceVestedTransferAndRemoval< // Forcibly remove the vesting schedule. const forceRemoveVestingTx = client.api.tx.vesting.forceRemoveVestingSchedule(dave.address, 0) - scheduleInlineCallWithOrigin(client, forceRemoveVestingTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, forceRemoveVestingTx.method.toHex(), { system: 'Root' }) await client.dev.newBlock() diff --git a/vitest.config.mts b/vitest.config.mts index 3e4462473..b4efd073e 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -24,4 +24,5 @@ export default defineConfig({ outDir: '../../dist', }, plugins: [tsconfigPaths(), swc.vite()], + clearScreen: false, }) From ee34920733e5e6ad8816c0f6611073a672ed6d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Mon, 1 Sep 2025 17:30:08 +0100 Subject: [PATCH 03/18] Use minimal validator bond if unset in network --- .../kusama.staking.e2e.test.ts.snap | 51 ++++++++++++------- .../polkadot.staking.e2e.test.ts.snap | 49 +++++++++++------- packages/shared/src/helpers/index.ts | 2 +- packages/shared/src/staking.ts | 33 +++++++++--- 4 files changed, 90 insertions(+), 45 deletions(-) diff --git a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap index 33e9113c2..cafa0716f 100644 --- a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap @@ -490,7 +490,7 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > kick events 1 [ { "data": { - "nominator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "nominator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "stash": "FQ3JxEebQJY23NumtMUU1k7YJrbyK6L8j4uK5VwKpeVqFnh", }, "method": "Kicked", @@ -504,7 +504,7 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > nominator bon { "data": { "amount": 100000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "stash": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Bonded", "section": "staking", @@ -517,7 +517,7 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > nominator bon { "data": { "amount": 100000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "stash": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Bonded", "section": "staking", @@ -529,7 +529,7 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > unbond events [ { "data": { - "amount": 50000000000000, + "amount": "(rounded 33000000000000)", "stash": "FQ3JxEebQJY23NumtMUU1k7YJrbyK6L8j4uK5VwKpeVqFnh", }, "method": "Unbonded", @@ -558,7 +558,7 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > validator 0 b [ { "data": { - "amount": 50000000000000, + "amount": "(rounded 33000000000000)", "stash": "FQ3JxEebQJY23NumtMUU1k7YJrbyK6L8j4uK5VwKpeVqFnh", }, "method": "Bonded", @@ -587,7 +587,7 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > validator 1 b [ { "data": { - "amount": 50000000000000, + "amount": "(rounded 33000000000000)", "stash": "GtgvkKoi3CxJk2mP5ZzuJ7Mj8ipiy4Sf6T4wtt89W8m8FNa", }, "method": "Bonded", @@ -616,7 +616,7 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > validator 2 b [ { "data": { - "amount": 50000000000000, + "amount": "(rounded 33000000000000)", "stash": "ErRmn1hykJ1ppjMoNfQyRYA9c3j7y3YZnKQsCecD1k9D42B", }, "method": "Bonded", @@ -724,57 +724,70 @@ exports[`Kusama Staking > base staking tests > trying to nominate with no bonded ] `; +exports[`Kusama Staking > fast unstake > test fast unstake > nominator bond events 1`] = ` +[ + { + "data": { + "amount": 100000000000000, + "stash": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "Bonded", + "section": "staking", + }, +] +`; + exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999554590223, + "free": 89999554590223, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999554590223, + "free": 89999554590223, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999554590223, + "free": 89999554590223, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999554590223, + "free": 89999554590223, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999554590223, + "free": 89999554590223, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999554590223, + "free": 89999554590223, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; diff --git a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap index 4a06b5b48..d906a2a6b 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap @@ -490,7 +490,7 @@ exports[`Polkadot Staking > base staking tests > staking lifecycle > kick events [ { "data": { - "nominator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "nominator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "stash": "13piny9qppZ5hvZyxpbRiDDGFLa1rwqHkqxe5iDLQ7TXGdnM", }, "method": "Kicked", @@ -504,7 +504,7 @@ exports[`Polkadot Staking > base staking tests > staking lifecycle > nominator b { "data": { "amount": 100000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "stash": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Bonded", "section": "staking", @@ -517,7 +517,7 @@ exports[`Polkadot Staking > base staking tests > staking lifecycle > nominator b { "data": { "amount": 100000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "stash": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Bonded", "section": "staking", @@ -558,7 +558,7 @@ exports[`Polkadot Staking > base staking tests > staking lifecycle > validator 0 [ { "data": { - "amount": 50000000000000, + "amount": 1000000000000000, "stash": "13piny9qppZ5hvZyxpbRiDDGFLa1rwqHkqxe5iDLQ7TXGdnM", }, "method": "Bonded", @@ -587,7 +587,7 @@ exports[`Polkadot Staking > base staking tests > staking lifecycle > validator 1 [ { "data": { - "amount": 50000000000000, + "amount": 1000000000000000, "stash": "15KNQmEzwTTVzdDqa1ox9VaWSASEcboQHDLoiXbXDnwnZVzn", }, "method": "Bonded", @@ -616,7 +616,7 @@ exports[`Polkadot Staking > base staking tests > staking lifecycle > validator 2 [ { "data": { - "amount": 50000000000000, + "amount": 1000000000000000, "stash": "13H7FnvuDAYZWhvRzJuNDd1Jrdm91bnWBuD9dqN1HJZAeNt9", }, "method": "Bonded", @@ -724,57 +724,70 @@ exports[`Polkadot Staking > base staking tests > trying to nominate with no bond ] `; +exports[`Polkadot Staking > fast unstake > test fast unstake > nominator bond events 1`] = ` +[ + { + "data": { + "amount": 100000000000000, + "stash": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + }, + "method": "Bonded", + "section": "staking", + }, +] +`; + exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999867589258, + "free": 89999867589258, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999867589258, + "free": 89999867589258, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999867589258, + "free": 89999867589258, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999867589258, + "free": 89999867589258, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999867589258, + "free": 89999867589258, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999867589258, + "free": 89999867589258, "frozen": 0, - "reserved": 0, + "reserved": 10000000000000, } `; diff --git a/packages/shared/src/helpers/index.ts b/packages/shared/src/helpers/index.ts index 5bf7d67a8..5b5856c0d 100644 --- a/packages/shared/src/helpers/index.ts +++ b/packages/shared/src/helpers/index.ts @@ -1,7 +1,7 @@ import type { StorageValues } from '@acala-network/chopsticks' import { sendTransaction, setupCheck } from '@acala-network/chopsticks-testing' -import { Chain, defaultAccounts } from '@e2e-test/networks' +import { defaultAccounts } from '@e2e-test/networks' import type { ApiPromise } from '@polkadot/api' import type { KeyringPair } from '@polkadot/keyring/types' diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index 22837762c..944f78e9a 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -216,13 +216,16 @@ async function stakingLifecycleTest< validators.push(validator) } - const minValBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + let minValBond = (await client.api.query.staking.minValidatorBond()).toBigInt() const ed = client.api.consts.balances.existentialDeposit.toBigInt() + if (minValBond === 0n) { + minValBond = ed * 10n ** 5n + } await client.dev.setStorage({ System: { - // Min val bond + 10 for fees - account: validators.map((v) => [[v.address], { providers: 1, data: { free: minValBond + ed * 10n } }]), + // Min val bond + 100 EDs for fees (to be safe) + account: validators.map((v) => [[v.address], { providers: 1, data: { free: minValBond + ed * 100n } }]), }, }) @@ -452,7 +455,11 @@ async function forceUnstakeTest< const bob = testAccounts.bob const minNominatorBond = (await client.api.query.staking.minNominatorBond()).toBigInt() - const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + let minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + const ed = client.api.consts.balances.existentialDeposit.toBigInt() + if (minValidatorBond === 0n) { + minValidatorBond = ed * 10n ** 5n + } await client.dev.setStorage({ System: { @@ -826,7 +833,11 @@ async function forceApplyValidatorCommissionTest< const alice = testAccounts.alice const bob = testAccounts.bob - const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + let minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + const ed = client.api.consts.balances.existentialDeposit.toBigInt() + if (minValidatorBond === 0n) { + minValidatorBond = ed * 10n ** 5n + } await client.dev.setStorage({ System: { @@ -1046,7 +1057,11 @@ async function chillOtherTest< /// Rquired information for this test, to set appropriate thresholds later const minNominatorBond = (await client.api.query.staking.minNominatorBond()).toBigInt() - const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + let minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + const ed = client.api.consts.balances.existentialDeposit.toBigInt() + if (minValidatorBond === 0n) { + minValidatorBond = ed * 10n ** 5n + } const minValidatorCommission = await client.api.query.staking.minCommission() @@ -1622,7 +1637,11 @@ async function setInvulnerablesTest< const charlie = testAccounts.charlie const dave = testAccounts.dave - const minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + let minValidatorBond = (await client.api.query.staking.minValidatorBond()).toBigInt() + const ed = client.api.consts.balances.existentialDeposit.toBigInt() + if (minValidatorBond === 0n) { + minValidatorBond = ed * 10n ** 5n + } const bondAmount = minValidatorBond + minValidatorBond / 10n await client.dev.setStorage({ From 697de181b1b180b695dcc55ed1beb02164cba7d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Mon, 1 Sep 2025 19:21:03 +0100 Subject: [PATCH 04/18] Fix first slashing test --- .../kusama.staking.e2e.test.ts.snap | 12 +-- .../kusama/src/kusama.staking.e2e.test.ts | 4 +- .../polkadot.staking.e2e.test.ts.snap | 12 +-- .../polkadot/src/polkadot.staking.e2e.test.ts | 4 +- packages/shared/src/staking.ts | 97 +++++++++++++------ 5 files changed, 88 insertions(+), 41 deletions(-) diff --git a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap index cafa0716f..3dc9428d8 100644 --- a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap @@ -823,9 +823,9 @@ exports[`Kusama Staking > slashing tests > unapplied slash > alice funds post sl exports[`Kusama Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 99899557923553, "frozen": 0, - "reserved": 10000000000000, + "reserved": 100000000000, } `; @@ -843,9 +843,9 @@ exports[`Kusama Staking > slashing tests > unapplied slash > bob funds post slas exports[`Kusama Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 99899557923553, "frozen": 0, - "reserved": 10000000000000, + "reserved": 100000000000, } `; @@ -861,9 +861,9 @@ exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds post exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 99899557923553, "frozen": 0, - "reserved": 10000000000000, + "reserved": 100000000000, } `; diff --git a/packages/kusama/src/kusama.staking.e2e.test.ts b/packages/kusama/src/kusama.staking.e2e.test.ts index 603d706db..c46b3276f 100644 --- a/packages/kusama/src/kusama.staking.e2e.test.ts +++ b/packages/kusama/src/kusama.staking.e2e.test.ts @@ -1,4 +1,6 @@ import { kusama } from '@e2e-test/networks/chains' import { fullStakingTests, registerTestTree } from '@e2e-test/shared' -registerTestTree(fullStakingTests(kusama, { testSuiteName: 'Kusama Staking', addressEncoding: 2 })) +registerTestTree( + fullStakingTests(kusama, { testSuiteName: 'Kusama Staking', addressEncoding: 2, relayOrPara: 'Relay' }), +) diff --git a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap index d906a2a6b..b1e792930 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap @@ -823,9 +823,9 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds post exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 97499867589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 2500000000000, } `; @@ -843,9 +843,9 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds post sl exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 97499867589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 2500000000000, } `; @@ -861,9 +861,9 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds pos exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 97499867589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 2500000000000, } `; diff --git a/packages/polkadot/src/polkadot.staking.e2e.test.ts b/packages/polkadot/src/polkadot.staking.e2e.test.ts index cbf36b71f..a96abda53 100644 --- a/packages/polkadot/src/polkadot.staking.e2e.test.ts +++ b/packages/polkadot/src/polkadot.staking.e2e.test.ts @@ -1,4 +1,6 @@ import { polkadot } from '@e2e-test/networks/chains' import { fullStakingTests, registerTestTree } from '@e2e-test/shared' -registerTestTree(fullStakingTests(polkadot, { testSuiteName: 'Polkadot Staking', addressEncoding: 0 })) +registerTestTree( + fullStakingTests(polkadot, { testSuiteName: 'Polkadot Staking', addressEncoding: 0, relayOrPara: 'Relay' }), +) diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index 944f78e9a..22ae3147b 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -13,6 +13,7 @@ import { encodeAddress } from '@polkadot/util-crypto' import { assert, expect } from 'vitest' import BN from 'bn.js' +import { match } from 'ts-pattern' import { check, checkEvents, @@ -1235,17 +1236,35 @@ async function chillOtherTest< async function unappliedSlashTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const alice = testAccounts.alice const bob = testAccounts.bob const charlie = testAccounts.charlie const dave = testAccounts.dave + let eraChangeBlock: number | undefined + // Only move to era change if running on a relay chain. If not, this is running on a post-migration Asset Hub, + // in which this is unnecessary. + if (testConfig.relayOrPara === 'Relay') { + eraChangeBlock = await locateEraChange(client) + if (eraChangeBlock === undefined) { + // This test only makes sense to run if there's an active era. + console.warn('Unable to find era change block, skipping unapplied slash test') + return + } + + // Go to the block just before the one in which the era changes, in order to modify the staking ledger with the + // accounts that will be slashed. + // If this isn't done, the slash will not be applied. + await client.dev.setHead(eraChangeBlock - 1) + } + const balances = 10000e10 await client.dev.setStorage({ System: { account: [ + [[alice.address], { providers: 1, data: { free: balances } }], [[bob.address], { providers: 1, data: { free: balances } }], [[charlie.address], { providers: 1, data: { free: balances } }], ], @@ -1263,36 +1282,60 @@ async function unappliedSlashTest< await client.dev.newBlock() const activeEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() - const slashKey = [ - alice.address, - // perbill, not relevant for the test - 0, - // page index, not relevant either - 0, - ] + let slashKey: any + let slashValue: any + match(testConfig.relayOrPara) + .with('Relay', () => { + slashKey = [activeEra + 1] + + slashValue = [ + { + validator: alice.address, + // Less than the bonded funds. + own: slashAmount, + others: [ + // Exactly the bonded funds. + [bob.address, slashAmount * 2], + // More than the bonded funds. + [charlie.address, slashAmount * 3], + ], + reporters: [dave.address], + payout: bondAmount, + }, + ] + }) + .with('Para', () => { + const slashKeyNewComponent = [ + alice.address, + // perbill, not relevant for the test + 0, + // page index, not relevant either + 0, + ] + + slashKey = [activeEra, slashKeyNewComponent] + + slashValue = { + validator: alice.address, + // Less than the bonded funds. + own: slashAmount, + others: [ + // Exactly the bonded funds. + [bob.address, slashAmount * 2], + // More than the bonded funds. + [charlie.address, slashAmount * 3], + ], + reporter: dave.address, + payout: bondAmount, + } + }) + .exhaustive() // Insert a slash into storage. The accounts named here as validators/nominators need not have called // `validate`/`nominate` - they must only exist in the staking ledger as having bonded funds. await client.dev.setStorage({ Staking: { - UnappliedSlashes: [ - [ - [activeEra, slashKey], - { - validator: alice.address, - // Less than the bonded funds. - own: slashAmount, - others: [ - // Exactly the bonded funds. - [bob.address, slashAmount * 2], - // More than the bonded funds. - [charlie.address, slashAmount * 3], - ], - reporter: dave.address, - payout: bondAmount, - }, - ], - ], + UnappliedSlashes: [[slashKey, slashValue]], }, }) @@ -1789,7 +1832,7 @@ export function slashingTests< { kind: 'test', label: 'unapplied slash', - testFn: async () => await unappliedSlashTest(chain), + testFn: async () => await unappliedSlashTest(chain, testConfig), }, { kind: 'test', From aebde9518bd53ad40a40aa14a8608da774068ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Mon, 1 Sep 2025 19:28:27 +0100 Subject: [PATCH 05/18] Add missing `applySlash` call to test --- packages/shared/src/staking.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index 22ae3147b..76215f007 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -1347,6 +1347,12 @@ async function unappliedSlashTest< expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') + if (testConfig.relayOrPara === 'Para') { + // Manually apply the slash. + const applySlashTx = client.api.tx.staking.applySlash(...slashKey) + await scheduleInlineCallWithOrigin(client, applySlashTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + } + await client.dev.newBlock() await checkSystemEvents(client, { section: 'staking', method: 'Slashed' }).toMatchSnapshot('staking slash events') From e8274d57626196fc48c246c2e3d44e408c544c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 2 Sep 2025 03:22:45 +0100 Subject: [PATCH 06/18] Fix staking tests to pass on both relay and AH --- .../kusama.staking.e2e.test.ts.snap | 135 ++------ .../polkadot.staking.e2e.test.ts.snap | 135 ++------ packages/shared/src/staking.ts | 289 ++++++++++++------ 3 files changed, 255 insertions(+), 304 deletions(-) diff --git a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap index 3dc9428d8..0e282ebd0 100644 --- a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap @@ -179,7 +179,7 @@ exports[`Kusama Staking > base staking tests > chill other > chill other events [ { "data": { - "stash": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "stash": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", }, "method": "Chilled", "section": "staking", @@ -305,18 +305,18 @@ exports[`Kusama Staking > base staking tests > set invulnerables with bad origin exports[`Kusama Staking > base staking tests > set invulnerables with root origin > alice funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999112324871, + "free": 3332445654871, "frozen": 0, - "reserved": 5000000000000, + "reserved": 16666666650000, } `; exports[`Kusama Staking > base staking tests > set invulnerables with root origin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999112324871, + "free": 3332445654871, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; @@ -325,7 +325,7 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > bob funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999112324871, + "free": 3332445654871, "frozen": 0, "reserved": 0, } @@ -334,16 +334,16 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999112324871, + "free": 3332445654871, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; exports[`Kusama Staking > base staking tests > set invulnerables with root origin > charlie funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999112324871, + "free": 3332445654871, "frozen": 0, "reserved": 0, } @@ -352,9 +352,9 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999112324871, + "free": 3332445654871, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; @@ -362,24 +362,24 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi [ { "data": { - "amount": 5000000000000, - "staker": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "amount": "(rounded 17000000000000)", + "staker": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Slashed", "section": "staking", }, { "data": { - "amount": 10000000000000, - "staker": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "amount": "(rounded 33000000000000)", + "staker": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", }, "method": "Slashed", "section": "staking", }, { "data": { - "amount": 10000000000000, - "staker": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", + "amount": "(rounded 33000000000000)", + "staker": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", }, "method": "Slashed", "section": "staking", @@ -641,19 +641,6 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > validator 2 v ] `; -exports[`Kusama Staking > base staking tests > test fast unstake > nominator bond events 1`] = ` -[ - { - "data": { - "amount": 100000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Bonded", - "section": "staking", - }, -] -`; - exports[`Kusama Staking > base staking tests > test force unstaking of nominator > force unstake bad origin events 1`] = ` [ { @@ -740,54 +727,54 @@ exports[`Kusama Staking > fast unstake > test fast unstake > nominator bond even exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 3332887920223, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 3332887920223, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 3332887920223, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 3332887920223, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 3332887920223, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, + "free": 3332887920223, "frozen": 0, - "reserved": 10000000000000, + "reserved": 33333333300000, } `; @@ -811,87 +798,29 @@ exports[`Kusama Staking > slashing tests > cancel deferred slash with bad origin ] `; -exports[`Kusama Staking > slashing tests > unapplied slash > alice funds post slash 1`] = ` -{ - "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, - "frozen": 0, - "reserved": 5000000000000, -} -`; - exports[`Kusama Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99899557923553, + "free": 33232891223553, "frozen": 0, "reserved": 100000000000, } `; -exports[`Kusama Staking > slashing tests > unapplied slash > balances slash events 1`] = `[]`; - -exports[`Kusama Staking > slashing tests > unapplied slash > bob funds post slash 1`] = ` -{ - "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, - "frozen": 0, - "reserved": 0, -} -`; - exports[`Kusama Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99899557923553, + "free": 33232891223553, "frozen": 0, "reserved": 100000000000, } `; -exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds post slash 1`] = ` -{ - "flags": "0x80000000000000000000000000000000", - "free": 89999554590223, - "frozen": 0, - "reserved": 0, -} -`; - exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99899557923553, + "free": 33232891223553, "frozen": 0, "reserved": 100000000000, } `; - -exports[`Kusama Staking > slashing tests > unapplied slash > staking slash events 1`] = ` -[ - { - "data": { - "amount": 5000000000000, - "staker": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - }, - "method": "Slashed", - "section": "staking", - }, - { - "data": { - "amount": 10000000000000, - "staker": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", - }, - "method": "Slashed", - "section": "staking", - }, - { - "data": { - "amount": 10000000000000, - "staker": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", - }, - "method": "Slashed", - "section": "staking", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap index b1e792930..434661901 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap @@ -179,7 +179,7 @@ exports[`Polkadot Staking > base staking tests > chill other > chill other event [ { "data": { - "stash": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", + "stash": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", }, "method": "Chilled", "section": "staking", @@ -305,18 +305,18 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with bad orig exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > alice funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999739445778, + "free": 99999738445778, "frozen": 0, - "reserved": 5000000000000, + "reserved": 500000000000000, } `; exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999739445778, + "free": 99999738445778, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; @@ -325,7 +325,7 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > bob funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999739445778, + "free": 99999738445778, "frozen": 0, "reserved": 0, } @@ -334,16 +334,16 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999739445778, + "free": 99999738445778, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > charlie funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999739445778, + "free": 99999738445778, "frozen": 0, "reserved": 0, } @@ -352,9 +352,9 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999739445778, + "free": 99999738445778, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; @@ -362,24 +362,24 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori [ { "data": { - "amount": 5000000000000, - "staker": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "amount": 500000000000000, + "staker": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Slashed", "section": "staking", }, { "data": { - "amount": 10000000000000, - "staker": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", + "amount": 1000000000000000, + "staker": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", }, "method": "Slashed", "section": "staking", }, { "data": { - "amount": 10000000000000, - "staker": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "amount": 1000000000000000, + "staker": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "Slashed", "section": "staking", @@ -641,19 +641,6 @@ exports[`Polkadot Staking > base staking tests > staking lifecycle > validator 2 ] `; -exports[`Polkadot Staking > base staking tests > test fast unstake > nominator bond events 1`] = ` -[ - { - "data": { - "amount": 100000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Bonded", - "section": "staking", - }, -] -`; - exports[`Polkadot Staking > base staking tests > test force unstaking of nominator > force unstake bad origin events 1`] = ` [ { @@ -740,54 +727,54 @@ exports[`Polkadot Staking > fast unstake > test fast unstake > nominator bond ev exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 99999866589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 99999866589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 99999866589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 99999866589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 99999866589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, + "free": 99999866589258, "frozen": 0, - "reserved": 10000000000000, + "reserved": 1000000000000000, } `; @@ -811,87 +798,29 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash with bad orig ] `; -exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds post slash 1`] = ` -{ - "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, - "frozen": 0, - "reserved": 5000000000000, -} -`; - exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 97499867589258, + "free": 997499867589258, "frozen": 0, "reserved": 2500000000000, } `; -exports[`Polkadot Staking > slashing tests > unapplied slash > balances slash events 1`] = `[]`; - -exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds post slash 1`] = ` -{ - "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, - "frozen": 0, - "reserved": 0, -} -`; - exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 97499867589258, + "free": 997499867589258, "frozen": 0, "reserved": 2500000000000, } `; -exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds post slash 1`] = ` -{ - "flags": "0x80000000000000000000000000000000", - "free": 89999867589258, - "frozen": 0, - "reserved": 0, -} -`; - exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 97499867589258, + "free": 997499867589258, "frozen": 0, "reserved": 2500000000000, } `; - -exports[`Polkadot Staking > slashing tests > unapplied slash > staking slash events 1`] = ` -[ - { - "data": { - "amount": 5000000000000, - "staker": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - }, - "method": "Slashed", - "section": "staking", - }, - { - "data": { - "amount": 10000000000000, - "staker": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", - }, - "method": "Slashed", - "section": "staking", - }, - { - "data": { - "amount": 10000000000000, - "staker": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", - }, - "method": "Slashed", - "section": "staking", - }, -] -`; diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index 76215f007..2e444d20e 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -1260,7 +1260,8 @@ async function unappliedSlashTest< await client.dev.setHead(eraChangeBlock - 1) } - const balances = 10000e10 + const existentialDeposit = client.api.consts.balances.existentialDeposit.toBigInt() + const balances = existentialDeposit * 10n ** 5n await client.dev.setStorage({ System: { account: [ @@ -1347,6 +1348,7 @@ async function unappliedSlashTest< expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') + // If on an post-migration Asset Hub, `applySlash` can be called, instead of having to move to era change. if (testConfig.relayOrPara === 'Para') { // Manually apply the slash. const applySlashTx = client.api.tx.staking.applySlash(...slashKey) @@ -1393,41 +1395,65 @@ async function cancelDeferredSlashTest< const charlie = testAccounts.charlie const dave = testAccounts.dave - const eraChangeBlock = await locateEraChange(client) - if (eraChangeBlock === undefined) { - // This test only makes sense to run if there's an active era. - return - } + let eraChangeBlock: number | undefined + if (testConfig.relayOrPara === 'Relay') { + eraChangeBlock = await locateEraChange(client) + if (eraChangeBlock === undefined) { + // This test only makes sense to run if there's an active era. + return + } - // Go to a block before the one in which the era changes. In the two blocks before it changes, - // 1. the call to `cancel_deferred_slash` will be scheduled - // 2. the stakers in question will call `bond` - await client.dev.setHead(eraChangeBlock - 2) + // Go to a block before the one in which the era changes. In the two blocks before it changes, + // 1. the call to `cancel_deferred_slash` will be scheduled + // 2. the stakers in question will call `bond` + await client.dev.setHead(eraChangeBlock - 2) + } const activeEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() - const bondAmount = 1000e10 - const slashAmount = bondAmount / 2 + const existentialDeposit = client.api.consts.balances.existentialDeposit.toBigInt() + const bondAmount = existentialDeposit * 10n ** 5n + const balance = bondAmount + bondAmount / 10n + const slashAmount = bondAmount / 2n + + let slashKey: any + let slashKeyNewComponent: any | undefined + let slashValue: any + match(testConfig.relayOrPara) + .with('Relay', () => { + slashKey = [activeEra + 1] + slashValue = [ + { + validator: alice.address, + own: slashAmount, + others: [ + [bob.address, slashAmount], + [charlie.address, slashAmount], + ], + reporters: [dave.address], + payout: bondAmount, + }, + ] + }) + .with('Para', () => { + slashKeyNewComponent = [alice.address, 0, 0] + slashKey = [activeEra, slashKeyNewComponent] + slashValue = { + validator: alice.address, + own: slashAmount, + others: [ + [bob.address, slashAmount], + [charlie.address, slashAmount], + ], + reporter: dave.address, + payout: bondAmount, + } + }) + .exhaustive() // Insert a slash into storage. await client.dev.setStorage({ Staking: { - UnappliedSlashes: [ - [ - [activeEra + 1], - [ - { - validator: alice.address, - own: slashAmount, - others: [ - [bob.address, slashAmount], - [charlie.address, slashAmount], - ], - reporters: [dave.address], - payout: bondAmount, - }, - ], - ], - ], + UnappliedSlashes: [[slashKey, slashValue]], }, }) @@ -1436,9 +1462,9 @@ async function cancelDeferredSlashTest< await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: 10000e10 } }], - [[bob.address], { providers: 1, data: { free: 10000e10 } }], - [[charlie.address], { providers: 1, data: { free: 10000e10 } }], + [[alice.address], { providers: 1, data: { free: balance } }], + [[bob.address], { providers: 1, data: { free: balance } }], + [[charlie.address], { providers: 1, data: { free: balance } }], ], }, }) @@ -1452,10 +1478,25 @@ async function cancelDeferredSlashTest< // Two blocks away from the era change. - let slash = await client.api.query.staking.unappliedSlashes(activeEra + 1) - expect(slash.length).toBe(1) + let slash = (await client.api.query.staking.unappliedSlashes(...slashKey)) as any + match(testConfig.relayOrPara) + .with('Relay', () => { + expect(slash.length).toBe(1) + }) + .with('Para', () => { + expect(slash.toJSON()).toBeDefined() + }) + .exhaustive() - const cancelDeferredSlashTx = client.api.tx.staking.cancelDeferredSlash(activeEra + 1, [0]) + let cancelDeferredSlashTx: any + match(testConfig.relayOrPara) + .with('Relay', () => { + cancelDeferredSlashTx = client.api.tx.staking.cancelDeferredSlash(activeEra + 1, [0]) + }) + .with('Para', () => { + cancelDeferredSlashTx = client.api.tx.staking.cancelDeferredSlash(activeEra, [slashKeyNewComponent]) + }) + .exhaustive() await scheduleInlineCallWithOrigin(client, cancelDeferredSlashTx.method.toHex(), origin, testConfig.relayOrPara) // Check stakers' bonded funds before the slash would be applied. @@ -1472,32 +1513,51 @@ async function cancelDeferredSlashTest< // And the slash should have been cancelled. - slash = await client.api.query.staking.unappliedSlashes(activeEra + 1) - expect(slash.length).toBe(0) + slash = (await client.api.query.staking.unappliedSlashes(...slashKey)) as any + match(testConfig.relayOrPara) + .with('Relay', () => { + expect(slash.length).toBe(0) + }) + .with('Para', () => { + expect(slash.toJSON()).toBeNull() + }) + .exhaustive() // Era-boundary block creation tends to be slow. - await client.dev.setStorage({ - ParasDisputes: { - $removePrefix: ['disputes', 'included'], - }, - Dmp: { - $removePrefix: ['downwardMessageQueues'], - }, - Staking: { - $removePrefix: ['erasStakersOverview', 'erasStakersPaged', 'erasStakers'], - }, - Session: { - $removePrefix: ['nextKeys'], - }, - }) + if (testConfig.relayOrPara === 'Relay') { + await client.dev.setStorage({ + ParasDisputes: { + $removePrefix: ['disputes', 'included'], + }, + Dmp: { + $removePrefix: ['downwardMessageQueues'], + }, + Staking: { + $removePrefix: ['erasStakersOverview', 'erasStakersPaged', 'erasStakers'], + }, + Session: { + $removePrefix: ['nextKeys'], + }, + }) + } // This new block marks the start of the new era. + + // If on an post-migration Asset Hub, `applySlash` can be called, instead of having to move to era change. + if (testConfig.relayOrPara === 'Para') { + // Manually apply the slash. + const applySlashTx = client.api.tx.staking.applySlash(...slashKey) + await scheduleInlineCallWithOrigin(client, applySlashTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + } + await client.dev.newBlock() // The era should have changed. - const newActiveEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() - expect(newActiveEra).toBe(activeEra + 1) + if (testConfig.relayOrPara === 'Relay') { + const newActiveEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() + expect(newActiveEra).toBe(activeEra + 1) + } // None of the validators' funds should have been slashed. @@ -1666,16 +1726,19 @@ async function setInvulnerablesTest< // Locate era change // - const eraChangeBlock = await locateEraChange(client) - if (eraChangeBlock === undefined) { - // This test only makes sense to run if there's an active era. - console.warn('Unable to find era change block, skipping unapplied slash test') - return - } + let eraChangeBlock: number | undefined + if (testConfig.relayOrPara === 'Relay') { + eraChangeBlock = await locateEraChange(client) + if (eraChangeBlock === undefined) { + // This test only makes sense to run if there's an active era. + console.warn('Unable to find era change block, skipping unapplied slash test') + return + } - // Go to a block before the era change - accounts need to bond, start validating, and invulnerables still need to be - // set. - await client.dev.setHead(eraChangeBlock - 3) + // Go to a block before the era change - accounts need to bond, start validating, and invulnerables still need to be + // set. + await client.dev.setHead(eraChangeBlock - 3) + } // // Fund accounts @@ -1691,14 +1754,14 @@ async function setInvulnerablesTest< if (minValidatorBond === 0n) { minValidatorBond = ed * 10n ** 5n } - const bondAmount = minValidatorBond + minValidatorBond / 10n + const balance = minValidatorBond + minValidatorBond / 10n await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: bondAmount } }], - [[bob.address], { providers: 1, data: { free: bondAmount } }], - [[charlie.address], { providers: 1, data: { free: bondAmount } }], + [[alice.address], { providers: 1, data: { free: balance } }], + [[bob.address], { providers: 1, data: { free: balance } }], + [[charlie.address], { providers: 1, data: { free: balance } }], ], }, }) @@ -1755,40 +1818,62 @@ async function setInvulnerablesTest< const slashAmount = minValidatorBond / 2n + let slashKey: any + let slashValue: any + match(testConfig.relayOrPara) + .with('Relay', () => { + slashKey = [activeEra + 1] + slashValue = [ + { + validator: alice.address, + own: slashAmount, + others: [ + [bob.address, slashAmount * 2n], + [charlie.address, slashAmount * 3n], + ], + reporters: [dave.address], + payout: minValidatorBond, + }, + ] + }) + .with('Para', () => { + const slashKeyNewComponent = [alice.address, 0, 0] + slashKey = [activeEra, slashKeyNewComponent] + slashValue = { + validator: alice.address, + own: slashAmount, + others: [ + [bob.address, slashAmount * 2n], + [charlie.address, slashAmount * 3n], + ], + reporter: dave.address, + payout: minValidatorBond, + } + }) + .exhaustive() + + if (testConfig.relayOrPara === 'Relay') { + await client.dev.setStorage({ + ParasDisputes: { + $removePrefix: ['disputes', 'included'], + }, + Dmp: { + $removePrefix: ['downwardMessageQueues'], + }, + Staking: { + $removePrefix: ['erasStakersOverview', 'erasStakersPaged', 'erasStakers'], + }, + Session: { + $removePrefix: ['nextKeys'], + }, + }) + } + // Insert a slash into storage. The accounts named here as validators/nominators need not have called // `validate`/`nominate` - they must only exist in the staking ledger as having bonded funds. await client.dev.setStorage({ - ParasDisputes: { - $removePrefix: ['disputes', 'included'], - }, - Dmp: { - $removePrefix: ['downwardMessageQueues'], - }, Staking: { - $removePrefix: ['erasStakersOverview', 'erasStakersPaged', 'erasStakers'], - UnappliedSlashes: [ - [ - [activeEra + 1], - [ - { - validator: alice.address, - // Less than the bonded funds. - own: slashAmount, - others: [ - // Exactly the bonded funds. - [bob.address, slashAmount * 2n], - // More than the bonded funds. - [charlie.address, slashAmount * 3n], - ], - reporters: [dave.address], - payout: bondAmount, - }, - ], - ], - ], - }, - Session: { - $removePrefix: ['nextKeys'], + UnappliedSlashes: [[slashKey, slashValue]], }, }) @@ -1802,6 +1887,12 @@ async function setInvulnerablesTest< expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') + if (testConfig.relayOrPara === 'Para') { + // Manually apply the slash. + const applySlashTx = client.api.tx.staking.applySlash(...slashKey) + await scheduleInlineCallWithOrigin(client, applySlashTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + } + // With this block, the slash will have been applied. await client.dev.newBlock() @@ -1817,10 +1908,12 @@ async function setInvulnerablesTest< expect(charlieFundsPostSlash.data.toJSON()).toMatchSnapshot('charlie funds post slash') expect(aliceFundsPostSlash.data.reserved.toBigInt()).toBe(aliceFundsPreSlash.data.reserved.toBigInt() - slashAmount) - expect(bobFundsPostSlash.data.reserved.toBigInt()).toBe(bobFundsPreSlash.data.reserved.toBigInt() - bondAmount) + expect(bobFundsPostSlash.data.reserved.toBigInt()).toBe(bobFundsPreSlash.data.reserved.toBigInt() - slashAmount * 2n) + expect(bobFundsPostSlash.data.reserved.toBigInt()).toBe(0n) expect(charlieFundsPostSlash.data.reserved.toBigInt()).toBe( - charlieFundsPreSlash.data.reserved.toBigInt() - bondAmount, + charlieFundsPreSlash.data.reserved.toBigInt() - slashAmount * 2n, ) + expect(charlieFundsPostSlash.data.reserved.toBigInt()).toBe(0n) } /// -------------- From 029417d019602f4a24c3d98cbb73c77a11aa7a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 3 Sep 2025 02:08:18 +0100 Subject: [PATCH 07/18] Refactor governance E2E tests to work post-AHM --- .../kusama/src/kusama.governance.e2e.test.ts | 9 +- .../src/polkadot.governance.e2e.test.ts | 4 +- packages/shared/src/governance.ts | 99 ++++++++++++------- packages/shared/src/helpers/index.ts | 30 +++++- packages/shared/src/vesting.ts | 18 ++-- 5 files changed, 111 insertions(+), 49 deletions(-) diff --git a/packages/kusama/src/kusama.governance.e2e.test.ts b/packages/kusama/src/kusama.governance.e2e.test.ts index 5a967858f..a5bc9c7cc 100644 --- a/packages/kusama/src/kusama.governance.e2e.test.ts +++ b/packages/kusama/src/kusama.governance.e2e.test.ts @@ -1,4 +1,11 @@ import { kusama } from '@e2e-test/networks/chains' import { baseGovernanceE2ETests, registerTestTree } from '@e2e-test/shared' +import type { TestConfig } from '@e2e-test/shared/helpers' -registerTestTree(baseGovernanceE2ETests(kusama, { testSuiteName: 'Kusama Governance', addressEncoding: 2 })) +const testConfig = { + testSuiteName: 'Kusama Governance', + addressEncoding: 2, + relayOrPara: 'Relay', +} as TestConfig<'Relay'> + +registerTestTree(baseGovernanceE2ETests(kusama, testConfig)) diff --git a/packages/polkadot/src/polkadot.governance.e2e.test.ts b/packages/polkadot/src/polkadot.governance.e2e.test.ts index a64b05baa..576bc6930 100644 --- a/packages/polkadot/src/polkadot.governance.e2e.test.ts +++ b/packages/polkadot/src/polkadot.governance.e2e.test.ts @@ -1,4 +1,6 @@ import { polkadot } from '@e2e-test/networks/chains' import { baseGovernanceE2ETests, registerTestTree } from '@e2e-test/shared' -registerTestTree(baseGovernanceE2ETests(polkadot, { testSuiteName: 'Polkadot Governance', addressEncoding: 0 })) +registerTestTree( + baseGovernanceE2ETests(polkadot, { testSuiteName: 'Polkadot Governance', addressEncoding: 0, relayOrPara: 'Relay' }), +) diff --git a/packages/shared/src/governance.ts b/packages/shared/src/governance.ts index 604cf16ed..9c7b4cd6a 100644 --- a/packages/shared/src/governance.ts +++ b/packages/shared/src/governance.ts @@ -16,13 +16,16 @@ import { encodeAddress } from '@polkadot/util-crypto' import { assert, expect } from 'vitest' +import { match } from 'ts-pattern' import { check, checkEvents, checkSystemEvents, expectPjsEqual, + getBlockNumber, objectCmp, scheduleInlineCallWithOrigin, + type TestConfig, } from './helpers/index.js' /// ------- @@ -112,7 +115,7 @@ function referendumCmp( export async function referendumLifecycleTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) // Fund test accounts not already provisioned in the test chain spec. @@ -127,11 +130,6 @@ export async function referendumLifecycleTest< }, }) - /** - * Get current referendum count i.e. the next referendum's index - */ - const referendumIndex = await client.api.query.referenda.referendumCount() - /** * Submit a new referendum */ @@ -157,6 +155,15 @@ export async function referendumLifecycleTest< .redact({ removeKeys: unwantedFields }) .toMatchSnapshot('referendum submission events') + const subEvents = await client.api.query.system.events() + const [refEvent] = subEvents.filter((record) => { + const { event } = record + return event.section === 'referenda' && event.method === 'Submitted' + }) + assert(client.api.events.referenda.Submitted.is(refEvent.event)) + const refEventData = refEvent.event.data + const referendumIndex = refEventData[0].toNumber() + /** * Check the created referendum's data */ @@ -202,7 +209,7 @@ export async function referendumLifecycleTest< expect(ongoingRefPreDecDep.decisionDeposit.isNone).toBeTruthy() expect(ongoingRefPreDecDep.submissionDeposit.who.toString()).toBe( - encodeAddress(devAccounts.alice.address, addressEncoding), + encodeAddress(devAccounts.alice.address, testConfig.addressEncoding), ) expect(ongoingRefPreDecDep.submissionDeposit.amount.toString()).toBe( client.api.consts.referenda.submissionDeposit.toString(), @@ -252,7 +259,7 @@ export async function referendumLifecycleTest< assert(ongoingRefPostDecDep.decisionDeposit.isSome) expect(ongoingRefPostDecDep.decisionDeposit.unwrap().who.toString()).toBe( - encodeAddress(devAccounts.bob.address, addressEncoding), + encodeAddress(devAccounts.bob.address, testConfig.addressEncoding), ) expect(ongoingRefPostDecDep.decisionDeposit.unwrap().amount.toString()).toBe( smallTipper[1].decisionDeposit.toString(), @@ -278,7 +285,17 @@ export async function referendumLifecycleTest< let refPre = ongoingRefPostDecDep let refPost: PalletReferendaReferendumStatusConvictionVotingTally - for (let i = 0; i < smallTipper[1].preparePeriod.toNumber() - 2; i++) { + let iters: number + match(testConfig.relayOrPara) + .with('Relay', async () => { + iters = smallTipper[1].preparePeriod.toNumber() - 2 + }) + .with('Para', async () => { + iters = (smallTipper[1].preparePeriod.toNumber() - 2) / 2 + }) + .exhaustive() + + for (let i = 0; i < iters!; i++) { await client.dev.newBlock() referendumDataOpt = await client.api.query.referenda.referendumInfoFor(referendumIndex) assert(referendumDataOpt.isSome, "referendum's data cannot be `None`") @@ -378,16 +395,16 @@ export async function referendumLifecycleTest< .redact({ removeKeys: unwantedRefIx }) .toMatchSnapshot("charlie's votes after casting his") expect(charlieCastVotes.votes.length).toBe(1) - expect(charlieCastVotes.votes[0][0].toNumber()).toBe(referendumIndex.toNumber()) + expect(charlieCastVotes.votes[0][0].toNumber()).toBe(referendumIndex) const charlieVotes = charlieCastVotes.votes[0][1].asStandard expect(charlieVotes.vote.conviction.isLocked3x).toBeTruthy() expect(charlieVotes.vote.isAye).toBeTruthy() - let blockNumber = await client.api.query.system.number() + let blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) // After a vote, the referendum's alarm is set to the block following the one the vote tx was // included in. - expect(ongoingRefFirstVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber.toNumber() + 1) + expect(ongoingRefFirstVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber + 1) // Placing a vote for a referendum should change nothing BUT: // 1. the tally, and @@ -448,16 +465,16 @@ export async function referendumLifecycleTest< .toMatchSnapshot("dave's votes after casting his") expect(daveCastVotes.votes.length).toBe(1) - expect(daveCastVotes.votes[0][0].toNumber()).toBe(referendumIndex.toNumber()) + expect(daveCastVotes.votes[0][0].toNumber()).toBe(referendumIndex) const daveVote = daveCastVotes.votes[0][1].asSplit expect(daveVote.aye.toNumber()).toBe(ayeVote) expect(daveVote.nay.toNumber()).toBe(nayVote) - blockNumber = await client.api.query.system.number() + blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) // After a vote, the referendum's alarm is set to the block following the one the vote tx was // included in. - expect(ongoingRefSecondVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber.toNumber() + 1) + expect(ongoingRefSecondVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber + 1) // Placing a split vote for a referendum should change nothing BUT: // 1. the tally, and @@ -516,17 +533,17 @@ export async function referendumLifecycleTest< .redact({ removeKeys: unwantedRefIx }) .toMatchSnapshot("eve's votes after casting hers") expect(eveCastVotes.votes.length).toBe(1) - expect(eveCastVotes.votes[0][0].toNumber()).toBe(referendumIndex.toNumber()) + expect(eveCastVotes.votes[0][0].toNumber()).toBe(referendumIndex) const eveVote = eveCastVotes.votes[0][1].asSplitAbstain expect(eveVote.aye.toNumber()).toBe(ayeVote) expect(eveVote.nay.toNumber()).toBe(nayVote) expect(eveVote.abstain.toNumber()).toBe(abstainVote) - blockNumber = await client.api.query.system.number() + blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) // As before, after another vote, the referendum's alarm is set to the block following the one the vote tx was // included in. - expect(ongoingRefThirdVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber.toNumber() + 1) + expect(ongoingRefThirdVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber + 1) // Placing a split abstain vote for a referendum should change nothing BUT: // 1. the tally, and @@ -546,7 +563,7 @@ export async function referendumLifecycleTest< // Cancel the referendum using the scheduler pallet to simulate a root origin - await scheduleInlineCallWithOrigin(client, cancelRefCall.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelRefCall.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -569,7 +586,7 @@ export async function referendumLifecycleTest< assert(client.api.events.referenda.Cancelled.is(cancellationEvent.event)) const [index, tally] = cancellationEvent.event.data - expect(index.toNumber()).toBe(referendumIndex.toNumber()) + expect(index.toNumber()).toBe(referendumIndex) expect(tally.toJSON()).toEqual(votes) // Now, check the referendum's data, post-cancellation @@ -582,16 +599,22 @@ export async function referendumLifecycleTest< const cancelledRef: ITuple<[u32, Option, Option]> = referendumDataOpt.unwrap().asCancelled - blockNumber = await client.api.query.system.number() - expect(cancelledRef[0].toNumber()).toBe(blockNumber.toNumber()) + blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + match(testConfig.relayOrPara) + .with('Relay', async () => { + expect(cancelledRef[0].toNumber()).toBe(blockNumber) + }) + .with('Para', async () => { + expect(cancelledRef[0].toNumber()).toBe(blockNumber - 2) + }) // Check that the referendum's submission deposit was refunded to Alice expect(cancelledRef[1].unwrap().toJSON()).toEqual({ - who: encodeAddress(devAccounts.alice.address, addressEncoding), + who: encodeAddress(devAccounts.alice.address, testConfig.addressEncoding), amount: client.api.consts.referenda.submissionDeposit.toNumber(), }) // Check that the referendum's submission deposit was refunded to Bob expect(cancelledRef[2].unwrap().toJSON()).toEqual({ - who: encodeAddress(devAccounts.bob.address, addressEncoding), + who: encodeAddress(devAccounts.bob.address, testConfig.addressEncoding), amount: smallTipper[1].decisionDeposit.toNumber(), }) @@ -728,7 +751,7 @@ export async function referendumLifecycleTest< export async function referendumLifecycleKillTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) // Fund test accounts not already provisioned in the test chain spec. await client.dev.setStorage({ @@ -743,7 +766,7 @@ export async function referendumLifecycleKillTest< /** * Get current referendum count i.e. the next referendum's index */ - const referendumIndex = await client.api.query.referenda.referendumCount() + const referendumIndex = (await client.api.query.referenda.referendumCount()).toNumber() /** * Submit a new referendum @@ -795,7 +818,7 @@ export async function referendumLifecycleKillTest< * Kill the referendum using the scheduler pallet to simulate a root origin for the call. */ - await scheduleInlineCallWithOrigin(client, killRefCall.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, killRefCall.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -817,16 +840,16 @@ export async function referendumLifecycleKillTest< const { event } = record if (client.api.events.referenda.Killed.is(event)) { const [index, tally] = event.data - expect(index.toNumber()).toBe(referendumIndex.toNumber()) + expect(index.toNumber()).toBe(referendumIndex) expect(tally.ayes.toNumber()).toBe(0) expect(tally.nays.toNumber()).toBe(0) expect(tally.support.toNumber()).toBe(0) } else if (client.api.events.referenda.DepositSlashed.is(event)) { const [who, amount] = event.data - if (who.toString() === encodeAddress(devAccounts.alice.address, addressEncoding)) { + if (who.toString() === encodeAddress(devAccounts.alice.address, testConfig.addressEncoding)) { expect(amount.toNumber()).toBe(client.api.consts.referenda.submissionDeposit.toNumber()) - } else if (who.toString() === encodeAddress(devAccounts.bob.address, addressEncoding)) { + } else if (who.toString() === encodeAddress(devAccounts.bob.address, testConfig.addressEncoding)) { expect(amount.toNumber()).toBe(smallTipper[1].decisionDeposit.toNumber()) } else { expect.fail('malformed decision slashed events') @@ -840,9 +863,15 @@ export async function referendumLifecycleKillTest< expect(referendumDataOpt.unwrap().isKilled, 'referendum should be killed!').toBeTruthy() // The only information left from the killed referendum is the block number when it was killed. - const blockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) const killedRef: u32 = referendumDataOpt.unwrap().asKilled - expect(killedRef.toNumber()).toBe(blockNumber) + match(testConfig.relayOrPara) + .with('Relay', async () => { + expect(killedRef.toNumber()).toBe(blockNumber) + }) + .with('Para', async () => { + expect(killedRef.toNumber()).toBe(blockNumber - 2) + }) } /** @@ -898,7 +927,7 @@ export async function preimageTest< export function baseGovernanceE2ETests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, testConfig: { testSuiteName: string; addressEncoding: number }): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { return { kind: 'describe', label: testConfig.testSuiteName, @@ -910,12 +939,12 @@ export function baseGovernanceE2ETests< { kind: 'test', label: 'referendum lifecycle test - submission, decision deposit, various voting should all work', - testFn: async () => await referendumLifecycleTest(chain, testConfig.addressEncoding), + testFn: async () => await referendumLifecycleTest(chain, testConfig), }, { kind: 'test', label: 'referendum lifecycle test 2 - submission, decision deposit, and killing should work', - testFn: async () => await referendumLifecycleKillTest(chain, testConfig.addressEncoding), + testFn: async () => await referendumLifecycleKillTest(chain, testConfig), }, ], }, diff --git a/packages/shared/src/helpers/index.ts b/packages/shared/src/helpers/index.ts index 5b5856c0d..6e908cfe3 100644 --- a/packages/shared/src/helpers/index.ts +++ b/packages/shared/src/helpers/index.ts @@ -98,6 +98,9 @@ export function objectCmp( */ export type RelayOrPara = 'Relay' | 'Para' +/** Whether async backing is enabled or disabled on the querying parachain. */ +export type AsyncBacking = 'Enabled' | 'Disabled' + /** * Given a PJS client and a call, modify the `scheduler` pallet's `agenda` storage to execute the extrinsic in the next * block. @@ -128,7 +131,8 @@ export async function scheduleCallWithOrigin( ) { const scheduledBlock = await match(relayOrPara) .with('Relay', async () => (await client.api.rpc.chain.getHeader()).number.toNumber() + 1) - .otherwise(async () => (await client.api.query.parachainSystem.lastRelayChainBlockNumber()).toNumber()) + .with('Para', async () => ((await client.api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) + .exhaustive() await client.dev.setStorage({ Scheduler: { @@ -178,9 +182,9 @@ export async function scheduleLookupCallWithOrigin( }, lookupCall: { hash: any; len: any }, origin: any, - isParachain: RelayOrPara = 'Relay', + relayOrPara: RelayOrPara = 'Relay', ) { - await scheduleCallWithOrigin(client, { Lookup: lookupCall }, origin, isParachain) + await scheduleCallWithOrigin(client, { Lookup: lookupCall }, origin, relayOrPara) } /** @@ -354,6 +358,26 @@ export async function setValidatorsStorage( }) } +/** + * Get the last known block number for a given chain. + * + * @param api Promise-based RPC wrapper around the endpoint of a Polkadot chain. + * @param relayOrPara Whether the block provider being queried is local or external (e.g. a parachain querying its + * relay chain) + * @returns The last known block number + */ +export async function getBlockNumber(api: ApiPromise, relayOrPara: RelayOrPara): Promise { + return await match(relayOrPara) + .with('Relay', async () => (await api.rpc.chain.getHeader()).number.toNumber()) + .with('Para', async () => ((await api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) + .exhaustive() +} + +/** + * Interface specifying the configuration data required for an E2E test suite. + * + * Only parachains need to specify the `asyncBacking` field. + */ export interface TestConfig { testSuiteName: string addressEncoding: number diff --git a/packages/shared/src/vesting.ts b/packages/shared/src/vesting.ts index 48c6c2fd8..914a9284e 100644 --- a/packages/shared/src/vesting.ts +++ b/packages/shared/src/vesting.ts @@ -9,7 +9,7 @@ import { encodeAddress } from '@polkadot/util-crypto' import { assert, expect } from 'vitest' -import { check, checkEvents, expectPjsEqual, scheduleInlineCallWithOrigin } from './helpers/index.js' +import { check, checkEvents, expectPjsEqual, scheduleInlineCallWithOrigin, type TestConfig } from './helpers/index.js' /** * Test that a vested transfer works as expected. @@ -23,7 +23,7 @@ import { check, checkEvents, expectPjsEqual, scheduleInlineCallWithOrigin } from async function testVestedTransfer< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const alice = defaultAccountsSr25519.alice @@ -62,7 +62,7 @@ async function testVestedTransfer< assert(client.api.events.vesting.VestingUpdated.is(ev1.event)) let vestingUpdatedEvent = ev1.event.data - expect(vestingUpdatedEvent.account.toString()).toBe(encodeAddress(bob.address, addressEncoding)) + expect(vestingUpdatedEvent.account.toString()).toBe(encodeAddress(bob.address, testConfig.addressEncoding)) // The vesting schedule began before the vested transfer, so two blocks' worth of unvesting should be deducted from // the unvested amount in the event emitted in this block. expect(vestingUpdatedEvent.unvested.toNumber()).toBe(locked - perBlock * 2) @@ -106,7 +106,7 @@ async function testVestedTransfer< assert(client.api.events.vesting.VestingUpdated.is(ev2.event)) vestingUpdatedEvent = ev2.event.data - expect(vestingUpdatedEvent.account.toString()).toBe(encodeAddress(bob.address, addressEncoding)) + expect(vestingUpdatedEvent.account.toString()).toBe(encodeAddress(bob.address, testConfig.addressEncoding)) expect(vestingUpdatedEvent.unvested.toNumber()).toBe(locked - perBlock * 3) // Check Bob's free and frozen balances after Alice's vesting @@ -144,7 +144,7 @@ async function testVestedTransfer< assert(client.api.events.vesting.VestingCompleted.is(ev3.event)) const vestingCompletedEvent = ev3.event.data - expect(vestingCompletedEvent.account.toString()).toBe(encodeAddress(bob.address, addressEncoding)) + expect(vestingCompletedEvent.account.toString()).toBe(encodeAddress(bob.address, testConfig.addressEncoding)) const vestingBalance3 = await client.api.query.vesting.vesting(bob.address) expect(vestingBalance3.isNone).toBe(true) @@ -153,7 +153,7 @@ async function testVestedTransfer< assert(client.api.events.balances.Withdraw.is(balEv.event)) const balanceWithdrawalEvent = balEv.event.data - expect(balanceWithdrawalEvent.who.toString()).toBe(encodeAddress(bob.address, addressEncoding)) + expect(balanceWithdrawalEvent.who.toString()).toBe(encodeAddress(bob.address, testConfig.addressEncoding)) // Net of the fees from having called `vest` once, Bob's balance should the the vested amount, plus his initial // balance. @@ -503,7 +503,7 @@ async function testMergeSchedulesNoSchedule< export function relayVestingE2ETests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, testConfig: { testSuiteName: string; addressEncoding: number }): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { return { kind: 'describe', label: testConfig.testSuiteName, @@ -511,7 +511,7 @@ export function relayVestingE2ETests< { kind: 'test', label: 'vesting schedule lifecycle', - testFn: () => testVestedTransfer(chain, testConfig.addressEncoding), + testFn: () => testVestedTransfer(chain, testConfig), }, { kind: 'test', @@ -545,7 +545,7 @@ export function relayVestingE2ETests< export function assetHubVestingE2ETests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, testConfig: { testSuiteName: string }): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { return { kind: 'describe', label: testConfig.testSuiteName, From 958c0186332ebd95382fd653c69c1175545c419a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 3 Sep 2025 02:45:25 +0100 Subject: [PATCH 08/18] Swap test accounts used in nom. pools test --- packages/shared/src/nomination-pools.ts | 209 ++++++++++++------------ 1 file changed, 101 insertions(+), 108 deletions(-) diff --git a/packages/shared/src/nomination-pools.ts b/packages/shared/src/nomination-pools.ts index a78468ba1..2ff3c8ca6 100644 --- a/packages/shared/src/nomination-pools.ts +++ b/packages/shared/src/nomination-pools.ts @@ -1,6 +1,6 @@ import { sendTransaction } from '@acala-network/chopsticks-testing' -import { type Chain, defaultAccountsSr25519 } from '@e2e-test/networks' +import { type Chain, testAccounts } from '@e2e-test/networks' import { type RootTestTree, setupNetworks } from '@e2e-test/shared' import type { ApiPromise } from '@polkadot/api' @@ -21,6 +21,7 @@ import { objectCmp, scheduleInlineCallWithOrigin, setValidatorsStorage, + type TestConfig, } from './helpers/index.js' /// ------- @@ -109,11 +110,11 @@ async function nominationPoolCreationFailureTest< // Attempt to create a pool with insufficient funds const createNomPoolTx = client.api.tx.nominationPools.create( depositorMinBond - 1, - defaultAccountsSr25519.alice.address, - defaultAccountsSr25519.bob.address, - defaultAccountsSr25519.charlie.address, + testAccounts.alice.address, + testAccounts.bob.address, + testAccounts.charlie.address, ) - await sendTransaction(createNomPoolTx.signAsync(defaultAccountsSr25519.alice)) + await sendTransaction(createNomPoolTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -169,18 +170,18 @@ async function nominationPoolCreationFailureTest< async function nominationPoolLifecycleTest< TCustom extends Record | undefined, TInitStoragesRelay extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const ferdie = defaultAccountsSr25519.keyring.addFromUri('//Ferdie') + const ferdie = testAccounts.keyring.addFromUri('//fresh_ferdie') // Fund test accounts not already provisioned in the test chain spec. await client.dev.setStorage({ System: { account: [ - [[defaultAccountsSr25519.bob.address], { providers: 1, data: { free: 10000e10 } }], - [[defaultAccountsSr25519.charlie.address], { providers: 1, data: { free: 10000e10 } }], - [[defaultAccountsSr25519.dave.address], { providers: 1, data: { free: 10000e10 } }], - [[defaultAccountsSr25519.eve.address], { providers: 1, data: { free: 10000e10 } }], + [[testAccounts.bob.address], { providers: 1, data: { free: 10000e10 } }], + [[testAccounts.charlie.address], { providers: 1, data: { free: 10000e10 } }], + [[testAccounts.dave.address], { providers: 1, data: { free: 10000e10 } }], + [[testAccounts.eve.address], { providers: 1, data: { free: 10000e10 } }], [[ferdie.address], { providers: 1, data: { free: 10000e10 } }], ], }, @@ -201,11 +202,11 @@ async function nominationPoolLifecycleTest< const createNomPoolTx = client.api.tx.nominationPools.create( depositorMinBond, - defaultAccountsSr25519.alice.address, - defaultAccountsSr25519.alice.address, - defaultAccountsSr25519.alice.address, + testAccounts.alice.address, + testAccounts.alice.address, + testAccounts.alice.address, ) - const createNomPoolEvents = await sendTransaction(createNomPoolTx.signAsync(defaultAccountsSr25519.alice)) + const createNomPoolEvents = await sendTransaction(createNomPoolTx.signAsync(testAccounts.alice)) /// Check that prior to the block taking effect, the pool does not yet exist with the /// most recently available pool ID. @@ -242,10 +243,10 @@ async function nominationPoolLifecycleTest< depositorMinBond, ) await check(nominationPoolPostCreation.roles).toMatchObject({ - depositor: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - root: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - nominator: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - bouncer: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), + depositor: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + root: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + nominator: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + bouncer: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), }) expect(nominationPoolPostCreation.state.isOpen, 'Pool should be open after creation').toBe(true) @@ -255,11 +256,11 @@ async function nominationPoolLifecycleTest< const updateRolesTx = client.api.tx.nominationPools.updateRoles( nomPoolId, - { Set: defaultAccountsSr25519.bob.address }, - { Set: defaultAccountsSr25519.charlie.address }, - { Set: defaultAccountsSr25519.dave.address }, + { Set: testAccounts.bob.address }, + { Set: testAccounts.charlie.address }, + { Set: testAccounts.dave.address }, ) - const updateRolesEvents = await sendTransaction(updateRolesTx.signAsync(defaultAccountsSr25519.alice)) + const updateRolesEvents = await sendTransaction(updateRolesTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -272,10 +273,10 @@ async function nominationPoolLifecycleTest< nominationPoolCmp(nominationPoolPostCreation, nominationPoolWithRoles, ['roles']) await check(nominationPoolWithRoles.roles).toMatchObject({ - depositor: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - root: encodeAddress(defaultAccountsSr25519.bob.address, addressEncoding), - nominator: encodeAddress(defaultAccountsSr25519.charlie.address, addressEncoding), - bouncer: encodeAddress(defaultAccountsSr25519.dave.address, addressEncoding), + depositor: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + root: encodeAddress(testAccounts.bob.address, testConfig.addressEncoding), + nominator: encodeAddress(testAccounts.charlie.address, testConfig.addressEncoding), + bouncer: encodeAddress(testAccounts.dave.address, testConfig.addressEncoding), }) /** @@ -286,10 +287,7 @@ async function nominationPoolLifecycleTest< // `10e1` = `10 * 10` const commission = 1e6 - const setCommissionTx = client.api.tx.nominationPools.setCommission(nomPoolId, [ - commission, - defaultAccountsSr25519.eve.address, - ]) + const setCommissionTx = client.api.tx.nominationPools.setCommission(nomPoolId, [commission, testAccounts.eve.address]) const setCommissionMaxTx = client.api.tx.nominationPools.setCommissionMax(nomPoolId, commission * 10) @@ -309,7 +307,7 @@ async function nominationPoolLifecycleTest< setCommissionChangeRateTx, setCommissionClaimPermissionTx, ]) - const commissionEvents = await sendTransaction(commissionTx.signAsync(defaultAccountsSr25519.bob)) + const commissionEvents = await sendTransaction(commissionTx.signAsync(testAccounts.bob)) await client.dev.newBlock() @@ -329,7 +327,7 @@ async function nominationPoolLifecycleTest< const newCommissionData = { max: commission * 10, - current: [commission, encodeAddress(defaultAccountsSr25519.eve.address, addressEncoding)], + current: [commission, encodeAddress(testAccounts.eve.address, testConfig.addressEncoding)], changeRate: { maxIncrease: 1e9, minDelay: 10, @@ -363,7 +361,7 @@ async function nominationPoolLifecycleTest< } const nominateTx = client.api.tx.nominationPools.nominate(nomPoolId, validators) - const nominateEvents = await sendTransaction(nominateTx.signAsync(defaultAccountsSr25519.charlie)) + const nominateEvents = await sendTransaction(nominateTx.signAsync(testAccounts.charlie)) await client.dev.newBlock() @@ -389,7 +387,7 @@ async function nominationPoolLifecycleTest< */ const joinPoolTx = client.api.tx.nominationPools.join(minJoinBond, nomPoolId) - const joinPoolEvents = await sendTransaction(joinPoolTx.signAsync(defaultAccountsSr25519.eve)) + const joinPoolEvents = await sendTransaction(joinPoolTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -414,7 +412,7 @@ async function nominationPoolLifecycleTest< */ const bondExtraTx = client.api.tx.nominationPools.bondExtra({ FreeBalance: minJoinBond - 1 }) - const bondExtraEvents = await sendTransaction(bondExtraTx.signAsync(defaultAccountsSr25519.eve)) + const bondExtraEvents = await sendTransaction(bondExtraTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -474,8 +472,8 @@ async function nominationPoolLifecycleTest< * Unbond previously bonded funds */ - const unbondTx = client.api.tx.nominationPools.unbond(defaultAccountsSr25519.eve.address, minJoinBond - 1) - const unbondEvents = await sendTransaction(unbondTx.signAsync(defaultAccountsSr25519.eve)) + const unbondTx = client.api.tx.nominationPools.unbond(testAccounts.eve.address, minJoinBond - 1) + const unbondEvents = await sendTransaction(unbondTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -495,7 +493,7 @@ async function nominationPoolLifecycleTest< */ const chillTx = client.api.tx.nominationPools.chill(nomPoolId) - const chillEvents = await sendTransaction(chillTx.signAsync(defaultAccountsSr25519.charlie)) + const chillEvents = await sendTransaction(chillTx.signAsync(testAccounts.charlie)) await client.dev.newBlock() @@ -517,7 +515,7 @@ async function nominationPoolLifecycleTest< */ const setStateTx = client.api.tx.nominationPools.setState(nomPoolId, 'Blocked') - const setStateEvents = await sendTransaction(setStateTx.signAsync(defaultAccountsSr25519.bob)) + const setStateEvents = await sendTransaction(setStateTx.signAsync(testAccounts.bob)) await client.dev.newBlock() @@ -537,8 +535,8 @@ async function nominationPoolLifecycleTest< * Kick a member from the pool as the bouncer */ - const kickTx = client.api.tx.nominationPools.unbond(defaultAccountsSr25519.eve.address, minJoinBond) - const kickEvents = await sendTransaction(kickTx.signAsync(defaultAccountsSr25519.dave)) + const kickTx = client.api.tx.nominationPools.unbond(testAccounts.eve.address, minJoinBond) + const kickEvents = await sendTransaction(kickTx.signAsync(testAccounts.dave)) await client.dev.newBlock() @@ -561,7 +559,7 @@ async function nominationPoolLifecycleTest< */ const setDestroyingTx = client.api.tx.nominationPools.setState(nomPoolId, 'Destroying') - const setDestroyingEvents = await sendTransaction(setDestroyingTx.signAsync(defaultAccountsSr25519.bob)) + const setDestroyingEvents = await sendTransaction(setDestroyingTx.signAsync(testAccounts.bob)) await client.dev.newBlock() @@ -583,8 +581,8 @@ async function nominationPoolLifecycleTest< * process, but has not fully unbonded and withdrawn their funds. */ - const unbondDepositorTx = client.api.tx.nominationPools.unbond(defaultAccountsSr25519.alice.address, depositorMinBond) - await sendTransaction(unbondDepositorTx.signAsync(defaultAccountsSr25519.alice)) + const unbondDepositorTx = client.api.tx.nominationPools.unbond(testAccounts.alice.address, depositorMinBond) + await sendTransaction(unbondDepositorTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -632,10 +630,10 @@ async function nominationPoolSetMetadataTest< const createNomPoolEvents = await createNominationPool( client, - defaultAccountsSr25519.alice, - defaultAccountsSr25519.alice.address, - defaultAccountsSr25519.alice.address, - defaultAccountsSr25519.alice.address, + testAccounts.alice, + testAccounts.alice.address, + testAccounts.alice.address, + testAccounts.alice.address, ) /// Check that prior to the pool creation extrinsic taking effect, the pool does not yet exist with the @@ -663,7 +661,7 @@ async function nominationPoolSetMetadataTest< /// Set pool's metadata const setMetadataTx = client.api.tx.nominationPools.setMetadata(nomPoolId, 'Test pool #1, welcome') - const setMetadataEvents = await sendTransaction(setMetadataTx.signAsync(defaultAccountsSr25519.alice)) + const setMetadataEvents = await sendTransaction(setMetadataTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -693,10 +691,10 @@ async function nominationPoolDoubleJoinError< await createNominationPool( client, - defaultAccountsSr25519.alice, - defaultAccountsSr25519.bob.address, - defaultAccountsSr25519.charlie.address, - defaultAccountsSr25519.dave.address, + testAccounts.alice, + testAccounts.bob.address, + testAccounts.charlie.address, + testAccounts.dave.address, ) await client.dev.newBlock() @@ -708,8 +706,8 @@ async function nominationPoolDoubleJoinError< await client.dev.setStorage({ System: { account: [ - [[defaultAccountsSr25519.bob.address], { providers: 1, data: { free: 10000e10 } }], - [[defaultAccountsSr25519.eve.address], { providers: 1, data: { free: 10000e10 } }], + [[testAccounts.bob.address], { providers: 1, data: { free: 10000e10 } }], + [[testAccounts.eve.address], { providers: 1, data: { free: 10000e10 } }], ], }, }) @@ -717,7 +715,7 @@ async function nominationPoolDoubleJoinError< const minJoinBond = await client.api.query.nominationPools.minJoinBond() const joinPoolTx = client.api.tx.nominationPools.join(minJoinBond, firstPoolId) - const joinPoolEvents = await sendTransaction(joinPoolTx.signAsync(defaultAccountsSr25519.eve)) + const joinPoolEvents = await sendTransaction(joinPoolTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -738,10 +736,10 @@ async function nominationPoolDoubleJoinError< /// The depositor in the second pool cannot be Alice, as that would also be a double join - precisely the object of this test. await createNominationPool( client, - defaultAccountsSr25519.bob, - defaultAccountsSr25519.alice.address, - defaultAccountsSr25519.charlie.address, - defaultAccountsSr25519.dave.address, + testAccounts.bob, + testAccounts.alice.address, + testAccounts.charlie.address, + testAccounts.dave.address, ) await client.dev.newBlock() @@ -753,7 +751,7 @@ async function nominationPoolDoubleJoinError< */ const joinSecondPoolTx = client.api.tx.nominationPools.join(minJoinBond, secondPoolId) - await sendTransaction(joinSecondPoolTx.signAsync(defaultAccountsSr25519.eve)) + await sendTransaction(joinSecondPoolTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -812,7 +810,7 @@ async function nominationPoolDoubleJoinError< async function nominationPoolGlobalConfigTest< TCustom extends Record | undefined, TInitStoragesRelay extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const one = new u32(client.api.registry, 1) @@ -835,7 +833,7 @@ async function nominationPoolGlobalConfigTest< { Set: preMaxMembersPerPool + inc }, { Set: preGlobalMaxCommission + inc }, ) - await sendTransaction(setConfigsCall(0).signAsync(defaultAccountsSr25519.alice)) + await sendTransaction(setConfigsCall(0).signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -854,7 +852,7 @@ async function nominationPoolGlobalConfigTest< ] for (const [origin, inc] of originsAndIncrements) { - await scheduleInlineCallWithOrigin(client, setConfigsCall(inc).method.toHex(), origin) + await scheduleInlineCallWithOrigin(client, setConfigsCall(inc).method.toHex(), origin, testConfig.relayOrPara) await client.dev.newBlock() @@ -890,7 +888,7 @@ async function nominationPoolGlobalConfigTest< async function nominationPoolsUpdateRolesTest< TCustom extends Record | undefined, TInitStoragesRelay extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const preLastPoolId = (await client.api.query.nominationPools.lastPoolId()).toNumber() @@ -902,10 +900,10 @@ async function nominationPoolsUpdateRolesTest< await createNominationPool( client, - defaultAccountsSr25519.alice, - defaultAccountsSr25519.bob.address, - defaultAccountsSr25519.charlie.address, - defaultAccountsSr25519.dave.address, + testAccounts.alice, + testAccounts.bob.address, + testAccounts.charlie.address, + testAccounts.dave.address, ) await client.dev.newBlock() @@ -916,10 +914,10 @@ async function nominationPoolsUpdateRolesTest< const nominationPool = poolData.unwrap() await check(nominationPool.roles).toMatchObject({ - depositor: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - root: encodeAddress(defaultAccountsSr25519.bob.address, addressEncoding), - nominator: encodeAddress(defaultAccountsSr25519.charlie.address, addressEncoding), - bouncer: encodeAddress(defaultAccountsSr25519.dave.address, addressEncoding), + depositor: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + root: encodeAddress(testAccounts.bob.address, testConfig.addressEncoding), + nominator: encodeAddress(testAccounts.charlie.address, testConfig.addressEncoding), + bouncer: encodeAddress(testAccounts.dave.address, testConfig.addressEncoding), }) /** @@ -929,17 +927,17 @@ async function nominationPoolsUpdateRolesTest< await client.dev.setStorage({ System: { - account: [[[defaultAccountsSr25519.bob.address], { providers: 1, data: { free: 10000e10 } }]], + account: [[[testAccounts.bob.address], { providers: 1, data: { free: 10000e10 } }]], }, }) const updateRolesTx = client.api.tx.nominationPools.updateRoles( poolId, - { Set: defaultAccountsSr25519.alice.address }, - { Set: defaultAccountsSr25519.dave.address }, - { Set: defaultAccountsSr25519.bob.address }, + { Set: testAccounts.alice.address }, + { Set: testAccounts.dave.address }, + { Set: testAccounts.bob.address }, ) - const updateRolesEvents = await sendTransaction(updateRolesTx.signAsync(defaultAccountsSr25519.bob)) + const updateRolesEvents = await sendTransaction(updateRolesTx.signAsync(testAccounts.bob)) await client.dev.newBlock() @@ -953,10 +951,10 @@ async function nominationPoolsUpdateRolesTest< nominationPoolCmp(nominationPool, nominationPoolWithRoles, ['roles']) await check(nominationPoolWithRoles.roles).toMatchObject({ - depositor: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - root: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - nominator: encodeAddress(defaultAccountsSr25519.dave.address, addressEncoding), - bouncer: encodeAddress(defaultAccountsSr25519.bob.address, addressEncoding), + depositor: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + root: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + nominator: encodeAddress(testAccounts.dave.address, testConfig.addressEncoding), + bouncer: encodeAddress(testAccounts.bob.address, testConfig.addressEncoding), }) /** @@ -965,11 +963,11 @@ async function nominationPoolsUpdateRolesTest< const updateRolesFailTx = client.api.tx.nominationPools.updateRoles( poolId, - { Set: defaultAccountsSr25519.eve.address }, - { Set: defaultAccountsSr25519.eve.address }, - { Set: defaultAccountsSr25519.eve.address }, + { Set: testAccounts.eve.address }, + { Set: testAccounts.eve.address }, + { Set: testAccounts.eve.address }, ) - await sendTransaction(updateRolesFailTx.signAsync(defaultAccountsSr25519.bob)) + await sendTransaction(updateRolesFailTx.signAsync(testAccounts.bob)) await client.dev.newBlock() @@ -1000,9 +998,7 @@ async function nominationPoolsUpdateRolesTest< { Noop: null }, { Noop: null }, ) - const updateRolesRemoveSelfEvents = await sendTransaction( - updateRolesRemoveSelfTx.signAsync(defaultAccountsSr25519.alice), - ) + const updateRolesRemoveSelfEvents = await sendTransaction(updateRolesRemoveSelfTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -1016,10 +1012,10 @@ async function nominationPoolsUpdateRolesTest< nominationPoolCmp(nominationPoolWithRoles, nominationPoolWithoutRoot, ['roles']) await check(nominationPoolWithoutRoot.roles).toMatchObject({ - depositor: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), + depositor: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), root: null, - nominator: encodeAddress(defaultAccountsSr25519.dave.address, addressEncoding), - bouncer: encodeAddress(defaultAccountsSr25519.bob.address, addressEncoding), + nominator: encodeAddress(testAccounts.dave.address, testConfig.addressEncoding), + bouncer: encodeAddress(testAccounts.bob.address, testConfig.addressEncoding), }) /** @@ -1028,12 +1024,12 @@ async function nominationPoolsUpdateRolesTest< const updateRolesCall = client.api.tx.nominationPools.updateRoles( poolId, - { Set: defaultAccountsSr25519.charlie.address }, - { Set: defaultAccountsSr25519.dave.address }, - { Set: defaultAccountsSr25519.eve.address }, + { Set: testAccounts.charlie.address }, + { Set: testAccounts.dave.address }, + { Set: testAccounts.eve.address }, ) - await scheduleInlineCallWithOrigin(client, updateRolesCall.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, updateRolesCall.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -1054,20 +1050,17 @@ async function nominationPoolsUpdateRolesTest< nominationPoolCmp(nominationPoolWithoutRoot, nominationPoolUpdatedRoles, ['roles']) await check(nominationPoolUpdatedRoles.roles).toMatchObject({ - depositor: encodeAddress(defaultAccountsSr25519.alice.address, addressEncoding), - root: encodeAddress(defaultAccountsSr25519.charlie.address, addressEncoding), - nominator: encodeAddress(defaultAccountsSr25519.dave.address, addressEncoding), - bouncer: encodeAddress(defaultAccountsSr25519.eve.address, addressEncoding), + depositor: encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + root: encodeAddress(testAccounts.charlie.address, testConfig.addressEncoding), + nominator: encodeAddress(testAccounts.dave.address, testConfig.addressEncoding), + bouncer: encodeAddress(testAccounts.eve.address, testConfig.addressEncoding), }) } export function baseNominationPoolsE2ETests< TCustom extends Record | undefined, TInitStoragesRelay extends Record> | undefined, ->( - chain: Chain, - testConfig: { testSuiteName: string; addressEncoding: number }, -): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { return { kind: 'describe', label: testConfig.testSuiteName, @@ -1075,7 +1068,7 @@ export function baseNominationPoolsE2ETests< { kind: 'test', label: 'nomination pool lifecycle test', - testFn: async () => await nominationPoolLifecycleTest(chain, testConfig.addressEncoding), + testFn: async () => await nominationPoolLifecycleTest(chain, testConfig), }, { kind: 'test', @@ -1095,12 +1088,12 @@ export function baseNominationPoolsE2ETests< { kind: 'test', label: 'nomination pool global config test', - testFn: async () => await nominationPoolGlobalConfigTest(chain), + testFn: async () => await nominationPoolGlobalConfigTest(chain, testConfig), }, { kind: 'test', label: 'nomination pools update roles test', - testFn: async () => await nominationPoolsUpdateRolesTest(chain, testConfig.addressEncoding), + testFn: async () => await nominationPoolsUpdateRolesTest(chain, testConfig), }, ], } From c0f0531623e89147f541bb9b62ff98ef3acda150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 3 Sep 2025 14:05:29 +0100 Subject: [PATCH 09/18] Apply lint fixes --- .../kusama/src/assetHubKusama.vesting.e2e.test.ts | 10 ++++++++-- packages/kusama/src/kusama.governance.e2e.test.ts | 6 +++--- .../kusama/src/kusama.nominationPools.e2e.test.ts | 10 ++++++++-- packages/kusama/src/kusama.vesting.e2e.test.ts | 10 ++++++++-- .../src/assetHubPolkadot.vesting.e2e.test.ts | 10 ++++++++-- .../src/polkadot.nominationPools.e2e.test.ts | 12 ++++++++---- packages/polkadot/src/polkadot.vesting.e2e.test.ts | 10 ++++++++-- packages/shared/src/index.ts | 1 + yarn.lock | 9 +++++++++ 9 files changed, 61 insertions(+), 17 deletions(-) diff --git a/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts b/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts index 1c690ae26..939ecefc9 100644 --- a/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts +++ b/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts @@ -1,4 +1,10 @@ import { assetHubKusama } from '@e2e-test/networks/chains' -import { assetHubVestingE2ETests, registerTestTree } from '@e2e-test/shared' +import { assetHubVestingE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared' -registerTestTree(assetHubVestingE2ETests(assetHubKusama, { testSuiteName: 'Kusama Asset Hub Vesting' })) +const kahTestConfig: TestConfig = { + testSuiteName: 'Kusama Asset Hub Vesting', + addressEncoding: 2, + relayOrPara: 'Relay', +} + +registerTestTree(assetHubVestingE2ETests(assetHubKusama, kahTestConfig)) diff --git a/packages/kusama/src/kusama.governance.e2e.test.ts b/packages/kusama/src/kusama.governance.e2e.test.ts index a5bc9c7cc..88d1f4a69 100644 --- a/packages/kusama/src/kusama.governance.e2e.test.ts +++ b/packages/kusama/src/kusama.governance.e2e.test.ts @@ -1,11 +1,11 @@ import { kusama } from '@e2e-test/networks/chains' +import type { TestConfig } from '@e2e-test/shared' import { baseGovernanceE2ETests, registerTestTree } from '@e2e-test/shared' -import type { TestConfig } from '@e2e-test/shared/helpers' -const testConfig = { +const testConfig: TestConfig = { testSuiteName: 'Kusama Governance', addressEncoding: 2, relayOrPara: 'Relay', -} as TestConfig<'Relay'> +} registerTestTree(baseGovernanceE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.nominationPools.e2e.test.ts b/packages/kusama/src/kusama.nominationPools.e2e.test.ts index 01dd96627..e3d03654f 100644 --- a/packages/kusama/src/kusama.nominationPools.e2e.test.ts +++ b/packages/kusama/src/kusama.nominationPools.e2e.test.ts @@ -1,4 +1,10 @@ import { kusama } from '@e2e-test/networks/chains' -import { baseNominationPoolsE2ETests, registerTestTree } from '@e2e-test/shared' +import { baseNominationPoolsE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared' -registerTestTree(baseNominationPoolsE2ETests(kusama, { testSuiteName: 'Kusama Nomination Pools', addressEncoding: 2 })) +const testConfig: TestConfig = { + testSuiteName: 'Kusama Nomination Pools', + addressEncoding: 2, + relayOrPara: 'Relay', +} + +registerTestTree(baseNominationPoolsE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.vesting.e2e.test.ts b/packages/kusama/src/kusama.vesting.e2e.test.ts index c93b6ac4e..e02ae3bdc 100644 --- a/packages/kusama/src/kusama.vesting.e2e.test.ts +++ b/packages/kusama/src/kusama.vesting.e2e.test.ts @@ -1,4 +1,10 @@ import { kusama } from '@e2e-test/networks/chains' -import { registerTestTree, relayVestingE2ETests } from '@e2e-test/shared' +import { registerTestTree, relayVestingE2ETests, type TestConfig } from '@e2e-test/shared' -registerTestTree(relayVestingE2ETests(kusama, { testSuiteName: 'Kusama Vesting', addressEncoding: 2 })) +const testConfig: TestConfig = { + testSuiteName: 'Kusama Vesting', + addressEncoding: 2, + relayOrPara: 'Relay', +} + +registerTestTree(relayVestingE2ETests(kusama, testConfig)) diff --git a/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts b/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts index 9b456cd8f..195cb1307 100644 --- a/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts +++ b/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts @@ -1,4 +1,10 @@ import { assetHubPolkadot } from '@e2e-test/networks/chains' -import { assetHubVestingE2ETests, registerTestTree } from '@e2e-test/shared' +import { assetHubVestingE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared' -registerTestTree(assetHubVestingE2ETests(assetHubPolkadot, { testSuiteName: 'Polkadot Asset Hub Vesting' })) +const testConfig: TestConfig = { + testSuiteName: 'Polkadot Asset Hub Vesting', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(assetHubVestingE2ETests(assetHubPolkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts b/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts index 3ce5cf845..f1dabb10a 100644 --- a/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts +++ b/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts @@ -1,6 +1,10 @@ import { polkadot } from '@e2e-test/networks/chains' -import { baseNominationPoolsE2ETests, registerTestTree } from '@e2e-test/shared' +import { baseNominationPoolsE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared' -registerTestTree( - baseNominationPoolsE2ETests(polkadot, { testSuiteName: 'Polkadot Nomination Pools', addressEncoding: 0 }), -) +const testConfig: TestConfig = { + testSuiteName: 'Polkadot Nomination Pools', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(baseNominationPoolsE2ETests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.vesting.e2e.test.ts b/packages/polkadot/src/polkadot.vesting.e2e.test.ts index b98669321..69043ecae 100644 --- a/packages/polkadot/src/polkadot.vesting.e2e.test.ts +++ b/packages/polkadot/src/polkadot.vesting.e2e.test.ts @@ -1,4 +1,10 @@ import { polkadot } from '@e2e-test/networks/chains' -import { registerTestTree, relayVestingE2ETests } from '@e2e-test/shared' +import { registerTestTree, relayVestingE2ETests, type TestConfig } from '@e2e-test/shared' -registerTestTree(relayVestingE2ETests(polkadot, { testSuiteName: 'Polkadot Vesting', addressEncoding: 0 })) +const testConfig: TestConfig = { + testSuiteName: 'Polkadot Vesting', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(relayVestingE2ETests(polkadot, testConfig)) diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 03bdeff09..177dbfdc7 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -1,5 +1,6 @@ export * from './collectives.js' export * from './governance.js' +export * from './helpers/index.js' export * from './helpers/proxyTypes.js' export * from './multisig.js' export * from './nomination-pools.js' diff --git a/yarn.lock b/yarn.lock index 8a08f21c5..3101fce2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -245,6 +245,15 @@ __metadata: languageName: unknown linkType: soft +"@e2e-test/paseo@workspace:packages/paseo": + version: 0.0.0-use.local + resolution: "@e2e-test/paseo@workspace:packages/paseo" + dependencies: + "@acala-network/chopsticks-testing": "npm:^1.2.1" + "@e2e-test/shared": "workspace:*" + languageName: unknown + linkType: soft + "@e2e-test/polkadot@workspace:packages/polkadot": version: 0.0.0-use.local resolution: "@e2e-test/polkadot@workspace:packages/polkadot" From 0d386aa47f875745057852c0007bd3a9c4d31b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 3 Sep 2025 20:22:54 +0100 Subject: [PATCH 10/18] Fix nomination pool tests to be runnable in AH --- .../kusama.nominationPools.e2e.test.ts.snap | 68 ++++----- .../polkadot.nominationPools.e2e.test.ts.snap | 68 ++++----- packages/shared/src/nomination-pools.ts | 138 +++++++++++++++--- 3 files changed, 184 insertions(+), 90 deletions(-) diff --git a/packages/kusama/src/__snapshots__/kusama.nominationPools.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.nominationPools.e2e.test.ts.snap index fa80f6dc6..fb8e15787 100644 --- a/packages/kusama/src/__snapshots__/kusama.nominationPools.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.nominationPools.e2e.test.ts.snap @@ -38,7 +38,7 @@ exports[`Kusama Nomination Pools > nomination pool double join test: an account "data": { "bonded": "(rounded 1700000000)", "joined": true, - "member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", }, "method": "Bonded", "section": "nominationPools", @@ -129,16 +129,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > bond extra f [ { "data": { - "amount": "(rounded 1700000000)", + "amount": "(rounded 1000000000000)", }, "method": "Bonded", "section": "staking", }, { "data": { - "bonded": "(rounded 1700000000)", + "bonded": "(rounded 1000000000000)", "joined": false, - "member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", }, "method": "Bonded", "section": "nominationPools", @@ -155,7 +155,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > chill events }, { "data": { - "caller": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", + "caller": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", }, "method": "PoolNominatorChilled", "section": "nominationPools", @@ -208,7 +208,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > commission a "data": { "current": [ "0.10%", - "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", ], }, "method": "PoolCommissionUpdated", @@ -252,7 +252,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > create nomin }, { "data": { - "depositor": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "depositor": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Created", "section": "nominationPools", @@ -261,7 +261,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > create nomin "data": { "bonded": 1000000000000, "joined": true, - "member": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "member": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Bonded", "section": "nominationPools", @@ -273,16 +273,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > join nominat [ { "data": { - "amount": "(rounded 1700000000)", + "amount": 1000000000000, }, "method": "Bonded", "section": "staking", }, { "data": { - "bonded": "(rounded 1700000000)", + "bonded": 1000000000000, "joined": true, - "member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", }, "method": "Bonded", "section": "nominationPools", @@ -294,7 +294,7 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > nomination p [ { "data": { - "caller": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", + "caller": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", }, "method": "PoolNominationMade", "section": "nominationPools", @@ -369,16 +369,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > unbond (kick [ { "data": { - "amount": "(rounded 1700000000)", + "amount": 1000000000000, }, "method": "Unbonded", "section": "staking", }, { "data": { - "balance": "(rounded 1700000000)", - "member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "points": "(rounded 1700000000)", + "balance": 1000000000000, + "member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", + "points": 1000000000000, }, "method": "Unbonded", "section": "nominationPools", @@ -390,16 +390,16 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > unbond event [ { "data": { - "amount": "(rounded 1700000000)", + "amount": "(rounded 1000000000000)", }, "method": "Unbonded", "section": "staking", }, { "data": { - "balance": "(rounded 1700000000)", - "member": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "points": "(rounded 1700000000)", + "balance": "(rounded 1000000000000)", + "member": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", + "points": "(rounded 1000000000000)", }, "method": "Unbonded", "section": "nominationPools", @@ -411,9 +411,9 @@ exports[`Kusama Nomination Pools > nomination pool lifecycle test > update roles [ { "data": { - "bouncer": "DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK", - "nominator": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", - "root": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "bouncer": "H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h", + "nominator": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", + "root": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", }, "method": "RolesUpdated", "section": "nominationPools", @@ -432,7 +432,7 @@ exports[`Kusama Nomination Pools > nomination pool metadata test > create nomina }, { "data": { - "depositor": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "depositor": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Created", "section": "nominationPools", @@ -441,7 +441,7 @@ exports[`Kusama Nomination Pools > nomination pool metadata test > create nomina "data": { "bonded": 1000000000000, "joined": true, - "member": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "member": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Bonded", "section": "nominationPools", @@ -453,7 +453,7 @@ exports[`Kusama Nomination Pools > nomination pool metadata test > set metadata [ { "data": { - "caller": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "caller": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "MetadataUpdated", "section": "nominationPools", @@ -466,9 +466,9 @@ exports[`Kusama Nomination Pools > nomination pools update roles test > update p { "event": { "data": [ - "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", - "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK", + "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", + "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", + "H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h", ], "index": "0x2908", }, @@ -484,9 +484,9 @@ exports[`Kusama Nomination Pools > nomination pools update roles test > update r [ { "data": { - "bouncer": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", - "nominator": "DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK", - "root": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "bouncer": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "nominator": "H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h", + "root": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "RolesUpdated", "section": "nominationPools", @@ -523,8 +523,8 @@ exports[`Kusama Nomination Pools > nomination pools update roles test > update r [ { "data": { - "bouncer": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", - "nominator": "DfnTB4z7eUvYRqcGtTpFsLC69o6tvBSC1pEv8vWPZFtCkaK", + "bouncer": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "nominator": "H7L1Xh1XZxbKktdoEG5rkWdUdydq9e3NpsjmcSHpUHM8Z6h", "root": null, }, "method": "RolesUpdated", diff --git a/packages/polkadot/src/__snapshots__/polkadot.nominationPools.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.nominationPools.e2e.test.ts.snap index 929ea488f..69ae8dea3 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.nominationPools.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.nominationPools.e2e.test.ts.snap @@ -38,7 +38,7 @@ exports[`Polkadot Nomination Pools > nomination pool double join test: an accoun "data": { "bonded": 10000000000, "joined": true, - "member": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "member": "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", }, "method": "Bonded", "section": "nominationPools", @@ -129,16 +129,16 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > bond extra [ { "data": { - "amount": "(rounded 10000000000)", + "amount": "(rounded 5000000000000)", }, "method": "Bonded", "section": "staking", }, { "data": { - "bonded": "(rounded 10000000000)", + "bonded": "(rounded 5000000000000)", "joined": false, - "member": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "member": "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", }, "method": "Bonded", "section": "nominationPools", @@ -155,7 +155,7 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > chill even }, { "data": { - "caller": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "caller": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "PoolNominatorChilled", "section": "nominationPools", @@ -208,7 +208,7 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > commission "data": { "current": [ "0.10%", - "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", ], }, "method": "PoolCommissionUpdated", @@ -252,7 +252,7 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > create nom }, { "data": { - "depositor": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "depositor": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Created", "section": "nominationPools", @@ -261,7 +261,7 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > create nom "data": { "bonded": 5000000000000, "joined": true, - "member": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "member": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Bonded", "section": "nominationPools", @@ -273,16 +273,16 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > join nomin [ { "data": { - "amount": 10000000000, + "amount": 5000000000000, }, "method": "Bonded", "section": "staking", }, { "data": { - "bonded": 10000000000, + "bonded": 5000000000000, "joined": true, - "member": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "member": "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", }, "method": "Bonded", "section": "nominationPools", @@ -294,7 +294,7 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > nomination [ { "data": { - "caller": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "caller": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "PoolNominationMade", "section": "nominationPools", @@ -369,16 +369,16 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > unbond (ki [ { "data": { - "amount": 10000000000, + "amount": 5000000000000, }, "method": "Unbonded", "section": "staking", }, { "data": { - "balance": 10000000000, - "member": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "points": 10000000000, + "balance": 5000000000000, + "member": "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", + "points": 5000000000000, }, "method": "Unbonded", "section": "nominationPools", @@ -390,16 +390,16 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > unbond eve [ { "data": { - "amount": "(rounded 10000000000)", + "amount": "(rounded 5000000000000)", }, "method": "Unbonded", "section": "staking", }, { "data": { - "balance": "(rounded 10000000000)", - "member": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "points": "(rounded 10000000000)", + "balance": "(rounded 5000000000000)", + "member": "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", + "points": "(rounded 5000000000000)", }, "method": "Unbonded", "section": "nominationPools", @@ -411,9 +411,9 @@ exports[`Polkadot Nomination Pools > nomination pool lifecycle test > update rol [ { "data": { - "bouncer": "126TwBzBM4jUEK2gTphmW4oLoBWWnYvPp8hygmduTr4uds57", - "nominator": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", - "root": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", + "bouncer": "15Y1VYcCkzD91e5hzAW36wynBfh3inNzzwmUYF9gtm6NZwzi", + "nominator": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + "root": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", }, "method": "RolesUpdated", "section": "nominationPools", @@ -432,7 +432,7 @@ exports[`Polkadot Nomination Pools > nomination pool metadata test > create nomi }, { "data": { - "depositor": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "depositor": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Created", "section": "nominationPools", @@ -441,7 +441,7 @@ exports[`Polkadot Nomination Pools > nomination pool metadata test > create nomi "data": { "bonded": 5000000000000, "joined": true, - "member": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "member": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Bonded", "section": "nominationPools", @@ -453,7 +453,7 @@ exports[`Polkadot Nomination Pools > nomination pool metadata test > set metadat [ { "data": { - "caller": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "caller": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "MetadataUpdated", "section": "nominationPools", @@ -466,9 +466,9 @@ exports[`Polkadot Nomination Pools > nomination pools update roles test > update { "event": { "data": [ - "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", - "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "126TwBzBM4jUEK2gTphmW4oLoBWWnYvPp8hygmduTr4uds57", + "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", + "15Y1VYcCkzD91e5hzAW36wynBfh3inNzzwmUYF9gtm6NZwzi", ], "index": "0x2708", }, @@ -484,9 +484,9 @@ exports[`Polkadot Nomination Pools > nomination pools update roles test > update [ { "data": { - "bouncer": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", - "nominator": "126TwBzBM4jUEK2gTphmW4oLoBWWnYvPp8hygmduTr4uds57", - "root": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "bouncer": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "nominator": "15Y1VYcCkzD91e5hzAW36wynBfh3inNzzwmUYF9gtm6NZwzi", + "root": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "RolesUpdated", "section": "nominationPools", @@ -523,8 +523,8 @@ exports[`Polkadot Nomination Pools > nomination pools update roles test > update [ { "data": { - "bouncer": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", - "nominator": "126TwBzBM4jUEK2gTphmW4oLoBWWnYvPp8hygmduTr4uds57", + "bouncer": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "nominator": "15Y1VYcCkzD91e5hzAW36wynBfh3inNzzwmUYF9gtm6NZwzi", "root": null, }, "method": "RolesUpdated", diff --git a/packages/shared/src/nomination-pools.ts b/packages/shared/src/nomination-pools.ts index 2ff3c8ca6..c796454ed 100644 --- a/packages/shared/src/nomination-pools.ts +++ b/packages/shared/src/nomination-pools.ts @@ -17,6 +17,7 @@ import { checkEvents, checkSystemEvents, createAndBondAccounts, + getBlockNumber, getValidators, objectCmp, scheduleInlineCallWithOrigin, @@ -59,6 +60,58 @@ function nominationPoolCmp( objectCmp(pool1, pool2, properties, propertiesToBeSkipped, msgFun) } +/** + * Checks if the maximum allowed number of pools exists, and increases it if needed. + * + * This function checks if the current number of pools has reached the maximum limit, if one has been set. + * If so, schedules a `setConfigs` call via the scheduler pallet to increase the + * maximum number of pools by 1. + * + * @param client The API client + * @param testConfig Test configuration containing relay/para info + */ +async function ensureMaxPoolsCapacity(client: { api: ApiPromise; dev: any }, testConfig: TestConfig): Promise { + const currentPoolCount = (await client.api.query.nominationPools.lastPoolId()).toNumber() + const maxPoolsOpt = await client.api.query.nominationPools.maxPools() + + // If maxPools is None, there's no limit, so no action is needed + if (maxPoolsOpt.isNone) { + return + } + + const maxPools = maxPoolsOpt.unwrap().toNumber() + const newMaxPools = maxPools + 1 + + // If the maximum number of pools has been reached, increase the limit + if (currentPoolCount >= maxPools) { + const setConfigsCall = client.api.tx.nominationPools.setConfigs( + { Noop: null }, // Keep minJoinBond unchanged + { Noop: null }, // Keep minCreateBond unchanged + { Set: newMaxPools }, // Increase maxPools by 1 + { Noop: null }, // Keep maxPoolMembers unchanged + { Noop: null }, // Keep maxPoolMembersPerPool unchanged + { Noop: null }, // Keep globalMaxCommission unchanged + ) + + // Schedule the call with Root origin + await scheduleInlineCallWithOrigin( + client, + setConfigsCall.method.toHex(), + { system: 'Root' }, + testConfig.relayOrPara, + ) + + // Execute the scheduled call + await client.dev.newBlock() + + // Verify the change took effect + const updatedMaxPools = (await client.api.query.nominationPools.maxPools()).unwrap().toNumber() + if (updatedMaxPools !== newMaxPools) { + throw new Error(`Failed to increase max pools limit. Expected: ${newMaxPools}, Got: ${updatedMaxPools}`) + } + } +} + /** * Create a nomination pool for use in tests; useful helper to reduce boilerplate in tests. * @@ -69,17 +122,21 @@ function nominationPoolCmp( * @returns A promise resolving to the events emitted by the transaction, and the . */ async function createNominationPool( - client: { api: ApiPromise }, + client: { api: ApiPromise; dev: any }, signer: KeyringPair, root: string, nominator: string, bouncer: string, + testConfig: TestConfig, ): Promise<{ events: Promise }> { + // Ensure capacity exists to create a new pool + await ensureMaxPoolsCapacity(client, testConfig) + const minJoinBond = (await client.api.query.nominationPools.minJoinBond()).toNumber() const minCreateBond = (await client.api.query.nominationPools.minCreateBond()).toNumber() - const existentialDep = client.api.consts.balances.existentialDeposit.toNumber() + const minNominationBond = (await client.api.query.staking.minNominatorBond()).toNumber() - const depositorBond = Math.max(minJoinBond, minCreateBond, existentialDep) + const depositorBond = Math.max(minJoinBond, minCreateBond, minNominationBond) const createNomPoolTx = client.api.tx.nominationPools.create(depositorBond, root, nominator, bouncer) const createNomPoolEvents = sendTransaction(createNomPoolTx.signAsync(signer)) @@ -103,9 +160,9 @@ async function nominationPoolCreationFailureTest< const [client] = await setupNetworks(chain) const minJoinBond = (await client.api.query.nominationPools.minJoinBond()).toNumber() const minCreateBond = (await client.api.query.nominationPools.minCreateBond()).toNumber() - const existentialDep = client.api.consts.balances.existentialDeposit.toNumber() + const minNominationBond = (await client.api.query.staking.minNominatorBond()).toNumber() - const depositorMinBond = Math.max(minJoinBond, minCreateBond, existentialDep) + const depositorMinBond = Math.max(minJoinBond, minCreateBond, minNominationBond) // Attempt to create a pool with insufficient funds const createNomPoolTx = client.api.tx.nominationPools.create( @@ -192,9 +249,15 @@ async function nominationPoolLifecycleTest< // Obtain the minimum deposit required to create a pool, as calculated by `pallet_nomination_poola::create`. const minJoinBond = (await client.api.query.nominationPools.minJoinBond()).toNumber() const minCreateBond = (await client.api.query.nominationPools.minCreateBond()).toNumber() - const existentialDep = client.api.consts.balances.existentialDeposit.toNumber() + const minNominationBond = (await client.api.query.staking.minNominatorBond()).toNumber() + + const depositorMinBond = Math.max(minJoinBond, minCreateBond, minNominationBond) - const depositorMinBond = Math.max(minJoinBond, minCreateBond, existentialDep) + /** + * Check that the network is not at max pool capacity; if so, increase it. + */ + + await ensureMaxPoolsCapacity(client, testConfig) /** * Create pool with sufficient funds @@ -319,7 +382,7 @@ async function nominationPoolLifecycleTest< poolData = await client.api.query.nominationPools.bondedPools(nomPoolId) expect(poolData.isSome, 'Pool should still exist after commission is changed').toBe(true) - const blockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) const nominationPoolWithCommission = poolData.unwrap() @@ -386,7 +449,7 @@ async function nominationPoolLifecycleTest< * Have another account join the pool */ - const joinPoolTx = client.api.tx.nominationPools.join(minJoinBond, nomPoolId) + const joinPoolTx = client.api.tx.nominationPools.join(depositorMinBond, nomPoolId) const joinPoolEvents = await sendTransaction(joinPoolTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -400,10 +463,9 @@ async function nominationPoolLifecycleTest< const nominationPoolWithMembers = poolData.unwrap() expect(nominationPoolWithMembers.memberCounter.toNumber(), 'Pool should have 2 members').toBe(2) - expect( - nominationPoolWithMembers.points.toNumber(), - 'Pool should have `depositor_min_bond + min_join_bond` points', - ).toBe(depositorMinBond + minJoinBond) + expect(nominationPoolWithMembers.points.toNumber(), 'Pool should have `depositor_min_bond * 2` points').toBe( + depositorMinBond * 2, + ) nominationPoolCmp(nominationPoolWithCommission, nominationPoolWithMembers, ['memberCounter', 'points']) @@ -411,7 +473,7 @@ async function nominationPoolLifecycleTest< * Bond additional funds as Eve */ - const bondExtraTx = client.api.tx.nominationPools.bondExtra({ FreeBalance: minJoinBond - 1 }) + const bondExtraTx = client.api.tx.nominationPools.bondExtra({ FreeBalance: depositorMinBond - 1 }) const bondExtraEvents = await sendTransaction(bondExtraTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -427,7 +489,7 @@ async function nominationPoolLifecycleTest< nominationPoolCmp(nominationPoolWithMembers, nominationPoolWithExtraBond, ['points']) expect(nominationPoolWithExtraBond.points.toNumber(), 'Incorrect pool point count after bond_extra').toBe( - depositorMinBond + 2 * minJoinBond - 1, + 3 * depositorMinBond - 1, ) /** @@ -472,7 +534,7 @@ async function nominationPoolLifecycleTest< * Unbond previously bonded funds */ - const unbondTx = client.api.tx.nominationPools.unbond(testAccounts.eve.address, minJoinBond - 1) + const unbondTx = client.api.tx.nominationPools.unbond(testAccounts.eve.address, depositorMinBond - 1) const unbondEvents = await sendTransaction(unbondTx.signAsync(testAccounts.eve)) await client.dev.newBlock() @@ -485,7 +547,7 @@ async function nominationPoolLifecycleTest< expect(poolData.isSome, 'Pool should still exist after funds are unbonded').toBe(true) const nominationPoolPostUnbond = poolData.unwrap() - expect(nominationPoolPostUnbond.points.toNumber()).toBe(depositorMinBond + minJoinBond) + expect(nominationPoolPostUnbond.points.toNumber()).toBe(depositorMinBond * 2) nominationPoolCmp(nominationPoolWithExtraBond, nominationPoolPostUnbond, ['points']) /** @@ -535,7 +597,7 @@ async function nominationPoolLifecycleTest< * Kick a member from the pool as the bouncer */ - const kickTx = client.api.tx.nominationPools.unbond(testAccounts.eve.address, minJoinBond) + const kickTx = client.api.tx.nominationPools.unbond(testAccounts.eve.address, depositorMinBond) const kickEvents = await sendTransaction(kickTx.signAsync(testAccounts.dave)) await client.dev.newBlock() @@ -623,7 +685,7 @@ async function nominationPoolLifecycleTest< async function nominationPoolSetMetadataTest< TCustom extends Record | undefined, TInitStoragesRelay extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const preLastPoolId = (await client.api.query.nominationPools.lastPoolId()).toNumber() @@ -634,6 +696,7 @@ async function nominationPoolSetMetadataTest< testAccounts.alice.address, testAccounts.alice.address, testAccounts.alice.address, + testConfig, ) /// Check that prior to the pool creation extrinsic taking effect, the pool does not yet exist with the @@ -669,6 +732,19 @@ async function nominationPoolSetMetadataTest< .redact({ removeKeys: /poolId/ }) .toMatchSnapshot('set metadata events') + /// Check events + const events = await client.api.query.system.events() + const [metadataUpdatedEvent] = events.filter((record) => { + const { event } = record + return event.section === 'nominationPools' + }) + assert(client.api.events.nominationPools.MetadataUpdated.is(metadataUpdatedEvent.event)) + const metadataUpdatedData = metadataUpdatedEvent.event.data + expect(metadataUpdatedData.poolId.toNumber()).toBe(nomPoolId) + expect(metadataUpdatedData.caller.toString()).toBe( + encodeAddress(testAccounts.alice.address, testConfig.addressEncoding), + ) + /// Check the set metadata metadata = await client.api.query.nominationPools.metadata(nomPoolId) @@ -683,7 +759,7 @@ async function nominationPoolSetMetadataTest< async function nominationPoolDoubleJoinError< TCustom extends Record | undefined, TInitStoragesRelay extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const preLastPoolId = (await client.api.query.nominationPools.lastPoolId()).toNumber() @@ -695,6 +771,7 @@ async function nominationPoolDoubleJoinError< testAccounts.bob.address, testAccounts.charlie.address, testAccounts.dave.address, + testConfig, ) await client.dev.newBlock() @@ -740,6 +817,7 @@ async function nominationPoolDoubleJoinError< testAccounts.alice.address, testAccounts.charlie.address, testAccounts.dave.address, + testConfig, ) await client.dev.newBlock() @@ -873,6 +951,21 @@ async function nominationPoolGlobalConfigTest< expect(postMaxMembersOpt).toBe(preMaxMembersOpt + inc) expect(postMaxMembersPerPool).toBe(preMaxMembersPerPool + inc) expect(postGlobalMaxCommission).toBe(preGlobalMaxCommission + inc) + + /// Check events + const events = await client.api.query.system.events() + const [globalParamsUpdatedEvent] = events.filter((record) => { + const { event } = record + return event.section === 'nominationPools' + }) + assert(client.api.events.nominationPools.GlobalParamsUpdated.is(globalParamsUpdatedEvent.event)) + const globalParamsUpdatedData = globalParamsUpdatedEvent.event.data + expect(globalParamsUpdatedData.minJoinBond.toNumber()).toBe(preMinJoinBond + inc) + expect(globalParamsUpdatedData.minCreateBond.toNumber()).toBe(preMinCreateBond + inc) + expect(globalParamsUpdatedData.maxPools.unwrap().toNumber()).toBe(preMaxPoolsOpt + inc) + expect(globalParamsUpdatedData.maxMembers.unwrap().toNumber()).toBe(preMaxMembersOpt + inc) + expect(globalParamsUpdatedData.maxMembersPerPool.unwrap().toNumber()).toBe(preMaxMembersPerPool + inc) + expect(globalParamsUpdatedData.globalMaxCommission.unwrap().toNumber()).toBe(preGlobalMaxCommission + inc) } } @@ -904,6 +997,7 @@ async function nominationPoolsUpdateRolesTest< testAccounts.bob.address, testAccounts.charlie.address, testAccounts.dave.address, + testConfig, ) await client.dev.newBlock() @@ -1078,12 +1172,12 @@ export function baseNominationPoolsE2ETests< { kind: 'test', label: 'nomination pool metadata test', - testFn: async () => await nominationPoolSetMetadataTest(chain), + testFn: async () => await nominationPoolSetMetadataTest(chain, testConfig), }, { kind: 'test', label: 'nomination pool double join test: an account can only ever be in one pool at a time', - testFn: async () => await nominationPoolDoubleJoinError(chain), + testFn: async () => await nominationPoolDoubleJoinError(chain, testConfig), }, { kind: 'test', From c9371a3d454f4e0a661c2358aa4fc1d917a09ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Sun, 7 Sep 2025 03:23:56 +0100 Subject: [PATCH 11/18] Update scheduler tests to use new block provider refactor Some tests still need a second pass, but the idea is that they can now run on relay chains, parachains with or without AB, with local or non-local block providers. --- .../kusama.scheduler.e2e.test.ts.snap | 48 + .../src/assetHubKusama.vesting.e2e.test.ts | 7 +- .../kusama/src/kusama.governance.e2e.test.ts | 5 +- .../kusama/src/kusama.scheduler.e2e.test.ts | 10 +- .../kusama/src/kusama.staking.e2e.test.ts | 12 +- packages/networks/src/chains/collectives.ts | 3 +- ...ectivesPolkadot.scheduler.e2e.test.ts.snap | 48 + .../polkadot.scheduler.e2e.test.ts.snap | 48 + .../src/assetHubPolkadot.vesting.e2e.test.ts | 7 +- .../collectivesPolkadot.scheduler.e2e.test.ts | 14 +- .../src/polkadot.governance.e2e.test.ts | 12 +- .../src/polkadot.scheduler.e2e.test.ts | 10 +- .../polkadot/src/polkadot.staking.e2e.test.ts | 12 +- .../polkadot/src/polkadot.vesting.e2e.test.ts | 4 +- packages/shared/src/helpers/index.ts | 68 +- packages/shared/src/scheduler.ts | 867 ++++++++++++------ 16 files changed, 872 insertions(+), 303 deletions(-) diff --git a/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap index ada68c997..5e3a68045 100644 --- a/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap @@ -566,6 +566,54 @@ exports[`Kusama Scheduler > setting and canceling retry configuration for named ] `; +exports[`Kusama Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed anonymous task execution 1`] = ` +[ + { + "data": { + "id": null, + "result": { + "Err": "BadOrigin", + }, + "task": "(redacted)", + }, + "method": "Dispatched", + "section": "scheduler", + }, + { + "data": { + "index": 0, + "when": "(redacted)", + }, + "method": "Scheduled", + "section": "scheduler", + }, +] +`; + +exports[`Kusama Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed named task execution 1`] = ` +[ + { + "data": { + "id": null, + "result": { + "Err": "BadOrigin", + }, + "task": "(redacted)", + }, + "method": "Dispatched", + "section": "scheduler", + }, + { + "data": { + "index": 0, + "when": "(redacted)", + }, + "method": "Scheduled", + "section": "scheduler", + }, +] +`; + exports[`Kusama Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed task execution 1`] = ` [ { diff --git a/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts b/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts index 939ecefc9..8f52113c7 100644 --- a/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts +++ b/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts @@ -1,10 +1,11 @@ import { assetHubKusama } from '@e2e-test/networks/chains' -import { assetHubVestingE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared' +import { assetHubVestingE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared' -const kahTestConfig: TestConfig = { +const kahTestConfig: ParaTestConfig = { testSuiteName: 'Kusama Asset Hub Vesting', addressEncoding: 2, - relayOrPara: 'Relay', + relayOrPara: 'Para', + asyncBacking: 'Enabled', } registerTestTree(assetHubVestingE2ETests(assetHubKusama, kahTestConfig)) diff --git a/packages/kusama/src/kusama.governance.e2e.test.ts b/packages/kusama/src/kusama.governance.e2e.test.ts index 88d1f4a69..13278ebe1 100644 --- a/packages/kusama/src/kusama.governance.e2e.test.ts +++ b/packages/kusama/src/kusama.governance.e2e.test.ts @@ -1,8 +1,7 @@ import { kusama } from '@e2e-test/networks/chains' -import type { TestConfig } from '@e2e-test/shared' -import { baseGovernanceE2ETests, registerTestTree } from '@e2e-test/shared' +import { baseGovernanceE2ETests, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -const testConfig: TestConfig = { +const testConfig: RelayTestConfig = { testSuiteName: 'Kusama Governance', addressEncoding: 2, relayOrPara: 'Relay', diff --git a/packages/kusama/src/kusama.scheduler.e2e.test.ts b/packages/kusama/src/kusama.scheduler.e2e.test.ts index 3c7ceae2c..eeeaeb3fc 100644 --- a/packages/kusama/src/kusama.scheduler.e2e.test.ts +++ b/packages/kusama/src/kusama.scheduler.e2e.test.ts @@ -1,4 +1,10 @@ import { kusama } from '@e2e-test/networks/chains' -import { baseSchedulerE2ETests, registerTestTree } from '@e2e-test/shared' +import { baseSchedulerE2ETests, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree(baseSchedulerE2ETests(kusama, { testSuiteName: 'Kusama Scheduler' })) +const testConfig: RelayTestConfig = { + testSuiteName: 'Kusama Scheduler', + addressEncoding: 2, + relayOrPara: 'Relay', +} + +registerTestTree(baseSchedulerE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.staking.e2e.test.ts b/packages/kusama/src/kusama.staking.e2e.test.ts index c46b3276f..3947ab5d8 100644 --- a/packages/kusama/src/kusama.staking.e2e.test.ts +++ b/packages/kusama/src/kusama.staking.e2e.test.ts @@ -1,6 +1,10 @@ import { kusama } from '@e2e-test/networks/chains' -import { fullStakingTests, registerTestTree } from '@e2e-test/shared' +import { fullStakingTests, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullStakingTests(kusama, { testSuiteName: 'Kusama Staking', addressEncoding: 2, relayOrPara: 'Relay' }), -) +const testConfig: RelayTestConfig = { + testSuiteName: 'Kusama Staking', + addressEncoding: 2, + relayOrPara: 'Relay', +} + +registerTestTree(fullStakingTests(kusama, testConfig)) diff --git a/packages/networks/src/chains/collectives.ts b/packages/networks/src/chains/collectives.ts index 6ca0b14bd..f52711535 100644 --- a/packages/networks/src/chains/collectives.ts +++ b/packages/networks/src/chains/collectives.ts @@ -1,5 +1,5 @@ import { defineChain } from '../defineChain.js' -import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' +import { defaultAccounts, defaultAccountsSr25519, testAccounts } from '../testAccounts.js' const custom = { collectivesPolkadot: { @@ -13,6 +13,7 @@ const getInitStorages = (_config: typeof custom.collectivesPolkadot) => ({ [[defaultAccountsSr25519.alice.address], { providers: 1, data: { free: 1000e10 } }], [[defaultAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], [[defaultAccounts.bob.address], { providers: 1, data: { free: 1000e10 } }], + [[testAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], ], }, }) diff --git a/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap index 603318556..c157a709d 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap @@ -566,6 +566,54 @@ exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry ] `; +exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry configuration for unnamed scheduled tasks > events for failed anonymous task execution 1`] = ` +[ + { + "data": { + "id": null, + "result": { + "Err": "BadOrigin", + }, + "task": "(redacted)", + }, + "method": "Dispatched", + "section": "scheduler", + }, + { + "data": { + "index": 0, + "when": "(redacted)", + }, + "method": "Scheduled", + "section": "scheduler", + }, +] +`; + +exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry configuration for unnamed scheduled tasks > events for failed named task execution 1`] = ` +[ + { + "data": { + "id": null, + "result": { + "Err": "BadOrigin", + }, + "task": "(redacted)", + }, + "method": "Dispatched", + "section": "scheduler", + }, + { + "data": { + "index": 0, + "when": "(redacted)", + }, + "method": "Scheduled", + "section": "scheduler", + }, +] +`; + exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry configuration for unnamed scheduled tasks > events for failed task execution 1`] = ` [ { diff --git a/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap index 6d8d13400..07db65260 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap @@ -566,6 +566,54 @@ exports[`Polkadot Scheduler > setting and canceling retry configuration for name ] `; +exports[`Polkadot Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed anonymous task execution 1`] = ` +[ + { + "data": { + "id": null, + "result": { + "Err": "BadOrigin", + }, + "task": "(redacted)", + }, + "method": "Dispatched", + "section": "scheduler", + }, + { + "data": { + "index": 0, + "when": "(redacted)", + }, + "method": "Scheduled", + "section": "scheduler", + }, +] +`; + +exports[`Polkadot Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed named task execution 1`] = ` +[ + { + "data": { + "id": null, + "result": { + "Err": "BadOrigin", + }, + "task": "(redacted)", + }, + "method": "Dispatched", + "section": "scheduler", + }, + { + "data": { + "index": 0, + "when": "(redacted)", + }, + "method": "Scheduled", + "section": "scheduler", + }, +] +`; + exports[`Polkadot Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed task execution 1`] = ` [ { diff --git a/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts b/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts index 195cb1307..4e342b608 100644 --- a/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts +++ b/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts @@ -1,10 +1,11 @@ import { assetHubPolkadot } from '@e2e-test/networks/chains' -import { assetHubVestingE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared' +import { assetHubVestingE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared' -const testConfig: TestConfig = { +const testConfig: ParaTestConfig = { testSuiteName: 'Polkadot Asset Hub Vesting', addressEncoding: 0, - relayOrPara: 'Relay', + relayOrPara: 'Para', + asyncBacking: 'Enabled', } registerTestTree(assetHubVestingE2ETests(assetHubPolkadot, testConfig)) diff --git a/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts b/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts index 54df88277..1bac8b0e2 100644 --- a/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts +++ b/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts @@ -1,8 +1,10 @@ import { collectivesPolkadot } from '@e2e-test/networks/chains' -import { baseSchedulerE2ETests, registerTestTree } from '@e2e-test/shared' +import { baseSchedulerE2ETests, registerTestTree, type TestConfig } from '@e2e-test/shared' -registerTestTree( - baseSchedulerE2ETests(collectivesPolkadot, { - testSuiteName: 'Collectives Polkadot Scheduler E2E tests', - }), -) +const testConfig: TestConfig = { + testSuiteName: 'Collectives Polkadot Scheduler E2E tests', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(baseSchedulerE2ETests(collectivesPolkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.governance.e2e.test.ts b/packages/polkadot/src/polkadot.governance.e2e.test.ts index 576bc6930..770defc89 100644 --- a/packages/polkadot/src/polkadot.governance.e2e.test.ts +++ b/packages/polkadot/src/polkadot.governance.e2e.test.ts @@ -1,6 +1,10 @@ import { polkadot } from '@e2e-test/networks/chains' -import { baseGovernanceE2ETests, registerTestTree } from '@e2e-test/shared' +import { baseGovernanceE2ETests, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - baseGovernanceE2ETests(polkadot, { testSuiteName: 'Polkadot Governance', addressEncoding: 0, relayOrPara: 'Relay' }), -) +const testConfig: RelayTestConfig = { + testSuiteName: 'Polkadot Governance', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(baseGovernanceE2ETests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.scheduler.e2e.test.ts b/packages/polkadot/src/polkadot.scheduler.e2e.test.ts index 348fad3c2..ba0c7a53a 100644 --- a/packages/polkadot/src/polkadot.scheduler.e2e.test.ts +++ b/packages/polkadot/src/polkadot.scheduler.e2e.test.ts @@ -1,4 +1,10 @@ import { polkadot } from '@e2e-test/networks/chains' -import { baseSchedulerE2ETests, registerTestTree } from '@e2e-test/shared' +import { baseSchedulerE2ETests, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree(baseSchedulerE2ETests(polkadot, { testSuiteName: 'Polkadot Scheduler' })) +const testConfig: RelayTestConfig = { + testSuiteName: 'Polkadot Scheduler', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(baseSchedulerE2ETests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.staking.e2e.test.ts b/packages/polkadot/src/polkadot.staking.e2e.test.ts index a96abda53..fbb017d6a 100644 --- a/packages/polkadot/src/polkadot.staking.e2e.test.ts +++ b/packages/polkadot/src/polkadot.staking.e2e.test.ts @@ -1,6 +1,10 @@ import { polkadot } from '@e2e-test/networks/chains' -import { fullStakingTests, registerTestTree } from '@e2e-test/shared' +import { fullStakingTests, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullStakingTests(polkadot, { testSuiteName: 'Polkadot Staking', addressEncoding: 0, relayOrPara: 'Relay' }), -) +const testConfig: RelayTestConfig = { + testSuiteName: 'Polkadot Staking', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(fullStakingTests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.vesting.e2e.test.ts b/packages/polkadot/src/polkadot.vesting.e2e.test.ts index 69043ecae..b6c6d6675 100644 --- a/packages/polkadot/src/polkadot.vesting.e2e.test.ts +++ b/packages/polkadot/src/polkadot.vesting.e2e.test.ts @@ -1,7 +1,7 @@ import { polkadot } from '@e2e-test/networks/chains' -import { registerTestTree, relayVestingE2ETests, type TestConfig } from '@e2e-test/shared' +import { type RelayTestConfig, registerTestTree, relayVestingE2ETests } from '@e2e-test/shared' -const testConfig: TestConfig = { +const testConfig: RelayTestConfig = { testSuiteName: 'Polkadot Vesting', addressEncoding: 0, relayOrPara: 'Relay', diff --git a/packages/shared/src/helpers/index.ts b/packages/shared/src/helpers/index.ts index 6e908cfe3..faae88665 100644 --- a/packages/shared/src/helpers/index.ts +++ b/packages/shared/src/helpers/index.ts @@ -361,10 +361,11 @@ export async function setValidatorsStorage( /** * Get the last known block number for a given chain. * + * The block provider might be local or external (e.g. a parachain querying its relay chain). + * * @param api Promise-based RPC wrapper around the endpoint of a Polkadot chain. - * @param relayOrPara Whether the block provider being queried is local or external (e.g. a parachain querying its - * relay chain) - * @returns The last known block number + * @returns The last known block number if relay, the relay chain block number the most recent parablock was anchored + * to if parachain. */ export async function getBlockNumber(api: ApiPromise, relayOrPara: RelayOrPara): Promise { return await match(relayOrPara) @@ -374,12 +375,65 @@ export async function getBlockNumber(api: ApiPromise, relayOrPara: RelayOrPara): } /** - * Interface specifying the configuration data required for an E2E test suite. + * Get the earliest block number in which a task can be scheduled. + */ +export async function nextSchedulableBlockNum(api: ApiPromise, relayOrPara: RelayOrPara): Promise { + return await match(relayOrPara) + .with('Relay', async () => (await api.rpc.chain.getHeader()).number.toNumber() + 1) + .with('Para', async () => ((await api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) + .exhaustive() +} + +/** + * Get the offset at which the block numbers that key the scheduler's agenda are incremented. + * + * * If on a relay chain, the offset is 1 i.e. when injecting a task into the scheduler pallet's agenda storage, + * every block number is available. + * * If on a parachain without AB, with the same meaning as above. + * * If on a parachain with AB, the offset is 2, because `parachainSystem.lastRelayChainBlockNumber` moves with a step + * size of 2, and thus, manually scheduled blocks can only be injected every other relay block number. * - * Only parachains need to specify the `asyncBacking` field. + * @param relayOrPara Whether the call is being scheduled on a relay or parachain. + * @param asyncBacking Whether async backing is enabled on the parachain. + * @returns The number of blocks to offset when scheduling tasks */ -export interface TestConfig { +export function schedulerOffset(cfg: TestConfig): number { + if (cfg.relayOrPara === 'Relay') { + return 1 + } + + if (cfg.asyncBacking === 'Enabled') { + return 2 + } + + // On a parachain without async backing. + return 1 +} + +/** + * Configuration for relay chain tests. + */ +export interface RelayTestConfig { testSuiteName: string addressEncoding: number - relayOrPara: RelayOrPara + relayOrPara: 'Relay' } + +/** + * Configuration for parachain tests. + * Async backing is relevant due to the step size of `parachainSystem.lastRelayChainBlockNumber`. + * + * Recall that with the AHM, the scheduler pallet's agenda will be keyed by this block number. + * It is, then, relevant for tests to know whether AB is enabled. + */ +export interface ParaTestConfig { + testSuiteName: string + addressEncoding: number + relayOrPara: 'Para' + asyncBacking: AsyncBacking +} + +/** + * Union type for all test configurations, whether relay or parachain. + */ +export type TestConfig = RelayTestConfig | ParaTestConfig diff --git a/packages/shared/src/scheduler.ts b/packages/shared/src/scheduler.ts index aea69f9a9..945c99306 100644 --- a/packages/shared/src/scheduler.ts +++ b/packages/shared/src/scheduler.ts @@ -1,6 +1,6 @@ import { sendTransaction } from '@acala-network/chopsticks-testing' -import { type Chain, defaultAccountsSr25519 } from '@e2e-test/networks' +import { type Chain, testAccounts } from '@e2e-test/networks' import { type Client, type RootTestTree, setupNetworks } from '@e2e-test/shared' import type { SubmittableExtrinsic } from '@polkadot/api/types' @@ -10,18 +10,59 @@ import { sha256AsU8a } from '@polkadot/util-crypto' import { assert, expect } from 'vitest' +import { match } from 'ts-pattern' import { check, checkEvents, checkSystemEvents, + getBlockNumber, + nextSchedulableBlockNum, scheduleInlineCallWithOrigin, scheduleLookupCallWithOrigin, + schedulerOffset, + type TestConfig, } from './helpers/index.js' +/** + * Note on manually injecting tasks into the scheduler pallet's agenda storage. + * + * Scheduling extrinsics usually require supra-signed origins. + * + * The manual injection of tasks into the scheduler pallet's agenda storage could be used to simulate the execution of + * the scheduling extrinsics themselves by placing into the agenda what the scheduling extrinsics themselves would + * have placed, in case of a successful execution. + * However, this would not allow exercise their control flows. + * + * Without this injection technique, it is also not easy to use `chopsticks` to test calls requiring `Root` or other + * origins. + * + * So, a compromise is to manually inject the `schedule` calls themselves. + */ + +/** + * Note on relaychain vs parachain scheduler agenda keying. + * + * On parachains using the scheduler pallet and non-local block providers, the scheduler agenda can be keyed by + * these providers. Example: on Asset Hubs (post AHM), the scheduler agenda is keyed by the relay chain block number. + * + * Some things to keep in mind: + * 1. on a relay chain at block `r`, to schedule a task for execution next block, use `r + 1` + * 2. on a parachain at block `p` and with last known relay block number `r`, to schedule a task for execution next + * block, use `r` - **not** `p + 1` or `r + 1` + * - on parachains with async backing, use `r + 2` to schedule a task for execution the block after the next, + * **not** `r + 2` + */ + /// ------- /// Helpers /// ------- +/** + * Helper used in tests to origin checks on `Root`-gated scheduler extrinsics. + * + * @param scheduleTx The extrinsinc to be deliberately executed with a signed origin. + * @param snapshotDescription The string used to identify the snapshot. + */ export async function badOriginHelper< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, @@ -30,7 +71,7 @@ export async function badOriginHelper< scheduleTx: SubmittableExtrinsic<'promise', ISubmittableResult>, snapshotDescription: string, ) { - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice await sendTransaction(scheduleTx.signAsync(alice)) @@ -71,36 +112,42 @@ const REPETITIONS = 3 /// ------- /** - * Test the process of scheduling a call with a bad origin, and check that it fails. + * Test the process of scheduling a call with a signed (bad) origin, and check that it fails. + * + * 1. Sign scheduling extrinsic, and submit to chain + * 2. Check that the extrinsic fails */ export async function scheduleBadOriginTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const targetBlockNumber = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) const call = client.api.tx.system.remark('test').method.toHex() - const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber, null, 0, call) + const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber, null, 0, call) await badOriginHelper(client, scheduleTx, 'events when scheduling task with insufficient origin') } /** - * Test the process of scheduling a named call with a bad origin, and check that it fails. + * Test the process of scheduling a named call with a signed (bad) origin, and check that it fails. + * + * 1. Sign scheduling extrinsic, and submit to chain + * 2. Check that the extrinsic fails */ export async function scheduleNamedBadOriginTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const targetBlockNumber = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) const call = client.api.tx.system.remark('test').method.toHex() const taskId = sha256AsU8a('task_id') - const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, currBlockNumber, null, 0, call) + const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlockNumber, null, 0, call) await badOriginHelper(client, scheduleTx, 'events when scheduling named task with insufficient origin') } @@ -110,25 +157,34 @@ export async function scheduleNamedBadOriginTest< * * 1. scheduling a call with an origin fulfilling `ScheduleOrigin` * 2. cancelling the call with a bad origin - * - * Scheduler tests rely on `scheduleInlineCallWithOrigin`, as there would otherwise be no way of scheduling a call - * with the proper origin. + * 3. checking that the cancellation call was not executed */ export async function cancelScheduledTaskBadOriginTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const call = client.api.tx.system.remark('test').method.toHex() - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 2, null, 0, call) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + offset + }) + .exhaustive() + + const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, call) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - const scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 2) + const scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() await check(scheduled[0].unwrap()).toMatchObject({ @@ -143,7 +199,7 @@ export async function cancelScheduledTaskBadOriginTest< }, }) - const cancelTx = client.api.tx.scheduler.cancel(currBlockNumber + 2, 0) + const cancelTx = client.api.tx.scheduler.cancel(targetBlockNumber!, 0) await badOriginHelper(client, cancelTx, 'events when cancelling task with insufficient origin') } @@ -153,28 +209,35 @@ export async function cancelScheduledTaskBadOriginTest< * * 1. scheduling a named call with an origin fulfilling `ScheduleOrigin` * 2. cancelling the call with a bad origin - * - * Scheduler tests rely on `scheduleInlineCallWithOrigin`, as there would otherwise be no way of scheduling a call - * with the proper origin. */ export async function cancelNamedScheduledTaskBadOriginTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const call = client.api.tx.system.remark('test').method.toHex() - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + offset + }) + .exhaustive() const taskId = sha256AsU8a('task_id') - const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, currBlockNumber + 2, null, 0, call) + const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlockNumber!, null, 0, call) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - const scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 2) + const scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() await check(scheduled[0].unwrap()) @@ -199,30 +262,39 @@ export async function cancelNamedScheduledTaskBadOriginTest< /** * Test the process of * - * 1. creating a call requiring a `Root` origin: an update to total issuance - * 2. scheduling it - * 3. checking that the call was executed + * 1. scheduling a call requiring a `Root` origin: an update to total issuance + * 2. advancing to the scheduled block of execution + * 3. checking that the call was executed (verify total issuance, and events) */ - export async function scheduledCallExecutes< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 2, null, 0, adjustIssuanceTx) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + offset + }) + .exhaustive() + + const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) const oldTotalIssuance = await client.api.query.balances.totalIssuance() await client.dev.newBlock() - currBlockNumber += 1 - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) + let scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() @@ -239,7 +311,6 @@ export async function scheduledCallExecutes< }) await client.dev.newBlock() - currBlockNumber += 1 await checkSystemEvents(client, 'scheduler', { section: 'balances', method: 'TotalIssuanceForced' }) .redact({ @@ -251,39 +322,48 @@ export async function scheduledCallExecutes< expect(newTotalIssuance.toBigInt()).toBe(BigInt(oldTotalIssuance.addn(1).toString())) // Check that the call was removed from the agenda - scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 1) + scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(0) } /** * Test the process of * - * 1. creating a call requiring a `Root` origin: an update to total issuance - * 2. scheduling it, with a name - * 3. checking that the call was executed + * 1. scheduling a named call requiring a `Root` origin: an update to total issuance + * 2. advancing to the scheduled block of execution + * 3. checking that the call was executed (verify total issuance, and events) */ export async function scheduledNamedCallExecutes< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const taskId = sha256AsU8a('task_id') - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, currBlockNumber + 2, null, 0, adjustIssuanceTx) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + offset + }) + .exhaustive() + const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlockNumber!, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) const oldTotalIssuance = await client.api.query.balances.totalIssuance() await client.dev.newBlock() - currBlockNumber += 1 - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) + let scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() @@ -300,7 +380,6 @@ export async function scheduledNamedCallExecutes< }) await client.dev.newBlock() - currBlockNumber += 1 await checkSystemEvents(client, 'scheduler', { section: 'balances', method: 'TotalIssuanceForced' }) .redact({ @@ -312,44 +391,43 @@ export async function scheduledNamedCallExecutes< expect(newTotalIssuance.toBigInt()).toBe(BigInt(oldTotalIssuance.addn(1).toString())) // Check that the call was removed from the agenda - scheduled = await client.api.query.scheduler.agenda(currBlockNumber) + scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(0) } /** * Test cancellation of scheduled task * - * 1. create a `Root`-origin call - * 2. schedule said call - * 3. cancel the call + * 1. schedule a `Root`-origin call for execution sometime in the future + * 2. cancel the call by scheduling `scheduler.cancel` to execute before the scheduled call + * 3. verify that the original call is not executed * 4. verify that its data is removed from the agenda */ export async function cancelScheduledTask< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 3, null, 0, adjustIssuanceTx) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + + const scheduleTx = client.api.tx.scheduler.schedule(initialBlockNumber + 3, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - currBlockNumber += 1 - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 2) + let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() - const cancelTx = client.api.tx.scheduler.cancel(currBlockNumber + 2, 0) + const cancelTx = client.api.tx.scheduler.cancel(initialBlockNumber + 3, 0) - await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - currBlockNumber += 1 // This should capture 2 system events, and no `TotalIssuanceForced`. // 1. One system event will be for the test-originated dispatch injected via the helper `scheduleInlineCallWithOrigin` @@ -360,7 +438,7 @@ export async function cancelScheduledTask< }) .toMatchSnapshot('events for scheduled task cancellation') - scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) + scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) expect(scheduled.length).toBe(0) await client.dev.newBlock() @@ -369,39 +447,44 @@ export async function cancelScheduledTask< /** * Test cancellation of a (named) scheduled task * - * 1. create a `Root`-origin call - * 2. schedule said call, with a name - * 3. cancel the call + * 1. schedule a `Root`-origin call for execution sometime in the future + * 2. cancel the call by scheduling `scheduler.cancel` to execute before the scheduled call + * 3. verify that the original call is not executed * 4. verify that its data is removed from the agenda */ export async function cancelScheduledNamedTask< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const taskId = sha256AsU8a('task_id') - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, currBlockNumber + 3, null, 0, adjustIssuanceTx) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) - await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) + const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed( + taskId, + initialBlockNumber + 3, + null, + 0, + adjustIssuanceTx, + ) + + await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - currBlockNumber += 1 - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 2) + let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() const cancelTx = client.api.tx.scheduler.cancelNamed(taskId) - await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - currBlockNumber += 1 await checkSystemEvents(client, 'scheduler', { section: 'balances', method: 'TotalIssuanceForced' }) .redact({ @@ -409,7 +492,7 @@ export async function cancelScheduledNamedTask< }) .toMatchSnapshot('events for scheduled task cancellation') - scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) + scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) expect(scheduled.length).toBe(0) await client.dev.newBlock() @@ -427,25 +510,36 @@ export async function cancelScheduledNamedTask< /** * Test scheduling a task after a delay. + * + * 1. schedule a delayed `Root`-origin call e.g. a fixed number of blocks after the block in which it was scheduled + * 2. verify that the call is scheduled in the agenda at the correct block + * 3. advance blocks to reach the execution time + * 4. verify that the call was executed (check total issuance and events) + * 5. verify that the call was removed from the agenda after execution */ export async function scheduleTaskAfterDelay< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleTx = client.api.tx.scheduler.scheduleAfter(1, null, 0, adjustIssuanceTx) + const offset = schedulerOffset(testConfig) + // In case of non-local block providers, spans of blocks must be specified in terms of the nonlocal + // provider. + // This multiplication is because on parachains with AB, each para block spans 2 relay blocks. + // In all other cases, the offset will just be 1, and this is idempotent. + const delay = 3 * offset - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + const scheduleTx = client.api.tx.scheduler.scheduleAfter(delay, null, 0, adjustIssuanceTx) - await client.dev.newBlock() - currBlockNumber += 1 + let currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) - expect(scheduled.length).toBe(0) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + + await client.dev.newBlock() + currBlockNumber += offset await checkSystemEvents(client, 'scheduler') .redact({ @@ -453,11 +547,21 @@ export async function scheduleTaskAfterDelay< }) .toMatchSnapshot('events when scheduling task with delay') - await client.dev.newBlock() - currBlockNumber += 1 + let targetBlock: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlock = currBlockNumber + delay + 1 + }) + .with('Para', () => { + // Recall that parachains use `parachainSystem.lastRelayChainBlockNumber` to key the agenda for the next block, + // not the agenda for the current block - a step back is needed. + targetBlock = currBlockNumber + delay + 1 - offset + }) + .exhaustive() - scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) + let scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled.length).toBe(1) + expect(scheduled[0].isSome).toBeTruthy() await check(scheduled[0].unwrap()).toMatchObject({ maybeId: null, @@ -473,8 +577,7 @@ export async function scheduleTaskAfterDelay< const oldTotalIssuance = await client.api.query.balances.totalIssuance() - await client.dev.newBlock() - currBlockNumber += 1 + await client.dev.newBlock({ count: delay / offset + 1 }) await checkSystemEvents(client, 'scheduler', { section: 'balances', method: 'TotalIssuanceForced' }) .redact({ @@ -482,36 +585,45 @@ export async function scheduleTaskAfterDelay< }) .toMatchSnapshot('events for scheduled task execution') - const newTotalIssuance = await client.api.query.balances.totalIssuance() - expect(newTotalIssuance.toBigInt()).toBe(BigInt(oldTotalIssuance.addn(1).toString())) - // Check that the call was removed from the agenda - scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 1) + scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled.length).toBe(0) + + // Verify total issuance was increased + const newTotalIssuance = await client.api.query.balances.totalIssuance() + expect(newTotalIssuance.toBigInt()).toBe(BigInt(oldTotalIssuance.addn(1).toString())) } /** * Test scheduling a named task after a delay. + * + * 1. schedule a delayed named `Root`-origin call e.g. a fixed number of blocks after the block in which it was + * scheduled + * 2. verify that the call is scheduled in the agenda at the correct block + * 3. advance blocks to reach the execution time + * 4. verify that the call was executed (check total issuance and events) + * 5. verify that the call was removed from the agenda after execution */ export async function scheduleNamedTaskAfterDelay< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const taskId = sha256AsU8a('task_id') - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleNamedTx = client.api.tx.scheduler.scheduleNamedAfter(taskId, 1, null, 0, adjustIssuanceTx) + let currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) - await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }) + const offset = schedulerOffset(testConfig) + // See above note in `scheduleTaskAfterDelay` + const delay = 5 * offset + const scheduleNamedTx = client.api.tx.scheduler.scheduleNamedAfter(taskId, delay, null, 0, adjustIssuanceTx) - await client.dev.newBlock() - currBlockNumber += 1 + await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) - expect(scheduled.length).toBe(0) + await client.dev.newBlock() + currBlockNumber += offset await checkSystemEvents(client, 'scheduler') .redact({ @@ -519,11 +631,21 @@ export async function scheduleNamedTaskAfterDelay< }) .toMatchSnapshot('events when scheduling task with delay') - await client.dev.newBlock() - currBlockNumber += 1 + let targetBlock: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlock = currBlockNumber + delay + 1 + }) + .with('Para', () => { + // Recall that parachains use `parachainSystem.lastRelayChainBlockNumber` to key the agenda for the next block, + // not the agenda for the current block - a step back is needed. + targetBlock = currBlockNumber + delay + 1 - offset + }) + .exhaustive() - scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) + let scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled.length).toBe(1) + scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled[0].isSome).toBeTruthy() await check(scheduled[0].unwrap()).toMatchObject({ maybeId: `0x${Buffer.from(taskId).toString('hex')}`, @@ -539,8 +661,7 @@ export async function scheduleNamedTaskAfterDelay< const oldTotalIssuance = await client.api.query.balances.totalIssuance() - await client.dev.newBlock() - currBlockNumber += 1 + await client.dev.newBlock({ count: delay / offset + 1 }) await checkSystemEvents(client, 'scheduler', { section: 'balances', method: 'TotalIssuanceForced' }) .redact({ @@ -548,29 +669,30 @@ export async function scheduleNamedTaskAfterDelay< }) .toMatchSnapshot('events for scheduled task execution') - const newTotalIssuance = await client.api.query.balances.totalIssuance() - expect(newTotalIssuance.toBigInt()).toBe(BigInt(oldTotalIssuance.addn(1).toString())) - // Check that the call was removed from the agenda - scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 1) + scheduled = await client.api.query.scheduler.agenda(currBlockNumber + delay + 1) expect(scheduled.length).toBe(0) + + // Verify total issuance was increased + const newTotalIssuance = await client.api.query.balances.totalIssuance() + expect(newTotalIssuance.toBigInt()).toBe(BigInt(oldTotalIssuance.addn(1).toString())) } /** - * Test the process of + * Test overweight call scheduling. * - * 1. creating a call requiring a `Root` origin: an update to total issuance - * 2. artificially manipulating that call's weight to the per-block weight limit allotted to scheduled calls - * 3. scheduling the call - * 4. checking that the call was not executed - * 5. checking that it remains in the agenda for the original block it was scheduled in + * 1. create a call requiring a `Root` origin: an update to total issuance + * 2. artificially manipulate that call's weight to the per-block weight limit allotted to scheduled calls + * 3. schedule the call + * 4. check that the call was not executed + * 5. check that it remains in the agenda for the original block it was scheduled in * @param chain * */ export async function scheduledOverweightCallFails< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) // Call whose weight will be artifically inflated const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) @@ -580,17 +702,16 @@ export async function scheduledOverweightCallFails< const withWeightTx = client.api.tx.utility.withWeight(adjustIssuanceTx, maxWeight) - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() - const scheduleTx = client.api.tx.scheduler.schedule(currBlockNumber + 2, null, 0, withWeightTx) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const scheduleTx = client.api.tx.scheduler.schedule(initialBlockNumber + 2, null, 0, withWeightTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - currBlockNumber += 1 - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) - + let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) expect(scheduled.length).toBe(1) + const scheduledTask: PalletSchedulerScheduled = scheduled[0].unwrap() const task = { maybeId: null, @@ -610,8 +731,6 @@ export async function scheduledOverweightCallFails< await client.dev.newBlock() - currBlockNumber += 1 - // Check that the call was not executed const newTotalIssuance = await client.api.query.balances.totalIssuance() expect(newTotalIssuance.toBigInt()).toBe(totalIssuance.toBigInt()) @@ -624,11 +743,27 @@ export async function scheduledOverweightCallFails< }) .toMatchSnapshot('events when scheduling overweight task') + const events = await client.api.query.system.events() + const [overweightEvent] = events.filter((record) => { + const { event } = record + return event.section === 'scheduler' && event.method === 'PermanentlyOverweight' + }) + + assert(client.api.events.scheduler.PermanentlyOverweight.is(overweightEvent.event)) + expect(overweightEvent.event.data.task.toJSON()).toMatchObject([initialBlockNumber + 2, 0]) + expect(overweightEvent.event.data.id.toJSON()).toBeNull() + // Check that the call remains in the agenda for the original block it was scheduled in - scheduled = await client.api.query.scheduler.agenda(currBlockNumber) + scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) expect(scheduled.length).toBe(1) await check(scheduled[0].unwrap()).toMatchObject(task) + + // Since the scheduler pallet signaled it as permanently overweight, it should set the + // `incompleteSince` storage item. + + const incompleteSince = await client.api.query.scheduler.incompleteSince() + assert(incompleteSince.isNone) } /** @@ -637,21 +772,22 @@ export async function scheduledOverweightCallFails< * 1. Create a call requiring a `Root` origin: an update to total issuance * 2. Note the call in storage for the `preimage` pallet * 3. Schedule the call - * 4. Check that the call was executed + * 4. Move to the execution block + * 5. Check that the call is executed * - * As of Mar. 2025, this fails on the Collectives chain. + * Circa Mar. 2025, this failed on the Collectives chain. * The issue has been fixed, and when it is upstreamed, this test can then be updated. * @param client */ async function scheduleLookupCall< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const encodedProposal = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1).method const preimageTx = client.api.tx.preimage.notePreimage(encodedProposal.toHex()) - const preImageEvents = await sendTransaction(preimageTx.signAsync(defaultAccountsSr25519.alice)) + const preImageEvents = await sendTransaction(preimageTx.signAsync(testAccounts.alice)) await client.dev.newBlock() @@ -659,14 +795,16 @@ async function scheduleLookupCall< const preimageHash = encodedProposal.hash - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() await scheduleLookupCallWithOrigin( client, { hash: preimageHash, len: encodedProposal.encodedLength }, { system: 'Root' }, + testConfig.relayOrPara, ) - const agenda = await client.api.query.scheduler.agenda(currBlockNumber + 1) + const targetBlock = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) + let agenda = await client.api.query.scheduler.agenda(targetBlock) + expect(agenda.length).toBe(1) assert(agenda[0].isSome) const scheduledTask = agenda[0].unwrap() @@ -694,6 +832,9 @@ async function scheduleLookupCall< redactKeys: /new|old|task/, }) .toMatchSnapshot('events for scheduled lookup-task execution') + + agenda = await client.api.query.scheduler.agenda(targetBlock) + expect(agenda.length).toBe(0) } /** @@ -703,31 +844,32 @@ async function scheduleLookupCall< * 2. Schedule the preimaged call * 3. Remove the preimage * 4. Move to execution block + * 5. Check that the call is *not* executed */ export async function schedulePreimagedCall< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const encodedProposal = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1).method // Note the preimage const noteTx = client.api.tx.preimage.notePreimage(encodedProposal.toHex()) - const noteEvents = await sendTransaction(noteTx.signAsync(defaultAccountsSr25519.alice)) + const noteEvents = await sendTransaction(noteTx.signAsync(testAccounts.alice)) await client.dev.newBlock() await checkEvents(noteEvents, 'preimage').toMatchSnapshot('note preimage events') // Schedule using the preimage hash - const blockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) await client.dev.setStorage({ Scheduler: { agenda: [ [ - [blockNumber + 2], + [initialBlockNumber + 2], [ { call: { @@ -746,7 +888,7 @@ export async function schedulePreimagedCall< }, }) - let scheduled = await client.api.query.scheduler.agenda(blockNumber + 2) + let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() expect(scheduled[0].toJSON()).toMatchObject({ @@ -768,7 +910,7 @@ export async function schedulePreimagedCall< // Unnote the preimage const unnoteTx = client.api.tx.preimage.unnotePreimage(encodedProposal.hash.toHex()) - await unnoteTx.signAndSend(defaultAccountsSr25519.alice) + await unnoteTx.signAndSend(testAccounts.alice) await client.dev.newBlock() const oldTotalIssuance = await client.api.query.balances.totalIssuance() @@ -776,7 +918,7 @@ export async function schedulePreimagedCall< // Move to execution block await client.dev.newBlock() - scheduled = await client.api.query.scheduler.agenda(blockNumber + 2) + scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() @@ -793,15 +935,53 @@ export async function schedulePreimagedCall< const newTotalIssuance = await client.api.query.balances.totalIssuance() expect(newTotalIssuance.toBigInt()).toBe(oldTotalIssuance.toBigInt()) + + const events = await client.api.query.system.events() + const balanceEvents = events.filter((record) => { + const { event } = record + return event.section === 'balances' && event.method === 'TotalIssuanceForced' + }) + expect(balanceEvents.length).toBe(0) + + const [schedEvent] = events.filter((record) => { + const { event } = record + return event.section === 'scheduler' && event.method === 'CallUnavailable' + }) + assert(client.api.events.scheduler.CallUnavailable.is(schedEvent.event)) + expect(schedEvent.event.data.task.toJSON()).toMatchObject([initialBlockNumber + 2, 0]) + expect(schedEvent.event.data.id.toJSON()).toBeNull() } /** - * Helper function containing common logic for testing periodic tasks. + * Helper function containing common logic for testing periodic tasks - can be used to test both anonymous and named + * periodic tasks. + * + * The periodic task starts with a delay - for now, it is hardcoded to be 2. * - * Tests that: - * 1. task executes at the correct intervals - * 2. it runs the expected number of executions, and that - * 3. the task is removed from the agenda after all executions + * It tests that periodic tasks execute at the correct intervals, for the expected number of executions, and that + * the task is removed from the agenda after all executions, no longer to be rescheduled. + * + * Rough process: + * 1. manually schedule the periodic task to run in the next block + * 2. move to block just before the first execution + * 3. check the agenda to observe proper structure of the periodic task + * 4. run through each of the task's repetitions, checking that + * + * 4.1. the period between executions is correct + * + * 4.2. the task is indeed executed correctly + * + * 4.3. while there are still repetitions left, that the task reschedules itself with the correct new number of + * repetitions + * + * 4.4. that on the last repetition, the task no longer reschedules itself + * + * 5. at the end, verify that exactly the expected number of executions have occurred, and that + * 6. the task is removed from the agenda. + * + * @param scheduleTx The extrinsic containing the periodic task (named or otherwise) to be scheduled. + * @param taskId The ID of the periodic task, if named. Null otherwise. + * @param testConfig The test configuration - needed to account for relaychain vs parachain scheduler agenda keying. */ async function testPeriodicTask< TCustom extends Record | undefined, @@ -810,28 +990,42 @@ async function testPeriodicTask< chain: Chain, scheduleTx: SubmittableExtrinsic<'promise', ISubmittableResult>, taskId: Uint8Array | null, + testConfig: TestConfig, ) { const [client] = await setupNetworks(chain) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + const offset = schedulerOffset(testConfig) + + // Manually schedule `scheduleTx` to run on the next block. + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + const initialTotalIssuance = await client.api.query.balances.totalIssuance() const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - // Move to first execution block - let currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + let currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + + // Move to just before the first execution block await client.dev.newBlock() - currBlockNumber += 1 + currBlockNumber += offset + + // Agenda check for the first scheduled execution + let agenda: any + if (testConfig.relayOrPara === 'Relay') { + agenda = await client.api.query.scheduler.agenda(currBlockNumber + 1) + } else { + // Recall that on a parachain, a task to be run on the next block has an agenda key of + // `parachainSystem.lastRelayChainBlockNumber`, which `getBlockNumber` will return. + agenda = await client.api.query.scheduler.agenda(currBlockNumber) + } - // Initial agenda check - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) - expect(scheduled.length).toBe(1) - expect(scheduled[0].isSome).toBeTruthy() - await check(scheduled[0].unwrap()).toMatchObject({ + expect(agenda.length).toBe(1) + expect(agenda[0].isSome).toBeTruthy() + await check(agenda[0].unwrap()).toMatchObject({ maybeId: taskId ? `0x${Buffer.from(taskId).toString('hex')}` : null, priority: 0, call: { inline: adjustIssuanceTx.method.toHex() }, - // The number of repetitions has already been reduced by 1 because the first scheduled execution has already - // occurred: it is exactly this task. + // The last repetition will have this as null, so in effect, this ranges from `REPETITIONS - 1` to `null`, + // for a total of `REPETITIONS`. maybePeriodic: [PERIOD, REPETITIONS - 1], origin: { system: { @@ -843,11 +1037,11 @@ async function testPeriodicTask< // Run through the task's repetitions, and verify that // 1. it executes at the correct intervals, // 2. it runs the expected number of executions. - // 3. the task is removed from the agenda after all executions. + // 3. on the last repetition, the task no longer reschedules itself. for (let i = 1; i <= REPETITIONS; i++) { // Execution block await client.dev.newBlock() - currBlockNumber += 1 + currBlockNumber += offset await checkSystemEvents(client, 'scheduler', { section: 'balances', @@ -863,18 +1057,28 @@ async function testPeriodicTask< // Check agenda for next scheduled execution (if not the last iteration) if (i < REPETITIONS) { - scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 2) - expect(scheduled.length).toBe(1) - expect(scheduled[0].isSome).toBeTruthy() + let targetBlock: number + if (testConfig.relayOrPara === 'Relay') { + targetBlock = currBlockNumber + 2 + } else { + targetBlock = currBlockNumber + } + agenda = await client.api.query.scheduler.agenda(targetBlock) + + expect(agenda.length).toBe(1) + expect(agenda[0].isSome).toBeTruthy() let maybePeriodic: [number, number] | null + // Recall that the first execution had `REPETITIONS - 1` in this field, when `i` was 1 i.e. first iteration. + // Therefore, when `i` is `REPETITIONS - 1`, it will be ran one last time - no more repetitions to be scheduled, + // and this field of the periodic task structure must be `null`. if (i === REPETITIONS - 1) { maybePeriodic = null } else { maybePeriodic = [PERIOD, REPETITIONS - (i + 1)] } - await check(scheduled[0].unwrap()).toMatchObject({ + await check(agenda[0].unwrap()).toMatchObject({ maybeId: taskId ? `0x${Buffer.from(taskId).toString('hex')}` : null, priority: 0, call: { inline: adjustIssuanceTx.method.toHex() }, @@ -887,14 +1091,29 @@ async function testPeriodicTask< }) } - // Skip one block (no execution) - await client.dev.newBlock() - currBlockNumber += 1 + // If on a parachain with AB enabled, the single new block from above is enough to advance through the repetitions. + // Recall that with AB, each parachain block corresponds to 2 relay blocks, and that `PERIOD === 2`. + if ( + testConfig.relayOrPara === 'Relay' || + (testConfig.relayOrPara === 'Para' && testConfig.asyncBacking === 'Disabled') + ) { + // Skip one block (no execution) + await client.dev.newBlock() + currBlockNumber += offset + } } // Verify task is removed after all executions - scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) - expect(scheduled.length).toBe(0) + if (testConfig.relayOrPara === 'Relay') { + agenda = await client.api.query.scheduler.agenda(currBlockNumber + 1) + } else { + agenda = await client.api.query.scheduler.agenda(currBlockNumber) + } + expect(agenda.length).toBe(0) + + // Check final issuance - must have been increased by `REPETITIONS * increment == REPETITIONS`. + const finalTotalIssuance = await client.api.query.balances.totalIssuance() + expect(finalTotalIssuance.toBigInt()).toBe(BigInt(initialTotalIssuance.addn(REPETITIONS).toString())) } /** @@ -907,20 +1126,25 @@ async function testPeriodicTask< export async function schedulePeriodicTask< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + + const delay = match(testConfig.relayOrPara) + .with('Relay', () => 2) + .with('Para', () => 2) + .exhaustive() const scheduleTx = client.api.tx.scheduler.schedule( - currBlockNumber + 2, // when + currBlockNumber + delay, // when [PERIOD, REPETITIONS], // maybe_periodic: [period, repetitions] 0, // priority adjustIssuanceTx, // call ) - await testPeriodicTask(chain, scheduleTx, null) + await testPeriodicTask(chain, scheduleTx, null, testConfig) } /** @@ -933,22 +1157,29 @@ export async function schedulePeriodicTask< export async function scheduleNamedPeriodicTask< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const taskId = sha256AsU8a('task_id') - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + + const delay = match(testConfig.relayOrPara) + .with('Relay', () => 2) + // Recall: to schedule a task on the next block of a parachain, the offset is 0. On the block after that one, + // it is 1 if async backing is disabled, 2 if enabled. + .with('Para', () => 2) + .exhaustive() const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed( taskId, // id - currBlockNumber + 2, // when + currBlockNumber + delay, // when [PERIOD, REPETITIONS], // maybe_periodic: [period, repetitions] 0, // priority adjustIssuanceTx, // call ) - await testPeriodicTask(chain, scheduleNamedTx, taskId) + await testPeriodicTask(chain, scheduleNamedTx, taskId, testConfig) } /** @@ -964,7 +1195,7 @@ export async function scheduleNamedPeriodicTask< export async function schedulePriorityWeightedTasks< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) const adjustIssuanceHighTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 2) @@ -980,30 +1211,41 @@ export async function schedulePriorityWeightedTasks< const highPriorityTx = client.api.tx.utility.withWeight(adjustIssuanceHighTx, taskWeight) const lowPriorityTx = client.api.tx.utility.withWeight(adjustIssuanceLowTx, taskWeight) - const initBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const initBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) let currBlockNumber = initBlockNumber - const targetBlock = currBlockNumber + 2 + const offset = schedulerOffset(testConfig) + let priorityTargetBlock: number + match(testConfig.relayOrPara) + .with('Relay', async () => { + priorityTargetBlock = initBlockNumber + 2 * offset + }) + .with('Para', async () => { + priorityTargetBlock = initBlockNumber + offset + }) + .exhaustive() // Schedule both tasks for the same block with different priorities const scheduleHighPriorityTx = client.api.tx.scheduler.schedule( - targetBlock, + priorityTargetBlock!, null, 0, // higher priority highPriorityTx, ) const scheduleLowPriorityTx = client.api.tx.scheduler.schedule( - targetBlock, + priorityTargetBlock!, null, 1, // lower priority lowPriorityTx, ) + const targetBlock = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) + // Schedule both tasks await client.dev.setStorage({ Scheduler: { agenda: [ [ - [currBlockNumber + 1], + [targetBlock], [ { call: { Inline: scheduleLowPriorityTx.method.toHex() }, @@ -1023,17 +1265,19 @@ export async function schedulePriorityWeightedTasks< // Move to block just before scheduled execution await client.dev.newBlock() - currBlockNumber += 1 + currBlockNumber += offset + + const manuallyScheduledBlock = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) // Verify both tasks are in the agenda - let scheduled = await client.api.query.scheduler.agenda(currBlockNumber + 1) + let scheduled = await client.api.query.scheduler.agenda(manuallyScheduledBlock) expect(scheduled.length).toBe(2) expect(scheduled[0].isSome).toBeTruthy() expect(scheduled[1].isSome).toBeTruthy() // Execute first block - should only complete high priority task await client.dev.newBlock() - currBlockNumber += 1 + currBlockNumber += offset // Check events - there should only be one execution await checkSystemEvents(client, 'scheduler', { section: 'balances', method: 'TotalIssuanceForced' }) @@ -1049,13 +1293,34 @@ export async function schedulePriorityWeightedTasks< // Verify `incompleteSince` is set to current block const incompleteSince = await client.api.query.scheduler.incompleteSince() assert(incompleteSince.isSome) - expect(incompleteSince.unwrap().toNumber()).toBe(currBlockNumber) + match(testConfig.relayOrPara) + .with('Relay', async () => { + expect(incompleteSince.unwrap().toNumber()).toBe(currBlockNumber) + }) + .with('Para', async () => { + expect(incompleteSince.unwrap().toNumber()).toBe(currBlockNumber - offset) + }) + .exhaustive() + + // Check the agenda for the most recently built block + match(testConfig.relayOrPara) + .with('Relay', async () => { + scheduled = await client.api.query.scheduler.agenda(currBlockNumber) + }) + .with('Para', async () => { + scheduled = await client.api.query.scheduler.agenda(currBlockNumber - offset) + }) + .exhaustive() - scheduled = await client.api.query.scheduler.agenda(currBlockNumber) expect(scheduled.length).toBe(2) - expect(scheduled[0].isSome).toBeTruthy() - expect(scheduled[1].isNone).toBeTruthy() - await check(scheduled[0].unwrap()).toMatchObject({ + // Expect that both tasks are `Some` + expect(scheduled.every((task) => task.isSome)).toBeTruthy() + // Disambiguate between the two tasks + const lowPriorityTask = scheduled.find((task) => task.unwrap().priority.toNumber() === 1) + const highPriorityTask = scheduled.find((task) => task.unwrap().priority.toNumber() === 0) + + expect(lowPriorityTask).toBeDefined() + await check(lowPriorityTask).toMatchObject({ maybeId: null, priority: 1, call: { inline: lowPriorityTx.method.toHex() }, @@ -1063,9 +1328,18 @@ export async function schedulePriorityWeightedTasks< origin: { system: { root: null } }, }) + expect(highPriorityTask).toBeDefined() + await check(highPriorityTask).toMatchObject({ + maybeId: null, + priority: 0, + call: { inline: highPriorityTx.method.toHex() }, + maybePeriodic: null, + origin: { system: { root: null } }, + }) + // Move to the next block, where the lower priority task will execute await client.dev.newBlock() - currBlockNumber += 1 + currBlockNumber += offset const finalTotalIssuance = await client.api.query.balances.totalIssuance() expect(finalTotalIssuance.toBigInt()).toBe(BigInt(initialTotalIssuance.addn(3).toString())) @@ -1074,12 +1348,31 @@ export async function schedulePriorityWeightedTasks< const finalIncompleteSince = await client.api.query.scheduler.incompleteSince() expect(finalIncompleteSince.isNone).toBeTruthy() - // Verify agenda is now empty - scheduled = await client.api.query.scheduler.agenda(initBlockNumber) + // Check that the agenda for the block in which the 2 priority tasks were scheduled is empty + scheduled = await client.api.query.scheduler.agenda(priorityTargetBlock!) expect(scheduled.length).toBe(0) - scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 1) + + // The agenda on the block just before the most recently built block should be emoty + match(testConfig.relayOrPara) + .with('Relay', async () => { + scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 1) + }) + .with('Para', async () => { + scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 2 * offset) + }) + .exhaustive() + expect(scheduled.length).toBe(0) - scheduled = await client.api.query.scheduler.agenda(currBlockNumber) + + // Check the agenda on the most recently built block - should be empty + match(testConfig.relayOrPara) + .with('Relay', async () => { + scheduled = await client.api.query.scheduler.agenda(currBlockNumber) + }) + .with('Para', async () => { + scheduled = await client.api.query.scheduler.agenda(currBlockNumber - offset) + }) + .exhaustive() expect(scheduled.length).toBe(0) } @@ -1087,20 +1380,20 @@ export async function schedulePriorityWeightedTasks< * Test setting and canceling retry configuration for unnamed scheduled tasks: * * 1. Create and schedule a task that will fail - * - `remarkWithEvent` fails with `Root` origin - * 2. Set retry configuration using `scheduler.setRetry` - * 3. Verify task fails and is rescheduled per its retry config + * - `remarkWithEvent` with `Root` origin, which will fail + * 2. Set the retry configuration of this scheduled task using `scheduler.setRetry` + * 3. Verify the task fails and is rescheduled per its retry config * 4. Cancel the retry configuration * 5. Verify the task remains scheduled but without its retry config */ export async function scheduleWithRetryConfig< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) // Create a task that will fail - remarkWithEvent requires signed origin const failingTx = client.api.tx.system.remarkWithEvent('will_fail') - const initialBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) // Define base task object once const baseTask = { @@ -1115,36 +1408,48 @@ export async function scheduleWithRetryConfig< }, } + const offset = schedulerOffset(testConfig) + + const period = 3 * offset + const retryConfig = { totalRetries: 3, remaining: 3, - period: 3, + period, } - // Schedule the task first - const scheduleTx = client.api.tx.scheduler.schedule(initialBlockNumber + 3, null, 1, failingTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + let targetBlock: number + match(testConfig.relayOrPara) + .with('Relay', async () => { + targetBlock = initialBlockNumber + 3 * offset + }) + .with('Para', async () => { + // Recall that on a parachain, the current value of `parachainSystem.lastRelayChainBlockNumber` + // keys the agenda for the next block, not the current one, so a step back is needed. + targetBlock = initialBlockNumber + 3 * offset - offset + }) + .exhaustive() + + // Schedule the named task first + const scheduleTx = client.api.tx.scheduler.schedule(targetBlock!, null, 1, failingTx) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) // Move to scheduling block await client.dev.newBlock() // Check initial schedule - let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + let scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() await check(scheduled[0].unwrap()).toMatchObject(baseTask) // Set retry configuration - const setRetryTx = client.api.tx.scheduler.setRetry( - [initialBlockNumber + 3, 0], - retryConfig.totalRetries, - retryConfig.period, - ) - await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }) + const setRetryTx = client.api.tx.scheduler.setRetry([targetBlock!, 0], retryConfig.totalRetries, retryConfig.period) + await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - let retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 3, 0]) + let retryOpt = await client.api.query.scheduler.retries([targetBlock!, 0]) assert(retryOpt.isSome) let retry = retryOpt.unwrap() await check(retry).toMatchObject(retryConfig) @@ -1157,17 +1462,21 @@ export async function scheduleWithRetryConfig< .redact({ redactKeys: /task|when/, }) - .toMatchSnapshot('events for failed task execution') + .toMatchSnapshot('events for failed named task execution') + const rescheduledBlock = targetBlock! + period // Verify task failed and was rescheduled - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled.length).toBe(0) - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 6) + scheduled = await client.api.query.scheduler.agenda(rescheduledBlock!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() - await check(scheduled[0].unwrap()).toMatchObject(baseTask) + await check(scheduled[0].unwrap()).toMatchObject({ + ...baseTask, + maybeId: null, + }) - retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 6, 0]) + retryOpt = await client.api.query.scheduler.retries([rescheduledBlock!, 0]) assert(retryOpt.isSome) retry = retryOpt.unwrap() await check(retry).toMatchObject({ @@ -1175,8 +1484,8 @@ export async function scheduleWithRetryConfig< remaining: retryConfig.remaining - 1, }) - const cancelRetryTx = client.api.tx.scheduler.cancelRetry([initialBlockNumber + 6, 0]) - await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) + const cancelRetryTx = client.api.tx.scheduler.cancelRetry([rescheduledBlock!, 0]) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -1190,12 +1499,15 @@ export async function scheduleWithRetryConfig< await client.dev.newBlock() // Verify task is still scheduled but without retry config - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 6) + scheduled = await client.api.query.scheduler.agenda(rescheduledBlock!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() - await check(scheduled[0].unwrap()).toMatchObject(baseTask) + await check(scheduled[0].unwrap()).toMatchObject({ + ...baseTask, + maybeId: null, + }) - retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 6, 0]) + retryOpt = await client.api.query.scheduler.retries([rescheduledBlock!, 0]) expect(retryOpt.isNone).toBeTruthy() } @@ -1206,18 +1518,21 @@ export async function scheduleWithRetryConfig< * - `remarkWithEvent` fails with `Root` origin * 2. Set retry configuration using `scheduler.setRetryNamed` * 3. Verify task fails and is rescheduled per its retry config - * 4. Cancel the retry configuration - * 5. Verify the task remains scheduled but without its retry config + * 4. Cancel the retry configuration with `cancelRetryNamed` + * 5. Verify the task remains scheduled with its retry config + * - retries of named tasks have no id, and must thus be cancelled with `cancelRetry` + * 6. Cancel the retry configuration with `cancelRetry` + * 7. Verify the task remains scheduled but without its retry config */ export async function scheduleNamedWithRetryConfig< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) // Create a task that will fail - remarkWithEvent requires signed origin const failingTx = client.api.tx.system.remarkWithEvent('will_fail') const taskId = sha256AsU8a('retry_task') - const initialBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) // Define base task object once const baseTask = { @@ -1232,32 +1547,48 @@ export async function scheduleNamedWithRetryConfig< }, } + const offset = schedulerOffset(testConfig) + + const period = 3 * offset + const retryConfig = { totalRetries: 3, remaining: 3, - period: 3, + period, } + let targetBlock: number + match(testConfig.relayOrPara) + .with('Relay', async () => { + targetBlock = initialBlockNumber + 3 * offset + }) + .with('Para', async () => { + // Recall that on a parachain, the current value of `parachainSystem.lastRelayChainBlockNumber` + // keys the agenda for the next block, not the current one, so a step back is needed. + targetBlock = initialBlockNumber + 3 * offset - offset + }) + .exhaustive() + // Schedule the named task first - const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, initialBlockNumber + 3, null, 1, failingTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }) + const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlock!, null, 1, failingTx) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) // Move to scheduling block await client.dev.newBlock() // Check initial schedule - let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + let scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() await check(scheduled[0].unwrap()).toMatchObject(baseTask) // Set retry configuration const setRetryTx = client.api.tx.scheduler.setRetryNamed(taskId, retryConfig.totalRetries, retryConfig.period) - await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - let retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 3, 0]) + let retryOpt = await client.api.query.scheduler.retries([targetBlock!, 0]) assert(retryOpt.isSome) let retry = retryOpt.unwrap() await check(retry).toMatchObject(retryConfig) @@ -1272,10 +1603,11 @@ export async function scheduleNamedWithRetryConfig< }) .toMatchSnapshot('events for failed named task execution') + const rescheduledBlock = targetBlock! + period // Verify task failed and was rescheduled - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + scheduled = await client.api.query.scheduler.agenda(targetBlock!) expect(scheduled.length).toBe(0) - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 6) + scheduled = await client.api.query.scheduler.agenda(rescheduledBlock!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() // Retries of named tasks have no id @@ -1284,7 +1616,7 @@ export async function scheduleNamedWithRetryConfig< maybeId: null, }) - retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 6, 0]) + retryOpt = await client.api.query.scheduler.retries([rescheduledBlock!, 0]) assert(retryOpt.isSome) retry = retryOpt.unwrap() await check(retry).toMatchObject({ @@ -1293,7 +1625,7 @@ export async function scheduleNamedWithRetryConfig< }) let cancelRetryTx = client.api.tx.scheduler.cancelRetryNamed(taskId) - await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() @@ -1306,17 +1638,18 @@ export async function scheduleNamedWithRetryConfig< await client.dev.newBlock() - // Verify task is still scheduled but without retry config - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 6) + // Verify task is still scheduled... + scheduled = await client.api.query.scheduler.agenda(rescheduledBlock!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() - // Once again - retries of named tasks have no id, even after removal of retry config + // Once again - retries of named tasks have no id await check(scheduled[0].unwrap()).toMatchObject({ ...baseTask, maybeId: null, }) - retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 6, 0]) + // ... *with* a retry config + retryOpt = await client.api.query.scheduler.retries([rescheduledBlock!, 0]) // A named task's retry will be unnamed, so its retry configuration must be cancelled // via `cancelRetry` - `cancelRetryNamed` has no effect. assert(retryOpt.isSome) @@ -1328,16 +1661,17 @@ export async function scheduleNamedWithRetryConfig< await client.dev.newBlock() - // In the meantime, the task has been retried a second time, and has scheduled for a third + const finalRescheduledBlock = rescheduledBlock! + period - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 9) + // In the meantime, the task has been retried a second time, and has scheduled for a third + scheduled = await client.api.query.scheduler.agenda(finalRescheduledBlock!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() await check(scheduled[0].unwrap()).toMatchObject({ ...baseTask, maybeId: null, }) - retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 9, 0]) + retryOpt = await client.api.query.scheduler.retries([finalRescheduledBlock!, 0]) assert(retryOpt.isSome) retry = retryOpt.unwrap() await check(retry).toMatchObject({ @@ -1346,19 +1680,28 @@ export async function scheduleNamedWithRetryConfig< }) // Cancel the retry configuration with `cancelRetry` - cancelRetryTx = client.api.tx.scheduler.cancelRetry([initialBlockNumber + 9, 0]) - await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }) + cancelRetryTx = client.api.tx.scheduler.cancelRetry([finalRescheduledBlock!, 0]) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - retryOpt = await client.api.query.scheduler.retries([initialBlockNumber + 9, 0]) + retryOpt = await client.api.query.scheduler.retries([finalRescheduledBlock!, 0]) expect(retryOpt.isNone).toBeTruthy() + + // Check that the retry config cancellation does not affect the scheduled third try + scheduled = await client.api.query.scheduler.agenda(finalRescheduledBlock!) + expect(scheduled.length).toBe(1) + expect(scheduled[0].isSome).toBeTruthy() + await check(scheduled[0].unwrap()).toMatchObject({ + ...baseTask, + maybeId: null, + }) } export function baseSchedulerE2ETests< TCustom extends Record | undefined, TInitStoragesRelay extends Record> | undefined, ->(chain: Chain, testConfig: { testSuiteName: string }): RootTestTree { +>(chain: Chain, testConfig: TestConfig): RootTestTree { return { kind: 'describe', label: testConfig.testSuiteName, @@ -1366,92 +1709,92 @@ export function baseSchedulerE2ETests< { kind: 'test', label: 'scheduling a call is possible, and the call itself succeeds', - testFn: async () => await scheduledCallExecutes(chain), + testFn: async () => await scheduledCallExecutes(chain, testConfig), }, { kind: 'test', label: 'scheduling a named call is possible, and the call itself succeeds', - testFn: async () => await scheduledNamedCallExecutes(chain), + testFn: async () => await scheduledNamedCallExecutes(chain, testConfig), }, { kind: 'test', label: 'cancelling a scheduled task is possible', - testFn: async () => await cancelScheduledTask(chain), + testFn: async () => await cancelScheduledTask(chain, testConfig), }, { kind: 'test', label: 'cancelling a named scheduled task is possible', - testFn: async () => await cancelScheduledNamedTask(chain), + testFn: async () => await cancelScheduledNamedTask(chain, testConfig), }, { kind: 'test', label: 'scheduling a task after a delay is possible', - testFn: async () => await scheduleTaskAfterDelay(chain), + testFn: async () => await scheduleTaskAfterDelay(chain, testConfig), }, { kind: 'test', label: 'scheduling a periodic task is possible', - testFn: async () => await schedulePeriodicTask(chain), + testFn: async () => await schedulePeriodicTask(chain, testConfig), }, { kind: 'test', label: 'scheduling a named periodic task that executes multiple times', - testFn: async () => await scheduleNamedPeriodicTask(chain), + testFn: async () => await scheduleNamedPeriodicTask(chain, testConfig), }, { kind: 'test', label: 'scheduling a named task after a delay is possible', - testFn: async () => await scheduleNamedTaskAfterDelay(chain), + testFn: async () => await scheduleNamedTaskAfterDelay(chain, testConfig), }, { kind: 'test', label: 'execution of scheduled preimage lookup call works', - testFn: async () => await scheduleLookupCall(chain), + testFn: async () => await scheduleLookupCall(chain, testConfig), }, { kind: 'test', label: 'priority-based execution of weighted tasks works correctly', - testFn: async () => await schedulePriorityWeightedTasks(chain), + testFn: async () => await schedulePriorityWeightedTasks(chain, testConfig), }, { kind: 'test', label: 'schedule task with wrong origin', - testFn: async () => await scheduleBadOriginTest(chain), + testFn: async () => await scheduleBadOriginTest(chain, testConfig), }, { kind: 'test', label: 'schedule named task with wrong origin', - testFn: async () => await scheduleNamedBadOriginTest(chain), + testFn: async () => await scheduleNamedBadOriginTest(chain, testConfig), }, { kind: 'test', label: 'cancel scheduled task with wrong origin', - testFn: async () => await cancelScheduledTaskBadOriginTest(chain), + testFn: async () => await cancelScheduledTaskBadOriginTest(chain, testConfig), }, { kind: 'test', label: 'cancel named scheduled task with wrong origin', - testFn: async () => await cancelNamedScheduledTaskBadOriginTest(chain), + testFn: async () => await cancelNamedScheduledTaskBadOriginTest(chain, testConfig), }, { kind: 'test', label: 'scheduling an overweight call is possible, but the call itself fails', - testFn: async () => await scheduledOverweightCallFails(chain), + testFn: async () => await scheduledOverweightCallFails(chain, testConfig), }, { kind: 'test', label: 'scheduling a call using a preimage that gets removed', - testFn: async () => await schedulePreimagedCall(chain), + testFn: async () => await schedulePreimagedCall(chain, testConfig), }, { kind: 'test', label: 'setting and canceling retry configuration for unnamed scheduled tasks', - testFn: async () => await scheduleWithRetryConfig(chain), + testFn: async () => await scheduleWithRetryConfig(chain, testConfig), }, { kind: 'test', label: 'setting and canceling retry configuration for named scheduled tasks', - testFn: async () => await scheduleNamedWithRetryConfig(chain), + testFn: async () => await scheduleNamedWithRetryConfig(chain, testConfig), }, ], } From 9b92aa533aa357936fbd47547ca1cbfe297c5f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Mon, 8 Sep 2025 16:50:06 +0100 Subject: [PATCH 12/18] Perform final fixes to scheduler E2E tests --- .../kusama.scheduler.e2e.test.ts.snap | 54 +----- ...ectivesPolkadot.scheduler.e2e.test.ts.snap | 54 +----- .../polkadot.scheduler.e2e.test.ts.snap | 54 +----- packages/shared/src/scheduler.ts | 157 ++++++++++++------ 4 files changed, 111 insertions(+), 208 deletions(-) diff --git a/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap index 5e3a68045..49e5913e9 100644 --- a/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.scheduler.e2e.test.ts.snap @@ -256,7 +256,7 @@ exports[`Kusama Scheduler > scheduling a named call is possible, and the call it ] `; -exports[`Kusama Scheduler > scheduling a named periodic task that executes multiple times > events for named periodic task execution 1 1`] = ` +exports[`Kusama Scheduler > scheduling a named periodic is possible > events for named periodic task execution 1 1`] = ` [ { "data": { @@ -286,7 +286,7 @@ exports[`Kusama Scheduler > scheduling a named periodic task that executes multi ] `; -exports[`Kusama Scheduler > scheduling a named periodic task that executes multiple times > events for named periodic task execution 2 1`] = ` +exports[`Kusama Scheduler > scheduling a named periodic is possible > events for named periodic task execution 2 1`] = ` [ { "data": { @@ -316,7 +316,7 @@ exports[`Kusama Scheduler > scheduling a named periodic task that executes multi ] `; -exports[`Kusama Scheduler > scheduling a named periodic task that executes multiple times > events for named periodic task execution 3 1`] = ` +exports[`Kusama Scheduler > scheduling a named periodic is possible > events for named periodic task execution 3 1`] = ` [ { "data": { @@ -590,54 +590,6 @@ exports[`Kusama Scheduler > setting and canceling retry configuration for unname ] `; -exports[`Kusama Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed named task execution 1`] = ` -[ - { - "data": { - "id": null, - "result": { - "Err": "BadOrigin", - }, - "task": "(redacted)", - }, - "method": "Dispatched", - "section": "scheduler", - }, - { - "data": { - "index": 0, - "when": "(redacted)", - }, - "method": "Scheduled", - "section": "scheduler", - }, -] -`; - -exports[`Kusama Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed task execution 1`] = ` -[ - { - "data": { - "id": null, - "result": { - "Err": "BadOrigin", - }, - "task": "(redacted)", - }, - "method": "Dispatched", - "section": "scheduler", - }, - { - "data": { - "index": 0, - "when": "(redacted)", - }, - "method": "Scheduled", - "section": "scheduler", - }, -] -`; - exports[`Kusama Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for retry config cancellation 1`] = ` [ { diff --git a/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap index c157a709d..6a4e88e16 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.scheduler.e2e.test.ts.snap @@ -256,7 +256,7 @@ exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named call is p ] `; -exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic task that executes multiple times > events for named periodic task execution 1 1`] = ` +exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic is possible > events for named periodic task execution 1 1`] = ` [ { "data": { @@ -286,7 +286,7 @@ exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic ] `; -exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic task that executes multiple times > events for named periodic task execution 2 1`] = ` +exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic is possible > events for named periodic task execution 2 1`] = ` [ { "data": { @@ -316,7 +316,7 @@ exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic ] `; -exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic task that executes multiple times > events for named periodic task execution 3 1`] = ` +exports[`Collectives Polkadot Scheduler E2E tests > scheduling a named periodic is possible > events for named periodic task execution 3 1`] = ` [ { "data": { @@ -590,54 +590,6 @@ exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry ] `; -exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry configuration for unnamed scheduled tasks > events for failed named task execution 1`] = ` -[ - { - "data": { - "id": null, - "result": { - "Err": "BadOrigin", - }, - "task": "(redacted)", - }, - "method": "Dispatched", - "section": "scheduler", - }, - { - "data": { - "index": 0, - "when": "(redacted)", - }, - "method": "Scheduled", - "section": "scheduler", - }, -] -`; - -exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry configuration for unnamed scheduled tasks > events for failed task execution 1`] = ` -[ - { - "data": { - "id": null, - "result": { - "Err": "BadOrigin", - }, - "task": "(redacted)", - }, - "method": "Dispatched", - "section": "scheduler", - }, - { - "data": { - "index": 0, - "when": "(redacted)", - }, - "method": "Scheduled", - "section": "scheduler", - }, -] -`; - exports[`Collectives Polkadot Scheduler E2E tests > setting and canceling retry configuration for unnamed scheduled tasks > events for retry config cancellation 1`] = ` [ { diff --git a/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap index 07db65260..3bab0d7a2 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.scheduler.e2e.test.ts.snap @@ -256,7 +256,7 @@ exports[`Polkadot Scheduler > scheduling a named call is possible, and the call ] `; -exports[`Polkadot Scheduler > scheduling a named periodic task that executes multiple times > events for named periodic task execution 1 1`] = ` +exports[`Polkadot Scheduler > scheduling a named periodic is possible > events for named periodic task execution 1 1`] = ` [ { "data": { @@ -286,7 +286,7 @@ exports[`Polkadot Scheduler > scheduling a named periodic task that executes mul ] `; -exports[`Polkadot Scheduler > scheduling a named periodic task that executes multiple times > events for named periodic task execution 2 1`] = ` +exports[`Polkadot Scheduler > scheduling a named periodic is possible > events for named periodic task execution 2 1`] = ` [ { "data": { @@ -316,7 +316,7 @@ exports[`Polkadot Scheduler > scheduling a named periodic task that executes mul ] `; -exports[`Polkadot Scheduler > scheduling a named periodic task that executes multiple times > events for named periodic task execution 3 1`] = ` +exports[`Polkadot Scheduler > scheduling a named periodic is possible > events for named periodic task execution 3 1`] = ` [ { "data": { @@ -590,54 +590,6 @@ exports[`Polkadot Scheduler > setting and canceling retry configuration for unna ] `; -exports[`Polkadot Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed named task execution 1`] = ` -[ - { - "data": { - "id": null, - "result": { - "Err": "BadOrigin", - }, - "task": "(redacted)", - }, - "method": "Dispatched", - "section": "scheduler", - }, - { - "data": { - "index": 0, - "when": "(redacted)", - }, - "method": "Scheduled", - "section": "scheduler", - }, -] -`; - -exports[`Polkadot Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for failed task execution 1`] = ` -[ - { - "data": { - "id": null, - "result": { - "Err": "BadOrigin", - }, - "task": "(redacted)", - }, - "method": "Dispatched", - "section": "scheduler", - }, - { - "data": { - "index": 0, - "when": "(redacted)", - }, - "method": "Scheduled", - "section": "scheduler", - }, -] -`; - exports[`Polkadot Scheduler > setting and canceling retry configuration for unnamed scheduled tasks > events for retry config cancellation 1`] = ` [ { diff --git a/packages/shared/src/scheduler.ts b/packages/shared/src/scheduler.ts index 945c99306..1babfb822 100644 --- a/packages/shared/src/scheduler.ts +++ b/packages/shared/src/scheduler.ts @@ -412,18 +412,28 @@ export async function cancelScheduledTask< const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 3 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .exhaustive() - const scheduleTx = client.api.tx.scheduler.schedule(initialBlockNumber + 3, null, 0, adjustIssuanceTx) + const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, adjustIssuanceTx) await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + let scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() - const cancelTx = client.api.tx.scheduler.cancel(initialBlockNumber + 3, 0) + const cancelTx = client.api.tx.scheduler.cancel(targetBlockNumber!, 0) await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) @@ -438,7 +448,7 @@ export async function cancelScheduledTask< }) .toMatchSnapshot('events for scheduled task cancellation') - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(0) await client.dev.newBlock() @@ -463,20 +473,24 @@ export async function cancelScheduledNamedTask< const taskId = sha256AsU8a('task_id') const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 3 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .exhaustive() - const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed( - taskId, - initialBlockNumber + 3, - null, - 0, - adjustIssuanceTx, - ) + const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlockNumber!, null, 0, adjustIssuanceTx) await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + let scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() @@ -492,7 +506,7 @@ export async function cancelScheduledNamedTask< }) .toMatchSnapshot('events for scheduled task cancellation') - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 3) + scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(0) await client.dev.newBlock() @@ -555,6 +569,8 @@ export async function scheduleTaskAfterDelay< .with('Para', () => { // Recall that parachains use `parachainSystem.lastRelayChainBlockNumber` to key the agenda for the next block, // not the agenda for the current block - a step back is needed. + // Also, the scheduler considers the block in which call to schedule the delayed task to not count, so the + // `+ 1` is to start counting from the next, as yet uncreated block. targetBlock = currBlockNumber + delay + 1 - offset }) .exhaustive() @@ -702,14 +718,26 @@ export async function scheduledOverweightCallFails< const withWeightTx = client.api.tx.utility.withWeight(adjustIssuanceTx, maxWeight) + const offset = schedulerOffset(testConfig) const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) - const scheduleTx = client.api.tx.scheduler.schedule(initialBlockNumber + 2, null, 0, withWeightTx) + // Target block is two blocks in the future - see the notes about parachain scheduling differences. + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + offset + }) + .exhaustive() + + const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, withWeightTx) await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) await client.dev.newBlock() - let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) + let scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) const scheduledTask: PalletSchedulerScheduled = scheduled[0].unwrap() @@ -750,11 +778,11 @@ export async function scheduledOverweightCallFails< }) assert(client.api.events.scheduler.PermanentlyOverweight.is(overweightEvent.event)) - expect(overweightEvent.event.data.task.toJSON()).toMatchObject([initialBlockNumber + 2, 0]) + expect(overweightEvent.event.data.task.toJSON()).toMatchObject([targetBlockNumber!, 0]) expect(overweightEvent.event.data.id.toJSON()).toBeNull() // Check that the call remains in the agenda for the original block it was scheduled in - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) + scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) await check(scheduled[0].unwrap()).toMatchObject(task) @@ -864,12 +892,24 @@ export async function schedulePreimagedCall< // Schedule using the preimage hash const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) + // Target block number is two blocks in the future: if `n` is the most recent block, the task should be executed + // at `n + 2`. + let targetBlockNumber: number + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlockNumber = initialBlockNumber + 2 * offset + }) + .with('Para', () => { + targetBlockNumber = initialBlockNumber + offset + }) + .exhaustive() await client.dev.setStorage({ Scheduler: { agenda: [ [ - [initialBlockNumber + 2], + [targetBlockNumber!], [ { call: { @@ -888,7 +928,7 @@ export async function schedulePreimagedCall< }, }) - let scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) + let scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() expect(scheduled[0].toJSON()).toMatchObject({ @@ -918,7 +958,7 @@ export async function schedulePreimagedCall< // Move to execution block await client.dev.newBlock() - scheduled = await client.api.query.scheduler.agenda(initialBlockNumber + 2) + scheduled = await client.api.query.scheduler.agenda(targetBlockNumber!) expect(scheduled.length).toBe(1) expect(scheduled[0].isSome).toBeTruthy() @@ -948,7 +988,7 @@ export async function schedulePreimagedCall< return event.section === 'scheduler' && event.method === 'CallUnavailable' }) assert(client.api.events.scheduler.CallUnavailable.is(schedEvent.event)) - expect(schedEvent.event.data.task.toJSON()).toMatchObject([initialBlockNumber + 2, 0]) + expect(schedEvent.event.data.task.toJSON()).toMatchObject([targetBlockNumber!, 0]) expect(schedEvent.event.data.id.toJSON()).toBeNull() } @@ -981,6 +1021,8 @@ export async function schedulePreimagedCall< * * @param scheduleTx The extrinsic containing the periodic task (named or otherwise) to be scheduled. * @param taskId The ID of the periodic task, if named. Null otherwise. + * @param period The period of the task - on parachains, with nonlocal block providers, it must be expressed by how + * many relay blocks it spans. * @param testConfig The test configuration - needed to account for relaychain vs parachain scheduler agenda keying. */ async function testPeriodicTask< @@ -990,6 +1032,7 @@ async function testPeriodicTask< chain: Chain, scheduleTx: SubmittableExtrinsic<'promise', ISubmittableResult>, taskId: Uint8Array | null, + period: number, testConfig: TestConfig, ) { const [client] = await setupNetworks(chain) @@ -1009,14 +1052,15 @@ async function testPeriodicTask< currBlockNumber += offset // Agenda check for the first scheduled execution - let agenda: any + let targetBlock: number if (testConfig.relayOrPara === 'Relay') { - agenda = await client.api.query.scheduler.agenda(currBlockNumber + 1) + targetBlock = currBlockNumber + offset } else { // Recall that on a parachain, a task to be run on the next block has an agenda key of // `parachainSystem.lastRelayChainBlockNumber`, which `getBlockNumber` will return. - agenda = await client.api.query.scheduler.agenda(currBlockNumber) + targetBlock = currBlockNumber } + let agenda = await client.api.query.scheduler.agenda(targetBlock!) expect(agenda.length).toBe(1) expect(agenda[0].isSome).toBeTruthy() @@ -1026,7 +1070,7 @@ async function testPeriodicTask< call: { inline: adjustIssuanceTx.method.toHex() }, // The last repetition will have this as null, so in effect, this ranges from `REPETITIONS - 1` to `null`, // for a total of `REPETITIONS`. - maybePeriodic: [PERIOD, REPETITIONS - 1], + maybePeriodic: [period, REPETITIONS - 1], origin: { system: { root: null, @@ -1057,13 +1101,12 @@ async function testPeriodicTask< // Check agenda for next scheduled execution (if not the last iteration) if (i < REPETITIONS) { - let targetBlock: number if (testConfig.relayOrPara === 'Relay') { - targetBlock = currBlockNumber + 2 + targetBlock = currBlockNumber + period } else { - targetBlock = currBlockNumber + targetBlock = currBlockNumber + period - offset } - agenda = await client.api.query.scheduler.agenda(targetBlock) + agenda = await client.api.query.scheduler.agenda(targetBlock!) expect(agenda.length).toBe(1) expect(agenda[0].isSome).toBeTruthy() @@ -1075,7 +1118,7 @@ async function testPeriodicTask< if (i === REPETITIONS - 1) { maybePeriodic = null } else { - maybePeriodic = [PERIOD, REPETITIONS - (i + 1)] + maybePeriodic = [period, REPETITIONS - (i + 1)] } await check(agenda[0].unwrap()).toMatchObject({ @@ -1091,24 +1134,20 @@ async function testPeriodicTask< }) } - // If on a parachain with AB enabled, the single new block from above is enough to advance through the repetitions. - // Recall that with AB, each parachain block corresponds to 2 relay blocks, and that `PERIOD === 2`. - if ( - testConfig.relayOrPara === 'Relay' || - (testConfig.relayOrPara === 'Para' && testConfig.asyncBacking === 'Disabled') - ) { - // Skip one block (no execution) - await client.dev.newBlock() - currBlockNumber += offset - } + await client.dev.newBlock() + currBlockNumber += offset } // Verify task is removed after all executions - if (testConfig.relayOrPara === 'Relay') { - agenda = await client.api.query.scheduler.agenda(currBlockNumber + 1) - } else { - agenda = await client.api.query.scheduler.agenda(currBlockNumber) - } + match(testConfig.relayOrPara) + .with('Relay', () => { + targetBlock = currBlockNumber + offset + }) + .with('Para', () => { + targetBlock = currBlockNumber + }) + .exhaustive() + agenda = await client.api.query.scheduler.agenda(targetBlock!) expect(agenda.length).toBe(0) // Check final issuance - must have been increased by `REPETITIONS * increment == REPETITIONS`. @@ -1132,19 +1171,24 @@ export async function schedulePeriodicTask< const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) const delay = match(testConfig.relayOrPara) - .with('Relay', () => 2) - .with('Para', () => 2) + .with('Relay', () => 2 * offset) + // Parachain scheduling differences - see notes above. + // This is obviously 2, but leaving it like this clarifies what's happening. + .with('Para', () => 2 * offset - offset) .exhaustive() + const period = PERIOD * offset + const scheduleTx = client.api.tx.scheduler.schedule( currBlockNumber + delay, // when - [PERIOD, REPETITIONS], // maybe_periodic: [period, repetitions] + [period, REPETITIONS], // maybe_periodic: [period, repetitions] 0, // priority adjustIssuanceTx, // call ) - await testPeriodicTask(chain, scheduleTx, null, testConfig) + await testPeriodicTask(chain, scheduleTx, null, period, testConfig) } /** @@ -1164,22 +1208,25 @@ export async function scheduleNamedPeriodicTask< const taskId = sha256AsU8a('task_id') const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const offset = schedulerOffset(testConfig) const delay = match(testConfig.relayOrPara) - .with('Relay', () => 2) + .with('Relay', () => 2 * offset) // Recall: to schedule a task on the next block of a parachain, the offset is 0. On the block after that one, // it is 1 if async backing is disabled, 2 if enabled. - .with('Para', () => 2) + .with('Para', () => 2 * offset - offset) .exhaustive() + const period = PERIOD * offset + const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed( taskId, // id currBlockNumber + delay, // when - [PERIOD, REPETITIONS], // maybe_periodic: [period, repetitions] + [period, REPETITIONS], // maybe_periodic: [period, repetitions] 0, // priority adjustIssuanceTx, // call ) - await testPeriodicTask(chain, scheduleNamedTx, taskId, testConfig) + await testPeriodicTask(chain, scheduleNamedTx, taskId, period, testConfig) } /** @@ -1462,7 +1509,7 @@ export async function scheduleWithRetryConfig< .redact({ redactKeys: /task|when/, }) - .toMatchSnapshot('events for failed named task execution') + .toMatchSnapshot('events for failed anonymous task execution') const rescheduledBlock = targetBlock! + period // Verify task failed and was rescheduled @@ -1738,7 +1785,7 @@ export function baseSchedulerE2ETests< }, { kind: 'test', - label: 'scheduling a named periodic task that executes multiple times', + label: 'scheduling a named periodic is possible', testFn: async () => await scheduleNamedPeriodicTask(chain, testConfig), }, { From 37751172323534036c5b71d2144febf24ab9dd68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 9 Sep 2025 01:37:04 +0100 Subject: [PATCH 13/18] Update proxy E2E tests * they now use the new `testAccounts` (snapshots (partially) updated, * pass new `TestConfig` parameter to E2E test trees * update proxy E2E tests to use new block provider (80% done) --- .../assetHubKusama.proxy.e2e.test.ts.snap | 85 +- .../coretimeKusama.proxy.e2e.test.ts.snap | 85 +- .../kusama.proxy.e2e.test.ts.snap | 1367 +---------------- .../peopleKusama.proxy.e2e.test.ts.snap | 79 +- .../src/assetHubKusama.proxy.e2e.test.ts | 13 +- .../src/coretimeKusama.proxy.e2e.test.ts | 13 +- .../kusama/src/kusama.governance.e2e.test.ts | 2 +- packages/kusama/src/kusama.proxy.e2e.test.ts | 10 +- .../kusama/src/peopleKusama.proxy.e2e.test.ts | 13 +- packages/networks/src/chains/coretime.ts | 3 +- packages/networks/src/chains/people.ts | 3 +- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 75 +- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 75 +- .../coretimePolkadot.proxy.e2e.test.ts.snap | 75 +- .../peoplePolkadot.proxy.e2e.test.ts.snap | 69 +- .../polkadot.proxy.e2e.test.ts.snap | 68 +- .../src/assetHubPolkadot.proxy.e2e.test.ts | 17 +- .../src/collectivesPolkadot.proxy.e2e.test.ts | 17 +- .../src/coretimePolkadot.proxy.e2e.test.ts | 17 +- .../src/peoplePolkadot.proxy.e2e.test.ts | 13 +- .../polkadot/src/polkadot.proxy.e2e.test.ts | 12 +- packages/shared/src/helpers/index.ts | 2 +- packages/shared/src/proxy.ts | 106 +- 23 files changed, 470 insertions(+), 1749 deletions(-) diff --git a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap index f02d28d09..88d90a8d1 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "DfeV9UQE55S368Ym2LfgJJpXcfkF5MmjnwFDvAe9VKMBpAy", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Assets", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "EwHAaLmkR3hm3Yu2ULBtfASxRT8L8Hhn5m1VYciJ7RVr5F4", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "AssetOwner", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "Eio83Zh4aVyhpaTTYr9wEp2pjiX1qTN4xngG9FKo5xoPwRQ", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "AssetManager", }, "method": "ProxyAdded", @@ -66,7 +66,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FyhwkyfubTPKDEaEs9V58pV3z8pRrYiGRj6TgGWRu8eMLXH", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Collator", }, "method": "ProxyAdded", @@ -81,7 +81,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -91,7 +91,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "DfeV9UQE55S368Ym2LfgJJpXcfkF5MmjnwFDvAe9VKMBpAy", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Assets", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "EwHAaLmkR3hm3Yu2ULBtfASxRT8L8Hhn5m1VYciJ7RVr5F4", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "AssetOwner", }, "method": "ProxyRemoved", @@ -131,7 +131,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "Eio83Zh4aVyhpaTTYr9wEp2pjiX1qTN4xngG9FKo5xoPwRQ", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "AssetManager", }, "method": "ProxyRemoved", @@ -141,7 +141,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FyhwkyfubTPKDEaEs9V58pV3z8pRrYiGRj6TgGWRu8eMLXH", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Collator", }, "method": "ProxyRemoved", @@ -156,7 +156,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -165,7 +165,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -174,7 +174,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -183,7 +183,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Assets", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -192,7 +192,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "AssetOwner", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -201,7 +201,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "AssetManager", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -210,7 +210,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Collator", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -222,14 +222,17 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 42, - }, - }, - }, + "disambiguationIndex": 0, + "proxyType": "Any", + "pure": "Gnv77gxzKFNGZhM2k9YFHnmGMsXPgXkCSHDnK7GjhSavMV3", + "spawner": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "PureKilled", + "section": "proxy", + }, + { + "data": { + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -451,7 +454,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -1229,7 +1232,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -2094,8 +2097,8 @@ exports[`Kusama AssetHub Proxy > perform proxy call on behalf of delegator > eve { "data": { "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", }, "method": "Transfer", "section": "balances", @@ -2115,11 +2118,23 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when { "data": { "callHash": "(hash)", - "proxy": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", - "real": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Announced", "section": "proxy", }, ] `; + +exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap index 138803c21..4cc0c5c2d 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "EM8fNwcZSqgrttrMmkctnpRQgC1HZiMrVtMu2GHToK3gidi", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Broker", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "DwuEgokcQ45AGkC65gFfLV5j35RrJum6AU9sxECb9FzuxRW", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CoretimeRenewer", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "DJn991i1ZTrXXRWQR9DkT5NJmxTA3X1xZk7ZCVgDYFu6y9e", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "OnDemandPurchaser", }, "method": "ProxyAdded", @@ -66,7 +66,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FyhwkyfubTPKDEaEs9V58pV3z8pRrYiGRj6TgGWRu8eMLXH", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Collator", }, "method": "ProxyAdded", @@ -81,7 +81,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -91,7 +91,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "EM8fNwcZSqgrttrMmkctnpRQgC1HZiMrVtMu2GHToK3gidi", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Broker", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "DwuEgokcQ45AGkC65gFfLV5j35RrJum6AU9sxECb9FzuxRW", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CoretimeRenewer", }, "method": "ProxyRemoved", @@ -131,7 +131,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "DJn991i1ZTrXXRWQR9DkT5NJmxTA3X1xZk7ZCVgDYFu6y9e", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "OnDemandPurchaser", }, "method": "ProxyRemoved", @@ -141,7 +141,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "FyhwkyfubTPKDEaEs9V58pV3z8pRrYiGRj6TgGWRu8eMLXH", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Collator", }, "method": "ProxyRemoved", @@ -156,7 +156,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -165,7 +165,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -174,7 +174,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -183,7 +183,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Broker", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -192,7 +192,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "CoretimeRenewer", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -201,7 +201,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "OnDemandPurchaser", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -210,7 +210,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Collator", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -222,17 +222,14 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill [ { "data": { - "disambiguationIndex": 0, - "proxyType": "Any", - "pure": "GGpFpBACd8abcKvunDtwZzEAGeiSt4awSCH7sAumKcKr9tV", - "spawner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "PureKilled", - "section": "proxy", - }, - { - "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 42, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -454,7 +451,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -997,7 +994,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -1875,8 +1872,8 @@ exports[`Kusama Coretime Proxy > perform proxy call on behalf of delegator > eve { "data": { "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", }, "method": "Transfer", "section": "balances", @@ -1896,23 +1893,11 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when { "data": { "callHash": "(hash)", - "proxy": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", - "real": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Announced", "section": "proxy", }, ] `; - -exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap index b9e69ca67..3f33e10c0 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "Ef4fPbsLDyyhBZMsLNxuErttrTVeZygduXM26bupXbrgjKP", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Governance", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "Fju5xS5KrXfrYCDMRPZa38t7x73jumfQsTqxpFgjni58nXF", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Staking", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "F1yN2phuNDeehafhtzb9bJmkdShgEuMqxwZbRKMaeAqvUfU", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Auction", }, "method": "ProxyAdded", @@ -66,7 +66,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "HuzD9NcQaDgcMcSYWpeAPFDaLC7dS53TDruPCmU97njVEzZ", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Society", }, "method": "ProxyAdded", @@ -76,7 +76,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "E2SeX2FCET9jK6AgYaz2bjMsjp8DdE5BRchooMp5uMBoL9B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NominationPools", }, "method": "ProxyAdded", @@ -86,7 +86,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "DgBeKgakkePrTGGSi4deeNAiZzPRJ8mszSZqmtp5CYWm9JY", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Spokesperson", }, "method": "ProxyAdded", @@ -96,7 +96,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "DAbUwtseJVK8571h1MgjeuPTBCW6NZt5G7moDa1iGJZQ8FL", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "ParaRegistration", }, "method": "ProxyAdded", @@ -111,7 +111,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -131,7 +131,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "Ef4fPbsLDyyhBZMsLNxuErttrTVeZygduXM26bupXbrgjKP", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Governance", }, "method": "ProxyRemoved", @@ -141,7 +141,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "Fju5xS5KrXfrYCDMRPZa38t7x73jumfQsTqxpFgjni58nXF", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Staking", }, "method": "ProxyRemoved", @@ -151,7 +151,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -161,7 +161,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "F1yN2phuNDeehafhtzb9bJmkdShgEuMqxwZbRKMaeAqvUfU", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Auction", }, "method": "ProxyRemoved", @@ -171,7 +171,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "HuzD9NcQaDgcMcSYWpeAPFDaLC7dS53TDruPCmU97njVEzZ", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Society", }, "method": "ProxyRemoved", @@ -181,7 +181,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "E2SeX2FCET9jK6AgYaz2bjMsjp8DdE5BRchooMp5uMBoL9B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NominationPools", }, "method": "ProxyRemoved", @@ -191,7 +191,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "DgBeKgakkePrTGGSi4deeNAiZzPRJ8mszSZqmtp5CYWm9JY", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Spokesperson", }, "method": "ProxyRemoved", @@ -201,7 +201,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "data": { "delay": 0, "delegatee": "DAbUwtseJVK8571h1MgjeuPTBCW6NZt5G7moDa1iGJZQ8FL", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "ParaRegistration", }, "method": "ProxyRemoved", @@ -216,7 +216,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -225,7 +225,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -234,7 +234,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "Governance", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -243,7 +243,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "Staking", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -252,7 +252,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -261,7 +261,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "Auction", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -270,7 +270,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "Society", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -279,7 +279,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "NominationPools", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -288,7 +288,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "Spokesperson", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -297,7 +297,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "data": { "disambiguationIndex": 0, "proxyType": "ParaRegistration", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -311,8 +311,8 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure "data": { "disambiguationIndex": 0, "proxyType": "Any", - "pure": "D6qRX8F2Swp1mAnssEJ5PsbjWbeKSdYyRzY7sEujFjtWzQp", - "spawner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "pure": "Gnv77gxzKFNGZhM2k9YFHnmGMsXPgXkCSHDnK7GjhSavMV3", + "spawner": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureKilled", "section": "proxy", @@ -652,7 +652,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy { "data": { "amount": 1000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "stash": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Bonded", "section": "staking", @@ -698,7 +698,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -782,7 +782,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy [ { "data": { - "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "account": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", "scheduleIndex": 0, }, "method": "VestingCreated", @@ -790,7 +790,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy }, { "data": { - "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "account": "Cdbxb6S9i8s4swqGZRWhcZyrcaXmTw1MkzLjbUiADjdSo2f", }, "method": "VestingCompleted", "section": "vesting", @@ -1256,7 +1256,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy { "data": { "amount": 1000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "stash": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Bonded", "section": "staking", @@ -1302,7 +1302,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -1456,7 +1456,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy [ { "data": { - "candidateId": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "candidateId": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "offer": 1000000000000, }, "method": "Bid", @@ -1503,7 +1503,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -1556,7 +1556,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy { "data": { "amount": 1000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "stash": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Bonded", "section": "staking", @@ -1641,1290 +1641,13 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet referenda, call submit 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": "(redacted)", - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet staking, call bond 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet vesting, call vested_transfer 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet staking, call bond 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet staking, call bond 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet vesting, call vested_transfer 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet referenda, call submit 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": "(redacted)", - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet staking, call bond 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet vesting, call vested_transfer 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call reject_announcement 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_announcement 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch_all 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call force_batch 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch_all 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call force_batch 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet balances, call burn 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet referenda, call submit 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": "(redacted)", - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call apply_authorized_upgrade 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Operational", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 100000000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 10000)", - "refTime": "(rounded 700000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet vesting, call vested_transfer 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` [ { "data": { "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", }, "method": "Transfer", "section": "balances", @@ -2944,8 +1667,8 @@ exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob anno { "data": { "callHash": "(hash)", - "proxy": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", - "real": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Announced", "section": "proxy", diff --git a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap index b9f0b03bd..9f43d45a0 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "HyXXTjiT1XBZBpCGSXjLbH4wkb7AGBt3NmHpsji77BXab7e", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Identity", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "GvdYm4dtSFetLboSmKA3fRbobchAuFmZuWt9GR2f4MVH6GD", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "IdentityJudgement", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "FyhwkyfubTPKDEaEs9V58pV3z8pRrYiGRj6TgGWRu8eMLXH", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Collator", }, "method": "ProxyAdded", @@ -71,7 +71,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -81,7 +81,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "Ftk6uzZmZVciEaSMHBZ3b1272KavruU4NxLjGLQVsUAKV3B", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -91,7 +91,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "FF84pi37FUToJKQSPaMDYsY96BLNzhyLQ5opd2AWFu7HCKe", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "HyXXTjiT1XBZBpCGSXjLbH4wkb7AGBt3NmHpsji77BXab7e", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Identity", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "GvdYm4dtSFetLboSmKA3fRbobchAuFmZuWt9GR2f4MVH6GD", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "IdentityJudgement", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a "data": { "delay": 0, "delegatee": "FyhwkyfubTPKDEaEs9V58pV3z8pRrYiGRj6TgGWRu8eMLXH", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "delegator": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", "proxyType": "Collator", }, "method": "ProxyRemoved", @@ -136,7 +136,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when creati "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -145,7 +145,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when creati "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -154,7 +154,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when creati "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -163,7 +163,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when creati "data": { "disambiguationIndex": 0, "proxyType": "Identity", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -172,7 +172,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when creati "data": { "disambiguationIndex": 0, "proxyType": "IdentityJudgement", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -181,7 +181,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when creati "data": { "disambiguationIndex": 0, "proxyType": "Collator", - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "who": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "PureCreated", "section": "proxy", @@ -193,17 +193,14 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin [ { "data": { - "disambiguationIndex": 0, - "proxyType": "Any", - "pure": "FJ3Yk5SeRPRt8rQjeVDZ3Mxm199uwx8pLT1cPBEHWaNEgzV", - "spawner": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "PureKilled", - "section": "proxy", - }, - { - "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 42, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -406,7 +403,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -949,7 +946,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed { "data": { "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "sender": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Remarked", "section": "system", @@ -1582,8 +1579,8 @@ exports[`People Kusama Proxy > perform proxy call on behalf of delegator > event { "data": { "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "Fr4NzY1udSFFLzb2R3qxVQkwz9cZraWkyfH4h3mVVk7BK7P", + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", }, "method": "Transfer", "section": "balances", @@ -1603,23 +1600,11 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B { "data": { "callHash": "(hash)", - "proxy": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", - "real": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", }, "method": "Announced", "section": "proxy", }, ] `; - -exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts b/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts index f489a2971..fc5374ae6 100644 --- a/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts +++ b/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts @@ -1,6 +1,11 @@ import { assetHubKusama } from '@e2e-test/networks/chains' -import { AssetHubProxyTypes, fullProxyE2ETests, registerTestTree } from '@e2e-test/shared' +import { AssetHubProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests(assetHubKusama, { testSuiteName: 'Kusama AssetHub Proxy', addressEncoding: 2 }, AssetHubProxyTypes), -) +const testConfig: ParaTestConfig = { + testSuiteName: 'Kusama AssetHub Proxy', + addressEncoding: 2, + relayOrPara: 'Para', + asyncBacking: 'Enabled', +} + +registerTestTree(fullProxyE2ETests(assetHubKusama, testConfig, AssetHubProxyTypes)) diff --git a/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts b/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts index cf5c14f60..c9224d0a9 100644 --- a/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts +++ b/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts @@ -1,6 +1,11 @@ import { coretimeKusama } from '@e2e-test/networks/chains' -import { CoretimeProxyTypes, fullProxyE2ETests, registerTestTree } from '@e2e-test/shared' +import { CoretimeProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests(coretimeKusama, { testSuiteName: 'Kusama Coretime Proxy', addressEncoding: 2 }, CoretimeProxyTypes), -) +const testConfig: ParaTestConfig = { + testSuiteName: 'Kusama Coretime Proxy', + addressEncoding: 2, + relayOrPara: 'Para', + asyncBacking: 'Enabled', +} + +registerTestTree(fullProxyE2ETests(coretimeKusama, testConfig, CoretimeProxyTypes)) diff --git a/packages/kusama/src/kusama.governance.e2e.test.ts b/packages/kusama/src/kusama.governance.e2e.test.ts index 13278ebe1..4b47573c9 100644 --- a/packages/kusama/src/kusama.governance.e2e.test.ts +++ b/packages/kusama/src/kusama.governance.e2e.test.ts @@ -4,7 +4,7 @@ import { baseGovernanceE2ETests, type RelayTestConfig, registerTestTree } from ' const testConfig: RelayTestConfig = { testSuiteName: 'Kusama Governance', addressEncoding: 2, - relayOrPara: 'Relay', + blockProvider: 'Relay', } registerTestTree(baseGovernanceE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.proxy.e2e.test.ts b/packages/kusama/src/kusama.proxy.e2e.test.ts index bf41905ca..966db84df 100644 --- a/packages/kusama/src/kusama.proxy.e2e.test.ts +++ b/packages/kusama/src/kusama.proxy.e2e.test.ts @@ -1,4 +1,10 @@ import { kusama } from '@e2e-test/networks/chains' -import { fullProxyE2ETests, KusamaProxyTypes, registerTestTree } from '@e2e-test/shared' +import { fullProxyE2ETests, KusamaProxyTypes, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree(fullProxyE2ETests(kusama, { testSuiteName: 'Kusama Proxy', addressEncoding: 2 }, KusamaProxyTypes)) +const testConfig: RelayTestConfig = { + testSuiteName: 'Kusama Proxy', + addressEncoding: 2, + relayOrPara: 'Relay', +} + +registerTestTree(fullProxyE2ETests(kusama, testConfig, KusamaProxyTypes)) diff --git a/packages/kusama/src/peopleKusama.proxy.e2e.test.ts b/packages/kusama/src/peopleKusama.proxy.e2e.test.ts index df70a5e58..283ae12b3 100644 --- a/packages/kusama/src/peopleKusama.proxy.e2e.test.ts +++ b/packages/kusama/src/peopleKusama.proxy.e2e.test.ts @@ -1,6 +1,11 @@ import { peopleKusama } from '@e2e-test/networks/chains' -import { fullProxyE2ETests, PeopleProxyTypes, registerTestTree } from '@e2e-test/shared' +import { fullProxyE2ETests, type ParaTestConfig, PeopleProxyTypes, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests(peopleKusama, { testSuiteName: 'People Kusama Proxy', addressEncoding: 2 }, PeopleProxyTypes), -) +const testConfig: ParaTestConfig = { + testSuiteName: 'People Kusama Proxy', + addressEncoding: 2, + relayOrPara: 'Para', + asyncBacking: 'Disabled', +} + +registerTestTree(fullProxyE2ETests(peopleKusama, testConfig, PeopleProxyTypes)) diff --git a/packages/networks/src/chains/coretime.ts b/packages/networks/src/chains/coretime.ts index b646d29a0..c5bc1c6c3 100644 --- a/packages/networks/src/chains/coretime.ts +++ b/packages/networks/src/chains/coretime.ts @@ -1,5 +1,5 @@ import { defineChain } from '../defineChain.js' -import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' +import { defaultAccounts, defaultAccountsSr25519, testAccounts } from '../testAccounts.js' const custom = { coretimePolkadot: { @@ -15,6 +15,7 @@ const getInitStorages = (_config: typeof custom.coretimePolkadot | typeof custom account: [ [[defaultAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], [[defaultAccountsSr25519.alice.address], { providers: 1, data: { free: 1000e10 } }], + [[testAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], ], }, }) diff --git a/packages/networks/src/chains/people.ts b/packages/networks/src/chains/people.ts index e91645c6b..496732289 100644 --- a/packages/networks/src/chains/people.ts +++ b/packages/networks/src/chains/people.ts @@ -1,5 +1,5 @@ import { defineChain } from '../defineChain.js' -import { defaultAccounts, defaultAccountsSr25519 } from '../testAccounts.js' +import { defaultAccounts, defaultAccountsSr25519, testAccounts } from '../testAccounts.js' const custom = { peoplePolkadot: { @@ -29,6 +29,7 @@ const getInitStorages = (_config: typeof custom.peoplePolkadot | typeof custom.p [[defaultAccounts.bob.address], { providers: 1, data: { free: 1000e10 } }], [[defaultAccountsSr25519.alice.address], { providers: 1, data: { free: 1000e10 } }], [[defaultAccountsSr25519.bob.address], { providers: 1, data: { free: 1000e10 } }], + [[testAccounts.alice.address], { providers: 1, data: { free: 1000e10 } }], ], }, // Registrars to be used in E2E tests - required to test `RegistrarOrigin`-locked extrinsics. diff --git a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap index f34bdee12..2f1418229 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "126KyAPbTVKyiyKcwxacvVmyEePA8i6jMupyzYt3Dn8NdKCB", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Assets", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "13MxebFxyqJFSvjyDQa98rdbfTAYDm2fQCekGBL7NQEXHFyu", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "AssetOwner", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "139Uc4UtHzkXPhmXeV67BSHBXmRvuUCKh5gR2mxisNmpqV8B", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "AssetManager", }, "method": "ProxyAdded", @@ -66,7 +66,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyAdded", @@ -81,7 +81,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -91,7 +91,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "126KyAPbTVKyiyKcwxacvVmyEePA8i6jMupyzYt3Dn8NdKCB", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Assets", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "13MxebFxyqJFSvjyDQa98rdbfTAYDm2fQCekGBL7NQEXHFyu", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "AssetOwner", }, "method": "ProxyRemoved", @@ -131,7 +131,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "139Uc4UtHzkXPhmXeV67BSHBXmRvuUCKh5gR2mxisNmpqV8B", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "AssetManager", }, "method": "ProxyRemoved", @@ -141,7 +141,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyRemoved", @@ -156,7 +156,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -165,7 +165,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -174,7 +174,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -183,7 +183,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "Assets", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -192,7 +192,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "AssetOwner", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -201,7 +201,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "AssetManager", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -210,7 +210,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "Collator", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -222,7 +222,14 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki [ { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 42, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -444,7 +451,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -1222,7 +1229,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -2087,8 +2094,8 @@ exports[`Polkadot AssetHub Proxy > perform proxy call on behalf of delegator > e { "data": { "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "Transfer", "section": "balances", @@ -2108,23 +2115,11 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh { "data": { "callHash": "(hash)", - "proxy": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", - "real": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Announced", "section": "proxy", }, ] `; - -exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap index 44e2fece1..681ca2057 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "13tsR5Cx9rYpR5UgpYskh3cyfiRxgVJiVvSJR89qLBjxtbA9", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Alliance", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "12mR752ZLe32C5xhai4kE9n1sytSpE1XPTXr7dmzv2tYMMVs", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Fellowship", }, "method": "ProxyAdded", @@ -66,7 +66,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "14YRWSTsjvjY39pPXKu9fj1zHyso2E2mpxFmdtw6dMuyKjdW", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Ambassador", }, "method": "ProxyAdded", @@ -81,7 +81,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -91,7 +91,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "13tsR5Cx9rYpR5UgpYskh3cyfiRxgVJiVvSJR89qLBjxtbA9", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Alliance", }, "method": "ProxyRemoved", @@ -131,7 +131,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "12mR752ZLe32C5xhai4kE9n1sytSpE1XPTXr7dmzv2tYMMVs", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Fellowship", }, "method": "ProxyRemoved", @@ -141,7 +141,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc "data": { "delay": 0, "delegatee": "14YRWSTsjvjY39pPXKu9fj1zHyso2E2mpxFmdtw6dMuyKjdW", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Ambassador", }, "method": "ProxyRemoved", @@ -156,7 +156,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -165,7 +165,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -174,7 +174,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -183,7 +183,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when "data": { "disambiguationIndex": 0, "proxyType": "Collator", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -192,7 +192,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when "data": { "disambiguationIndex": 0, "proxyType": "Alliance", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -201,7 +201,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when "data": { "disambiguationIndex": 0, "proxyType": "Fellowship", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -210,7 +210,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when "data": { "disambiguationIndex": 0, "proxyType": "Ambassador", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -222,7 +222,14 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when [ { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 42, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -691,7 +698,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -1164,7 +1171,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -2200,8 +2207,8 @@ exports[`Polkadot Collectives Proxy > perform proxy call on behalf of delegator { "data": { "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "Transfer", "section": "balances", @@ -2221,23 +2228,11 @@ exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events { "data": { "callHash": "(hash)", - "proxy": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", - "real": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Announced", "section": "proxy", }, ] `; - -exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap index acff2e77e..aacc2cd95 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "12mp9Prons6EYn5vYhza8zHa7huRBCTKUcn6feygY68584FX", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Broker", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "12NaihiwqpJcr9wGH1vCuXxES4nqjweiiHMteawbfS52MGnp", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CoretimeRenewer", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "1jTd9vuEyiQDQcabMPAzeYX1ofs3gFyagdrKqD5Hq4vYXKC", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "OnDemandPurchaser", }, "method": "ProxyAdded", @@ -66,7 +66,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyAdded", @@ -81,7 +81,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -91,7 +91,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "12mp9Prons6EYn5vYhza8zHa7huRBCTKUcn6feygY68584FX", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Broker", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "12NaihiwqpJcr9wGH1vCuXxES4nqjweiiHMteawbfS52MGnp", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CoretimeRenewer", }, "method": "ProxyRemoved", @@ -131,7 +131,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "1jTd9vuEyiQDQcabMPAzeYX1ofs3gFyagdrKqD5Hq4vYXKC", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "OnDemandPurchaser", }, "method": "ProxyRemoved", @@ -141,7 +141,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyRemoved", @@ -156,7 +156,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -165,7 +165,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -174,7 +174,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -183,7 +183,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "Broker", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -192,7 +192,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "CoretimeRenewer", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -201,7 +201,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "OnDemandPurchaser", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -210,7 +210,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr "data": { "disambiguationIndex": 0, "proxyType": "Collator", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -222,7 +222,14 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki [ { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 42, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -444,7 +451,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -987,7 +994,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -1865,8 +1872,8 @@ exports[`Polkadot Coretime Proxy > perform proxy call on behalf of delegator > e { "data": { "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "Transfer", "section": "balances", @@ -1886,23 +1893,11 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh { "data": { "callHash": "(hash)", - "proxy": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", - "real": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Announced", "section": "proxy", }, ] `; - -exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap index a22d02602..c9ba51b2e 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "16QD1UeugRmjF51GTNmgankDenJX3tvqfVf2bWT7BPzZ1yVf", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Identity", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "15MK2myq7rWCaDnsdhZ7HrtkWdL74XzjC2Qcuu8RjMAWieaR", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "IdentityJudgement", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyAdded", @@ -71,7 +71,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -81,7 +81,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -91,7 +91,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "16QD1UeugRmjF51GTNmgankDenJX3tvqfVf2bWT7BPzZ1yVf", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Identity", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "15MK2myq7rWCaDnsdhZ7HrtkWdL74XzjC2Qcuu8RjMAWieaR", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "IdentityJudgement", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, "data": { "delay": 0, "delegatee": "14QPRmts91hw16ReRoPSKLHdm1rEKVHftYcqEJyuWBwfnuJ6", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Collator", }, "method": "ProxyRemoved", @@ -136,7 +136,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -145,7 +145,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -154,7 +154,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -163,7 +163,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Identity", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -172,7 +172,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "IdentityJudgement", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -181,7 +181,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when crea "data": { "disambiguationIndex": 0, "proxyType": "Collator", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -193,7 +193,14 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill [ { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 42, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -396,7 +403,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -939,7 +946,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -1572,8 +1579,8 @@ exports[`People Polkadot Proxy > perform proxy call on behalf of delegator > eve { "data": { "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "Transfer", "section": "balances", @@ -1593,23 +1600,11 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when { "data": { "callHash": "(hash)", - "proxy": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", - "real": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Announced", "section": "proxy", }, ] `; - -exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap index a6906762e..f5e34f8ba 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap @@ -6,7 +6,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyAdded", @@ -16,7 +16,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyAdded", @@ -26,7 +26,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "135k9QX4ZeEXP4kS4Gcv9SL3btAuYCieG2R5njKJtpQt83Ng", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Governance", }, "method": "ProxyAdded", @@ -36,7 +36,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "14AaZyMGZGnDYRPHYMdWpEc2pypTdYWd2zMajSy5p5X6aF47", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Staking", }, "method": "ProxyAdded", @@ -46,7 +46,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyAdded", @@ -56,7 +56,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "13Ser3ju8nUCLamjtqEYPnmvTfA7ZseKU5qJN42kevysMqwu", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Auction", }, "method": "ProxyAdded", @@ -66,7 +66,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "12T88XwSRehhRCHEsUpwGoCWamXY7Fy2oYWSaS5DACADEbkQ", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NominationPools", }, "method": "ProxyAdded", @@ -76,7 +76,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "1bGxxp4sijroxJ5swbdyrNYACuuz1JqhP1WZrHQnZ7aqTnm", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "ParaRegistration", }, "method": "ProxyAdded", @@ -91,7 +91,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Any", }, "method": "ProxyRemoved", @@ -101,7 +101,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "14KRavukzykAQ7mWYDRWHnUAp42zpVeRgVr5Vu3oaAHBkn4J", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NonTransfer", }, "method": "ProxyRemoved", @@ -111,7 +111,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "135k9QX4ZeEXP4kS4Gcv9SL3btAuYCieG2R5njKJtpQt83Ng", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Governance", }, "method": "ProxyRemoved", @@ -121,7 +121,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "14AaZyMGZGnDYRPHYMdWpEc2pypTdYWd2zMajSy5p5X6aF47", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Staking", }, "method": "ProxyRemoved", @@ -131,7 +131,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "13foYqdELfj1VBWUdKpJTkLgr7tkGdSvxWyYbFjZaYi8iLan", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "CancelProxy", }, "method": "ProxyRemoved", @@ -141,7 +141,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "13Ser3ju8nUCLamjtqEYPnmvTfA7ZseKU5qJN42kevysMqwu", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "Auction", }, "method": "ProxyRemoved", @@ -151,7 +151,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "12T88XwSRehhRCHEsUpwGoCWamXY7Fy2oYWSaS5DACADEbkQ", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "NominationPools", }, "method": "ProxyRemoved", @@ -161,7 +161,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "data": { "delay": 0, "delegatee": "1bGxxp4sijroxJ5swbdyrNYACuuz1JqhP1WZrHQnZ7aqTnm", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "delegator": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", "proxyType": "ParaRegistration", }, "method": "ProxyRemoved", @@ -176,7 +176,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "Any", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -185,7 +185,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "NonTransfer", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -194,7 +194,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "Governance", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -203,7 +203,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "Staking", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -212,7 +212,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "CancelProxy", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -221,7 +221,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "Auction", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -230,7 +230,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "NominationPools", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -239,7 +239,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "data": { "disambiguationIndex": 0, "proxyType": "ParaRegistration", - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "who": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "PureCreated", "section": "proxy", @@ -546,7 +546,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox { "data": { "amount": 1000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "stash": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Bonded", "section": "staking", @@ -592,7 +592,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -676,7 +676,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox [ { "data": { - "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "account": "14HSc1dP8PQkm8uTVfTwp38ZeHwf6fxyst5WEC7EWYetHdz", }, "method": "VestingCompleted", "section": "vesting", @@ -1142,7 +1142,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox { "data": { "amount": 1000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "stash": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Bonded", "section": "staking", @@ -1188,7 +1188,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox { "data": { "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "sender": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Remarked", "section": "system", @@ -1362,7 +1362,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox { "data": { "amount": 1000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "stash": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Bonded", "section": "staking", @@ -2445,8 +2445,8 @@ exports[`Polkadot Proxy > perform proxy call on behalf of delegator > events whe { "data": { "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "14Gjs1TD93gnwEBfDMHoCgsuf1s2TVKUP6Z1qKmAZnZ8cW5q", + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", }, "method": "Transfer", "section": "balances", @@ -2466,8 +2466,8 @@ exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob an { "data": { "callHash": "(hash)", - "proxy": "14E5nqKAp3oAJcmzgZhUD2RcptBeUBScxKHgJKU4HPNcKVf3", - "real": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", }, "method": "Announced", "section": "proxy", diff --git a/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts b/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts index 6949f0d78..130d70d2b 100644 --- a/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts @@ -1,10 +1,11 @@ import { assetHubPolkadot } from '@e2e-test/networks/chains' -import { AssetHubProxyTypes, fullProxyE2ETests, registerTestTree } from '@e2e-test/shared' +import { AssetHubProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests( - assetHubPolkadot, - { testSuiteName: 'Polkadot AssetHub Proxy', addressEncoding: 0 }, - AssetHubProxyTypes, - ), -) +const testConfig: ParaTestConfig = { + testSuiteName: 'Polkadot AssetHub Proxy', + addressEncoding: 0, + relayOrPara: 'Para', + asyncBacking: 'Enabled', +} + +registerTestTree(fullProxyE2ETests(assetHubPolkadot, testConfig, AssetHubProxyTypes)) diff --git a/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts b/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts index c31257924..4151481c0 100644 --- a/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts @@ -1,10 +1,11 @@ import { collectivesPolkadot } from '@e2e-test/networks/chains' -import { CollectivesProxyTypes, fullProxyE2ETests, registerTestTree } from '@e2e-test/shared' +import { CollectivesProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests( - collectivesPolkadot, - { testSuiteName: 'Polkadot Collectives Proxy', addressEncoding: 0 }, - CollectivesProxyTypes, - ), -) +const testConfig: ParaTestConfig = { + testSuiteName: 'Polkadot Collectives Proxy', + addressEncoding: 0, + relayOrPara: 'Para', + asyncBacking: 'Enabled', +} + +registerTestTree(fullProxyE2ETests(collectivesPolkadot, testConfig, CollectivesProxyTypes)) diff --git a/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts b/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts index a6706aa90..afd18fc68 100644 --- a/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts @@ -1,10 +1,11 @@ import { coretimePolkadot } from '@e2e-test/networks/chains' -import { CoretimeProxyTypes, fullProxyE2ETests, registerTestTree } from '@e2e-test/shared' +import { CoretimeProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests( - coretimePolkadot, - { testSuiteName: 'Polkadot Coretime Proxy', addressEncoding: 0 }, - CoretimeProxyTypes, - ), -) +const testConfig: ParaTestConfig = { + testSuiteName: 'Polkadot Coretime Proxy', + addressEncoding: 0, + relayOrPara: 'Para', + asyncBacking: 'Enabled', +} + +registerTestTree(fullProxyE2ETests(coretimePolkadot, testConfig, CoretimeProxyTypes)) diff --git a/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts b/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts index 9d08d43ca..7222b03e1 100644 --- a/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts @@ -1,6 +1,11 @@ import { peoplePolkadot } from '@e2e-test/networks/chains' -import { fullProxyE2ETests, PeopleProxyTypes, registerTestTree } from '@e2e-test/shared' +import { fullProxyE2ETests, type ParaTestConfig, PeopleProxyTypes, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests(peoplePolkadot, { testSuiteName: 'People Polkadot Proxy', addressEncoding: 0 }, PeopleProxyTypes), -) +const testConfig: ParaTestConfig = { + testSuiteName: 'People Polkadot Proxy', + addressEncoding: 0, + relayOrPara: 'Para', + asyncBacking: 'Disabled', +} + +registerTestTree(fullProxyE2ETests(peoplePolkadot, testConfig, PeopleProxyTypes)) diff --git a/packages/polkadot/src/polkadot.proxy.e2e.test.ts b/packages/polkadot/src/polkadot.proxy.e2e.test.ts index 89d2eee13..7becaade7 100644 --- a/packages/polkadot/src/polkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/polkadot.proxy.e2e.test.ts @@ -1,6 +1,10 @@ import { polkadot } from '@e2e-test/networks/chains' -import { fullProxyE2ETests, PolkadotProxyTypes, registerTestTree } from '@e2e-test/shared' +import { fullProxyE2ETests, PolkadotProxyTypes, type RelayTestConfig, registerTestTree } from '@e2e-test/shared' -registerTestTree( - fullProxyE2ETests(polkadot, { testSuiteName: 'Polkadot Proxy', addressEncoding: 0 }, PolkadotProxyTypes), -) +const testConfig: RelayTestConfig = { + testSuiteName: 'Polkadot Proxy', + addressEncoding: 0, + relayOrPara: 'Relay', +} + +registerTestTree(fullProxyE2ETests(polkadot, testConfig, PolkadotProxyTypes)) diff --git a/packages/shared/src/helpers/index.ts b/packages/shared/src/helpers/index.ts index faae88665..333cf2592 100644 --- a/packages/shared/src/helpers/index.ts +++ b/packages/shared/src/helpers/index.ts @@ -375,7 +375,7 @@ export async function getBlockNumber(api: ApiPromise, relayOrPara: RelayOrPara): } /** - * Get the earliest block number in which a task can be scheduled. + * Get the next block number in which a task can be scheduled. */ export async function nextSchedulableBlockNum(api: ApiPromise, relayOrPara: RelayOrPara): Promise { return await match(relayOrPara) diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index ddfc9d80d..6394801e1 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -1,6 +1,6 @@ import { type Checker, sendTransaction } from '@acala-network/chopsticks-testing' -import { type Chain, defaultAccountsSr25519 } from '@e2e-test/networks' +import { type Chain, testAccounts } from '@e2e-test/networks' import { type Client, type DescribeNode, @@ -23,7 +23,7 @@ import { assert, expect } from 'vitest' import BN from 'bn.js' import { match } from 'ts-pattern' -import { check, checkEvents } from './helpers/index.js' +import { check, checkEvents, getBlockNumber, schedulerOffset, type TestConfig } from './helpers/index.js' /// ------- /// Helpers @@ -36,6 +36,9 @@ const PROXY_DELAY = 5 /** * Given a keyring and a network's proxy types, create a keypair for each proxy type. + * + * @returns A record of proxy type names to their corresponding keypairs. The proxy type names that key the return + * object will be derived from the fields in the `proxyTypes` argument. */ function createProxyAccounts( accountName: string, @@ -186,7 +189,7 @@ class ProxyActionBuilderImpl< ambassadorCoreCalls.push({ pallet: 'core_fellowship', extrinsic: 'bump', - call: this.client.api.tx.ambassadorCore.bump(defaultAccountsSr25519.eve.address), + call: this.client.api.tx.ambassadorCore.bump(testAccounts.eve.address), }) } @@ -233,7 +236,7 @@ class ProxyActionBuilderImpl< assetsCalls.push({ pallet: 'assets', extrinsic: 'mint', - call: this.client.api.tx.assets.mint(1, defaultAccountsSr25519.eve.address, 1e10), + call: this.client.api.tx.assets.mint(1, testAccounts.eve.address, 1e10), }) } return assetsCalls @@ -245,7 +248,7 @@ class ProxyActionBuilderImpl< assetsCalls.push({ pallet: 'assets', extrinsic: 'create', - call: this.client.api.tx.assets.create(1, defaultAccountsSr25519.eve.address, 1e10), + call: this.client.api.tx.assets.create(1, testAccounts.eve.address, 1e10), }) } return assetsCalls @@ -309,7 +312,7 @@ class ProxyActionBuilderImpl< brokerPurchaseCreditCalls.push({ pallet: 'broker', extrinsic: 'purchase_credit', - call: this.client.api.tx.broker.purchaseCredit(100e10, defaultAccountsSr25519.eve.address), + call: this.client.api.tx.broker.purchaseCredit(100e10, testAccounts.eve.address), }) } @@ -396,7 +399,7 @@ class ProxyActionBuilderImpl< fellowshipCalls.push({ pallet: 'core_fellowship', extrinsic: 'bump', - call: this.client.api.tx.fellowshipCore.bump(defaultAccountsSr25519.eve.address), + call: this.client.api.tx.fellowshipCore.bump(testAccounts.eve.address), }) } @@ -464,7 +467,7 @@ class ProxyActionBuilderImpl< identityJudgementCalls.push({ pallet: 'identity', extrinsic: 'provide_judgement', - call: this.client.api.tx.identity.provideJudgement(0, defaultAccountsSr25519.eve.address, 'FeePaid', hash), + call: this.client.api.tx.identity.provideJudgement(0, testAccounts.eve.address, 'FeePaid', hash), }) } @@ -583,7 +586,7 @@ class ProxyActionBuilderImpl< proxyCalls.push({ pallet: 'proxy', extrinsic: 'remove_announcement', - call: this.client.api.tx.proxy.removeAnnouncement(defaultAccountsSr25519.eve.address, hash), + call: this.client.api.tx.proxy.removeAnnouncement(testAccounts.eve.address, hash), }) } @@ -598,7 +601,7 @@ class ProxyActionBuilderImpl< cancelProxyCalls.push({ pallet: 'proxy', extrinsic: 'reject_announcement', - call: this.client.api.tx.proxy.rejectAnnouncement(defaultAccountsSr25519.eve.address, hash), + call: this.client.api.tx.proxy.rejectAnnouncement(testAccounts.eve.address, hash), }) } @@ -614,7 +617,7 @@ class ProxyActionBuilderImpl< // Careful not to elicit unintended call filtering by using a proxy type that is a supertype of // of the calling proxy type. // With the available data at this point, it is not possible to foresee which proxy type is making the call. - call: this.client.api.tx.proxy.removeProxy(defaultAccountsSr25519.eve.address, proxyType!, 0), + call: this.client.api.tx.proxy.removeProxy(testAccounts.eve.address, proxyType!, 0), }) } @@ -695,7 +698,7 @@ class ProxyActionBuilderImpl< vestingCalls.push({ pallet: 'vesting', extrinsic: 'vested_transfer', - call: this.client.api.tx.vesting.vestedTransfer(defaultAccountsSr25519.eve.address, { + call: this.client.api.tx.vesting.vestedTransfer(testAccounts.eve.address, { locked: 100e10, perBlock: 1e10, startingBlock: 1, @@ -721,7 +724,7 @@ class ProxyActionBuilderImpl< uniquesCalls.push({ pallet: 'uniques', extrinsic: 'mint', - call: this.client.api.tx.uniques.mint(1, 1, defaultAccountsSr25519.eve.address), + call: this.client.api.tx.uniques.mint(1, 1, testAccounts.eve.address), }) } @@ -734,7 +737,7 @@ class ProxyActionBuilderImpl< uniquesCalls.push({ pallet: 'uniques', extrinsic: 'create', - call: this.client.api.tx.uniques.create(1, defaultAccountsSr25519.eve.address), + call: this.client.api.tx.uniques.create(1, testAccounts.eve.address), }) } @@ -1220,7 +1223,7 @@ async function proxyCallFilteringSingleTestRunner< ) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice // Add the proxy account, with the to-be-tested proxy type const addProxyTx = client.api.tx.proxy.addProxy(proxyAccount.address, proxyTypeIx, 0) @@ -1338,7 +1341,7 @@ function proxyCallFilteringTestTree< proxyTypes: Record, testType: ProxyCallFilteringTestType, ): DescribeNode { - const kr = defaultAccountsSr25519.keyring + const kr = testAccounts.keyring const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) @@ -1403,21 +1406,21 @@ function proxyCallFilteringTestTree< * 1. creates proxies of every type for an account * - these proxies have a delay of 0 * 2. checks that the proxies exist - * 3. removes every previously created proxy + * 3. removes every previously created proxy, one at a time with `remove_proxy` * 4. checks that the proxies no longer exist * 5. creates proxies of every type for the same account, this time with a delay - * 6. checks that the proxies exist - * 7. removes every previously created proxy with `remove_proxies` - * 8. checks that the proxies no longer exist + * 6. checks that the proxies have been removed + * 7. removes every previously created proxy, all at once with `remove_proxies` + * 8. checks that the proxies have been removed */ export async function addRemoveProxyTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number, proxyTypes: Record, delay: number) { +>(chain: Chain, testConfig: TestConfig, proxyTypes: Record, delay: number) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice - const kr = defaultAccountsSr25519.keyring + const alice = testAccounts.alice + const kr = testAccounts.keyring // Create object with keys as proxy types and values as an Sr25519 keypair const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) @@ -1457,7 +1460,7 @@ export async function addRemoveProxyTest< for (const proxy of proxies) { await check(proxy).toMatchObject({ - delegate: encodeAddress(proxyAccounts[proxy.proxyType.toString()].address, addressEncoding), + delegate: encodeAddress(proxyAccounts[proxy.proxyType.toString()].address, testConfig.addressEncoding), proxyType: proxyIndicesToTypes[proxy.proxyType.toNumber()], delay: 0, }) @@ -1517,7 +1520,7 @@ export async function addRemoveProxyTest< await check(proxy) .redact({ removeKeys: /proxyType/ }) .toMatchObject({ - delegate: encodeAddress(proxyAccounts[proxy.proxyType.toString()].address, addressEncoding), + delegate: encodeAddress(proxyAccounts[proxy.proxyType.toString()].address, testConfig.addressEncoding), delay: delay, }) } @@ -1558,10 +1561,10 @@ export async function addRemoveProxyTest< export async function createKillPureProxyTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number, proxyTypes: Record) { +>(chain: Chain, testConfig: TestConfig, proxyTypes: Record) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice + const alice = testAccounts.alice // Create pure proxies @@ -1626,7 +1629,7 @@ export async function createKillPureProxyTest< expect(pureProxy[0].length).toBe(1) expect(pureProxy[0][0].proxyType.eq(eventData.proxyType)).toBe(true) expect(pureProxy[0][0].delay.eq(0)).toBe(true) - expect(pureProxy[0][0].delegate.eq(encodeAddress(alice.address, addressEncoding))).toBe(true) + expect(pureProxy[0][0].delegate.eq(encodeAddress(alice.address, testConfig.addressEncoding))).toBe(true) const proxyDepositBase = client.api.consts.proxy.proxyDepositBase const proxyDepositFactor = client.api.consts.proxy.proxyDepositFactor @@ -1639,7 +1642,7 @@ export async function createKillPureProxyTest< // To call `proxy.killPure`, the block number of `proxy.createPure` is required. // The current block number will have been the block in which the batch transaction containing all of the // `createPure` extrinsics were executed. - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) // For every pure proxy type, create a `proxy.proxy` call, containing a `proxy.killPure` extrinsic. // Note that in the case of pure proxies, the account which called `proxy.createPure` becomes the delegate, @@ -1676,7 +1679,7 @@ export async function createKillPureProxyTest< expect(pureProxy[1].eq(0)).toBe(true) } else { expect(pureProxy[0].length).toBe(1) - expect(pureProxy[0][0].delegate.eq(encodeAddress(alice.address, addressEncoding))).toBe(true) + expect(pureProxy[0][0].delegate.eq(encodeAddress(alice.address, testConfig.addressEncoding))).toBe(true) const proxyDepositBase = client.api.consts.proxy.proxyDepositBase const proxyDepositFactor = client.api.consts.proxy.proxyDepositFactor @@ -1699,9 +1702,9 @@ export async function proxyCallTest< >(chain: Chain) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice - const bob = defaultAccountsSr25519.bob - const charlie = defaultAccountsSr25519.charlie + const alice = testAccounts.alice + const bob = testAccounts.bob + const charlie = testAccounts.charlie // Fund test accounts not already provisioned in the test chain spec. await client.dev.setStorage({ @@ -1757,12 +1760,12 @@ export async function proxyCallTest< export async function proxyAnnouncementLifecycleTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(chain: Chain, addressEncoding: number) { +>(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const alice = defaultAccountsSr25519.alice - const bob = defaultAccountsSr25519.bob - const charlie = defaultAccountsSr25519.charlie + const alice = testAccounts.alice + const bob = testAccounts.bob + const charlie = testAccounts.charlie await client.dev.setStorage({ System: { @@ -1778,7 +1781,7 @@ export async function proxyAnnouncementLifecycleTest< await client.dev.newBlock() // Bob announces an intent to transfer funds to Charlie - const transferAmount: number = 100e10 + const transferAmount = client.api.consts.balances.existentialDeposit.toBigInt() * 100n const transferCall = client.api.tx.balances.transferKeepAlive(charlie.address, transferAmount) await client.dev.newBlock() @@ -1790,9 +1793,9 @@ export async function proxyAnnouncementLifecycleTest< await checkEvents(announcementEvents, 'proxy').toMatchSnapshot('events when Bob announces a proxy call') - const currBlockNumber = (await client.api.rpc.chain.getHeader()).number.toNumber() + const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) const announcementObject = { - real: encodeAddress(alice.address, addressEncoding), + real: encodeAddress(alice.address, testConfig.addressEncoding), callHash: transferCall.method.hash.toHex(), height: currBlockNumber, } @@ -1835,9 +1838,12 @@ export async function proxyAnnouncementLifecycleTest< await client.dev.newBlock() + const offset = schedulerOffset(testConfig) + announcements = await client.api.query.proxy.announcements(bob.address) expect(announcements[0].length).toBe(1) - announcementObject.height = currBlockNumber + 2 + announcementObject.height = currBlockNumber + 2 * offset + await check(announcements[0][0]).toMatchObject(announcementObject) expect(announcements[1].eq(announcementDepositTotal)).toBe(true) @@ -1882,11 +1888,7 @@ export async function proxyAnnouncementLifecycleTest< export function baseProxyE2ETests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->( - chain: Chain, - testConfig: { testSuiteName: string; addressEncoding: number }, - proxyTypes: Record, -): RootTestTree { +>(chain: Chain, testConfig: TestConfig, proxyTypes: Record): RootTestTree { return { kind: 'describe', label: testConfig.testSuiteName, @@ -1894,12 +1896,12 @@ export function baseProxyE2ETests< { kind: 'test', label: 'add proxies (with/without delay) to an account, and remove them', - testFn: async () => await addRemoveProxyTest(chain, testConfig.addressEncoding, proxyTypes, PROXY_DELAY), + testFn: async () => await addRemoveProxyTest(chain, testConfig, proxyTypes, PROXY_DELAY), }, { kind: 'test', label: 'create and kill pure proxies', - testFn: async () => await createKillPureProxyTest(chain, testConfig.addressEncoding, proxyTypes), + testFn: async () => await createKillPureProxyTest(chain, testConfig, proxyTypes), }, { kind: 'test', @@ -1909,7 +1911,7 @@ export function baseProxyE2ETests< { kind: 'test', label: 'proxy announcement lifecycle test', - testFn: async () => await proxyAnnouncementLifecycleTest(chain, testConfig.addressEncoding), + testFn: async () => await proxyAnnouncementLifecycleTest(chain, testConfig), }, ], } @@ -1918,11 +1920,7 @@ export function baseProxyE2ETests< export function fullProxyE2ETests< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->( - chain: Chain, - testConfig: { testSuiteName: string; addressEncoding: number }, - proxyTypes: Record, -): RootTestTree { +>(chain: Chain, testConfig: TestConfig, proxyTypes: Record): RootTestTree { const allowedFilteringTests = proxyCallFilteringTestTree(chain, proxyTypes, ProxyCallFilteringTestType.Permitted) const forbiddenFilteringTests = proxyCallFilteringTestTree(chain, proxyTypes, ProxyCallFilteringTestType.Forbidden) From fd2ca4e6a1ef6aa2493eabce5e1e14bcf73a5095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 9 Sep 2025 03:04:45 +0100 Subject: [PATCH 14/18] Rename `TestConfig` param `relayOrPara` to `blockProvider` --- .../coretimeKusama.proxy.e2e.test.ts.snap | 31 +- .../kusama.proxy.e2e.test.ts.snap | 1277 +++++++++++++++++ .../peopleKusama.proxy.e2e.test.ts.snap | 31 +- .../src/assetHubKusama.proxy.e2e.test.ts | 2 +- .../src/assetHubKusama.vesting.e2e.test.ts | 2 +- .../src/coretimeKusama.proxy.e2e.test.ts | 2 +- .../kusama/src/kusama.governance.e2e.test.ts | 2 +- .../src/kusama.nominationPools.e2e.test.ts | 2 +- packages/kusama/src/kusama.proxy.e2e.test.ts | 2 +- .../kusama/src/kusama.scheduler.e2e.test.ts | 2 +- .../kusama/src/kusama.staking.e2e.test.ts | 2 +- .../kusama/src/kusama.vesting.e2e.test.ts | 2 +- .../kusama/src/peopleKusama.proxy.e2e.test.ts | 2 +- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 21 +- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 21 +- .../coretimePolkadot.proxy.e2e.test.ts.snap | 21 +- .../peoplePolkadot.proxy.e2e.test.ts.snap | 21 +- .../src/assetHubPolkadot.proxy.e2e.test.ts | 2 +- .../src/assetHubPolkadot.vesting.e2e.test.ts | 2 +- .../src/collectivesPolkadot.proxy.e2e.test.ts | 2 +- .../collectivesPolkadot.scheduler.e2e.test.ts | 2 +- .../src/coretimePolkadot.proxy.e2e.test.ts | 2 +- .../src/peoplePolkadot.proxy.e2e.test.ts | 2 +- .../src/polkadot.governance.e2e.test.ts | 2 +- .../src/polkadot.nominationPools.e2e.test.ts | 2 +- .../polkadot/src/polkadot.proxy.e2e.test.ts | 2 +- .../src/polkadot.scheduler.e2e.test.ts | 2 +- .../polkadot/src/polkadot.staking.e2e.test.ts | 2 +- .../polkadot/src/polkadot.vesting.e2e.test.ts | 2 +- packages/shared/src/governance.ts | 32 +- packages/shared/src/helpers/index.ts | 55 +- packages/shared/src/nomination-pools.ts | 13 +- packages/shared/src/proxy.ts | 4 +- packages/shared/src/scheduler.ts | 236 +-- packages/shared/src/staking.ts | 116 +- yarn.lock | 9 - 36 files changed, 1653 insertions(+), 279 deletions(-) diff --git a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap index 4cc0c5c2d..2ce3db5ab 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -222,14 +222,17 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 42, - }, - }, - }, + "disambiguationIndex": 0, + "proxyType": "Any", + "pure": "GV8GWLDsikzsf9uSKwvZu5G415z9f5CUuSPTQoDxnELtQuf", + "spawner": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "PureKilled", + "section": "proxy", + }, + { + "data": { + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -1901,3 +1904,15 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when }, ] `; + +exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap index 3f33e10c0..7e4cf4477 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -1641,6 +1641,1283 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet referenda, call submit 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": "(redacted)", + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet staking, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet vesting, call vested_transfer 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet staking, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet staking, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet vesting, call vested_transfer 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet referenda, call submit 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": "(redacted)", + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet staking, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet vesting, call vested_transfer 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call reject_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch_all 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call force_batch 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch_all 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call force_batch 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet balances, call burn 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet referenda, call submit 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": "(redacted)", + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call apply_authorized_upgrade 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Operational", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 100000000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 10000)", + "refTime": "(rounded 700000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet vesting, call vested_transfer 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` [ { diff --git a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap index 9f43d45a0..162397d53 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -193,14 +193,17 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 42, - }, - }, - }, + "disambiguationIndex": 0, + "proxyType": "Any", + "pure": "JKb9r5Bt4mCcqRdrhmgjP6gEyfLeJdZMUUP5wxereNBnFT2", + "spawner": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "PureKilled", + "section": "proxy", + }, + { + "data": { + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -1608,3 +1611,15 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B }, ] `; + +exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts b/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts index fc5374ae6..3114c2aa4 100644 --- a/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts +++ b/packages/kusama/src/assetHubKusama.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { AssetHubProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTes const testConfig: ParaTestConfig = { testSuiteName: 'Kusama AssetHub Proxy', addressEncoding: 2, - relayOrPara: 'Para', + blockProvider: 'NonLocal', asyncBacking: 'Enabled', } diff --git a/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts b/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts index 8f52113c7..275385629 100644 --- a/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts +++ b/packages/kusama/src/assetHubKusama.vesting.e2e.test.ts @@ -4,7 +4,7 @@ import { assetHubVestingE2ETests, type ParaTestConfig, registerTestTree } from ' const kahTestConfig: ParaTestConfig = { testSuiteName: 'Kusama Asset Hub Vesting', addressEncoding: 2, - relayOrPara: 'Para', + blockProvider: 'NonLocal', asyncBacking: 'Enabled', } diff --git a/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts b/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts index c9224d0a9..00f1ef95a 100644 --- a/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts +++ b/packages/kusama/src/coretimeKusama.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { CoretimeProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTes const testConfig: ParaTestConfig = { testSuiteName: 'Kusama Coretime Proxy', addressEncoding: 2, - relayOrPara: 'Para', + blockProvider: 'Local', asyncBacking: 'Enabled', } diff --git a/packages/kusama/src/kusama.governance.e2e.test.ts b/packages/kusama/src/kusama.governance.e2e.test.ts index 4b47573c9..ca6c4fbc0 100644 --- a/packages/kusama/src/kusama.governance.e2e.test.ts +++ b/packages/kusama/src/kusama.governance.e2e.test.ts @@ -4,7 +4,7 @@ import { baseGovernanceE2ETests, type RelayTestConfig, registerTestTree } from ' const testConfig: RelayTestConfig = { testSuiteName: 'Kusama Governance', addressEncoding: 2, - blockProvider: 'Relay', + blockProvider: 'Local', } registerTestTree(baseGovernanceE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.nominationPools.e2e.test.ts b/packages/kusama/src/kusama.nominationPools.e2e.test.ts index e3d03654f..9d33285ac 100644 --- a/packages/kusama/src/kusama.nominationPools.e2e.test.ts +++ b/packages/kusama/src/kusama.nominationPools.e2e.test.ts @@ -4,7 +4,7 @@ import { baseNominationPoolsE2ETests, registerTestTree, type TestConfig } from ' const testConfig: TestConfig = { testSuiteName: 'Kusama Nomination Pools', addressEncoding: 2, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(baseNominationPoolsE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.proxy.e2e.test.ts b/packages/kusama/src/kusama.proxy.e2e.test.ts index 966db84df..e0ac904f4 100644 --- a/packages/kusama/src/kusama.proxy.e2e.test.ts +++ b/packages/kusama/src/kusama.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { fullProxyE2ETests, KusamaProxyTypes, type RelayTestConfig, registerTest const testConfig: RelayTestConfig = { testSuiteName: 'Kusama Proxy', addressEncoding: 2, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(fullProxyE2ETests(kusama, testConfig, KusamaProxyTypes)) diff --git a/packages/kusama/src/kusama.scheduler.e2e.test.ts b/packages/kusama/src/kusama.scheduler.e2e.test.ts index eeeaeb3fc..830f20c48 100644 --- a/packages/kusama/src/kusama.scheduler.e2e.test.ts +++ b/packages/kusama/src/kusama.scheduler.e2e.test.ts @@ -4,7 +4,7 @@ import { baseSchedulerE2ETests, type RelayTestConfig, registerTestTree } from '@ const testConfig: RelayTestConfig = { testSuiteName: 'Kusama Scheduler', addressEncoding: 2, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(baseSchedulerE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.staking.e2e.test.ts b/packages/kusama/src/kusama.staking.e2e.test.ts index 3947ab5d8..968162b0e 100644 --- a/packages/kusama/src/kusama.staking.e2e.test.ts +++ b/packages/kusama/src/kusama.staking.e2e.test.ts @@ -4,7 +4,7 @@ import { fullStakingTests, type RelayTestConfig, registerTestTree } from '@e2e-t const testConfig: RelayTestConfig = { testSuiteName: 'Kusama Staking', addressEncoding: 2, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(fullStakingTests(kusama, testConfig)) diff --git a/packages/kusama/src/kusama.vesting.e2e.test.ts b/packages/kusama/src/kusama.vesting.e2e.test.ts index e02ae3bdc..7ca556a9a 100644 --- a/packages/kusama/src/kusama.vesting.e2e.test.ts +++ b/packages/kusama/src/kusama.vesting.e2e.test.ts @@ -4,7 +4,7 @@ import { registerTestTree, relayVestingE2ETests, type TestConfig } from '@e2e-te const testConfig: TestConfig = { testSuiteName: 'Kusama Vesting', addressEncoding: 2, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(relayVestingE2ETests(kusama, testConfig)) diff --git a/packages/kusama/src/peopleKusama.proxy.e2e.test.ts b/packages/kusama/src/peopleKusama.proxy.e2e.test.ts index 283ae12b3..a524c27d4 100644 --- a/packages/kusama/src/peopleKusama.proxy.e2e.test.ts +++ b/packages/kusama/src/peopleKusama.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { fullProxyE2ETests, type ParaTestConfig, PeopleProxyTypes, registerTestT const testConfig: ParaTestConfig = { testSuiteName: 'People Kusama Proxy', addressEncoding: 2, - relayOrPara: 'Para', + blockProvider: 'Local', asyncBacking: 'Disabled', } diff --git a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap index 2f1418229..5db0c98eb 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -222,14 +222,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 42, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -2123,3 +2116,15 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh }, ] `; + +exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap index 681ca2057..185a446fd 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -222,14 +222,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 42, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -2236,3 +2229,15 @@ exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events }, ] `; + +exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap index aacc2cd95..2668d73a4 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -222,14 +222,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 42, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -1901,3 +1894,15 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh }, ] `; + +exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap index c9ba51b2e..f636609e5 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -193,14 +193,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 42, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -1608,3 +1601,15 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when }, ] `; + +exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts b/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts index 130d70d2b..63abe1686 100644 --- a/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/assetHubPolkadot.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { AssetHubProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTes const testConfig: ParaTestConfig = { testSuiteName: 'Polkadot AssetHub Proxy', addressEncoding: 0, - relayOrPara: 'Para', + blockProvider: 'Local', asyncBacking: 'Enabled', } diff --git a/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts b/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts index 4e342b608..936725823 100644 --- a/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts +++ b/packages/polkadot/src/assetHubPolkadot.vesting.e2e.test.ts @@ -4,7 +4,7 @@ import { assetHubVestingE2ETests, type ParaTestConfig, registerTestTree } from ' const testConfig: ParaTestConfig = { testSuiteName: 'Polkadot Asset Hub Vesting', addressEncoding: 0, - relayOrPara: 'Para', + blockProvider: 'NonLocal', asyncBacking: 'Enabled', } diff --git a/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts b/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts index 4151481c0..2ac71311b 100644 --- a/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/collectivesPolkadot.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { CollectivesProxyTypes, fullProxyE2ETests, type ParaTestConfig, register const testConfig: ParaTestConfig = { testSuiteName: 'Polkadot Collectives Proxy', addressEncoding: 0, - relayOrPara: 'Para', + blockProvider: 'Local', asyncBacking: 'Enabled', } diff --git a/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts b/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts index 1bac8b0e2..31f40d56e 100644 --- a/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts +++ b/packages/polkadot/src/collectivesPolkadot.scheduler.e2e.test.ts @@ -4,7 +4,7 @@ import { baseSchedulerE2ETests, registerTestTree, type TestConfig } from '@e2e-t const testConfig: TestConfig = { testSuiteName: 'Collectives Polkadot Scheduler E2E tests', addressEncoding: 0, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(baseSchedulerE2ETests(collectivesPolkadot, testConfig)) diff --git a/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts b/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts index afd18fc68..6a1742ccd 100644 --- a/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/coretimePolkadot.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { CoretimeProxyTypes, fullProxyE2ETests, type ParaTestConfig, registerTes const testConfig: ParaTestConfig = { testSuiteName: 'Polkadot Coretime Proxy', addressEncoding: 0, - relayOrPara: 'Para', + blockProvider: 'Local', asyncBacking: 'Enabled', } diff --git a/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts b/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts index 7222b03e1..1b9710c71 100644 --- a/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/peoplePolkadot.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { fullProxyE2ETests, type ParaTestConfig, PeopleProxyTypes, registerTestT const testConfig: ParaTestConfig = { testSuiteName: 'People Polkadot Proxy', addressEncoding: 0, - relayOrPara: 'Para', + blockProvider: 'Local', asyncBacking: 'Disabled', } diff --git a/packages/polkadot/src/polkadot.governance.e2e.test.ts b/packages/polkadot/src/polkadot.governance.e2e.test.ts index 770defc89..11a7cb57b 100644 --- a/packages/polkadot/src/polkadot.governance.e2e.test.ts +++ b/packages/polkadot/src/polkadot.governance.e2e.test.ts @@ -4,7 +4,7 @@ import { baseGovernanceE2ETests, type RelayTestConfig, registerTestTree } from ' const testConfig: RelayTestConfig = { testSuiteName: 'Polkadot Governance', addressEncoding: 0, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(baseGovernanceE2ETests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts b/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts index f1dabb10a..e7430bd8e 100644 --- a/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts +++ b/packages/polkadot/src/polkadot.nominationPools.e2e.test.ts @@ -4,7 +4,7 @@ import { baseNominationPoolsE2ETests, registerTestTree, type TestConfig } from ' const testConfig: TestConfig = { testSuiteName: 'Polkadot Nomination Pools', addressEncoding: 0, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(baseNominationPoolsE2ETests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.proxy.e2e.test.ts b/packages/polkadot/src/polkadot.proxy.e2e.test.ts index 7becaade7..a0c764c61 100644 --- a/packages/polkadot/src/polkadot.proxy.e2e.test.ts +++ b/packages/polkadot/src/polkadot.proxy.e2e.test.ts @@ -4,7 +4,7 @@ import { fullProxyE2ETests, PolkadotProxyTypes, type RelayTestConfig, registerTe const testConfig: RelayTestConfig = { testSuiteName: 'Polkadot Proxy', addressEncoding: 0, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(fullProxyE2ETests(polkadot, testConfig, PolkadotProxyTypes)) diff --git a/packages/polkadot/src/polkadot.scheduler.e2e.test.ts b/packages/polkadot/src/polkadot.scheduler.e2e.test.ts index ba0c7a53a..cf1f5fdcd 100644 --- a/packages/polkadot/src/polkadot.scheduler.e2e.test.ts +++ b/packages/polkadot/src/polkadot.scheduler.e2e.test.ts @@ -4,7 +4,7 @@ import { baseSchedulerE2ETests, type RelayTestConfig, registerTestTree } from '@ const testConfig: RelayTestConfig = { testSuiteName: 'Polkadot Scheduler', addressEncoding: 0, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(baseSchedulerE2ETests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.staking.e2e.test.ts b/packages/polkadot/src/polkadot.staking.e2e.test.ts index fbb017d6a..671e3d8cb 100644 --- a/packages/polkadot/src/polkadot.staking.e2e.test.ts +++ b/packages/polkadot/src/polkadot.staking.e2e.test.ts @@ -4,7 +4,7 @@ import { fullStakingTests, type RelayTestConfig, registerTestTree } from '@e2e-t const testConfig: RelayTestConfig = { testSuiteName: 'Polkadot Staking', addressEncoding: 0, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(fullStakingTests(polkadot, testConfig)) diff --git a/packages/polkadot/src/polkadot.vesting.e2e.test.ts b/packages/polkadot/src/polkadot.vesting.e2e.test.ts index b6c6d6675..5b306fa0a 100644 --- a/packages/polkadot/src/polkadot.vesting.e2e.test.ts +++ b/packages/polkadot/src/polkadot.vesting.e2e.test.ts @@ -4,7 +4,7 @@ import { type RelayTestConfig, registerTestTree, relayVestingE2ETests } from '@e const testConfig: RelayTestConfig = { testSuiteName: 'Polkadot Vesting', addressEncoding: 0, - relayOrPara: 'Relay', + blockProvider: 'Local', } registerTestTree(relayVestingE2ETests(polkadot, testConfig)) diff --git a/packages/shared/src/governance.ts b/packages/shared/src/governance.ts index 9c7b4cd6a..07bb6c237 100644 --- a/packages/shared/src/governance.ts +++ b/packages/shared/src/governance.ts @@ -286,11 +286,11 @@ export async function referendumLifecycleTest< let refPost: PalletReferendaReferendumStatusConvictionVotingTally let iters: number - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { iters = smallTipper[1].preparePeriod.toNumber() - 2 }) - .with('Para', async () => { + .with('NonLocal', async () => { iters = (smallTipper[1].preparePeriod.toNumber() - 2) / 2 }) .exhaustive() @@ -401,7 +401,7 @@ export async function referendumLifecycleTest< expect(charlieVotes.vote.conviction.isLocked3x).toBeTruthy() expect(charlieVotes.vote.isAye).toBeTruthy() - let blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + let blockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // After a vote, the referendum's alarm is set to the block following the one the vote tx was // included in. expect(ongoingRefFirstVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber + 1) @@ -471,7 +471,7 @@ export async function referendumLifecycleTest< expect(daveVote.aye.toNumber()).toBe(ayeVote) expect(daveVote.nay.toNumber()).toBe(nayVote) - blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + blockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // After a vote, the referendum's alarm is set to the block following the one the vote tx was // included in. expect(ongoingRefSecondVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber + 1) @@ -540,7 +540,7 @@ export async function referendumLifecycleTest< expect(eveVote.nay.toNumber()).toBe(nayVote) expect(eveVote.abstain.toNumber()).toBe(abstainVote) - blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + blockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // As before, after another vote, the referendum's alarm is set to the block following the one the vote tx was // included in. expect(ongoingRefThirdVote.alarm.unwrap()[0].toNumber()).toBe(blockNumber + 1) @@ -563,7 +563,7 @@ export async function referendumLifecycleTest< // Cancel the referendum using the scheduler pallet to simulate a root origin - await scheduleInlineCallWithOrigin(client, cancelRefCall.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, cancelRefCall.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -599,12 +599,12 @@ export async function referendumLifecycleTest< const cancelledRef: ITuple<[u32, Option, Option]> = referendumDataOpt.unwrap().asCancelled - blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) - match(testConfig.relayOrPara) - .with('Relay', async () => { + blockNumber = await getBlockNumber(client.api, testConfig.blockProvider) + match(testConfig.blockProvider) + .with('Local', async () => { expect(cancelledRef[0].toNumber()).toBe(blockNumber) }) - .with('Para', async () => { + .with('NonLocal', async () => { expect(cancelledRef[0].toNumber()).toBe(blockNumber - 2) }) // Check that the referendum's submission deposit was refunded to Alice @@ -818,7 +818,7 @@ export async function referendumLifecycleKillTest< * Kill the referendum using the scheduler pallet to simulate a root origin for the call. */ - await scheduleInlineCallWithOrigin(client, killRefCall.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, killRefCall.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -863,13 +863,13 @@ export async function referendumLifecycleKillTest< expect(referendumDataOpt.unwrap().isKilled, 'referendum should be killed!').toBeTruthy() // The only information left from the killed referendum is the block number when it was killed. - const blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const blockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const killedRef: u32 = referendumDataOpt.unwrap().asKilled - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { expect(killedRef.toNumber()).toBe(blockNumber) }) - .with('Para', async () => { + .with('NonLocal', async () => { expect(killedRef.toNumber()).toBe(blockNumber - 2) }) } diff --git a/packages/shared/src/helpers/index.ts b/packages/shared/src/helpers/index.ts index 333cf2592..78836aef7 100644 --- a/packages/shared/src/helpers/index.ts +++ b/packages/shared/src/helpers/index.ts @@ -92,11 +92,12 @@ export function objectCmp( } /** - * This enum is used when scheduling calls, to know whether the scheduling is: - * 1. on a relay chain, using an RPC call to get the current block number, or - * 2. on a system parachain, using that parachain's last known relay chain block number. + * This enum is used when scheduling calls, to know whether the calling environment: + * 1. uses a local block provider e.g. relay chains, or some system parachains + * 2. uses a non-local block provider e.g. some system parachain that need relay block numbers for proxies or + * call scheduling */ -export type RelayOrPara = 'Relay' | 'Para' +export type BlockProvider = 'Local' | 'NonLocal' /** Whether async backing is enabled or disabled on the querying parachain. */ export type AsyncBacking = 'Enabled' | 'Disabled' @@ -108,8 +109,8 @@ export type AsyncBacking = 'Enabled' | 'Disabled' * The call can be either an inline call or a lookup call, which in the latter case *must* have been noted * in the storage of the chain's `preimage` pallet with a `notePreimage` extrinsic. * - * @param relayOrPara Whether the call is being scheduled on a parachain. This parachain's runtime *must* have the - * scheduler pallet available. + * @param blockProvider Whether the call is being scheduled on a chain that uses a local or nonlocal block provider. + * This chain's runtime *must* have the scheduler pallet available. */ export async function scheduleCallWithOrigin( client: { @@ -127,11 +128,13 @@ export async function scheduleCallWithOrigin( } }, origin: any, - relayOrPara: RelayOrPara = 'Relay', + blockProvider: BlockProvider = 'Local', ) { - const scheduledBlock = await match(relayOrPara) - .with('Relay', async () => (await client.api.rpc.chain.getHeader()).number.toNumber() + 1) - .with('Para', async () => ((await client.api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) + const scheduledBlock = await match(blockProvider) + .with('Local', async () => (await client.api.rpc.chain.getHeader()).number.toNumber() + 1) + .with('NonLocal', async () => + ((await client.api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber(), + ) .exhaustive() await client.dev.setStorage({ @@ -164,9 +167,9 @@ export async function scheduleInlineCallWithOrigin( }, encodedCall: HexString, origin: any, - relayOrPara: RelayOrPara = 'Relay', + blockProvider: BlockProvider = 'Local', ) { - await scheduleCallWithOrigin(client, { Inline: encodedCall }, origin, relayOrPara) + await scheduleCallWithOrigin(client, { Inline: encodedCall }, origin, blockProvider) } /** @@ -182,9 +185,9 @@ export async function scheduleLookupCallWithOrigin( }, lookupCall: { hash: any; len: any }, origin: any, - relayOrPara: RelayOrPara = 'Relay', + blockProvider: BlockProvider = 'Local', ) { - await scheduleCallWithOrigin(client, { Lookup: lookupCall }, origin, relayOrPara) + await scheduleCallWithOrigin(client, { Lookup: lookupCall }, origin, blockProvider) } /** @@ -367,20 +370,20 @@ export async function setValidatorsStorage( * @returns The last known block number if relay, the relay chain block number the most recent parablock was anchored * to if parachain. */ -export async function getBlockNumber(api: ApiPromise, relayOrPara: RelayOrPara): Promise { - return await match(relayOrPara) - .with('Relay', async () => (await api.rpc.chain.getHeader()).number.toNumber()) - .with('Para', async () => ((await api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) +export async function getBlockNumber(api: ApiPromise, blockProvider: BlockProvider): Promise { + return await match(blockProvider) + .with('Local', async () => (await api.rpc.chain.getHeader()).number.toNumber()) + .with('NonLocal', async () => ((await api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) .exhaustive() } /** * Get the next block number in which a task can be scheduled. */ -export async function nextSchedulableBlockNum(api: ApiPromise, relayOrPara: RelayOrPara): Promise { - return await match(relayOrPara) - .with('Relay', async () => (await api.rpc.chain.getHeader()).number.toNumber() + 1) - .with('Para', async () => ((await api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) +export async function nextSchedulableBlockNum(api: ApiPromise, blockProvider: BlockProvider): Promise { + return await match(blockProvider) + .with('Local', async () => (await api.rpc.chain.getHeader()).number.toNumber() + 1) + .with('NonLocal', async () => ((await api.query.parachainSystem.lastRelayChainBlockNumber()) as any).toNumber()) .exhaustive() } @@ -393,12 +396,12 @@ export async function nextSchedulableBlockNum(api: ApiPromise, relayOrPara: Rela * * If on a parachain with AB, the offset is 2, because `parachainSystem.lastRelayChainBlockNumber` moves with a step * size of 2, and thus, manually scheduled blocks can only be injected every other relay block number. * - * @param relayOrPara Whether the call is being scheduled on a relay or parachain. + * @param blockProvider Whether the call is being scheduled on a relay or parachain. * @param asyncBacking Whether async backing is enabled on the parachain. * @returns The number of blocks to offset when scheduling tasks */ export function schedulerOffset(cfg: TestConfig): number { - if (cfg.relayOrPara === 'Relay') { + if (cfg.blockProvider === 'Local') { return 1 } @@ -416,7 +419,7 @@ export function schedulerOffset(cfg: TestConfig): number { export interface RelayTestConfig { testSuiteName: string addressEncoding: number - relayOrPara: 'Relay' + blockProvider: 'Local' } /** @@ -429,7 +432,7 @@ export interface RelayTestConfig { export interface ParaTestConfig { testSuiteName: string addressEncoding: number - relayOrPara: 'Para' + blockProvider: BlockProvider asyncBacking: AsyncBacking } diff --git a/packages/shared/src/nomination-pools.ts b/packages/shared/src/nomination-pools.ts index c796454ed..db0af9f49 100644 --- a/packages/shared/src/nomination-pools.ts +++ b/packages/shared/src/nomination-pools.ts @@ -98,7 +98,7 @@ async function ensureMaxPoolsCapacity(client: { api: ApiPromise; dev: any }, tes client, setConfigsCall.method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) // Execute the scheduled call @@ -382,7 +382,7 @@ async function nominationPoolLifecycleTest< poolData = await client.api.query.nominationPools.bondedPools(nomPoolId) expect(poolData.isSome, 'Pool should still exist after commission is changed').toBe(true) - const blockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const blockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const nominationPoolWithCommission = poolData.unwrap() @@ -930,7 +930,7 @@ async function nominationPoolGlobalConfigTest< ] for (const [origin, inc] of originsAndIncrements) { - await scheduleInlineCallWithOrigin(client, setConfigsCall(inc).method.toHex(), origin, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, setConfigsCall(inc).method.toHex(), origin, testConfig.blockProvider) await client.dev.newBlock() @@ -1123,7 +1123,12 @@ async function nominationPoolsUpdateRolesTest< { Set: testAccounts.eve.address }, ) - await scheduleInlineCallWithOrigin(client, updateRolesCall.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + updateRolesCall.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) await client.dev.newBlock() diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 6394801e1..cc5ea7a4a 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -1642,7 +1642,7 @@ export async function createKillPureProxyTest< // To call `proxy.killPure`, the block number of `proxy.createPure` is required. // The current block number will have been the block in which the batch transaction containing all of the // `createPure` extrinsics were executed. - const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const currBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // For every pure proxy type, create a `proxy.proxy` call, containing a `proxy.killPure` extrinsic. // Note that in the case of pure proxies, the account which called `proxy.createPure` becomes the delegate, @@ -1793,7 +1793,7 @@ export async function proxyAnnouncementLifecycleTest< await checkEvents(announcementEvents, 'proxy').toMatchSnapshot('events when Bob announces a proxy call') - const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const currBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const announcementObject = { real: encodeAddress(alice.address, testConfig.addressEncoding), callHash: transferCall.method.hash.toHex(), diff --git a/packages/shared/src/scheduler.ts b/packages/shared/src/scheduler.ts index 1babfb822..11090b79e 100644 --- a/packages/shared/src/scheduler.ts +++ b/packages/shared/src/scheduler.ts @@ -123,7 +123,7 @@ export async function scheduleBadOriginTest< >(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const targetBlockNumber = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) + const targetBlockNumber = await nextSchedulableBlockNum(client.api, testConfig.blockProvider) const call = client.api.tx.system.remark('test').method.toHex() const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber, null, 0, call) @@ -142,7 +142,7 @@ export async function scheduleNamedBadOriginTest< >(chain: Chain, testConfig: TestConfig) { const [client] = await setupNetworks(chain) - const targetBlockNumber = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) + const targetBlockNumber = await nextSchedulableBlockNum(client.api, testConfig.blockProvider) const call = client.api.tx.system.remark('test').method.toHex() const taskId = sha256AsU8a('task_id') @@ -166,21 +166,21 @@ export async function cancelScheduledTaskBadOriginTest< const [client] = await setupNetworks(chain) const call = client.api.tx.system.remark('test').method.toHex() - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + offset }) .exhaustive() const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, call) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -217,14 +217,14 @@ export async function cancelNamedScheduledTaskBadOriginTest< const [client] = await setupNetworks(chain) const call = client.api.tx.system.remark('test').method.toHex() - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + offset }) .exhaustive() @@ -233,7 +233,7 @@ export async function cancelNamedScheduledTaskBadOriginTest< const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlockNumber!, null, 0, call) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -274,21 +274,21 @@ export async function scheduledCallExecutes< const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + offset }) .exhaustive() const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) const oldTotalIssuance = await client.api.query.balances.totalIssuance() @@ -344,20 +344,25 @@ export async function scheduledNamedCallExecutes< const taskId = sha256AsU8a('task_id') - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + offset }) .exhaustive() const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlockNumber!, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + scheduleNamedTx.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) const oldTotalIssuance = await client.api.query.balances.totalIssuance() @@ -411,21 +416,21 @@ export async function cancelScheduledTask< const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 3 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) .exhaustive() const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -435,7 +440,7 @@ export async function cancelScheduledTask< const cancelTx = client.api.tx.scheduler.cancel(targetBlockNumber!, 0) - await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -472,21 +477,26 @@ export async function cancelScheduledNamedTask< const taskId = sha256AsU8a('task_id') - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 3 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) .exhaustive() const scheduleNamedTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlockNumber!, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + scheduleNamedTx.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) await client.dev.newBlock() @@ -496,7 +506,7 @@ export async function cancelScheduledNamedTask< const cancelTx = client.api.tx.scheduler.cancelNamed(taskId) - await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, cancelTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -548,9 +558,9 @@ export async function scheduleTaskAfterDelay< const scheduleTx = client.api.tx.scheduler.scheduleAfter(delay, null, 0, adjustIssuanceTx) - let currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + let currBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() currBlockNumber += offset @@ -562,11 +572,11 @@ export async function scheduleTaskAfterDelay< .toMatchSnapshot('events when scheduling task with delay') let targetBlock: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlock = currBlockNumber + delay + 1 }) - .with('Para', () => { + .with('NonLocal', () => { // Recall that parachains use `parachainSystem.lastRelayChainBlockNumber` to key the agenda for the next block, // not the agenda for the current block - a step back is needed. // Also, the scheduler considers the block in which call to schedule the delayed task to not count, so the @@ -629,14 +639,19 @@ export async function scheduleNamedTaskAfterDelay< const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const taskId = sha256AsU8a('task_id') - let currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + let currBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) // See above note in `scheduleTaskAfterDelay` const delay = 5 * offset const scheduleNamedTx = client.api.tx.scheduler.scheduleNamedAfter(taskId, delay, null, 0, adjustIssuanceTx) - await scheduleInlineCallWithOrigin(client, scheduleNamedTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + scheduleNamedTx.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) await client.dev.newBlock() currBlockNumber += offset @@ -648,11 +663,11 @@ export async function scheduleNamedTaskAfterDelay< .toMatchSnapshot('events when scheduling task with delay') let targetBlock: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlock = currBlockNumber + delay + 1 }) - .with('Para', () => { + .with('NonLocal', () => { // Recall that parachains use `parachainSystem.lastRelayChainBlockNumber` to key the agenda for the next block, // not the agenda for the current block - a step back is needed. targetBlock = currBlockNumber + delay + 1 - offset @@ -719,21 +734,21 @@ export async function scheduledOverweightCallFails< const withWeightTx = client.api.tx.utility.withWeight(adjustIssuanceTx, maxWeight) const offset = schedulerOffset(testConfig) - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // Target block is two blocks in the future - see the notes about parachain scheduling differences. let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + offset }) .exhaustive() const scheduleTx = client.api.tx.scheduler.schedule(targetBlockNumber!, null, 0, withWeightTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -827,10 +842,10 @@ async function scheduleLookupCall< client, { hash: preimageHash, len: encodedProposal.encodedLength }, { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) - const targetBlock = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) + const targetBlock = await nextSchedulableBlockNum(client.api, testConfig.blockProvider) let agenda = await client.api.query.scheduler.agenda(targetBlock) expect(agenda.length).toBe(1) @@ -891,16 +906,16 @@ export async function schedulePreimagedCall< await checkEvents(noteEvents, 'preimage').toMatchSnapshot('note preimage events') // Schedule using the preimage hash - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) // Target block number is two blocks in the future: if `n` is the most recent block, the task should be executed // at `n + 2`. let targetBlockNumber: number - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlockNumber = initialBlockNumber + 2 * offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlockNumber = initialBlockNumber + offset }) .exhaustive() @@ -1040,12 +1055,12 @@ async function testPeriodicTask< const offset = schedulerOffset(testConfig) // Manually schedule `scheduleTx` to run on the next block. - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) const initialTotalIssuance = await client.api.query.balances.totalIssuance() const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - let currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + let currBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // Move to just before the first execution block await client.dev.newBlock() @@ -1053,13 +1068,16 @@ async function testPeriodicTask< // Agenda check for the first scheduled execution let targetBlock: number - if (testConfig.relayOrPara === 'Relay') { - targetBlock = currBlockNumber + offset - } else { - // Recall that on a parachain, a task to be run on the next block has an agenda key of - // `parachainSystem.lastRelayChainBlockNumber`, which `getBlockNumber` will return. - targetBlock = currBlockNumber - } + match(testConfig.blockProvider) + .with('Local', () => { + targetBlock = currBlockNumber + offset + }) + .with('NonLocal', () => { + // Recall that on a parachain, a task to be run on the next block has an agenda key of + // `parachainSystem.lastRelayChainBlockNumber`, which `getBlockNumber` will return. + targetBlock = currBlockNumber + }) + .exhaustive() let agenda = await client.api.query.scheduler.agenda(targetBlock!) expect(agenda.length).toBe(1) @@ -1101,7 +1119,7 @@ async function testPeriodicTask< // Check agenda for next scheduled execution (if not the last iteration) if (i < REPETITIONS) { - if (testConfig.relayOrPara === 'Relay') { + if (testConfig.blockProvider === 'Local') { targetBlock = currBlockNumber + period } else { targetBlock = currBlockNumber + period - offset @@ -1139,11 +1157,11 @@ async function testPeriodicTask< } // Verify task is removed after all executions - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { targetBlock = currBlockNumber + offset }) - .with('Para', () => { + .with('NonLocal', () => { targetBlock = currBlockNumber }) .exhaustive() @@ -1169,14 +1187,14 @@ export async function schedulePeriodicTask< const [client] = await setupNetworks(chain) const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) - const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const currBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) - const delay = match(testConfig.relayOrPara) - .with('Relay', () => 2 * offset) + const delay = match(testConfig.blockProvider) + .with('Local', () => 2 * offset) // Parachain scheduling differences - see notes above. // This is obviously 2, but leaving it like this clarifies what's happening. - .with('Para', () => 2 * offset - offset) + .with('NonLocal', () => 2 * offset - offset) .exhaustive() const period = PERIOD * offset @@ -1206,14 +1224,14 @@ export async function scheduleNamedPeriodicTask< const adjustIssuanceTx = client.api.tx.balances.forceAdjustTotalIssuance('Increase', 1) const taskId = sha256AsU8a('task_id') - const currBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const currBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) const offset = schedulerOffset(testConfig) - const delay = match(testConfig.relayOrPara) - .with('Relay', () => 2 * offset) + const delay = match(testConfig.blockProvider) + .with('Local', () => 2 * offset) // Recall: to schedule a task on the next block of a parachain, the offset is 0. On the block after that one, // it is 1 if async backing is disabled, 2 if enabled. - .with('Para', () => 2 * offset - offset) + .with('NonLocal', () => 2 * offset - offset) .exhaustive() const period = PERIOD * offset @@ -1258,15 +1276,15 @@ export async function schedulePriorityWeightedTasks< const highPriorityTx = client.api.tx.utility.withWeight(adjustIssuanceHighTx, taskWeight) const lowPriorityTx = client.api.tx.utility.withWeight(adjustIssuanceLowTx, taskWeight) - const initBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) let currBlockNumber = initBlockNumber const offset = schedulerOffset(testConfig) let priorityTargetBlock: number - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { priorityTargetBlock = initBlockNumber + 2 * offset }) - .with('Para', async () => { + .with('NonLocal', async () => { priorityTargetBlock = initBlockNumber + offset }) .exhaustive() @@ -1285,7 +1303,7 @@ export async function schedulePriorityWeightedTasks< lowPriorityTx, ) - const targetBlock = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) + const targetBlock = await nextSchedulableBlockNum(client.api, testConfig.blockProvider) // Schedule both tasks await client.dev.setStorage({ @@ -1314,7 +1332,7 @@ export async function schedulePriorityWeightedTasks< await client.dev.newBlock() currBlockNumber += offset - const manuallyScheduledBlock = await nextSchedulableBlockNum(client.api, testConfig.relayOrPara) + const manuallyScheduledBlock = await nextSchedulableBlockNum(client.api, testConfig.blockProvider) // Verify both tasks are in the agenda let scheduled = await client.api.query.scheduler.agenda(manuallyScheduledBlock) @@ -1340,21 +1358,21 @@ export async function schedulePriorityWeightedTasks< // Verify `incompleteSince` is set to current block const incompleteSince = await client.api.query.scheduler.incompleteSince() assert(incompleteSince.isSome) - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { expect(incompleteSince.unwrap().toNumber()).toBe(currBlockNumber) }) - .with('Para', async () => { + .with('NonLocal', async () => { expect(incompleteSince.unwrap().toNumber()).toBe(currBlockNumber - offset) }) .exhaustive() // Check the agenda for the most recently built block - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { scheduled = await client.api.query.scheduler.agenda(currBlockNumber) }) - .with('Para', async () => { + .with('NonLocal', async () => { scheduled = await client.api.query.scheduler.agenda(currBlockNumber - offset) }) .exhaustive() @@ -1400,11 +1418,11 @@ export async function schedulePriorityWeightedTasks< expect(scheduled.length).toBe(0) // The agenda on the block just before the most recently built block should be emoty - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 1) }) - .with('Para', async () => { + .with('NonLocal', async () => { scheduled = await client.api.query.scheduler.agenda(currBlockNumber - 2 * offset) }) .exhaustive() @@ -1412,11 +1430,11 @@ export async function schedulePriorityWeightedTasks< expect(scheduled.length).toBe(0) // Check the agenda on the most recently built block - should be empty - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { scheduled = await client.api.query.scheduler.agenda(currBlockNumber) }) - .with('Para', async () => { + .with('NonLocal', async () => { scheduled = await client.api.query.scheduler.agenda(currBlockNumber - offset) }) .exhaustive() @@ -1440,7 +1458,7 @@ export async function scheduleWithRetryConfig< const [client] = await setupNetworks(chain) // Create a task that will fail - remarkWithEvent requires signed origin const failingTx = client.api.tx.system.remarkWithEvent('will_fail') - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // Define base task object once const baseTask = { @@ -1466,11 +1484,11 @@ export async function scheduleWithRetryConfig< } let targetBlock: number - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { targetBlock = initialBlockNumber + 3 * offset }) - .with('Para', async () => { + .with('NonLocal', async () => { // Recall that on a parachain, the current value of `parachainSystem.lastRelayChainBlockNumber` // keys the agenda for the next block, not the current one, so a step back is needed. targetBlock = initialBlockNumber + 3 * offset - offset @@ -1479,7 +1497,7 @@ export async function scheduleWithRetryConfig< // Schedule the named task first const scheduleTx = client.api.tx.scheduler.schedule(targetBlock!, null, 1, failingTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) // Move to scheduling block await client.dev.newBlock() @@ -1492,7 +1510,7 @@ export async function scheduleWithRetryConfig< // Set retry configuration const setRetryTx = client.api.tx.scheduler.setRetry([targetBlock!, 0], retryConfig.totalRetries, retryConfig.period) - await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -1532,7 +1550,7 @@ export async function scheduleWithRetryConfig< }) const cancelRetryTx = client.api.tx.scheduler.cancelRetry([rescheduledBlock!, 0]) - await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -1579,7 +1597,7 @@ export async function scheduleNamedWithRetryConfig< // Create a task that will fail - remarkWithEvent requires signed origin const failingTx = client.api.tx.system.remarkWithEvent('will_fail') const taskId = sha256AsU8a('retry_task') - const initialBlockNumber = await getBlockNumber(client.api, testConfig.relayOrPara) + const initialBlockNumber = await getBlockNumber(client.api, testConfig.blockProvider) // Define base task object once const baseTask = { @@ -1605,11 +1623,11 @@ export async function scheduleNamedWithRetryConfig< } let targetBlock: number - match(testConfig.relayOrPara) - .with('Relay', async () => { + match(testConfig.blockProvider) + .with('Local', async () => { targetBlock = initialBlockNumber + 3 * offset }) - .with('Para', async () => { + .with('NonLocal', async () => { // Recall that on a parachain, the current value of `parachainSystem.lastRelayChainBlockNumber` // keys the agenda for the next block, not the current one, so a step back is needed. targetBlock = initialBlockNumber + 3 * offset - offset @@ -1618,7 +1636,7 @@ export async function scheduleNamedWithRetryConfig< // Schedule the named task first const scheduleTx = client.api.tx.scheduler.scheduleNamed(taskId, targetBlock!, null, 1, failingTx) - await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, scheduleTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) // Move to scheduling block await client.dev.newBlock() @@ -1631,7 +1649,7 @@ export async function scheduleNamedWithRetryConfig< // Set retry configuration const setRetryTx = client.api.tx.scheduler.setRetryNamed(taskId, retryConfig.totalRetries, retryConfig.period) - await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, setRetryTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -1672,7 +1690,7 @@ export async function scheduleNamedWithRetryConfig< }) let cancelRetryTx = client.api.tx.scheduler.cancelRetryNamed(taskId) - await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -1728,7 +1746,7 @@ export async function scheduleNamedWithRetryConfig< // Cancel the retry configuration with `cancelRetry` cancelRetryTx = client.api.tx.scheduler.cancelRetry([finalRescheduledBlock!, 0]) - await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, cancelRetryTx.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index 2e444d20e..40b6b6baa 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -514,7 +514,12 @@ async function forceUnstakeTest< let nominatorPrefs = await client.api.query.staking.nominators(bob.address) assert(nominatorPrefs.isSome) - await scheduleInlineCallWithOrigin(client, forceUnstakeTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + forceUnstakeTx.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) await client.dev.newBlock() @@ -672,7 +677,12 @@ async function setMinCommission< ] for (const [origin, inc] of originsAndIncrements) { - await scheduleInlineCallWithOrigin(client, setMinCommissionCall(inc).method.toHex(), origin, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + setMinCommissionCall(inc).method.toHex(), + origin, + testConfig.blockProvider, + ) await client.dev.newBlock() @@ -773,7 +783,7 @@ async function setStakingConfigsTest< client, setStakingConfigsCall(inc).method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -891,7 +901,7 @@ async function forceApplyValidatorCommissionTest< client, setStakingConfigsTx.method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -953,7 +963,7 @@ async function modifyValidatorCountTest< client, setValidatorCountCall(100).method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -992,7 +1002,7 @@ async function modifyValidatorCountTest< client, increaseValidatorCountCall(100).method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -1026,7 +1036,7 @@ async function modifyValidatorCountTest< client, scaleValidatorCountCall(10).method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -1086,7 +1096,7 @@ async function chillOtherTest< client, setStakingConfigsCall.method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -1173,7 +1183,7 @@ async function chillOtherTest< const successfulCall = setStakingConfigsCalls.pop() for (const call of setStakingConfigsCalls) { - await scheduleInlineCallWithOrigin(client, call.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, call.method.toHex(), { system: 'Root' }, testConfig.blockProvider) await client.dev.newBlock() @@ -1203,7 +1213,12 @@ async function chillOtherTest< /// To end the test, sucessfully run `chill_other` with the appropriate staking configuration limits all set, /// and observe that Bob is forcibly chilled. - await scheduleInlineCallWithOrigin(client, successfulCall!.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + successfulCall!.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) await client.dev.newBlock() @@ -1246,7 +1261,7 @@ async function unappliedSlashTest< let eraChangeBlock: number | undefined // Only move to era change if running on a relay chain. If not, this is running on a post-migration Asset Hub, // in which this is unnecessary. - if (testConfig.relayOrPara === 'Relay') { + if (testConfig.blockProvider === 'Local') { eraChangeBlock = await locateEraChange(client) if (eraChangeBlock === undefined) { // This test only makes sense to run if there's an active era. @@ -1285,8 +1300,8 @@ async function unappliedSlashTest< const activeEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() let slashKey: any let slashValue: any - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { slashKey = [activeEra + 1] slashValue = [ @@ -1305,7 +1320,7 @@ async function unappliedSlashTest< }, ] }) - .with('Para', () => { + .with('NonLocal', () => { const slashKeyNewComponent = [ alice.address, // perbill, not relevant for the test @@ -1349,10 +1364,15 @@ async function unappliedSlashTest< expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') // If on an post-migration Asset Hub, `applySlash` can be called, instead of having to move to era change. - if (testConfig.relayOrPara === 'Para') { + if (testConfig.blockProvider === 'NonLocal') { // Manually apply the slash. const applySlashTx = client.api.tx.staking.applySlash(...slashKey) - await scheduleInlineCallWithOrigin(client, applySlashTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + applySlashTx.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) } await client.dev.newBlock() @@ -1396,7 +1416,7 @@ async function cancelDeferredSlashTest< const dave = testAccounts.dave let eraChangeBlock: number | undefined - if (testConfig.relayOrPara === 'Relay') { + if (testConfig.blockProvider === 'Local') { eraChangeBlock = await locateEraChange(client) if (eraChangeBlock === undefined) { // This test only makes sense to run if there's an active era. @@ -1418,8 +1438,8 @@ async function cancelDeferredSlashTest< let slashKey: any let slashKeyNewComponent: any | undefined let slashValue: any - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { slashKey = [activeEra + 1] slashValue = [ { @@ -1434,7 +1454,7 @@ async function cancelDeferredSlashTest< }, ] }) - .with('Para', () => { + .with('NonLocal', () => { slashKeyNewComponent = [alice.address, 0, 0] slashKey = [activeEra, slashKeyNewComponent] slashValue = { @@ -1479,25 +1499,25 @@ async function cancelDeferredSlashTest< // Two blocks away from the era change. let slash = (await client.api.query.staking.unappliedSlashes(...slashKey)) as any - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { expect(slash.length).toBe(1) }) - .with('Para', () => { + .with('NonLocal', () => { expect(slash.toJSON()).toBeDefined() }) .exhaustive() let cancelDeferredSlashTx: any - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { cancelDeferredSlashTx = client.api.tx.staking.cancelDeferredSlash(activeEra + 1, [0]) }) - .with('Para', () => { + .with('NonLocal', () => { cancelDeferredSlashTx = client.api.tx.staking.cancelDeferredSlash(activeEra, [slashKeyNewComponent]) }) .exhaustive() - await scheduleInlineCallWithOrigin(client, cancelDeferredSlashTx.method.toHex(), origin, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin(client, cancelDeferredSlashTx.method.toHex(), origin, testConfig.blockProvider) // Check stakers' bonded funds before the slash would be applied. @@ -1514,17 +1534,17 @@ async function cancelDeferredSlashTest< // And the slash should have been cancelled. slash = (await client.api.query.staking.unappliedSlashes(...slashKey)) as any - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { expect(slash.length).toBe(0) }) - .with('Para', () => { + .with('NonLocal', () => { expect(slash.toJSON()).toBeNull() }) .exhaustive() // Era-boundary block creation tends to be slow. - if (testConfig.relayOrPara === 'Relay') { + if (testConfig.blockProvider === 'Local') { await client.dev.setStorage({ ParasDisputes: { $removePrefix: ['disputes', 'included'], @@ -1544,17 +1564,22 @@ async function cancelDeferredSlashTest< // This new block marks the start of the new era. // If on an post-migration Asset Hub, `applySlash` can be called, instead of having to move to era change. - if (testConfig.relayOrPara === 'Para') { + if (testConfig.blockProvider === 'NonLocal') { // Manually apply the slash. const applySlashTx = client.api.tx.staking.applySlash(...slashKey) - await scheduleInlineCallWithOrigin(client, applySlashTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + applySlashTx.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) } await client.dev.newBlock() // The era should have changed. - if (testConfig.relayOrPara === 'Relay') { + if (testConfig.blockProvider === 'Local') { const newActiveEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() expect(newActiveEra).toBe(activeEra + 1) } @@ -1687,7 +1712,7 @@ async function setInvulnerablesTestBadOrigin< client, setInvulnerablesTx.method.toHex(), { Origins: 'StakingAdmin' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -1727,7 +1752,7 @@ async function setInvulnerablesTest< // let eraChangeBlock: number | undefined - if (testConfig.relayOrPara === 'Relay') { + if (testConfig.blockProvider === 'Local') { eraChangeBlock = await locateEraChange(client) if (eraChangeBlock === undefined) { // This test only makes sense to run if there's an active era. @@ -1796,7 +1821,7 @@ async function setInvulnerablesTest< client, setInvulnerablesTx.method.toHex(), { system: 'Root' }, - testConfig.relayOrPara, + testConfig.blockProvider, ) await client.dev.newBlock() @@ -1820,8 +1845,8 @@ async function setInvulnerablesTest< let slashKey: any let slashValue: any - match(testConfig.relayOrPara) - .with('Relay', () => { + match(testConfig.blockProvider) + .with('Local', () => { slashKey = [activeEra + 1] slashValue = [ { @@ -1836,7 +1861,7 @@ async function setInvulnerablesTest< }, ] }) - .with('Para', () => { + .with('NonLocal', () => { const slashKeyNewComponent = [alice.address, 0, 0] slashKey = [activeEra, slashKeyNewComponent] slashValue = { @@ -1852,7 +1877,7 @@ async function setInvulnerablesTest< }) .exhaustive() - if (testConfig.relayOrPara === 'Relay') { + if (testConfig.blockProvider === 'Local') { await client.dev.setStorage({ ParasDisputes: { $removePrefix: ['disputes', 'included'], @@ -1887,10 +1912,15 @@ async function setInvulnerablesTest< expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') - if (testConfig.relayOrPara === 'Para') { + if (testConfig.blockProvider === 'NonLocal') { // Manually apply the slash. const applySlashTx = client.api.tx.staking.applySlash(...slashKey) - await scheduleInlineCallWithOrigin(client, applySlashTx.method.toHex(), { system: 'Root' }, testConfig.relayOrPara) + await scheduleInlineCallWithOrigin( + client, + applySlashTx.method.toHex(), + { system: 'Root' }, + testConfig.blockProvider, + ) } // With this block, the slash will have been applied. diff --git a/yarn.lock b/yarn.lock index 871f82e59..70437c482 100644 --- a/yarn.lock +++ b/yarn.lock @@ -245,15 +245,6 @@ __metadata: languageName: unknown linkType: soft -"@e2e-test/paseo@workspace:packages/paseo": - version: 0.0.0-use.local - resolution: "@e2e-test/paseo@workspace:packages/paseo" - dependencies: - "@acala-network/chopsticks-testing": "npm:^1.2.1" - "@e2e-test/shared": "workspace:*" - languageName: unknown - linkType: soft - "@e2e-test/polkadot@workspace:packages/polkadot": version: 0.0.0-use.local resolution: "@e2e-test/polkadot@workspace:packages/polkadot" From e313e8cec6e3b0f0c91a63a82ab330d963bf288a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 9 Sep 2025 22:03:22 +0100 Subject: [PATCH 15/18] Fix staking test snapshots --- .../kusama.staking.e2e.test.ts.snap | 49 +++--- .../polkadot.staking.e2e.test.ts.snap | 30 ++-- packages/shared/src/staking.ts | 157 ++++++++++++++---- 3 files changed, 169 insertions(+), 67 deletions(-) diff --git a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap index ea453f85c..f3e4823e6 100644 --- a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap @@ -305,7 +305,7 @@ exports[`Kusama Staking > base staking tests > set invulnerables with bad origin exports[`Kusama Staking > base staking tests > set invulnerables with root origin > alice funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332445654871, + "free": "(redacted)", "frozen": 0, "reserved": 16666666650000, } @@ -314,7 +314,7 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332445654871, + "free": "(redacted)", "frozen": 0, "reserved": 33333333300000, } @@ -325,7 +325,7 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > bob funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332445654871, + "free": "(redacted)", "frozen": 0, "reserved": 0, } @@ -334,7 +334,7 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332445654871, + "free": "(redacted)", "frozen": 0, "reserved": 33333333300000, } @@ -343,7 +343,7 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > charlie funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332445654871, + "free": "(redacted)", "frozen": 0, "reserved": 0, } @@ -352,7 +352,7 @@ exports[`Kusama Staking > base staking tests > set invulnerables with root origi exports[`Kusama Staking > base staking tests > set invulnerables with root origin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332445654871, + "free": "(redacted)", "frozen": 0, "reserved": 33333333300000, } @@ -527,6 +527,13 @@ exports[`Kusama Staking > base staking tests > staking lifecycle > nominator bon exports[`Kusama Staking > base staking tests > staking lifecycle > unbond events 1`] = ` [ + { + "data": { + "stash": "FQ3JxEebQJY23NumtMUU1k7YJrbyK6L8j4uK5VwKpeVqFnh", + }, + "method": "Chilled", + "section": "staking", + }, { "data": { "amount": "(rounded 33000000000000)", @@ -727,54 +734,54 @@ exports[`Kusama Staking > fast unstake > test fast unstake > nominator bond even exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332887920223, + "free": "(rounded 3330000000000)", "frozen": 0, - "reserved": 33333333300000, + "reserved": "(rounded 33300000000000)", } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332887920223, + "free": "(rounded 3330000000000)", "frozen": 0, - "reserved": 33333333300000, + "reserved": "(rounded 33300000000000)", } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as admin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332887920223, + "free": "(rounded 3330000000000)", "frozen": 0, - "reserved": 33333333300000, + "reserved": "(rounded 33300000000000)", } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332887920223, + "free": "(rounded 3330000000000)", "frozen": 0, - "reserved": 33333333300000, + "reserved": "(rounded 33300000000000)", } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332887920223, + "free": "(rounded 3330000000000)", "frozen": 0, - "reserved": 33333333300000, + "reserved": "(rounded 33300000000000)", } `; exports[`Kusama Staking > slashing tests > cancel deferred slash as root > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 3332887920223, + "free": "(rounded 3330000000000)", "frozen": 0, - "reserved": 33333333300000, + "reserved": "(rounded 33300000000000)", } `; @@ -801,7 +808,7 @@ exports[`Kusama Staking > slashing tests > cancel deferred slash with bad origin exports[`Kusama Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 33232891223553, + "free": "(redacted)", "frozen": 0, "reserved": 100000000000, } @@ -810,7 +817,7 @@ exports[`Kusama Staking > slashing tests > unapplied slash > alice funds pre sla exports[`Kusama Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 33232891223553, + "free": "(redacted)", "frozen": 0, "reserved": 100000000000, } @@ -819,7 +826,7 @@ exports[`Kusama Staking > slashing tests > unapplied slash > bob funds pre slash exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 33232891223553, + "free": "(redacted)", "frozen": 0, "reserved": 100000000000, } diff --git a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap index 434661901..c7d30e536 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap @@ -305,7 +305,7 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with bad orig exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > alice funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999738445778, + "free": "(redacted)", "frozen": 0, "reserved": 500000000000000, } @@ -314,7 +314,7 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999738445778, + "free": "(redacted)", "frozen": 0, "reserved": 1000000000000000, } @@ -325,7 +325,7 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > bob funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999738445778, + "free": "(redacted)", "frozen": 0, "reserved": 0, } @@ -334,7 +334,7 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999738445778, + "free": "(redacted)", "frozen": 0, "reserved": 1000000000000000, } @@ -343,7 +343,7 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > charlie funds post slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999738445778, + "free": "(redacted)", "frozen": 0, "reserved": 0, } @@ -352,7 +352,7 @@ exports[`Polkadot Staking > base staking tests > set invulnerables with root ori exports[`Polkadot Staking > base staking tests > set invulnerables with root origin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999738445778, + "free": "(redacted)", "frozen": 0, "reserved": 1000000000000000, } @@ -727,7 +727,7 @@ exports[`Polkadot Staking > fast unstake > test fast unstake > nominator bond ev exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999866589258, + "free": "(rounded 100000000000000)", "frozen": 0, "reserved": 1000000000000000, } @@ -736,7 +736,7 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > al exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999866589258, + "free": "(rounded 100000000000000)", "frozen": 0, "reserved": 1000000000000000, } @@ -745,7 +745,7 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > bo exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999866589258, + "free": "(rounded 100000000000000)", "frozen": 0, "reserved": 1000000000000000, } @@ -754,7 +754,7 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash as admin > ch exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999866589258, + "free": "(rounded 100000000000000)", "frozen": 0, "reserved": 1000000000000000, } @@ -763,7 +763,7 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > ali exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999866589258, + "free": "(rounded 100000000000000)", "frozen": 0, "reserved": 1000000000000000, } @@ -772,7 +772,7 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > bob exports[`Polkadot Staking > slashing tests > cancel deferred slash as root > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 99999866589258, + "free": "(rounded 100000000000000)", "frozen": 0, "reserved": 1000000000000000, } @@ -801,7 +801,7 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash with bad orig exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 997499867589258, + "free": "(redacted)", "frozen": 0, "reserved": 2500000000000, } @@ -810,7 +810,7 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds pre s exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 997499867589258, + "free": "(redacted)", "frozen": 0, "reserved": 2500000000000, } @@ -819,7 +819,7 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds pre sla exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", - "free": 997499867589258, + "free": "(redacted)", "frozen": 0, "reserved": 2500000000000, } diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index 40b6b6baa..cf9972f46 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -3,6 +3,7 @@ import { sendTransaction } from '@acala-network/chopsticks-testing' import { type Chain, testAccounts } from '@e2e-test/networks' import { type Client, type RootTestTree, setupNetworks } from '@e2e-test/shared' +import type { ApiPromise } from '@polkadot/api' import type { SubmittableExtrinsic } from '@polkadot/api/types' import type { KeyringPair } from '@polkadot/keyring/types' import type { BlockHash } from '@polkadot/types/interfaces' @@ -27,6 +28,40 @@ import { /// Helpers /// ------- +/** + * Helper to track transaction fees paid by each staker. + * + * Traverses the most recent events, using the given `ApiPromise`, to find transaction fee payment events. + * It then uses this information to update the given `feeMap`. + * + * @param api - The API instance to query events + * @param feeMap - Map from staker addresses to their cumulative paid fees + * @param addressEncoding - The address encoding to use + * @returns Updated fee map with new fees added + */ +async function updateStakerFees( + api: ApiPromise, + feeMap: Map, + addressEncoding: number, +): Promise> { + const events = await api.query.system.events() + + for (const record of events) { + const { event } = record + if (event.section === 'transactionPayment' && event.method === 'TransactionFeePaid') { + assert(api.events.transactionPayment.TransactionFeePaid.is(event)) + const [who, actualFee, tip] = event.data + expect(tip.toNumber()).toBe(0) + const address = encodeAddress(who.toString(), addressEncoding) + const fee = BigInt(actualFee.toString()) + + const currentFee = feeMap.get(address) || 0n + feeMap.set(address, currentFee + fee) + } + } + return feeMap +} + /** * Locate the block number at which the current era ends. * @@ -1276,19 +1311,22 @@ async function unappliedSlashTest< } const existentialDeposit = client.api.consts.balances.existentialDeposit.toBigInt() - const balances = existentialDeposit * 10n ** 5n + const initialBalances = existentialDeposit * 10n ** 5n await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: balances } }], - [[bob.address], { providers: 1, data: { free: balances } }], - [[charlie.address], { providers: 1, data: { free: balances } }], + [[alice.address], { providers: 1, data: { free: initialBalances } }], + [[bob.address], { providers: 1, data: { free: initialBalances } }], + [[charlie.address], { providers: 1, data: { free: initialBalances } }], ], }, }) - const bondAmount = (await client.api.query.staking.minNominatorBond()).toNumber() - const slashAmount = bondAmount / 2 + const bondAmount = (await client.api.query.staking.minNominatorBond()).toBigInt() + const slashAmount = bondAmount / 2n + + // Initialize fee tracking map for the 3 stakers + const stakerFees = new Map() const bondTx = client.api.tx.staking.bond(bondAmount, { Staked: null }) await sendTransaction(bondTx.signAsync(alice)) @@ -1297,6 +1335,10 @@ async function unappliedSlashTest< await client.dev.newBlock() + // Track transaction fees for each staker. + // Ths is needed to keep accurate track of each account's free balance, which should not be affected by this test. + await updateStakerFees(client.api, stakerFees, testConfig.addressEncoding) + const activeEra = (await client.api.query.staking.activeEra()).unwrap().index.toNumber() let slashKey: any let slashValue: any @@ -1311,9 +1353,9 @@ async function unappliedSlashTest< own: slashAmount, others: [ // Exactly the bonded funds. - [bob.address, slashAmount * 2], + [bob.address, slashAmount * 2n], // More than the bonded funds. - [charlie.address, slashAmount * 3], + [charlie.address, slashAmount * 3n], ], reporters: [dave.address], payout: bondAmount, @@ -1337,9 +1379,9 @@ async function unappliedSlashTest< own: slashAmount, others: [ // Exactly the bonded funds. - [bob.address, slashAmount * 2], + [bob.address, slashAmount * 2n], // More than the bonded funds. - [charlie.address, slashAmount * 3], + [charlie.address, slashAmount * 3n], ], reporter: dave.address, payout: bondAmount, @@ -1359,9 +1401,11 @@ async function unappliedSlashTest< const bobFundsPreSlash = await client.api.query.system.account(bob.address) const charlieFundsPreSlash = await client.api.query.system.account(charlie.address) - expect(aliceFundsPreSlash.data.toJSON()).toMatchSnapshot('alice funds pre slash') - expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') - expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') + await check(aliceFundsPreSlash.data.toJSON()).redact({ redactKeys: /free/ }).toMatchSnapshot('alice funds pre slash') + await check(bobFundsPreSlash.data.toJSON()).redact({ redactKeys: /free/ }).toMatchSnapshot('bob funds pre slash') + await check(charlieFundsPreSlash.data.toJSON()) + .redact({ redactKeys: /free/ }) + .toMatchSnapshot('charlie funds pre slash') // If on an post-migration Asset Hub, `applySlash` can be called, instead of having to move to era change. if (testConfig.blockProvider === 'NonLocal') { @@ -1380,25 +1424,42 @@ async function unappliedSlashTest< await checkSystemEvents(client, { section: 'staking', method: 'Slashed' }).toMatchSnapshot('staking slash events') await checkSystemEvents(client, { section: 'balances', method: 'Slashed' }).toMatchSnapshot('balances slash events') + // Check free balances specifically + expect(aliceFundsPreSlash.data.free.toBigInt()).toBe( + initialBalances - bondAmount - stakerFees.get(encodeAddress(alice.address, testConfig.addressEncoding))!, + ) + expect(bobFundsPreSlash.data.free.toBigInt()).toBe( + initialBalances - bondAmount - stakerFees.get(encodeAddress(bob.address, testConfig.addressEncoding))!, + ) + expect(charlieFundsPreSlash.data.free.toBigInt()).toBe( + initialBalances - bondAmount - stakerFees.get(encodeAddress(charlie.address, testConfig.addressEncoding))!, + ) + const aliceFundsPostSlash = await client.api.query.system.account(alice.address) const bobFundsPostSlash = await client.api.query.system.account(bob.address) const charlieFundsPostSlash = await client.api.query.system.account(charlie.address) - // First, verify that all acounts' reserved funds have been slashed + // First, verify that all acounts' free funds are untouched. + // Then, that reserved funds have been slashed. // Recall that `bondAmount - slashAmount * 2` is zero. // Note that `bondAmount - slashAmount * 3` is negative, and an account's slashable funds are limited // to what it bonded. // Thus, also zero. + + expect(aliceFundsPostSlash.data.free.toBigInt()).toBe(aliceFundsPostSlash.data.free.toBigInt()) + expect(bobFundsPostSlash.data.free.toBigInt()).toBe(bobFundsPostSlash.data.free.toBigInt()) + expect(charlieFundsPostSlash.data.free.toBigInt()).toBe(charlieFundsPostSlash.data.free.toBigInt()) + expect(aliceFundsPostSlash.data.toJSON()).toMatchSnapshot('alice funds post slash') expect(bobFundsPostSlash.data.toJSON()).toMatchSnapshot('bob funds post slash') expect(charlieFundsPostSlash.data.toJSON()).toMatchSnapshot('charlie funds post slash') - expect(aliceFundsPostSlash.data.reserved.toNumber()).toBe(aliceFundsPreSlash.data.reserved.toNumber() - slashAmount) - expect(bobFundsPostSlash.data.reserved.toNumber()).toBe(bobFundsPreSlash.data.reserved.toNumber() - bondAmount) + expect(aliceFundsPostSlash.data.reserved.toBigInt()).toBe(aliceFundsPreSlash.data.reserved.toBigInt() - slashAmount) + expect(bobFundsPostSlash.data.reserved.toBigInt()).toBe(bobFundsPreSlash.data.reserved.toBigInt() - bondAmount) // Recall again that even though Charlie's slash is 1.5 times his bond, the slash can, at most, tax all he has // bonded, and not one unit more. - expect(charlieFundsPostSlash.data.reserved.toNumber()).toBe( - charlieFundsPreSlash.data.reserved.toNumber() - bondAmount, + expect(charlieFundsPostSlash.data.reserved.toBigInt()).toBe( + charlieFundsPreSlash.data.reserved.toBigInt() - bondAmount, ) } @@ -1525,9 +1586,9 @@ async function cancelDeferredSlashTest< const bobFundsPreSlash = await client.api.query.system.account(bob.address) const charlieFundsPreSlash = await client.api.query.system.account(charlie.address) - expect(aliceFundsPreSlash.data.toJSON()).toMatchSnapshot('alice funds pre slash') - expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') - expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') + await check(aliceFundsPreSlash.data.toJSON()).redact({ number: 3 }).toMatchSnapshot('alice funds pre slash') + await check(bobFundsPreSlash.data.toJSON()).redact({ number: 3 }).toMatchSnapshot('bob funds pre slash') + await check(charlieFundsPreSlash.data.toJSON()).redact({ number: 3 }).toMatchSnapshot('charlie funds pre slash') await client.dev.newBlock() @@ -1779,14 +1840,14 @@ async function setInvulnerablesTest< if (minValidatorBond === 0n) { minValidatorBond = ed * 10n ** 5n } - const balance = minValidatorBond + minValidatorBond / 10n + const initialBalance = minValidatorBond + minValidatorBond / 10n await client.dev.setStorage({ System: { account: [ - [[alice.address], { providers: 1, data: { free: balance } }], - [[bob.address], { providers: 1, data: { free: balance } }], - [[charlie.address], { providers: 1, data: { free: balance } }], + [[alice.address], { providers: 1, data: { free: initialBalance } }], + [[bob.address], { providers: 1, data: { free: initialBalance } }], + [[charlie.address], { providers: 1, data: { free: initialBalance } }], ], }, }) @@ -1799,6 +1860,11 @@ async function setInvulnerablesTest< await client.dev.newBlock() + // Initialize fee tracking map for the 3 stakers + const stakerFees = new Map() + + await updateStakerFees(client.api, stakerFees, testConfig.addressEncoding) + // Set them as validators const minCommission = await client.api.query.staking.minCommission() const validateTx = client.api.tx.staking.validate({ commission: minCommission, blocked: false }) @@ -1808,6 +1874,8 @@ async function setInvulnerablesTest< await client.dev.newBlock() + await updateStakerFees(client.api, stakerFees, testConfig.addressEncoding) + // Sort the addresses to make the test simpler. const invulnerables = [alice.address, bob.address, charlie.address].map((addr) => @@ -1908,9 +1976,11 @@ async function setInvulnerablesTest< const bobFundsPreSlash = await client.api.query.system.account(bob.address) const charlieFundsPreSlash = await client.api.query.system.account(charlie.address) - expect(aliceFundsPreSlash.data.toJSON()).toMatchSnapshot('alice funds pre slash') - expect(bobFundsPreSlash.data.toJSON()).toMatchSnapshot('bob funds pre slash') - expect(charlieFundsPreSlash.data.toJSON()).toMatchSnapshot('charlie funds pre slash') + await check(aliceFundsPreSlash.data.toJSON()).redact({ redactKeys: /free/ }).toMatchSnapshot('alice funds pre slash') + await check(bobFundsPreSlash.data.toJSON()).redact({ redactKeys: /free/ }).toMatchSnapshot('bob funds pre slash') + await check(charlieFundsPreSlash.data.toJSON()) + .redact({ redactKeys: /free/ }) + .toMatchSnapshot('charlie funds pre slash') if (testConfig.blockProvider === 'NonLocal') { // Manually apply the slash. @@ -1929,13 +1999,38 @@ async function setInvulnerablesTest< await checkSystemEvents(client, { section: 'staking', method: 'Slashed' }).toMatchSnapshot('staking slash events') await checkSystemEvents(client, { section: 'balances', method: 'Slashed' }).toMatchSnapshot('balances slash events') + expect(aliceFundsPreSlash.data.free.toBigInt()).toBe( + initialBalance - minValidatorBond - stakerFees.get(encodeAddress(alice.address, testConfig.addressEncoding))!, + ) + expect(bobFundsPreSlash.data.free.toBigInt()).toBe( + initialBalance - minValidatorBond - stakerFees.get(encodeAddress(bob.address, testConfig.addressEncoding))!, + ) + expect(charlieFundsPreSlash.data.free.toBigInt()).toBe( + initialBalance - minValidatorBond - stakerFees.get(encodeAddress(charlie.address, testConfig.addressEncoding))!, + ) + const aliceFundsPostSlash = await client.api.query.system.account(alice.address) const bobFundsPostSlash = await client.api.query.system.account(bob.address) const charlieFundsPostSlash = await client.api.query.system.account(charlie.address) - expect(aliceFundsPostSlash.data.toJSON()).toMatchSnapshot('alice funds post slash') - expect(bobFundsPostSlash.data.toJSON()).toMatchSnapshot('bob funds post slash') - expect(charlieFundsPostSlash.data.toJSON()).toMatchSnapshot('charlie funds post slash') + await check(aliceFundsPostSlash.data.toJSON()) + .redact({ redactKeys: /free/ }) + .toMatchSnapshot('alice funds post slash') + await check(bobFundsPostSlash.data.toJSON()).redact({ redactKeys: /free/ }).toMatchSnapshot('bob funds post slash') + await check(charlieFundsPostSlash.data.toJSON()) + .redact({ redactKeys: /free/ }) + .toMatchSnapshot('charlie funds post slash') + + // Free funds are unaffected by the slash - should be the same, net of fees from bonding and validating. + expect(aliceFundsPostSlash.data.free.toBigInt()).toBe( + initialBalance - minValidatorBond - stakerFees.get(encodeAddress(alice.address, testConfig.addressEncoding))!, + ) + expect(bobFundsPostSlash.data.free.toBigInt()).toBe( + initialBalance - minValidatorBond - stakerFees.get(encodeAddress(bob.address, testConfig.addressEncoding))!, + ) + expect(charlieFundsPostSlash.data.free.toBigInt()).toBe( + initialBalance - minValidatorBond - stakerFees.get(encodeAddress(charlie.address, testConfig.addressEncoding))!, + ) expect(aliceFundsPostSlash.data.reserved.toBigInt()).toBe(aliceFundsPreSlash.data.reserved.toBigInt() - slashAmount) expect(bobFundsPostSlash.data.reserved.toBigInt()).toBe(bobFundsPreSlash.data.reserved.toBigInt() - slashAmount * 2n) From 49a9b544cfd457e7d283d407b3b36cbd4984c215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 9 Sep 2025 22:59:01 +0100 Subject: [PATCH 16/18] Update proxy test snapshots --- .../assetHubKusama.proxy.e2e.test.ts.snap | 276 +++++++------- .../coretimeKusama.proxy.e2e.test.ts.snap | 252 ++++++------- .../kusama.proxy.e2e.test.ts.snap | 338 +++++++++--------- .../peopleKusama.proxy.e2e.test.ts.snap | 228 ++++++------ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 276 +++++++------- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 288 +++++++-------- .../coretimePolkadot.proxy.e2e.test.ts.snap | 252 ++++++------- .../peoplePolkadot.proxy.e2e.test.ts.snap | 228 ++++++------ .../polkadot.proxy.e2e.test.ts.snap | 304 ++++++++-------- packages/shared/src/proxy.ts | 9 +- 10 files changed, 1227 insertions(+), 1224 deletions(-) diff --git a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap index 88d90a8d1..611bd2614 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -75,7 +75,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, ] `; -exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -150,7 +150,7 @@ exports[`Kusama AssetHub Proxy > add proxies (with/without delay) to an account, ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -218,7 +218,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when crea ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -240,7 +240,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -259,7 +259,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -278,7 +278,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -297,7 +297,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` [ { "data": { @@ -316,7 +316,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -335,7 +335,7 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` [ { "data": { @@ -354,7 +354,54 @@ exports[`Kusama AssetHub Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > Kusama AssetHub Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -366,7 +413,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -385,7 +432,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -404,7 +451,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -423,7 +470,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -449,7 +496,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -483,7 +530,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -500,7 +547,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -517,7 +564,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -534,7 +581,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call mint 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call mint 1`] = ` [ { "data": { @@ -550,7 +597,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet multisig, call as_multi 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -569,7 +616,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call set_metadata 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call set_metadata 1`] = ` [ { "data": { @@ -588,7 +635,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call mint 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call mint 1`] = ` [ { "data": { @@ -607,7 +654,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -624,7 +671,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch_all 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -641,7 +688,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call force_batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -658,7 +705,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call create 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call create 1`] = ` [ { "data": { @@ -677,7 +724,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet multisig, call as_multi 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -696,7 +743,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call destroy 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call destroy 1`] = ` [ { "data": { @@ -715,7 +762,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call create 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call create 1`] = ` [ { "data": { @@ -734,7 +781,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -751,7 +798,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch_all 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -768,7 +815,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call force_batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -785,7 +832,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call create 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call create 1`] = ` [ { "data": { @@ -804,7 +851,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call mint 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call mint 1`] = ` [ { "data": { @@ -820,7 +867,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet multisig, call as_multi 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -839,7 +886,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call destroy 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call destroy 1`] = ` [ { "data": { @@ -858,7 +905,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call set_metadata 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call set_metadata 1`] = ` [ { "data": { @@ -877,7 +924,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call create 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call create 1`] = ` [ { "data": { @@ -896,7 +943,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call mint 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call mint 1`] = ` [ { "data": { @@ -915,7 +962,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -932,7 +979,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch_all 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -949,7 +996,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call force_batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -966,7 +1013,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -985,7 +1032,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -1004,7 +1051,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1021,7 +1068,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1038,7 +1085,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1055,7 +1102,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1074,7 +1121,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1093,7 +1140,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1110,7 +1157,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1127,7 +1174,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1144,7 +1191,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1163,7 +1210,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -1182,7 +1229,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -1201,7 +1248,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -1227,7 +1274,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1261,7 +1308,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1278,7 +1325,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1295,7 +1342,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1312,7 +1359,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -1331,7 +1378,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call create 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call create 1`] = ` [ { "data": { @@ -1350,7 +1397,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet balances, call burn 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet balances, call burn 1`] = ` [ { "data": { @@ -1369,7 +1416,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call destroy 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call destroy 1`] = ` [ { "data": { @@ -1388,7 +1435,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1421,7 +1468,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark 1`] = ` [ { "data": { @@ -1454,7 +1501,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark_with_event 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1487,7 +1534,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call create 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call create 1`] = ` [ { "data": { @@ -1506,7 +1553,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call mint 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call mint 1`] = ` [ { "data": { @@ -1525,7 +1572,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet balances, call burn 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet balances, call burn 1`] = ` [ { "data": { @@ -1544,7 +1591,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call set_metadata 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call set_metadata 1`] = ` [ { "data": { @@ -1563,7 +1610,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1596,7 +1643,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark 1`] = ` [ { "data": { @@ -1629,7 +1676,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark_with_event 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1662,7 +1709,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call mint 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call mint 1`] = ` [ { "data": { @@ -1681,7 +1728,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet balances, call burn 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet balances, call burn 1`] = ` [ { "data": { @@ -1700,7 +1747,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1733,7 +1780,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark 1`] = ` [ { "data": { @@ -1766,7 +1813,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark_with_event 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1799,7 +1846,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1818,7 +1865,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1851,7 +1898,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1884,7 +1931,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1917,7 +1964,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` [ { "data": { @@ -1936,7 +1983,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1969,7 +2016,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` [ { "data": { @@ -2002,7 +2049,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2035,7 +2082,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2054,7 +2101,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -2073,7 +2120,7 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2091,50 +2138,3 @@ exports[`Kusama AssetHub Proxy > filtering tests for forbidden proxy calls > for }, ] `; - -exports[`Kusama AssetHub Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", - "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap index 2ce3db5ab..0e49cc314 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -75,7 +75,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, ] `; -exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -150,7 +150,7 @@ exports[`Kusama Coretime Proxy > add proxies (with/without delay) to an account, ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -218,7 +218,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when crea ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -240,7 +240,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -259,7 +259,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -278,7 +278,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -297,7 +297,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` [ { "data": { @@ -316,7 +316,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -335,7 +335,7 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` [ { "data": { @@ -354,7 +354,54 @@ exports[`Kusama Coretime Proxy > create and kill pure proxies > events when kill ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy full tests (includes call filtering) > Kusama Coretime Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -366,7 +413,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -385,7 +432,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -404,7 +451,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -423,7 +470,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -449,7 +496,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -483,7 +530,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -500,7 +547,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -517,7 +564,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -534,7 +581,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call drop_history 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call drop_history 1`] = ` [ { "data": { @@ -553,7 +600,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call renew 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call renew 1`] = ` [ { "data": { @@ -572,7 +619,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -591,7 +638,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -608,7 +655,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch_all 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -625,7 +672,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call force_batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -642,7 +689,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -661,7 +708,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -680,7 +727,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -697,7 +744,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -714,7 +761,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -731,7 +778,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -750,7 +797,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -769,7 +816,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -786,7 +833,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -803,7 +850,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -820,7 +867,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call renew 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call renew 1`] = ` [ { "data": { @@ -839,7 +886,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -858,7 +905,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -875,7 +922,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch_all 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -892,7 +939,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call force_batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -909,7 +956,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -928,7 +975,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -947,7 +994,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -966,7 +1013,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -992,7 +1039,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1026,7 +1073,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1043,7 +1090,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1060,7 +1107,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1077,7 +1124,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1096,7 +1143,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1113,7 +1160,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch_all 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1130,7 +1177,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call force_batch 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1147,7 +1194,7 @@ exports[`Kusama Coretime Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet balances, call burn 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet balances, call burn 1`] = ` [ { "data": { @@ -1166,7 +1213,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet broker, call purchase_credit 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet broker, call purchase_credit 1`] = ` [ { "data": { @@ -1185,7 +1232,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1204,7 +1251,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1237,7 +1284,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark 1`] = ` [ { "data": { @@ -1270,7 +1317,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1303,7 +1350,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1322,7 +1369,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1355,7 +1402,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1388,7 +1435,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1421,7 +1468,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` [ { "data": { @@ -1440,7 +1487,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1473,7 +1520,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` [ { "data": { @@ -1506,7 +1553,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1539,7 +1586,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet balances, call burn 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet balances, call burn 1`] = ` [ { "data": { @@ -1558,7 +1605,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call purchase_credit 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call purchase_credit 1`] = ` [ { "data": { @@ -1577,7 +1624,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1596,7 +1643,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1629,7 +1676,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark 1`] = ` [ { "data": { @@ -1662,7 +1709,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1695,7 +1742,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -1714,7 +1761,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet balances, call burn 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet balances, call burn 1`] = ` [ { "data": { @@ -1733,7 +1780,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet broker, call purchase_credit 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet broker, call purchase_credit 1`] = ` [ { "data": { @@ -1752,7 +1799,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1771,7 +1818,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1804,7 +1851,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark 1`] = ` [ { "data": { @@ -1837,7 +1884,7 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1869,50 +1916,3 @@ exports[`Kusama Coretime Proxy > filtering tests for forbidden proxy calls > for }, ] `; - -exports[`Kusama Coretime Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", - "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap index 7e4cf4477..dfacf586d 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -105,7 +105,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo ] `; -exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -210,7 +210,7 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -305,7 +305,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -327,7 +327,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -346,7 +346,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -365,7 +365,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -384,7 +384,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -403,7 +403,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` [ { "data": { @@ -422,7 +422,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 7 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 7 for Alice 1`] = ` [ { "data": { @@ -441,7 +441,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 8 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 8 for Alice 1`] = ` [ { "data": { @@ -460,7 +460,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 9 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 9 for Alice 1`] = ` [ { "data": { @@ -479,7 +479,7 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 10 for Alice 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 10 for Alice 1`] = ` [ { "data": { @@ -498,7 +498,54 @@ exports[`Kusama Proxy > create and kill pure proxies > events when killing pure ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet auctions, call bid 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy full tests (includes call filtering) > Kusama Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet auctions, call bid 1`] = ` [ { "data": { @@ -517,7 +564,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -529,7 +576,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet bounties, call propose_bounty 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -548,7 +595,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -567,7 +614,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet nomination_pools, call chill 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -586,7 +633,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -605,7 +652,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -624,7 +671,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet referenda, call submit 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet referenda, call submit 1`] = ` [ { "data": { @@ -647,7 +694,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet staking, call bond 1`] = ` [ { "data": { @@ -667,7 +714,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -693,7 +740,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -727,7 +774,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -744,7 +791,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -761,7 +808,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -778,7 +825,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -805,7 +852,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet auctions, call bid 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet auctions, call bid 1`] = ` [ { "data": { @@ -824,7 +871,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet crowdloan, call dissolve 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet crowdloan, call dissolve 1`] = ` [ { "data": { @@ -843,7 +890,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet slots, call trigger_onboard 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet slots, call trigger_onboard 1`] = ` [ { "data": { @@ -862,7 +909,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -881,7 +928,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -900,7 +947,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -917,7 +964,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -934,7 +981,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -951,7 +998,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet bounties, call propose_bounty 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -970,7 +1017,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet referenda, call submit 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet referenda, call submit 1`] = ` [ { "data": { @@ -993,7 +1040,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1010,7 +1057,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1027,7 +1074,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1044,7 +1091,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -1063,7 +1110,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1080,7 +1127,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1097,7 +1144,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1114,7 +1161,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet auctions, call bid 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet auctions, call bid 1`] = ` [ { "data": { @@ -1133,7 +1180,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -1152,7 +1199,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1171,7 +1218,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet nomination_pools, call chill 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -1190,7 +1237,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -1209,7 +1256,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -1228,7 +1275,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet referenda, call submit 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet referenda, call submit 1`] = ` [ { "data": { @@ -1251,7 +1298,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet staking, call bond 1`] = ` [ { "data": { @@ -1271,7 +1318,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -1297,7 +1344,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1331,7 +1378,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1348,7 +1395,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1365,7 +1412,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1382,7 +1429,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` [ { "data": { @@ -1401,7 +1448,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1418,7 +1465,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1435,7 +1482,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1452,7 +1499,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Society > events for proxy type Society, pallet society, call bid 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Society > events for proxy type Society, pallet society, call bid 1`] = ` [ { "data": { @@ -1472,7 +1519,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call remark 1`] = ` [ { "data": { @@ -1498,7 +1545,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1532,7 +1579,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet nomination_pools, call chill 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -1551,7 +1598,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call bond 1`] = ` [ { "data": { @@ -1571,7 +1618,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call register_fast_unstake 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call register_fast_unstake 1`] = ` [ { "data": { @@ -1590,7 +1637,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1607,7 +1654,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1624,7 +1671,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1641,7 +1688,7 @@ exports[`Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet balances, call burn 1`] = ` [ { "data": { @@ -1660,7 +1707,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet referenda, call submit 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet referenda, call submit 1`] = ` [ { "data": { @@ -1679,7 +1726,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet staking, call bond 1`] = ` [ { "data": { @@ -1698,7 +1745,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1731,7 +1778,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark 1`] = ` [ { "data": { @@ -1764,7 +1811,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1797,7 +1844,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -1816,7 +1863,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1835,7 +1882,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet staking, call bond 1`] = ` [ { "data": { @@ -1854,7 +1901,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1887,7 +1934,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1920,7 +1967,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1953,7 +2000,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet balances, call burn 1`] = ` [ { "data": { @@ -1972,7 +2019,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet staking, call bond 1`] = ` [ { "data": { @@ -1991,7 +2038,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2024,7 +2071,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark 1`] = ` [ { "data": { @@ -2057,7 +2104,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2090,7 +2137,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2109,7 +2156,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet balances, call burn 1`] = ` [ { "data": { @@ -2128,7 +2175,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet referenda, call submit 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet referenda, call submit 1`] = ` [ { "data": { @@ -2147,7 +2194,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet staking, call bond 1`] = ` [ { "data": { @@ -2166,7 +2213,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2199,7 +2246,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark 1`] = ` [ { "data": { @@ -2232,7 +2279,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2265,7 +2312,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2284,7 +2331,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -2303,7 +2350,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2322,7 +2369,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet balances, call burn 1`] = ` [ { "data": { @@ -2341,7 +2388,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call reject_announcement 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -2360,7 +2407,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_announcement 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -2379,7 +2426,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2412,7 +2459,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark 1`] = ` [ { "data": { @@ -2445,7 +2492,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2478,7 +2525,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet balances, call burn 1`] = ` [ { "data": { @@ -2497,7 +2544,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2530,7 +2577,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark 1`] = ` [ { "data": { @@ -2563,7 +2610,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2596,7 +2643,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch 1`] = ` [ { "data": { @@ -2615,7 +2662,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call batch_all 1`] = ` [ { "data": { @@ -2634,7 +2681,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Society > events for proxy type Society, pallet utility, call force_batch 1`] = ` [ { "data": { @@ -2653,7 +2700,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet balances, call burn 1`] = ` [ { "data": { @@ -2672,7 +2719,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2705,7 +2752,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch 1`] = ` [ { "data": { @@ -2724,7 +2771,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call batch_all 1`] = ` [ { "data": { @@ -2743,7 +2790,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Spokesperson > events for proxy type Spokesperson, pallet utility, call force_batch 1`] = ` [ { "data": { @@ -2762,7 +2809,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet balances, call burn 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet balances, call burn 1`] = ` [ { "data": { @@ -2781,7 +2828,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet referenda, call submit 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet referenda, call submit 1`] = ` [ { "data": { @@ -2800,7 +2847,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2833,7 +2880,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark 1`] = ` [ { "data": { @@ -2866,7 +2913,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2899,7 +2946,7 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr ] `; -exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet vesting, call vested_transfer 1`] = ` +exports[`Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2917,50 +2964,3 @@ exports[`Kusama Proxy > filtering tests for forbidden proxy calls > forbidden pr }, ] `; - -exports[`Kusama Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", - "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap index 162397d53..df8c36ebc 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`People Kusama Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -65,7 +65,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a ] `; -exports[`People Kusama Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -130,7 +130,7 @@ exports[`People Kusama Proxy > add proxies (with/without delay) to an account, a ] `; -exports[`People Kusama Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -189,7 +189,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when creati ] `; -exports[`People Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -211,7 +211,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin ] `; -exports[`People Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -230,7 +230,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin ] `; -exports[`People Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -249,7 +249,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin ] `; -exports[`People Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -268,7 +268,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin ] `; -exports[`People Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` [ { "data": { @@ -287,7 +287,7 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin ] `; -exports[`People Kusama Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -306,7 +306,54 @@ exports[`People Kusama Proxy > create and kill pure proxies > events when killin ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy full tests (includes call filtering) > People Kusama Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -318,7 +365,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -337,7 +384,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -356,7 +403,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -375,7 +422,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -401,7 +448,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -435,7 +482,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -452,7 +499,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -469,7 +516,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -486,7 +533,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -505,7 +552,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -524,7 +571,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -541,7 +588,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -558,7 +605,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -575,7 +622,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -594,7 +641,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -613,7 +660,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -630,7 +677,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -647,7 +694,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -664,7 +711,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call clear_identity 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call clear_identity 1`] = ` [ { "data": { @@ -683,7 +730,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call provide_judgement 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call provide_judgement 1`] = ` [ { "data": { @@ -702,7 +749,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet multisig, call as_multi 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -721,7 +768,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -738,7 +785,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch_all 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -755,7 +802,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call force_batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -772,7 +819,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call provide_judgement 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call provide_judgement 1`] = ` [ { "data": { @@ -791,7 +838,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet multisig, call as_multi 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -810,7 +857,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -827,7 +874,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch_all 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -844,7 +891,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call force_batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -861,7 +908,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -880,7 +927,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -899,7 +946,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -918,7 +965,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -944,7 +991,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -978,7 +1025,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -995,7 +1042,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1012,7 +1059,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1029,7 +1076,7 @@ exports[`People Kusama Proxy > filtering tests for allowed proxy calls > allowed ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1048,7 +1095,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1081,7 +1128,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1114,7 +1161,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1147,7 +1194,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` [ { "data": { @@ -1166,7 +1213,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1199,7 +1246,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` [ { "data": { @@ -1232,7 +1279,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1265,7 +1312,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet balances, call burn 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet balances, call burn 1`] = ` [ { "data": { @@ -1284,7 +1331,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1303,7 +1350,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1336,7 +1383,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark 1`] = ` [ { "data": { @@ -1369,7 +1416,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark_with_event 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1402,7 +1449,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet balances, call burn 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet balances, call burn 1`] = ` [ { "data": { @@ -1421,7 +1468,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1440,7 +1487,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call clear_identity 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call clear_identity 1`] = ` [ { "data": { @@ -1459,7 +1506,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1492,7 +1539,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark 1`] = ` [ { "data": { @@ -1525,7 +1572,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark_with_event 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1558,7 +1605,7 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi ] `; -exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`People Kusama Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -1576,50 +1623,3 @@ exports[`People Kusama Proxy > filtering tests for forbidden proxy calls > forbi }, ] `; - -exports[`People Kusama Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - "to": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", - "real": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap index 5db0c98eb..ece478865 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -75,7 +75,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun ] `; -exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -150,7 +150,7 @@ exports[`Polkadot AssetHub Proxy > add proxies (with/without delay) to an accoun ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -218,7 +218,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when cr ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -230,7 +230,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -249,7 +249,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -268,7 +268,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -287,7 +287,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` [ { "data": { @@ -306,7 +306,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -325,7 +325,7 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` [ { "data": { @@ -344,7 +344,54 @@ exports[`Polkadot AssetHub Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > Polkadot AssetHub Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -356,7 +403,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -375,7 +422,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -394,7 +441,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -413,7 +460,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -439,7 +486,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -473,7 +520,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -490,7 +537,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -507,7 +554,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -524,7 +571,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call mint 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call mint 1`] = ` [ { "data": { @@ -540,7 +587,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -559,7 +606,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call set_metadata 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call set_metadata 1`] = ` [ { "data": { @@ -578,7 +625,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call mint 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call mint 1`] = ` [ { "data": { @@ -597,7 +644,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -614,7 +661,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch_all 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -631,7 +678,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call force_batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetManager > events for proxy type AssetManager, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -648,7 +695,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call create 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call create 1`] = ` [ { "data": { @@ -667,7 +714,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -686,7 +733,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call destroy 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call destroy 1`] = ` [ { "data": { @@ -705,7 +752,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call create 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call create 1`] = ` [ { "data": { @@ -724,7 +771,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -741,7 +788,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch_all 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -758,7 +805,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call force_batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for AssetOwner > events for proxy type AssetOwner, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -775,7 +822,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call create 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call create 1`] = ` [ { "data": { @@ -794,7 +841,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call mint 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet assets, call mint 1`] = ` [ { "data": { @@ -810,7 +857,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -829,7 +876,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call destroy 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call destroy 1`] = ` [ { "data": { @@ -848,7 +895,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call set_metadata 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet nfts, call set_metadata 1`] = ` [ { "data": { @@ -867,7 +914,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call create 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call create 1`] = ` [ { "data": { @@ -886,7 +933,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call mint 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet uniques, call mint 1`] = ` [ { "data": { @@ -905,7 +952,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -922,7 +969,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch_all 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -939,7 +986,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call force_batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Assets > events for proxy type Assets, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -956,7 +1003,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -975,7 +1022,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -994,7 +1041,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1011,7 +1058,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1028,7 +1075,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1045,7 +1092,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1064,7 +1111,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1083,7 +1130,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1100,7 +1147,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1117,7 +1164,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1134,7 +1181,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1153,7 +1200,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -1172,7 +1219,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -1191,7 +1238,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -1217,7 +1264,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1251,7 +1298,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1268,7 +1315,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1285,7 +1332,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1302,7 +1349,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -1321,7 +1368,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call create 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet assets, call create 1`] = ` [ { "data": { @@ -1340,7 +1387,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet balances, call burn 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet balances, call burn 1`] = ` [ { "data": { @@ -1359,7 +1406,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call destroy 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet nfts, call destroy 1`] = ` [ { "data": { @@ -1378,7 +1425,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1411,7 +1458,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark 1`] = ` [ { "data": { @@ -1444,7 +1491,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1477,7 +1524,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call create 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetManager > events for proxy type AssetManager, pallet uniques, call create 1`] = ` [ { "data": { @@ -1496,7 +1543,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call mint 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet assets, call mint 1`] = ` [ { "data": { @@ -1515,7 +1562,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet balances, call burn 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet balances, call burn 1`] = ` [ { "data": { @@ -1534,7 +1581,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call set_metadata 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet nfts, call set_metadata 1`] = ` [ { "data": { @@ -1553,7 +1600,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1586,7 +1633,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark 1`] = ` [ { "data": { @@ -1619,7 +1666,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1652,7 +1699,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call mint 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for AssetOwner > events for proxy type AssetOwner, pallet uniques, call mint 1`] = ` [ { "data": { @@ -1671,7 +1718,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet balances, call burn 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet balances, call burn 1`] = ` [ { "data": { @@ -1690,7 +1737,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1723,7 +1770,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark 1`] = ` [ { "data": { @@ -1756,7 +1803,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Assets > events for proxy type Assets, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1789,7 +1836,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1808,7 +1855,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1841,7 +1888,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1874,7 +1921,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1907,7 +1954,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` [ { "data": { @@ -1926,7 +1973,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1959,7 +2006,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` [ { "data": { @@ -1992,7 +2039,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2025,7 +2072,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2044,7 +2091,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -2063,7 +2110,7 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot AssetHub Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2081,50 +2128,3 @@ exports[`Polkadot AssetHub Proxy > filtering tests for forbidden proxy calls > f }, ] `; - -exports[`Polkadot AssetHub Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", - "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap index 185a446fd..9775241c4 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -75,7 +75,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc ] `; -exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -150,7 +150,7 @@ exports[`Polkadot Collectives Proxy > add proxies (with/without delay) to an acc ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -218,7 +218,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -230,7 +230,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -249,7 +249,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -268,7 +268,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -287,7 +287,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` [ { "data": { @@ -306,7 +306,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -325,7 +325,7 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` [ { "data": { @@ -344,7 +344,54 @@ exports[`Polkadot Collectives Proxy > create and kill pure proxies > events when ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet alliance, call join_alliance 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > Polkadot Collectives Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet alliance, call join_alliance 1`] = ` [ { "data": { @@ -363,7 +410,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet collectives, call propose 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet collectives, call propose 1`] = ` [ { "data": { @@ -382,7 +429,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -401,7 +448,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet utility, call batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -418,7 +465,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -435,7 +482,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Alliance > events for proxy type Alliance, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -452,7 +499,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet core_fellowship, call bump 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet core_fellowship, call bump 1`] = ` [ { "data": { @@ -471,7 +518,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -490,7 +537,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet ranked_collective, call vote 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet ranked_collective, call vote 1`] = ` [ { "data": { @@ -509,7 +556,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet referenda, call place_decision_deposit 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet referenda, call place_decision_deposit 1`] = ` [ { "data": { @@ -528,7 +575,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet salary, call init 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet salary, call init 1`] = ` [ { "data": { @@ -540,7 +587,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet utility, call batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -557,7 +604,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -574,7 +621,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Ambassador > events for proxy type Ambassador, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -591,7 +638,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -603,7 +650,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -622,7 +669,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -641,7 +688,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -660,7 +707,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -686,7 +733,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -720,7 +767,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -737,7 +784,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -754,7 +801,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -771,7 +818,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -790,7 +837,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -809,7 +856,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -826,7 +873,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -843,7 +890,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -860,7 +907,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -879,7 +926,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -898,7 +945,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -915,7 +962,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -932,7 +979,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -949,7 +996,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` [ { "data": { @@ -968,7 +1015,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -987,7 +1034,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet referenda, call place_decision_deposit 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet referenda, call place_decision_deposit 1`] = ` [ { "data": { @@ -1006,7 +1053,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet salary, call init 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet salary, call init 1`] = ` [ { "data": { @@ -1025,7 +1072,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet utility, call batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1042,7 +1089,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1059,7 +1106,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Fellowship > events for proxy type Fellowship, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1076,7 +1123,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1095,7 +1142,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -1114,7 +1161,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -1133,7 +1180,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -1159,7 +1206,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1193,7 +1240,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1210,7 +1257,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1227,7 +1274,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1244,7 +1291,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for allowed proxy calls > ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet balances, call burn 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet balances, call burn 1`] = ` [ { "data": { @@ -1263,7 +1310,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet core_fellowship, call bump 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet core_fellowship, call bump 1`] = ` [ { "data": { @@ -1282,7 +1329,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet core_fellowship, call bump 2`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet core_fellowship, call bump 2`] = ` [ { "data": { @@ -1301,7 +1348,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet ranked_collective, call vote 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet ranked_collective, call vote 1`] = ` [ { "data": { @@ -1320,7 +1367,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet referenda, call place_decision_deposit 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet referenda, call place_decision_deposit 1`] = ` [ { "data": { @@ -1339,7 +1386,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet referenda, call place_decision_deposit 2`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet referenda, call place_decision_deposit 2`] = ` [ { "data": { @@ -1358,7 +1405,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet salary, call init 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet salary, call init 1`] = ` [ { "data": { @@ -1377,7 +1424,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet salary, call init 2`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet salary, call init 2`] = ` [ { "data": { @@ -1396,7 +1443,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1429,7 +1476,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet system, call remark 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet system, call remark 1`] = ` [ { "data": { @@ -1462,7 +1509,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Alliance > events for proxy type Alliance, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1495,7 +1542,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet alliance, call join_alliance 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet alliance, call join_alliance 1`] = ` [ { "data": { @@ -1514,7 +1561,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet balances, call burn 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet balances, call burn 1`] = ` [ { "data": { @@ -1533,7 +1580,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet collectives, call propose 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet collectives, call propose 1`] = ` [ { "data": { @@ -1552,7 +1599,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet core_fellowship, call bump 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet core_fellowship, call bump 1`] = ` [ { "data": { @@ -1571,7 +1618,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet referenda, call place_decision_deposit 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet referenda, call place_decision_deposit 1`] = ` [ { "data": { @@ -1590,7 +1637,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet salary, call init 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet salary, call init 1`] = ` [ { "data": { @@ -1609,7 +1656,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1642,7 +1689,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet system, call remark 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet system, call remark 1`] = ` [ { "data": { @@ -1675,7 +1722,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Ambassador > events for proxy type Ambassador, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1708,7 +1755,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1727,7 +1774,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1760,7 +1807,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1793,7 +1840,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1826,7 +1873,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` [ { "data": { @@ -1845,7 +1892,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1878,7 +1925,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` [ { "data": { @@ -1911,7 +1958,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1944,7 +1991,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet alliance, call join_alliance 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet alliance, call join_alliance 1`] = ` [ { "data": { @@ -1963,7 +2010,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet balances, call burn 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet balances, call burn 1`] = ` [ { "data": { @@ -1982,7 +2029,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet collectives, call propose 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet collectives, call propose 1`] = ` [ { "data": { @@ -2001,7 +2048,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` [ { "data": { @@ -2020,7 +2067,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet ranked_collective, call vote 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet ranked_collective, call vote 1`] = ` [ { "data": { @@ -2039,7 +2086,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet referenda, call place_decision_deposit 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet referenda, call place_decision_deposit 1`] = ` [ { "data": { @@ -2058,7 +2105,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet salary, call init 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet salary, call init 1`] = ` [ { "data": { @@ -2077,7 +2124,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2110,7 +2157,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet system, call remark 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet system, call remark 1`] = ` [ { "data": { @@ -2143,7 +2190,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Fellowship > events for proxy type Fellowship, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2176,7 +2223,7 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls ] `; -exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`Polkadot Collectives Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -2194,50 +2241,3 @@ exports[`Polkadot Collectives Proxy > filtering tests for forbidden proxy calls }, ] `; - -exports[`Polkadot Collectives Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", - "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap index 2668d73a4..afab471b7 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -75,7 +75,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun ] `; -exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -150,7 +150,7 @@ exports[`Polkadot Coretime Proxy > add proxies (with/without delay) to an accoun ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -218,7 +218,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when cr ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -230,7 +230,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -249,7 +249,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -268,7 +268,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -287,7 +287,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` [ { "data": { @@ -306,7 +306,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -325,7 +325,7 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` [ { "data": { @@ -344,7 +344,54 @@ exports[`Polkadot Coretime Proxy > create and kill pure proxies > events when ki ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > Polkadot Coretime Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -356,7 +403,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -375,7 +422,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -394,7 +441,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -413,7 +460,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -439,7 +486,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -473,7 +520,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -490,7 +537,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -507,7 +554,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -524,7 +571,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call drop_history 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call drop_history 1`] = ` [ { "data": { @@ -543,7 +590,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call renew 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet broker, call renew 1`] = ` [ { "data": { @@ -562,7 +609,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -581,7 +628,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -598,7 +645,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -615,7 +662,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Broker > events for proxy type Broker, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -632,7 +679,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -651,7 +698,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -670,7 +717,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -687,7 +734,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -704,7 +751,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -721,7 +768,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -740,7 +787,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -759,7 +806,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -776,7 +823,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -793,7 +840,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -810,7 +857,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call renew 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call renew 1`] = ` [ { "data": { @@ -829,7 +876,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -848,7 +895,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -865,7 +912,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -882,7 +929,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -899,7 +946,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -918,7 +965,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -937,7 +984,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -956,7 +1003,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -982,7 +1029,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1016,7 +1063,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1033,7 +1080,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1050,7 +1097,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1067,7 +1114,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1086,7 +1133,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1103,7 +1150,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1120,7 +1167,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1137,7 +1184,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for allowed proxy calls > all ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet balances, call burn 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet balances, call burn 1`] = ` [ { "data": { @@ -1156,7 +1203,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet broker, call purchase_credit 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet broker, call purchase_credit 1`] = ` [ { "data": { @@ -1175,7 +1222,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1194,7 +1241,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1227,7 +1274,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark 1`] = ` [ { "data": { @@ -1260,7 +1307,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Broker > events for proxy type Broker, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1293,7 +1340,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1312,7 +1359,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1345,7 +1392,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1378,7 +1425,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1411,7 +1458,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` [ { "data": { @@ -1430,7 +1477,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1463,7 +1510,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` [ { "data": { @@ -1496,7 +1543,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1529,7 +1576,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet balances, call burn 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet balances, call burn 1`] = ` [ { "data": { @@ -1548,7 +1595,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call purchase_credit 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet broker, call purchase_credit 1`] = ` [ { "data": { @@ -1567,7 +1614,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1586,7 +1633,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1619,7 +1666,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark 1`] = ` [ { "data": { @@ -1652,7 +1699,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CoretimeRenewer > events for proxy type CoretimeRenewer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1685,7 +1732,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -1704,7 +1751,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet balances, call burn 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet balances, call burn 1`] = ` [ { "data": { @@ -1723,7 +1770,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet broker, call purchase_credit 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet broker, call purchase_credit 1`] = ` [ { "data": { @@ -1742,7 +1789,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1761,7 +1808,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1794,7 +1841,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark 1`] = ` [ { "data": { @@ -1827,7 +1874,7 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f ] `; -exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Coretime Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for OnDemandPurchaser > events for proxy type OnDemandPurchaser, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1859,50 +1906,3 @@ exports[`Polkadot Coretime Proxy > filtering tests for forbidden proxy calls > f }, ] `; - -exports[`Polkadot Coretime Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", - "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap index f636609e5..7792ef960 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -65,7 +65,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, ] `; -exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -130,7 +130,7 @@ exports[`People Polkadot Proxy > add proxies (with/without delay) to an account, ] `; -exports[`People Polkadot Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -189,7 +189,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when crea ] `; -exports[`People Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -201,7 +201,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill ] `; -exports[`People Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -220,7 +220,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill ] `; -exports[`People Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -239,7 +239,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill ] `; -exports[`People Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -258,7 +258,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill ] `; -exports[`People Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 4 for Alice 1`] = ` [ { "data": { @@ -277,7 +277,7 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill ] `; -exports[`People Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 5 for Alice 1`] = ` [ { "data": { @@ -296,7 +296,54 @@ exports[`People Polkadot Proxy > create and kill pure proxies > events when kill ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy full tests (includes call filtering) > People Polkadot Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -308,7 +355,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -327,7 +374,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -346,7 +393,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -365,7 +412,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -391,7 +438,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -425,7 +472,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -442,7 +489,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -459,7 +506,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -476,7 +523,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -495,7 +542,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -514,7 +561,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -531,7 +578,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -548,7 +595,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -565,7 +612,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -584,7 +631,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -603,7 +650,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -620,7 +667,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -637,7 +684,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Collator > events for proxy type Collator, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -654,7 +701,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call clear_identity 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call clear_identity 1`] = ` [ { "data": { @@ -673,7 +720,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call provide_judgement 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet identity, call provide_judgement 1`] = ` [ { "data": { @@ -692,7 +739,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet multisig, call as_multi 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -711,7 +758,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -728,7 +775,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch_all 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -745,7 +792,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call force_batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Identity > events for proxy type Identity, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -762,7 +809,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call provide_judgement 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call provide_judgement 1`] = ` [ { "data": { @@ -781,7 +828,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet multisig, call as_multi 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -800,7 +847,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -817,7 +864,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch_all 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -834,7 +881,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call force_batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -851,7 +898,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -870,7 +917,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -889,7 +936,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -908,7 +955,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -934,7 +981,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -968,7 +1015,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -985,7 +1032,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1002,7 +1049,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1019,7 +1066,7 @@ exports[`People Polkadot Proxy > filtering tests for allowed proxy calls > allow ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1038,7 +1085,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1071,7 +1118,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1104,7 +1151,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1137,7 +1184,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet balances, call burn 1`] = ` [ { "data": { @@ -1156,7 +1203,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1189,7 +1236,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark 1`] = ` [ { "data": { @@ -1222,7 +1269,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Collator > events for proxy type Collator, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1255,7 +1302,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet balances, call burn 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet balances, call burn 1`] = ` [ { "data": { @@ -1274,7 +1321,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1293,7 +1340,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1326,7 +1373,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark 1`] = ` [ { "data": { @@ -1359,7 +1406,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark_with_event 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Identity > events for proxy type Identity, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1392,7 +1439,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet balances, call burn 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet balances, call burn 1`] = ` [ { "data": { @@ -1411,7 +1458,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet collator_selection, call register_as_candidate 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -1430,7 +1477,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call clear_identity 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet identity, call clear_identity 1`] = ` [ { "data": { @@ -1449,7 +1496,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1482,7 +1529,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark 1`] = ` [ { "data": { @@ -1515,7 +1562,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark_with_event 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for IdentityJudgement > events for proxy type IdentityJudgement, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1548,7 +1595,7 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for ] `; -exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`People Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -1566,50 +1613,3 @@ exports[`People Polkadot Proxy > filtering tests for forbidden proxy calls > for }, ] `; - -exports[`People Polkadot Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", - "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap index f5e34f8ba..b8367ab3a 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.e2e.test.ts.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when adding proxies to Alice 1`] = ` [ { "data": { @@ -85,7 +85,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re ] `; -exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > add proxies (with/without delay) to an account, and remove them > events when removing proxies from Alice (batch) 1`] = ` [ { "data": { @@ -170,7 +170,7 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when creating pure proxies for Alice 1`] = ` [ { "data": { @@ -247,7 +247,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 0 for Alice 1`] = ` [ { "data": { @@ -259,7 +259,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 1 for Alice 1`] = ` [ { "data": { @@ -278,7 +278,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 2 for Alice 1`] = ` [ { "data": { @@ -297,7 +297,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 3 for Alice 1`] = ` [ { "data": { @@ -316,7 +316,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 6 for Alice 1`] = ` [ { "data": { @@ -335,7 +335,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 7 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 7 for Alice 1`] = ` [ { "data": { @@ -354,7 +354,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 8 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 8 for Alice 1`] = ` [ { "data": { @@ -373,7 +373,7 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > create and kill pure proxies > events when killing pure proxy of type 9 for Alice 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > create and kill pure proxies > events when killing pure proxy of type 9 for Alice 1`] = ` [ { "data": { @@ -392,7 +392,54 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when killing pur ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet auctions, call bid 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` +[ + { + "data": { + "callHash": "(hash)", + "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + }, + "method": "Announced", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy full tests (includes call filtering) > Polkadot Proxy base tests > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet auctions, call bid 1`] = ` [ { "data": { @@ -411,7 +458,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -423,7 +470,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet bounties, call propose_bounty 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -442,7 +489,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -461,7 +508,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet nomination_pools, call chill 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -480,7 +527,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -499,7 +546,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -518,7 +565,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet referenda, call submit 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet referenda, call submit 1`] = ` [ { "data": { @@ -541,7 +588,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet staking, call bond 1`] = ` [ { "data": { @@ -561,7 +608,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark 1`] = ` [ { "data": { @@ -587,7 +634,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -621,7 +668,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -638,7 +685,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -655,7 +702,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -672,7 +719,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Any > events for proxy type Any, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -691,7 +738,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet auctions, call bid 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet auctions, call bid 1`] = ` [ { "data": { @@ -710,7 +757,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet crowdloan, call dissolve 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet crowdloan, call dissolve 1`] = ` [ { "data": { @@ -729,7 +776,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet slots, call trigger_onboard 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Auction > events for proxy type Auction, pallet slots, call trigger_onboard 1`] = ` [ { "data": { @@ -748,7 +795,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -767,7 +814,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -786,7 +833,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -803,7 +850,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -820,7 +867,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for CancelProxy > events for proxy type CancelProxy, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -837,7 +884,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet bounties, call propose_bounty 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -856,7 +903,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet referenda, call submit 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet referenda, call submit 1`] = ` [ { "data": { @@ -879,7 +926,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -896,7 +943,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -913,7 +960,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Governance > events for proxy type Governance, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -930,7 +977,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -949,7 +996,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -966,7 +1013,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -983,7 +1030,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NominationPools > events for proxy type NominationPools, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1000,7 +1047,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet auctions, call bid 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet auctions, call bid 1`] = ` [ { "data": { @@ -1019,7 +1066,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -1038,7 +1085,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -1057,7 +1104,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet nomination_pools, call chill 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -1076,7 +1123,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -1095,7 +1142,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -1114,7 +1161,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet referenda, call submit 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet referenda, call submit 1`] = ` [ { "data": { @@ -1137,7 +1184,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet staking, call bond 1`] = ` [ { "data": { @@ -1157,7 +1204,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { @@ -1183,7 +1230,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1217,7 +1264,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1234,7 +1281,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1251,7 +1298,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for NonTransfer > events for proxy type NonTransfer, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1268,7 +1315,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` [ { "data": { @@ -1287,7 +1334,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1304,7 +1351,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1321,7 +1368,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1338,7 +1385,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet nomination_pools, call chill 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -1357,7 +1404,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call bond 1`] = ` [ { "data": { @@ -1377,7 +1424,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call register_fast_unstake 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet staking, call register_fast_unstake 1`] = ` [ { "data": { @@ -1396,7 +1443,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1413,7 +1460,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1430,7 +1477,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for allowed proxy calls > allowed proxy calls for Staking > events for proxy type Staking, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1447,7 +1494,7 @@ exports[`Polkadot Proxy > filtering tests for allowed proxy calls > allowed prox ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet balances, call burn 1`] = ` [ { "data": { @@ -1466,7 +1513,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet referenda, call submit 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet referenda, call submit 1`] = ` [ { "data": { @@ -1485,7 +1532,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet staking, call bond 1`] = ` [ { "data": { @@ -1504,7 +1551,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1537,7 +1584,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark 1`] = ` [ { "data": { @@ -1570,7 +1617,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1603,7 +1650,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Auction > events for proxy type Auction, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -1622,7 +1669,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet balances, call burn 1`] = ` [ { "data": { @@ -1641,7 +1688,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet staking, call bond 1`] = ` [ { "data": { @@ -1660,7 +1707,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1693,7 +1740,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark 1`] = ` [ { "data": { @@ -1726,7 +1773,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for CancelProxy > events for proxy type CancelProxy, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1759,7 +1806,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet balances, call burn 1`] = ` [ { "data": { @@ -1778,7 +1825,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet staking, call bond 1`] = ` [ { "data": { @@ -1797,7 +1844,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -1830,7 +1877,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark 1`] = ` [ { "data": { @@ -1863,7 +1910,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1896,7 +1943,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Governance > events for proxy type Governance, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -1915,7 +1962,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet balances, call burn 1`] = ` [ { "data": { @@ -1934,7 +1981,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet referenda, call submit 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet referenda, call submit 1`] = ` [ { "data": { @@ -1953,7 +2000,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet staking, call bond 1`] = ` [ { "data": { @@ -1972,7 +2019,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2005,7 +2052,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark 1`] = ` [ { "data": { @@ -2038,7 +2085,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2071,7 +2118,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NominationPools > events for proxy type NominationPools, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2090,7 +2137,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet balances, call burn 1`] = ` [ { "data": { @@ -2109,7 +2156,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for NonTransfer > events for proxy type NonTransfer, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2128,7 +2175,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet balances, call burn 1`] = ` [ { "data": { @@ -2147,7 +2194,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call reject_announcement 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -2166,7 +2213,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_announcement 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet proxy, call remove_announcement 1`] = ` [ { "data": { @@ -2185,7 +2232,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2218,7 +2265,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark 1`] = ` [ { "data": { @@ -2251,7 +2298,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for ParaRegistration > events for proxy type ParaRegistration, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2284,7 +2331,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet balances, call burn 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet balances, call burn 1`] = ` [ { "data": { @@ -2303,7 +2350,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet referenda, call submit 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet referenda, call submit 1`] = ` [ { "data": { @@ -2322,7 +2369,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call apply_authorized_upgrade 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call apply_authorized_upgrade 1`] = ` [ { "data": { @@ -2355,7 +2402,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark 1`] = ` [ { "data": { @@ -2388,7 +2435,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -2421,7 +2468,7 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden ] `; -exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet vesting, call vested_transfer 1`] = ` +exports[`Polkadot Proxy full tests (includes call filtering) > filtering tests for forbidden proxy calls > forbidden proxy calls for Staking > events for proxy type Staking, pallet vesting, call vested_transfer 1`] = ` [ { "data": { @@ -2439,50 +2486,3 @@ exports[`Polkadot Proxy > filtering tests for forbidden proxy calls > forbidden }, ] `; - -exports[`Polkadot Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` -[ - { - "data": { - "amount": 1000000000000, - "from": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - "to": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", - }, - "method": "Transfer", - "section": "balances", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` -[ - { - "data": { - "callHash": "(hash)", - "proxy": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", - "real": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", - }, - "method": "Announced", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index cc5ea7a4a..a34d4c601 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -1891,7 +1891,7 @@ export function baseProxyE2ETests< >(chain: Chain, testConfig: TestConfig, proxyTypes: Record): RootTestTree { return { kind: 'describe', - label: testConfig.testSuiteName, + label: testConfig.testSuiteName + ' base tests', children: [ { kind: 'test', @@ -1925,7 +1925,10 @@ export function fullProxyE2ETests< const forbiddenFilteringTests = proxyCallFilteringTestTree(chain, proxyTypes, ProxyCallFilteringTestType.Forbidden) const baseTestTree = baseProxyE2ETests(chain, testConfig, proxyTypes) - baseTestTree.children.push(allowedFilteringTests, forbiddenFilteringTests) - return baseTestTree + return { + kind: 'describe' as const, + label: testConfig.testSuiteName + ' full tests (includes call filtering)', + children: [baseTestTree, allowedFilteringTests, forbiddenFilteringTests], + } } From 6799972833c4becfa02c2985ac21b3f03581b876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 10 Sep 2025 02:39:29 +0100 Subject: [PATCH 17/18] Branch `incompleteSince` test fixes for Kusama --- packages/shared/src/scheduler.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/shared/src/scheduler.ts b/packages/shared/src/scheduler.ts index 11090b79e..c8b61b393 100644 --- a/packages/shared/src/scheduler.ts +++ b/packages/shared/src/scheduler.ts @@ -804,9 +804,14 @@ export async function scheduledOverweightCallFails< // Since the scheduler pallet signaled it as permanently overweight, it should set the // `incompleteSince` storage item. - const incompleteSince = await client.api.query.scheduler.incompleteSince() - assert(incompleteSince.isNone) + // TODO: this change only recently made it to Kusama. Update this when resolved. + if (chain.name.toLowerCase().includes('kusama')) { + assert(incompleteSince.isSome) + expect(incompleteSince.unwrap().toNumber()).toBe(targetBlockNumber! + 1) + } else { + assert(incompleteSince.isNone) + } } /** @@ -1411,7 +1416,12 @@ export async function schedulePriorityWeightedTasks< // Verify `incompleteSince` has been unset const finalIncompleteSince = await client.api.query.scheduler.incompleteSince() - expect(finalIncompleteSince.isNone).toBeTruthy() + if (chain.name.toLowerCase().includes('kusama')) { + expect(finalIncompleteSince.isSome).toBeTruthy() + expect(finalIncompleteSince.unwrap().toNumber()).toBe(currBlockNumber + 1) + } else { + expect(finalIncompleteSince.isNone).toBeTruthy() + } // Check that the agenda for the block in which the 2 priority tasks were scheduled is empty scheduled = await client.api.query.scheduler.agenda(priorityTargetBlock!) From db2b8d5f217683098bfb60a3a956b93d64190dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 10 Sep 2025 14:19:11 +0100 Subject: [PATCH 18/18] Add mistakenly removed era-change storage clean-up Without it, the unapplied slashing test times out, because building the era-change block takes some time to complete will all of the era's stakers. --- .../kusama.staking.e2e.test.ts.snap | 58 +++++++++++++++++++ .../polkadot.staking.e2e.test.ts.snap | 58 +++++++++++++++++++ packages/shared/src/staking.ts | 20 ++++++- 3 files changed, 135 insertions(+), 1 deletion(-) diff --git a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap index f3e4823e6..9cb4f4feb 100644 --- a/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.staking.e2e.test.ts.snap @@ -805,6 +805,15 @@ exports[`Kusama Staking > slashing tests > cancel deferred slash with bad origin ] `; +exports[`Kusama Staking > slashing tests > unapplied slash > alice funds post slash 1`] = ` +{ + "flags": "0x80000000000000000000000000000000", + "free": 33232889962721, + "frozen": 0, + "reserved": 50000000000, +} +`; + exports[`Kusama Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", @@ -814,6 +823,17 @@ exports[`Kusama Staking > slashing tests > unapplied slash > alice funds pre sla } `; +exports[`Kusama Staking > slashing tests > unapplied slash > balances slash events 1`] = `[]`; + +exports[`Kusama Staking > slashing tests > unapplied slash > bob funds post slash 1`] = ` +{ + "flags": "0x80000000000000000000000000000000", + "free": 33232889962721, + "frozen": 0, + "reserved": 0, +} +`; + exports[`Kusama Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", @@ -823,6 +843,15 @@ exports[`Kusama Staking > slashing tests > unapplied slash > bob funds pre slash } `; +exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds post slash 1`] = ` +{ + "flags": "0x80000000000000000000000000000000", + "free": 33232889962721, + "frozen": 0, + "reserved": 0, +} +`; + exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", @@ -831,3 +860,32 @@ exports[`Kusama Staking > slashing tests > unapplied slash > charlie funds pre s "reserved": 100000000000, } `; + +exports[`Kusama Staking > slashing tests > unapplied slash > staking slash events 1`] = ` +[ + { + "data": { + "amount": 50000000000, + "staker": "D8ew585BL5H1ALhn4kmJoxhgqcgKDZLPc6xunJNv4mmrBns", + }, + "method": "Slashed", + "section": "staking", + }, + { + "data": { + "amount": 100000000000, + "staker": "EvvS4HELEC1nxVHsjYUsPvypd2kXeu78AguyiSN7kV2pTnk", + }, + "method": "Slashed", + "section": "staking", + }, + { + "data": { + "amount": 100000000000, + "staker": "D2oHoVDFJGy7iDYcY7fbm82CuNycWaSxCGpsQtLqkrE9JKf", + }, + "method": "Slashed", + "section": "staking", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap index c7d30e536..b11f1598d 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.staking.e2e.test.ts.snap @@ -798,6 +798,15 @@ exports[`Polkadot Staking > slashing tests > cancel deferred slash with bad orig ] `; +exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds post slash 1`] = ` +{ + "flags": "0x80000000000000000000000000000000", + "free": 997499867589258, + "frozen": 0, + "reserved": 1250000000000, +} +`; + exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", @@ -807,6 +816,17 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > alice funds pre s } `; +exports[`Polkadot Staking > slashing tests > unapplied slash > balances slash events 1`] = `[]`; + +exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds post slash 1`] = ` +{ + "flags": "0x80000000000000000000000000000000", + "free": 997499867589258, + "frozen": 0, + "reserved": 0, +} +`; + exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", @@ -816,6 +836,15 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > bob funds pre sla } `; +exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds post slash 1`] = ` +{ + "flags": "0x80000000000000000000000000000000", + "free": 997499867589258, + "frozen": 0, + "reserved": 0, +} +`; + exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds pre slash 1`] = ` { "flags": "0x80000000000000000000000000000000", @@ -824,3 +853,32 @@ exports[`Polkadot Staking > slashing tests > unapplied slash > charlie funds pre "reserved": 2500000000000, } `; + +exports[`Polkadot Staking > slashing tests > unapplied slash > staking slash events 1`] = ` +[ + { + "data": { + "amount": "(rounded 1300000000000)", + "staker": "1ZLR63GQkKph3XmxzziZ1RrPsL6CrJJ1izhgR1mzMaoHZJA", + }, + "method": "Slashed", + "section": "staking", + }, + { + "data": { + "amount": 2500000000000, + "staker": "13Mbv5CRZeSZUqgN4fnS7bQ8XekARHe4kHaekM9mC3J4Fh7e", + }, + "method": "Slashed", + "section": "staking", + }, + { + "data": { + "amount": 2500000000000, + "staker": "1TUmpQQUiXWobQcoUMcqxbAuw6PW9KQaKAZe3bjv3fFaWSy", + }, + "method": "Slashed", + "section": "staking", + }, +] +`; diff --git a/packages/shared/src/staking.ts b/packages/shared/src/staking.ts index cf9972f46..431fcb0b3 100644 --- a/packages/shared/src/staking.ts +++ b/packages/shared/src/staking.ts @@ -1408,7 +1408,7 @@ async function unappliedSlashTest< .toMatchSnapshot('charlie funds pre slash') // If on an post-migration Asset Hub, `applySlash` can be called, instead of having to move to era change. - if (testConfig.blockProvider === 'NonLocal') { + if (client.api.tx.staking.applySlash) { // Manually apply the slash. const applySlashTx = client.api.tx.staking.applySlash(...slashKey) await scheduleInlineCallWithOrigin( @@ -1417,8 +1417,26 @@ async function unappliedSlashTest< { system: 'Root' }, testConfig.blockProvider, ) + } else { + // If `applySlash` is not available, the era change method is being used (pre-AHM relay chains). + // Era-boundary block creation tends to be slow, so these storages are removed. + await client.dev.setStorage({ + ParasDisputes: { + $removePrefix: ['disputes', 'included'], + }, + Dmp: { + $removePrefix: ['downwardMessageQueues'], + }, + Staking: { + $removePrefix: ['erasStakersOverview', 'erasStakersPaged', 'erasStakers'], + }, + Session: { + $removePrefix: ['nextKeys'], + }, + }) } + // With this block, the slash will have been applied. await client.dev.newBlock() await checkSystemEvents(client, { section: 'staking', method: 'Slashed' }).toMatchSnapshot('staking slash events')