From 8b43a2aac56323095f081f5156a98b527f6029a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 10 Apr 2025 16:38:51 +0100 Subject: [PATCH 01/39] Add `ts-pattern` dependency --- package.json | 1 + yarn.lock | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/package.json b/package.json index 786ebdc55..cd3e038d1 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@e2e-test/networks": "workspace:*", "@swc/core": "^1.11.5", "lodash": "^4.17.21", + "ts-pattern": "^5.7.0", "typescript": "^5.8.2", "vitest": "^3.0.7" }, diff --git a/yarn.lock b/yarn.lock index 41679c878..5ace40f3e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2988,6 +2988,7 @@ __metadata: husky: "npm:^9.1.7" lint-staged: "npm:^15.2.10" lodash: "npm:^4.17.21" + ts-pattern: "npm:^5.7.0" tsx: "npm:^4.19.2" typescript: "npm:^5.8.2" unplugin-swc: "npm:^1.5.1" @@ -6084,6 +6085,13 @@ __metadata: languageName: node linkType: hard +"ts-pattern@npm:^5.7.0": + version: 5.7.0 + resolution: "ts-pattern@npm:5.7.0" + checksum: 10c0/6a49d2b502a916def7b07ed66d5675aaf5159dd09b9dbdb334ebfc464af6307e33ae9fbec8ece9182f7ae6a9b2589087da5924d35a74bd52323c3f3745b15d1e + languageName: node + linkType: hard + "tsc-prog@npm:^2.3.0": version: 2.3.0 resolution: "tsc-prog@npm:2.3.0" From 0893601310cb8427bf382b29a7c15c54d846a263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 10 Apr 2025 16:40:15 +0100 Subject: [PATCH 02/39] Draft proxy call filtering test --- .../assetHubKusama.proxy.e2e.test.ts.snap | 12 +++ .../coretimeKusama.proxy.e2e.test.ts.snap | 12 +++ .../kusama.proxy.e2e.test.ts.snap | 12 +++ .../peopleKusama.proxy.e2e.test.ts.snap | 12 +++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 12 +++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 12 +++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 12 +++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 12 +++ .../polkadot.proxy.tests.e2e.test.ts.snap | 12 +++ packages/shared/src/proxy.ts | 97 +++++++++++++++++++ 10 files changed, 205 insertions(+) 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 4706bdda0..da8cf2869 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -396,3 +396,15 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when `; exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test > events when sending proxy action for Any 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 f8a337f5c..b70133c15 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -396,3 +396,15 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when `; exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`Kusama Coretime Proxy > proxy call filtering test > events when sending proxy action for Any 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 a025cc1e7..22e0162ef 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -492,3 +492,15 @@ exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob perf `; exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`Kusama Proxy > proxy call filtering test > events when sending proxy action for Any 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 f6fc12daf..0fca1ee74 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -348,3 +348,15 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B `; exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`People Kusama Proxy > proxy call filtering test > events when sending proxy action for Any 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 a96a6318f..f268ff7c9 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -396,3 +396,15 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh `; exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test > events when sending proxy action for Any 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 c7999d480..e75aabed5 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -396,3 +396,15 @@ exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events `; exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test > events when sending proxy action for Any 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 a70916431..0a86841f1 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -396,3 +396,15 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh `; exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test > events when sending proxy action for Any 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 bd98ca224..da2c2f415 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -348,3 +348,15 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when `; exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`People Polkadot Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 381a1452c..878e79a61 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -396,3 +396,15 @@ exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob pe `; exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 1535493ac..25f22b4a8 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -14,6 +14,8 @@ import { check, checkEvents } from './helpers/index.js' import BN from 'bn.js' +import { match } from 'ts-pattern' + /// ------- /// Helpers /// ------- @@ -36,6 +38,97 @@ function createProxyAccounts( ) } +function buildProxyAction< + TCustom extends Record | undefined, + TInitStorages extends Record> | undefined, +>(proxyType: string, client: Client): SubmittableExtrinsic<'promise', ISubmittableResult>[] { + const result = match(proxyType) + .with('Any', () => { + const batch = [client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10)] + if (client.api.tx.staking) { + batch.push(client.api.tx.staking.bond(100e10, 'Staked')) + } + if (client.api.tx.referenda) { + batch.push( + client.api.tx.referenda.submit( + { + Origins: 'SmallTipper', + } as any, + { + Inline: client.api.tx.system.remark('hello').method.toHex(), + }, + { + After: 0, + }, + ), + ) + } + console.log(batch.length) + return [client.api.tx.utility.batchAll(batch)] + }) + .otherwise(() => []) + + return result +} + +async function proxyCallFilteringTest< + TCustom extends Record | undefined, + TInitStorages extends Record> | undefined, +>(client: Client, proxyTypes: Record) { + const alice = defaultAccountsSr25519.alice + const kr = defaultAccountsSr25519.keyring + + const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) + + const proxyTypesToTest = ['Any'] + + // For every proxy type: + // 1. As Alice, add a proxy account of that type + // 2. As the proxy account, execute an action - on behalf of Alice - that such a proxy type is allowed to execute + // 3. Verify that the action was correctly executed + // - The extrinsic is not required to be well-formed; the transaction can fail, just not because the call was + // filtered over the proxy's lack of permission. + for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { + // For this network, there might be some proxy types not to be tested. + if (!proxyTypesToTest.includes(proxyType)) { + continue + } + + const addProxyTx = client.api.tx.proxy.addProxy(proxyAccounts[proxyType].address, proxyTypeIx, 0) + await sendTransaction(addProxyTx.signAsync(alice)) + + await client.dev.newBlock() + + const proxyActions = buildProxyAction(proxyType, client) + // If there's a single extrinsic, then it's a batch, since the proxy type in question allows the `utility` pallet. + if (proxyActions.length === 1) { + await client.dev.setStorage({ + System: { + account: [[[proxyAccounts[proxyType].address], { providers: 1, data: { free: 1000e10 } }]], + }, + }) + + // Recall that `proxyActions` is an array of extrinsics, which at this point is known to be of length 1. + // That single extrinsic represents the action to be performed by the proxy, on behalf of the delegating account. + const proxyTx = client.api.tx.proxy.proxy(alice.address, proxyTypeIx, proxyActions[0]) + + const proxyActionEvents = await sendTransaction(proxyTx.signAsync(proxyAccounts[proxyType])) + + await client.dev.newBlock() + + await checkEvents(proxyActionEvents, 'proxy').toMatchSnapshot(`events when sending proxy action for ${proxyType}`) + // Some proxy types do not allow use of the `utility` pallet, so a representative set of actions must be enacted + // manually, one extrinsic per block, and events checked for each extrinsic. + } else { + // TODO + } + } +} + +/// ------- +/// ------- +/// ------- + /** * Test to the process of adding and removing proxies to another account. * @@ -518,5 +611,9 @@ export async function proxyE2ETests< test('proxy announcement lifecycle test', async () => { await proxyAnnouncementLifecycleTest(client, testConfig.addressEncoding) }) + + test('proxy call filtering test', async () => { + await proxyCallFilteringTest(client, proxyTypes) + }) }) } From 819709143b3c84cbed0879d71970099d5e41f80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 15 Apr 2025 02:00:46 +0100 Subject: [PATCH 03/39] Draft proxy filtering mechanism for `NonTransfer/Governance` --- .../assetHubKusama.proxy.e2e.test.ts.snap | 12 +++ .../coretimeKusama.proxy.e2e.test.ts.snap | 12 +++ .../kusama.proxy.e2e.test.ts.snap | 31 +++++++ .../peopleKusama.proxy.e2e.test.ts.snap | 12 +++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 12 +++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 12 +++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 12 +++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 12 +++ .../polkadot.proxy.tests.e2e.test.ts.snap | 31 +++++++ packages/shared/src/proxy.ts | 84 ++++++++++++++----- 10 files changed, 208 insertions(+), 22 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 da8cf2869..4e0919a83 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -408,3 +408,15 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test > events when sending }, ] `; + +exports[`Kusama AssetHub Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 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 b70133c15..3b016e2f5 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -408,3 +408,15 @@ exports[`Kusama Coretime Proxy > proxy call filtering test > events when sending }, ] `; + +exports[`Kusama Coretime Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 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 22e0162ef..076c747c7 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -504,3 +504,34 @@ exports[`Kusama Proxy > proxy call filtering test > events when sending proxy ac }, ] `; + +exports[`Kusama Proxy > proxy call filtering test > events when sending proxy action for Governance 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 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 0fca1ee74..48be7abde 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -360,3 +360,15 @@ exports[`People Kusama Proxy > proxy call filtering test > events when sending p }, ] `; + +exports[`People Kusama Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 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 f268ff7c9..3938dd045 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -408,3 +408,15 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test > events when sendi }, ] `; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 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 e75aabed5..4d9d1e4b9 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -408,3 +408,15 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test > events when se }, ] `; + +exports[`Polkadot Collectives Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 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 0a86841f1..f9a4b5ad1 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -408,3 +408,15 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test > events when sendi }, ] `; + +exports[`Polkadot Coretime Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 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 da2c2f415..16e72872a 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -360,3 +360,15 @@ exports[`People Polkadot Proxy > proxy call filtering test > events when sending }, ] `; + +exports[`People Polkadot Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 878e79a61..30932c102 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -408,3 +408,34 @@ exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy }, ] `; + +exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy action for Governance 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 25f22b4a8..158b9d166 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -42,28 +42,56 @@ function buildProxyAction< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, >(proxyType: string, client: Client): SubmittableExtrinsic<'promise', ISubmittableResult>[] { + const balanceCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] + if (client.api.tx.balances) { + balanceCalls.push(client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10)) + } + + const governanceCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] + if (client.api.tx.referenda) { + governanceCalls.push( + client.api.tx.referenda.submit( + { + Origins: 'SmallTipper', + } as any, + { + Inline: client.api.tx.system.remark('hello').method.toHex(), + }, + { + After: 0, + }, + ), + ) + } + + const stakingCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] + if (client.api.tx.staking) { + stakingCalls.push(client.api.tx.staking.bond(100e10, 'Staked')) + } + + const systemCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [ + client.api.tx.system.remarkWithEvent('hello'), + ] + const result = match(proxyType) .with('Any', () => { - const batch = [client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10)] - if (client.api.tx.staking) { - batch.push(client.api.tx.staking.bond(100e10, 'Staked')) - } - if (client.api.tx.referenda) { - batch.push( - client.api.tx.referenda.submit( - { - Origins: 'SmallTipper', - } as any, - { - Inline: client.api.tx.system.remark('hello').method.toHex(), - }, - { - After: 0, - }, - ), - ) - } - console.log(batch.length) + const batch = balanceCalls + // If the network has staking, staking calls will be added to the batch. + // Otherwise, this is a no-op. + batch.concat(stakingCalls) + // Same as above - this pattern will be used where sensible. + batch.concat(governanceCalls) + return [client.api.tx.utility.batchAll(batch)] + }) + .with('NonTransfer', () => { + const batch = systemCalls + batch.concat(stakingCalls) + batch.concat(governanceCalls) + return [client.api.tx.utility.batchAll(batch)] + }) + .with('Governance', () => { + const batch = systemCalls + batch.concat(governanceCalls) return [client.api.tx.utility.batchAll(batch)] }) .otherwise(() => []) @@ -80,7 +108,7 @@ async function proxyCallFilteringTest< const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) - const proxyTypesToTest = ['Any'] + const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer'] // For every proxy type: // 1. As Alice, add a proxy account of that type @@ -116,9 +144,19 @@ async function proxyCallFilteringTest< await client.dev.newBlock() + await client.pause() + await checkEvents(proxyActionEvents, 'proxy').toMatchSnapshot(`events when sending proxy action for ${proxyType}`) // Some proxy types do not allow use of the `utility` pallet, so a representative set of actions must be enacted // manually, one extrinsic per block, and events checked for each extrinsic. + + const events = await client.api.query.system.events() + // All of the batched extrinsics must have been executed successfully - if this event is emitted, then no item in + // the batch failed. + const proxyEvents = events.filter((record) => { + const { event } = record + return event.section === 'utility' && event.method === 'BatchCompleted' + }) } else { // TODO } @@ -413,7 +451,7 @@ export async function createKillPureProxyTest< * * 1. Alice adds Bob as their `Any` proxy, with no associated delay * 2. Bob performs a proxy call on behalf of Alice to transfer some funds to Charlie - * 3. Charlie's balance is check, as is Alice's + * 3. Charlie's balance is checked, as is Alice's */ export async function proxyCallTest< TCustom extends Record | undefined, @@ -526,6 +564,8 @@ export async function proxyAnnouncementLifecycleTest< const announcementDepositTotal = announcementDeposit.add(announcementDepositFactor) assert(announcements[1].eq(announcementDepositTotal)) + // Alice rejects the announcement + const rejectAnnouncementTx = client.api.tx.proxy.rejectAnnouncement(bob.address, transferCall.method.hash) const rejectAnnouncementEvents = await sendTransaction(rejectAnnouncementTx.signAsync(alice)) From 9b70d59b805a8cd055e4ebb3ab7a44c66c1d39d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 15 Apr 2025 22:06:22 +0100 Subject: [PATCH 04/39] Add draft of proxy filtering tests for Governance proxies --- .../assetHubKusama.proxy.e2e.test.ts.snap | 4 +- .../coretimeKusama.proxy.e2e.test.ts.snap | 4 +- .../kusama.proxy.e2e.test.ts.snap | 15 +- .../peopleKusama.proxy.e2e.test.ts.snap | 4 +- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 4 +- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 4 +- .../coretimePolkadot.proxy.e2e.test.ts.snap | 4 +- .../peoplePolkadot.proxy.e2e.test.ts.snap | 4 +- .../polkadot.proxy.tests.e2e.test.ts.snap | 15 +- packages/shared/src/proxy.ts | 130 +++++++++++------- 10 files changed, 99 insertions(+), 89 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 4e0919a83..b99956c47 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama AssetHub Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -409,7 +409,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test > events when sending ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { 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 3b016e2f5..6a783beb0 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama Coretime Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -409,7 +409,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test > events when sending ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { 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 076c747c7..c381f375f 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -493,7 +493,7 @@ exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob perf exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -505,18 +505,11 @@ exports[`Kusama Proxy > proxy call filtering test > events when sending proxy ac ] `; -exports[`Kusama Proxy > proxy call filtering test > events when sending proxy action for Governance 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Governance > events when sending proxy action for Governance 1`] = ` [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -524,7 +517,7 @@ exports[`Kusama Proxy > proxy call filtering test > events when sending proxy ac ] `; -exports[`Kusama Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { 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 48be7abde..0f953b2d7 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -349,7 +349,7 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Kusama Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -361,7 +361,7 @@ exports[`People Kusama Proxy > proxy call filtering test > events when sending p ] `; -exports[`People Kusama Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { 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 3938dd045..598724593 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot AssetHub Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -409,7 +409,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test > events when sendi ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { 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 4d9d1e4b9..244ad8942 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Collectives Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -409,7 +409,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test > events when se ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { 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 f9a4b5ad1..dc01551c8 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Coretime Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -409,7 +409,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test > events when sendi ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { 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 16e72872a..cf0fff048 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -349,7 +349,7 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Polkadot Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -361,7 +361,7 @@ exports[`People Polkadot Proxy > proxy call filtering test > events when sending ] `; -exports[`People Polkadot Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 30932c102..5dc5c0a32 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob pe exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy action for Any 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { "data": { @@ -409,18 +409,11 @@ exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy ] `; -exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy action for Governance 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Governance > events when sending proxy action for Governance 1`] = ` [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -428,7 +421,7 @@ exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy ] `; -exports[`Polkadot Proxy > proxy call filtering test > events when sending proxy action for NonTransfer 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { "data": { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 158b9d166..20787d0f7 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -9,7 +9,7 @@ import type { Vec } from '@polkadot/types' import type { PalletProxyProxyDefinition } from '@polkadot/types/lookup' import type { ISubmittableResult } from '@polkadot/types/types' import { encodeAddress } from '@polkadot/util-crypto' -import { assert, describe, test } from 'vitest' +import { assert, describe, expect, test } from 'vitest' import { check, checkEvents } from './helpers/index.js' import BN from 'bn.js' @@ -81,85 +81,111 @@ function buildProxyAction< batch.concat(stakingCalls) // Same as above - this pattern will be used where sensible. batch.concat(governanceCalls) - return [client.api.tx.utility.batchAll(batch)] + return [client.api.tx.utility.forceBatch(batch)] }) .with('NonTransfer', () => { const batch = systemCalls batch.concat(stakingCalls) batch.concat(governanceCalls) - return [client.api.tx.utility.batchAll(batch)] + return [client.api.tx.utility.forceBatch(batch)] }) .with('Governance', () => { - const batch = systemCalls + const batch: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] batch.concat(governanceCalls) - return [client.api.tx.utility.batchAll(batch)] + return [client.api.tx.utility.forceBatch(batch)] }) .otherwise(() => []) return result } -async function proxyCallFilteringTest< +/** + * For a particular proxy type: + * 1. As Alice, add a proxy account of that type + * 2. As the proxy account, execute an action - on behalf of Alice - that such a proxy type is allowed to execute + * 3. Verify that the action was correctly executed + * - The extrinsic is not required to be well-formed; the transaction can fail, just not because the call was + * filtered over the proxy's lack of permission. + * + * To see which proxy-type-contingent actions are used, see `buildProxyAction`. + */ +async function proxyCallFilteringSingleTestRunner< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(client: Client, proxyTypes: Record) { +>(client: Client, proxyType: string, proxyTypeIx: number, proxyAccount: KeyringPair) { const alice = defaultAccountsSr25519.alice - const kr = defaultAccountsSr25519.keyring - const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) + const addProxyTx = client.api.tx.proxy.addProxy(proxyAccount.address, proxyTypeIx, 0) + await sendTransaction(addProxyTx.signAsync(alice)) - const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer'] + await client.dev.newBlock() - // For every proxy type: - // 1. As Alice, add a proxy account of that type - // 2. As the proxy account, execute an action - on behalf of Alice - that such a proxy type is allowed to execute - // 3. Verify that the action was correctly executed - // - The extrinsic is not required to be well-formed; the transaction can fail, just not because the call was - // filtered over the proxy's lack of permission. - for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { - // For this network, there might be some proxy types not to be tested. - if (!proxyTypesToTest.includes(proxyType)) { - continue - } + const proxyActions = buildProxyAction(proxyType, client) + // If there's a single extrinsic, then it is a batch of calls, since the proxy type in question allows the `utility` + // pallet. + if (proxyActions.length === 1) { + await client.dev.setStorage({ + System: { + account: [[[proxyAccount.address], { providers: 1, data: { free: 1000e10 } }]], + }, + }) - const addProxyTx = client.api.tx.proxy.addProxy(proxyAccounts[proxyType].address, proxyTypeIx, 0) - await sendTransaction(addProxyTx.signAsync(alice)) + // Recall that `proxyActions` is an array of extrinsics, which at this point is known to be of length 1. + // That single extrinsic - a utility batch - contains the actions to be performed by the proxy on behalf of the + // delegating account. + const proxyTx = client.api.tx.proxy.proxy(alice.address, proxyTypeIx, proxyActions[0]) - await client.dev.newBlock() + const proxyActionEvents = await sendTransaction(proxyTx.signAsync(proxyAccount)) - const proxyActions = buildProxyAction(proxyType, client) - // If there's a single extrinsic, then it's a batch, since the proxy type in question allows the `utility` pallet. - if (proxyActions.length === 1) { - await client.dev.setStorage({ - System: { - account: [[[proxyAccounts[proxyType].address], { providers: 1, data: { free: 1000e10 } }]], - }, - }) + await client.dev.newBlock() - // Recall that `proxyActions` is an array of extrinsics, which at this point is known to be of length 1. - // That single extrinsic represents the action to be performed by the proxy, on behalf of the delegating account. - const proxyTx = client.api.tx.proxy.proxy(alice.address, proxyTypeIx, proxyActions[0]) + await checkEvents(proxyActionEvents, 'proxy').toMatchSnapshot(`events when sending proxy action for ${proxyType}`) - const proxyActionEvents = await sendTransaction(proxyTx.signAsync(proxyAccounts[proxyType])) + const events = await client.api.query.system.events() + events + .filter((record) => { + const { event } = record + return event.section === 'utility' && (event.method === 'ItemCompleted' || event.method === 'ItemFailed') + }) + .forEach((record) => { + if (client.api.events.utility.ItemFailed.is(record.event)) { + const itemFailedData = record.event.data + assert(itemFailedData.error.isModule) + + // The call can have failed due to e.g. being semantically incorrect, but it can *never* have failed + // due to having been filtered, as each proxy type is only given calls it is allowed to execute. + expect(client.api.errors.system.CallFiltered.is(itemFailedData.error.asModule)).toBe(false) + } else { + // The call was executed successfully - nothing to check. + expect(client.api.events.utility.ItemCompleted.is(record.event)).toBe(true) + } + }) + } else { + // Some proxy types do not allow use of the `utility` pallet, so a representative set of actions must be enacted + // manually, one extrinsic per block, and events checked for each extrinsic. + // TODO + } +} - await client.dev.newBlock() +async function proxyCallFilteringTestRunner< + TCustom extends Record | undefined, + TInitStorages extends Record> | undefined, +>(client: Client, proxyTypes: Record) { + const kr = defaultAccountsSr25519.keyring - await client.pause() + const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) - await checkEvents(proxyActionEvents, 'proxy').toMatchSnapshot(`events when sending proxy action for ${proxyType}`) - // Some proxy types do not allow use of the `utility` pallet, so a representative set of actions must be enacted - // manually, one extrinsic per block, and events checked for each extrinsic. + const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer'] - const events = await client.api.query.system.events() - // All of the batched extrinsics must have been executed successfully - if this event is emitted, then no item in - // the batch failed. - const proxyEvents = events.filter((record) => { - const { event } = record - return event.section === 'utility' && event.method === 'BatchCompleted' - }) - } else { - // TODO + for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { + // For this network, there might be some proxy types not to be tested. + if (!proxyTypesToTest.includes(proxyType)) { + continue } + + test(`proxy call filtering test for ${proxyType}`, async () => { + await proxyCallFilteringSingleTestRunner(client, proxyType, proxyTypeIx, proxyAccounts[proxyType]) + }) } } @@ -652,8 +678,6 @@ export async function proxyE2ETests< await proxyAnnouncementLifecycleTest(client, testConfig.addressEncoding) }) - test('proxy call filtering test', async () => { - await proxyCallFilteringTest(client, proxyTypes) - }) + proxyCallFilteringTestRunner(client, proxyTypes) }) } From cc0a6b68ac0d8b38e95bd45e686351ffc0fc95ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 16 Apr 2025 02:38:03 +0100 Subject: [PATCH 05/39] Test bounty pallet in proxy call filtering test --- packages/shared/src/proxy.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 20787d0f7..2ca895683 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -47,6 +47,11 @@ function buildProxyAction< balanceCalls.push(client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10)) } + const bountyCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] + if (client.api.tx.bounties) { + bountyCalls.push(client.api.tx.bounties.proposeBounty(300e10, 'Test Bounty')) + } + const governanceCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] if (client.api.tx.referenda) { governanceCalls.push( @@ -76,21 +81,25 @@ function buildProxyAction< const result = match(proxyType) .with('Any', () => { const batch = balanceCalls + batch.concat(bountyCalls) // If the network has staking, staking calls will be added to the batch. // Otherwise, this is a no-op. batch.concat(stakingCalls) // Same as above - this pattern will be used where sensible. batch.concat(governanceCalls) + batch.concat(systemCalls) return [client.api.tx.utility.forceBatch(batch)] }) .with('NonTransfer', () => { const batch = systemCalls + batch.concat(bountyCalls) batch.concat(stakingCalls) batch.concat(governanceCalls) return [client.api.tx.utility.forceBatch(batch)] }) .with('Governance', () => { const batch: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] + batch.concat(bountyCalls) batch.concat(governanceCalls) return [client.api.tx.utility.forceBatch(batch)] }) @@ -178,7 +187,7 @@ async function proxyCallFilteringTestRunner< const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer'] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { - // For this network, there might be some proxy types not to be tested. + // In this network, there might be some proxy types that don't/cannot be tested. if (!proxyTypesToTest.includes(proxyType)) { continue } From 7a88a800555e1879b6b4f65a8058db97e8a057bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 16 Apr 2025 16:08:08 +0100 Subject: [PATCH 06/39] Refactor proxy call filtering test structure --- .../assetHubKusama.proxy.e2e.test.ts.snap | 121 +++++++ .../coretimeKusama.proxy.e2e.test.ts.snap | 121 +++++++ .../kusama.proxy.e2e.test.ts.snap | 295 ++++++++++++++++++ .../peopleKusama.proxy.e2e.test.ts.snap | 121 +++++++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 121 +++++++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 121 +++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 113 +++++++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 121 +++++++ .../polkadot.proxy.tests.e2e.test.ts.snap | 295 ++++++++++++++++++ packages/shared/src/proxy.ts | 261 ++++++++++------ 10 files changed, 1600 insertions(+), 90 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 b99956c47..ed41d4040 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -397,6 +397,101 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 93000000)", + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 93000000)", + "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -409,6 +504,32 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events when ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { 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 6a783beb0..6fec08323 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -397,6 +397,101 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 93000000)", + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 93000000)", + "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -409,6 +504,32 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events when ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { 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 c381f375f..c62723830 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -493,6 +493,171 @@ exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob perf exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0403","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 660000000)", + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 520000000)", + "who": "F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29", + }, + "method": "Deposit", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 130000000)", + "who": "FUqYp7AtDTKeeBW63rHEaoBdEf7xMaPJTY5bY6dNsx8jtU2", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0600","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type Any 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Any 1`] = ` +[ + { + "data": { + "index": "(rounded 520)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2300","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Any 1`] = ` +[ + { + "data": { + "index": 35, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -505,6 +670,48 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events when sending ] `; +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Governance 1`] = ` +[ + { + "data": { + "index": "(rounded 520)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2300","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Governance 1`] = ` +[ + { + "data": { + "index": 35, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Governance > events when sending proxy action for Governance 1`] = ` [ { @@ -517,6 +724,94 @@ exports[`Kusama Proxy > proxy call filtering test for Governance > events when s ] `; +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0600","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "index": "(rounded 520)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2300","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "index": 35, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 0f953b2d7..a6487df7e 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -349,6 +349,101 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 92000000)", + "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 92000000)", + "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -361,6 +456,32 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events when s ] `; +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { 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 598724593..399b97766 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -397,6 +397,101 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 14000000)", + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 14000000)", + "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -409,6 +504,32 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events wh ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { 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 244ad8942..a6923be8b 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -397,6 +397,101 @@ exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 14000000)", + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 14000000)", + "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -409,6 +504,32 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { 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 dc01551c8..86a2bdd84 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -397,6 +397,93 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 23000000)", + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -409,6 +496,32 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events wh ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { 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 cf0fff048..cfdd793bc 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -349,6 +349,101 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 23000000)", + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 23000000)", + "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -361,6 +456,32 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events when ] `; +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 5dc5c0a32..2daa1ab1e 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -397,6 +397,171 @@ exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob pe exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 270000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0503","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +[ + { + "data": { + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Upgraded", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 200000000)", + "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + }, + "method": "Withdraw", + "section": "balances", + }, + { + "data": { + "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "freeBalance": 1000000000000, + }, + "method": "Endowed", + "section": "balances", + }, + { + "data": { + "amount": 1000000000000, + "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + }, + "method": "Transfer", + "section": "balances", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "amount": "(rounded 160000000)", + "who": "13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB", + }, + "method": "Deposit", + "section": "balances", + }, + { + "data": { + "amount": "(rounded 39000000)", + "who": "1ZKHNRib33noQn1FpjFsPCHuVYUfci5TXy4Lif1FcUUwZe6", + }, + "method": "Deposit", + "section": "balances", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0700","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type Any 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1a00","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Any 1`] = ` +[ + { + "data": { + "index": "(rounded 1500)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2200","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Any 1`] = ` +[ + { + "data": { + "index": 66, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` [ { @@ -409,6 +574,48 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events when sendin ] `; +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Governance 1`] = ` +[ + { + "data": { + "index": "(rounded 1500)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2200","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Governance 1`] = ` +[ + { + "data": { + "index": 66, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Governance > events when sending proxy action for Governance 1`] = ` [ { @@ -421,6 +628,94 @@ exports[`Polkadot Proxy > proxy call filtering test for Governance > events when ] `; +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 270000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0700","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "index": "(rounded 1500)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2200","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type NonTransfer 1`] = ` +[ + { + "data": { + "index": 66, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 2ca895683..7fcd9446e 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -38,71 +38,143 @@ function createProxyAccounts( ) } -function buildProxyAction< +/** + * Shorthand for a list of PJS-type fully-formed extrinsics. + */ + +interface ProxyAction { + pallet: string + extrinsic: string + call: SubmittableExtrinsic<'promise', ISubmittableResult> +} + +interface ProxyActionBuilder { + buildBalanceAction(): ProxyAction[] + buildBountyAction(): ProxyAction[] + buildGovernanceAction(): ProxyAction[] + buildStakingAction(): ProxyAction[] + buildSystemAction(): ProxyAction[] + buildUtilityAction(): ProxyAction[] +} + +class ProxyActionBuilderImpl< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(proxyType: string, client: Client): SubmittableExtrinsic<'promise', ISubmittableResult>[] { - const balanceCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] - if (client.api.tx.balances) { - balanceCalls.push(client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10)) +> implements ProxyActionBuilder +{ + constructor(private client: Client) {} + + buildBalanceAction(): ProxyAction[] { + const balanceCalls: ProxyAction[] = [] + if (this.client.api.tx.balances) { + balanceCalls.push({ + pallet: 'balances', + extrinsic: 'transferKeepAlive', + call: this.client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10), + }) + } + + return balanceCalls } - const bountyCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] - if (client.api.tx.bounties) { - bountyCalls.push(client.api.tx.bounties.proposeBounty(300e10, 'Test Bounty')) + buildBountyAction(): ProxyAction[] { + const bountyCalls: ProxyAction[] = [] + if (this.client.api.tx.bounties) { + bountyCalls.push({ + pallet: 'bounties', + extrinsic: 'proposeBounty', + call: this.client.api.tx.bounties.proposeBounty(100e10, 'Test Bounty'), + }) + } + + return bountyCalls } - const governanceCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] - if (client.api.tx.referenda) { - governanceCalls.push( - client.api.tx.referenda.submit( - { - Origins: 'SmallTipper', - } as any, - { - Inline: client.api.tx.system.remark('hello').method.toHex(), - }, - { - After: 0, - }, - ), - ) + buildGovernanceAction(): ProxyAction[] { + const governanceCalls: ProxyAction[] = [] + if (this.client.api.tx.referenda) { + governanceCalls.push({ + pallet: 'referenda', + extrinsic: 'submit', + call: this.client.api.tx.referenda.submit( + { + Origins: 'SmallTipper', + } as any, + { + Inline: this.client.api.tx.system.remark('hello').method.toHex(), + }, + { + After: 0, + }, + ), + }) + } + + return governanceCalls } - const stakingCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] - if (client.api.tx.staking) { - stakingCalls.push(client.api.tx.staking.bond(100e10, 'Staked')) + buildStakingAction(): ProxyAction[] { + const stakingCalls: ProxyAction[] = [] + if (this.client.api.tx.staking) { + stakingCalls.push({ + pallet: 'staking', + extrinsic: 'bond', + call: this.client.api.tx.staking.bond(100e10, 'Staked'), + }) + } + + return stakingCalls } - const systemCalls: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [ - client.api.tx.system.remarkWithEvent('hello'), - ] + buildSystemAction(): ProxyAction[] { + return [ + { + pallet: 'system', + extrinsic: 'remark', + call: this.client.api.tx.system.remark('hello'), + }, + ] + } + buildUtilityAction(): ProxyAction[] { + return [ + { + pallet: 'utility', + extrinsic: 'forceBatch', + call: this.client.api.tx.utility.batch([]), + }, + ] + } +} + +function buildProxyAction< + TCustom extends Record | undefined, + TInitStorages extends Record> | undefined, +>(proxyType: string, client: Client): ProxyAction[] { + const proxyActionBuilder = new ProxyActionBuilderImpl(client) + + // Note the pattern used: if the network has a certain pallet available, the list returned by the proxy action + // builder won't be empty. + // Otherwise, it will be empty, and this is a no-op. const result = match(proxyType) - .with('Any', () => { - const batch = balanceCalls - batch.concat(bountyCalls) - // If the network has staking, staking calls will be added to the batch. - // Otherwise, this is a no-op. - batch.concat(stakingCalls) - // Same as above - this pattern will be used where sensible. - batch.concat(governanceCalls) - batch.concat(systemCalls) - return [client.api.tx.utility.forceBatch(batch)] - }) - .with('NonTransfer', () => { - const batch = systemCalls - batch.concat(bountyCalls) - batch.concat(stakingCalls) - batch.concat(governanceCalls) - return [client.api.tx.utility.forceBatch(batch)] - }) - .with('Governance', () => { - const batch: SubmittableExtrinsic<'promise', ISubmittableResult>[] = [] - batch.concat(bountyCalls) - batch.concat(governanceCalls) - return [client.api.tx.utility.forceBatch(batch)] - }) + .with('Any', () => [ + ...proxyActionBuilder.buildBalanceAction(), + ...proxyActionBuilder.buildBountyAction(), + ...proxyActionBuilder.buildStakingAction(), + ...proxyActionBuilder.buildGovernanceAction(), + ...proxyActionBuilder.buildSystemAction(), + ...proxyActionBuilder.buildUtilityAction(), + ]) + .with('NonTransfer', () => [ + ...proxyActionBuilder.buildSystemAction(), + ...proxyActionBuilder.buildBountyAction(), + ...proxyActionBuilder.buildStakingAction(), + ...proxyActionBuilder.buildGovernanceAction(), + ]) + .with('Governance', () => [ + ...proxyActionBuilder.buildBountyAction(), + ...proxyActionBuilder.buildGovernanceAction(), + ]) .otherwise(() => []) return result @@ -121,7 +193,9 @@ function buildProxyAction< async function proxyCallFilteringSingleTestRunner< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(client: Client, proxyType: string, proxyTypeIx: number, proxyAccount: KeyringPair) { +>(chain: Chain, proxyType: string, proxyTypeIx: number, proxyAccount: KeyringPair) { + const [client] = await setupNetworks(chain) + const alice = defaultAccountsSr25519.alice const addProxyTx = client.api.tx.proxy.addProxy(proxyAccount.address, proxyTypeIx, 0) @@ -130,56 +204,57 @@ async function proxyCallFilteringSingleTestRunner< await client.dev.newBlock() const proxyActions = buildProxyAction(proxyType, client) - // If there's a single extrinsic, then it is a batch of calls, since the proxy type in question allows the `utility` - // pallet. - if (proxyActions.length === 1) { - await client.dev.setStorage({ - System: { - account: [[[proxyAccount.address], { providers: 1, data: { free: 1000e10 } }]], - }, - }) + if (proxyActions.length === 0) { + return + } + + await client.dev.setStorage({ + System: { + account: [[[proxyAccount.address], { providers: 1, data: { free: 10000e10 } }]], + }, + }) - // Recall that `proxyActions` is an array of extrinsics, which at this point is known to be of length 1. - // That single extrinsic - a utility batch - contains the actions to be performed by the proxy on behalf of the + for (const proxyAction of proxyActions) { + // Recall that `proxyActions` is an array of extrinsics meant to be executed by the proxy, on behalf of the // delegating account. - const proxyTx = client.api.tx.proxy.proxy(alice.address, proxyTypeIx, proxyActions[0]) + const proxyTx = client.api.tx.proxy.proxy(alice.address, proxyTypeIx, proxyAction.call) const proxyActionEvents = await sendTransaction(proxyTx.signAsync(proxyAccount)) await client.dev.newBlock() - await checkEvents(proxyActionEvents, 'proxy').toMatchSnapshot(`events when sending proxy action for ${proxyType}`) + await checkEvents(proxyActionEvents, 'proxy', proxyAction.pallet).toMatchSnapshot( + `events for proxy action: pallet ${proxyAction.call}, call ${proxyAction.extrinsic}, proxy type ${proxyType}`, + ) const events = await client.api.query.system.events() events .filter((record) => { const { event } = record - return event.section === 'utility' && (event.method === 'ItemCompleted' || event.method === 'ItemFailed') + return event.section === 'proxy' && event.method === 'ProxyExecuted' }) .forEach((record) => { - if (client.api.events.utility.ItemFailed.is(record.event)) { - const itemFailedData = record.event.data - assert(itemFailedData.error.isModule) + assert(client.api.events.proxy.ProxyExecuted.is(record.event)) + const proxyExecutedData = record.event.data + if (proxyExecutedData.result.isErr) { + const error = proxyExecutedData.result.asErr + assert(error.isModule) - // The call can have failed due to e.g. being semantically incorrect, but it can *never* have failed + // A call can have failed due to e.g. being semantically incorrect, but it can *never* have failed // due to having been filtered, as each proxy type is only given calls it is allowed to execute. - expect(client.api.errors.system.CallFiltered.is(itemFailedData.error.asModule)).toBe(false) + expect(client.api.errors.system.CallFiltered.is(error.asModule)).toBe(false) } else { // The call was executed successfully - nothing to check. - expect(client.api.events.utility.ItemCompleted.is(record.event)).toBe(true) + expect(proxyExecutedData.result.isOk).toBe(true) } }) - } else { - // Some proxy types do not allow use of the `utility` pallet, so a representative set of actions must be enacted - // manually, one extrinsic per block, and events checked for each extrinsic. - // TODO } } async function proxyCallFilteringTestRunner< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(client: Client, proxyTypes: Record) { +>(chain: Chain, proxyTypes: Record) { const kr = defaultAccountsSr25519.keyring const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) @@ -193,7 +268,7 @@ async function proxyCallFilteringTestRunner< } test(`proxy call filtering test for ${proxyType}`, async () => { - await proxyCallFilteringSingleTestRunner(client, proxyType, proxyTypeIx, proxyAccounts[proxyType]) + await proxyCallFilteringSingleTestRunner(chain, proxyType, proxyTypeIx, proxyAccounts[proxyType]) }) } } @@ -218,7 +293,9 @@ async function proxyCallFilteringTestRunner< export async function addRemoveProxyTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(client: Client, addressEncoding: number, proxyTypes: Record, delay: number) { +>(chain: Chain, addressEncoding: number, proxyTypes: Record, delay: number) { + const [client] = await setupNetworks(chain) + const alice = defaultAccountsSr25519.alice const kr = defaultAccountsSr25519.keyring @@ -355,7 +432,9 @@ export async function addRemoveProxyTest< export async function createKillPureProxyTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(client: Client, addressEncoding: number, proxyTypes: Record) { +>(chain: Chain, addressEncoding: number, proxyTypes: Record) { + const [client] = await setupNetworks(chain) + const alice = defaultAccountsSr25519.alice // Create pure proxies @@ -491,7 +570,9 @@ export async function createKillPureProxyTest< export async function proxyCallTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(client: Client) { +>(chain: Chain) { + const [client] = await setupNetworks(chain) + const alice = defaultAccountsSr25519.alice const bob = defaultAccountsSr25519.bob const charlie = defaultAccountsSr25519.charlie @@ -548,7 +629,9 @@ export async function proxyCallTest< export async function proxyAnnouncementLifecycleTest< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(client: Client, addressEncoding: number) { +>(chain: Chain, addressEncoding: number) { + const [client] = await setupNetworks(chain) + const alice = defaultAccountsSr25519.alice const bob = defaultAccountsSr25519.bob const charlie = defaultAccountsSr25519.charlie @@ -669,24 +752,22 @@ export async function proxyE2ETests< proxyTypes: Record, ) { describe(testConfig.testSuiteName, async () => { - const [client] = await setupNetworks(chain) - test('add proxies (with/without delay) to an account, and remove them', async () => { - await addRemoveProxyTest(client, testConfig.addressEncoding, proxyTypes, PROXY_DELAY) + await addRemoveProxyTest(chain, testConfig.addressEncoding, proxyTypes, PROXY_DELAY) }) test('create and kill pure proxies', async () => { - await createKillPureProxyTest(client, testConfig.addressEncoding, proxyTypes) + await createKillPureProxyTest(chain, testConfig.addressEncoding, proxyTypes) }) test('perform proxy call on behalf of delegator', async () => { - await proxyCallTest(client) + await proxyCallTest(chain) }) test('proxy announcement lifecycle test', async () => { - await proxyAnnouncementLifecycleTest(client, testConfig.addressEncoding) + await proxyAnnouncementLifecycleTest(chain, testConfig.addressEncoding) }) - proxyCallFilteringTestRunner(client, proxyTypes) + proxyCallFilteringTestRunner(chain, proxyTypes) }) } From 27433559f00834a0762a23505d2f3b76b671ea61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 16 Apr 2025 16:16:37 +0100 Subject: [PATCH 07/39] Regenerate proxy snapshots --- .../assetHubKusama.proxy.e2e.test.ts.snap | 24 ------------- .../coretimeKusama.proxy.e2e.test.ts.snap | 24 ------------- .../kusama.proxy.e2e.test.ts.snap | 36 ------------------- .../peopleKusama.proxy.e2e.test.ts.snap | 24 ------------- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 24 ------------- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 24 ------------- .../coretimePolkadot.proxy.e2e.test.ts.snap | 24 ------------- .../peoplePolkadot.proxy.e2e.test.ts.snap | 24 ------------- .../polkadot.proxy.tests.e2e.test.ts.snap | 36 ------------------- 9 files changed, 240 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 ed41d4040..420268551 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -492,18 +492,6 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -529,15 +517,3 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > eve }, ] `; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 6fec08323..e549ee84e 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -492,18 +492,6 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -529,15 +517,3 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > eve }, ] `; - -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 c62723830..c7ad8cab1 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -658,18 +658,6 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Governance 1`] = ` [ { @@ -712,18 +700,6 @@ exports[`Kusama Proxy > proxy call filtering test for Governance > events for pr ] `; -exports[`Kusama Proxy > proxy call filtering test for Governance > events when sending proxy action for Governance 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -811,15 +787,3 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p }, ] `; - -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 a6487df7e..cf8470f80 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -444,18 +444,6 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -481,15 +469,3 @@ exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > event }, ] `; - -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 399b97766..c36ef83ad 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -492,18 +492,6 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -529,15 +517,3 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > e }, ] `; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 a6923be8b..a707bc4cc 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -492,18 +492,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -529,15 +517,3 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer }, ] `; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 86a2bdd84..c681d6c45 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -484,18 +484,6 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -521,15 +509,3 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > e }, ] `; - -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 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 cfdd793bc..d5b731a52 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -444,18 +444,6 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -481,15 +469,3 @@ exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > eve }, ] `; - -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 2daa1ab1e..f19a63d68 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -562,18 +562,6 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events when sending proxy action for Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Governance 1`] = ` [ { @@ -616,18 +604,6 @@ exports[`Polkadot Proxy > proxy call filtering test for Governance > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for Governance > events when sending proxy action for Governance 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` [ { @@ -715,15 +691,3 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for }, ] `; - -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events when sending proxy action for NonTransfer 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; From ca03501b159d50dd23519f8af93d963a13db9312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 16 Apr 2025 16:36:54 +0100 Subject: [PATCH 08/39] Rework proxy filtering snapshot names --- .../assetHubKusama.proxy.e2e.test.ts.snap | 58 +++--- .../coretimeKusama.proxy.e2e.test.ts.snap | 58 +++--- .../kusama.proxy.e2e.test.ts.snap | 158 ++++++++-------- .../peopleKusama.proxy.e2e.test.ts.snap | 58 +++--- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 58 +++--- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 58 +++--- .../coretimePolkadot.proxy.e2e.test.ts.snap | 58 +++--- .../peoplePolkadot.proxy.e2e.test.ts.snap | 58 +++--- .../polkadot.proxy.tests.e2e.test.ts.snap | 172 +++++++++--------- packages/shared/src/proxy.ts | 2 +- 10 files changed, 369 insertions(+), 369 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 420268551..c52b0ccbc 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -397,33 +397,7 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -475,7 +449,33 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { "data": {}, @@ -492,7 +492,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { 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 e549ee84e..bf9ebdf70 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -397,33 +397,7 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -475,7 +449,33 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { "data": {}, @@ -492,7 +492,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { 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 c7ad8cab1..4f083b20d 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -493,33 +493,7 @@ exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob perf exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0403","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -579,15 +553,14 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0600","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type Any 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet bounties, call proposeBounty 1`] = ` [ { "data": { - "amount": 1000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "index": 35, }, - "method": "Bonded", - "section": "staking", + "method": "BountyProposed", + "section": "bounties", }, { "data": { @@ -599,7 +572,7 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Any 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { "data": { @@ -622,12 +595,15 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet staking, call bond 1`] = ` [ { - "data": {}, - "method": "BatchCompleted", - "section": "utility", + "data": { + "amount": 1000000000000, + "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Bonded", + "section": "staking", }, { "data": { @@ -639,37 +615,38 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2300","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Any 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { "data": { - "index": 35, + "result": "Ok", }, - "method": "BountyProposed", - "section": "bounties", + "method": "ProxyExecuted", + "section": "proxy", }, { "data": { - "result": "Ok", + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, }, - "method": "ProxyExecuted", - "section": "proxy", + "method": "ExtrinsicSuccess", + "section": "system", }, ] `; -exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Governance 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { - "data": { - "index": "(rounded 520)", - "proposal": { - "Inline": "0x00001468656c6c6f", - }, - "track": 30, - }, - "method": "Submitted", - "section": "referenda", + "data": {}, + "method": "BatchCompleted", + "section": "utility", }, { "data": { @@ -681,7 +658,7 @@ exports[`Kusama Proxy > proxy call filtering test for Governance > events for pr ] `; -exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2300","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Governance 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call proposeBounty 1`] = ` [ { "data": { @@ -700,41 +677,37 @@ exports[`Kusama Proxy > proxy call filtering test for Governance > events for pr ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet referenda, call submit 1`] = ` [ { "data": { - "result": "Ok", + "index": "(rounded 520)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, }, - "method": "ProxyExecuted", - "section": "proxy", + "method": "Submitted", + "section": "referenda", }, { "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, + "result": "Ok", }, - "method": "ExtrinsicSuccess", - "section": "system", + "method": "ProxyExecuted", + "section": "proxy", }, ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0600","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type NonTransfer 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` [ { "data": { - "amount": 1000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "index": 35, }, - "method": "Bonded", - "section": "staking", + "method": "BountyProposed", + "section": "bounties", }, { "data": { @@ -746,7 +719,7 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type NonTransfer 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` [ { "data": { @@ -769,14 +742,15 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2300","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type NonTransfer 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet staking, call bond 1`] = ` [ { "data": { - "index": 35, + "amount": 1000000000000, + "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", }, - "method": "BountyProposed", - "section": "bounties", + "method": "Bonded", + "section": "staking", }, { "data": { @@ -787,3 +761,29 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p }, ] `; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; 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 cf8470f80..e7663c011 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -349,33 +349,7 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 280000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -427,7 +401,33 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { "data": {}, @@ -444,7 +444,7 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"CaKWz5omakTK7ovp4m3koXrHyHb7NG3Nt7GENHbviByZpKp"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { 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 c36ef83ad..3679c9d01 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -397,33 +397,7 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -475,7 +449,33 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { "data": {}, @@ -492,7 +492,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"assetId":null,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { 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 a707bc4cc..22a541a3c 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -397,33 +397,7 @@ exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -475,7 +449,33 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { "data": {}, @@ -492,7 +492,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { 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 c681d6c45..0b72dd70f 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -397,33 +397,7 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -467,7 +441,33 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { "data": {}, @@ -484,7 +484,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { 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 d5b731a52..9a9c24241 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -349,33 +349,7 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 280000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0a03","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -427,7 +401,33 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2800","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { "data": {}, @@ -444,7 +444,7 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { "data": { diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index f19a63d68..9f7a6a2ce 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -397,33 +397,7 @@ exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob pe exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type Any 1`] = ` -[ - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 270000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0503","args":{"dest":{"id":"16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L"},"value":1000000000000}}}, call transferKeepAlive, proxy type Any 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { "data": { @@ -483,32 +457,14 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0700","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type Any 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet bounties, call proposeBounty 1`] = ` [ { "data": { - "amount": 1000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Bonded", - "section": "staking", - }, - { - "data": { - "result": "Ok", + "index": 66, }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1a00","args":{"calls":[]}}}, call forceBatch, proxy type Any 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", + "method": "BountyProposed", + "section": "bounties", }, { "data": { @@ -520,7 +476,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Any 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { "data": { @@ -543,14 +499,15 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2200","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Any 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet staking, call bond 1`] = ` [ { "data": { - "index": 66, + "amount": 1000000000000, + "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", }, - "method": "BountyProposed", - "section": "bounties", + "method": "Bonded", + "section": "staking", }, { "data": { @@ -562,18 +519,38 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type Governance 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { "data": { - "index": "(rounded 1500)", - "proposal": { - "Inline": "0x00001468656c6c6f", + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 270000000)", + }, }, - "track": 30, }, - "method": "Submitted", - "section": "referenda", + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", }, { "data": { @@ -585,7 +562,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Governance > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2200","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type Governance 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call proposeBounty 1`] = ` [ { "data": { @@ -604,41 +581,37 @@ exports[`Polkadot Proxy > proxy call filtering test for Governance > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0000","args":{"remark":"0x68656c6c6f"}}}, call remark, proxy type NonTransfer 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet referenda, call submit 1`] = ` [ { "data": { - "result": "Ok", + "index": "(rounded 1500)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, }, - "method": "ProxyExecuted", - "section": "proxy", + "method": "Submitted", + "section": "referenda", }, { "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 270000000)", - }, - }, + "result": "Ok", }, - "method": "ExtrinsicSuccess", - "section": "system", + "method": "ProxyExecuted", + "section": "proxy", }, ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x0700","args":{"value":1000000000000,"payee":{"staked":null}}}}, call bond, proxy type NonTransfer 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` [ { "data": { - "amount": 1000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "index": 66, }, - "method": "Bonded", - "section": "staking", + "method": "BountyProposed", + "section": "bounties", }, { "data": { @@ -650,7 +623,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x1500","args":{"proposal_origin":{"origins":"SmallTipper"},"proposal":{"inline":"0x00001468656c6c6f"},"enactment_moment":{"after":0}}}}, call submit, proxy type NonTransfer 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` [ { "data": { @@ -673,14 +646,15 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: pallet {"signature":{"signer":{"id":"111111111111111111111111111111111HC1"},"signature":{"ed25519":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"era":{"immortalEra":"0x00"},"nonce":0,"tip":0,"mode":0},"method":{"callIndex":"0x2200","args":{"value":1000000000000,"description":"0x5465737420426f756e7479"}}}, call proposeBounty, proxy type NonTransfer 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet staking, call bond 1`] = ` [ { "data": { - "index": 66, + "amount": 1000000000000, + "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", }, - "method": "BountyProposed", - "section": "bounties", + "method": "Bonded", + "section": "staking", }, { "data": { @@ -691,3 +665,29 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for }, ] `; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 270000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 7fcd9446e..38d7e48e8 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -224,7 +224,7 @@ async function proxyCallFilteringSingleTestRunner< await client.dev.newBlock() await checkEvents(proxyActionEvents, 'proxy', proxyAction.pallet).toMatchSnapshot( - `events for proxy action: pallet ${proxyAction.call}, call ${proxyAction.extrinsic}, proxy type ${proxyType}`, + `events for proxy action: proxy type ${proxyType}, pallet ${proxyAction.pallet}, call ${proxyAction.extrinsic}`, ) const events = await client.api.query.system.events() From 3422832dfdf3f077f0e7cec5e8bc2daf4bb66018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 16 Apr 2025 18:28:27 +0100 Subject: [PATCH 09/39] Reduce amount of blocks required in proxy filtering tests --- packages/shared/src/proxy.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 38d7e48e8..8c8cf66d1 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -7,7 +7,7 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types' import type { KeyringPair } from '@polkadot/keyring/types' import type { Vec } from '@polkadot/types' import type { PalletProxyProxyDefinition } from '@polkadot/types/lookup' -import type { ISubmittableResult } from '@polkadot/types/types' +import type { Codec, ISubmittableResult } from '@polkadot/types/types' import { encodeAddress } from '@polkadot/util-crypto' import { assert, describe, expect, test } from 'vitest' import { check, checkEvents } from './helpers/index.js' @@ -214,17 +214,31 @@ async function proxyCallFilteringSingleTestRunner< }, }) + let proxyAccountNonce = (await client.api.rpc.system.accountNextIndex(proxyAccount.address)).toNumber() + + // Create a record to store transaction results + const transactionResults: Record }> = {} + + // First, send all of the proxy extrinsics. for (const proxyAction of proxyActions) { // Recall that `proxyActions` is an array of extrinsics meant to be executed by the proxy, on behalf of the // delegating account. const proxyTx = client.api.tx.proxy.proxy(alice.address, proxyTypeIx, proxyAction.call) - const proxyActionEvents = await sendTransaction(proxyTx.signAsync(proxyAccount)) + transactionResults[`${proxyAction.pallet}.${proxyAction.extrinsic}`] = await sendTransaction( + proxyTx.signAsync(proxyAccount, { nonce: proxyAccountNonce++ }), + ) + } - await client.dev.newBlock() + // Advance through a single block. + await client.dev.newBlock() + + // Then, for all of the emitted events, verify proxy call execution results. + for (const [actionKey, proxyActionEvents] of Object.entries(transactionResults)) { + const [pallet, extrinsic] = actionKey.split('.') - await checkEvents(proxyActionEvents, 'proxy', proxyAction.pallet).toMatchSnapshot( - `events for proxy action: proxy type ${proxyType}, pallet ${proxyAction.pallet}, call ${proxyAction.extrinsic}`, + await checkEvents(proxyActionEvents, 'proxy', pallet).toMatchSnapshot( + `events for proxy action: proxy type ${proxyType}, pallet ${pallet}, call ${extrinsic}`, ) const events = await client.api.query.system.events() From 7d65c20a2a0e83fbae514c71b15dd0191f65fe5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 16 Apr 2025 19:01:05 +0100 Subject: [PATCH 10/39] Test Staking and NominationPools proxy call filtering --- .../kusama.proxy.e2e.test.ts.snap | 111 ++++++++++++++++++ .../polkadot.proxy.tests.e2e.test.ts.snap | 111 ++++++++++++++++++ packages/shared/src/proxy.ts | 43 ++++++- 3 files changed, 263 insertions(+), 2 deletions(-) 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 4f083b20d..663a3b32b 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -700,6 +700,42 @@ exports[`Kusama Proxy > proxy call filtering test for Governance > events for pr ] `; +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` [ { @@ -787,3 +823,78 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p }, ] `; + +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call bond 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call fastUnstake 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 9f7a6a2ce..1ba21bf50 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -604,6 +604,42 @@ exports[`Polkadot Proxy > proxy call filtering test for Governance > events for ] `; +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 39, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` [ { @@ -691,3 +727,78 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for }, ] `; + +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call bond 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 39, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call bond 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call fastUnstake 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 40, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 8c8cf66d1..2c9335362 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -40,8 +40,9 @@ function createProxyAccounts( /** * Shorthand for a list of PJS-type fully-formed extrinsics. + * + * The pallet and extrinsic names are kept to better identify the correspoding snapshot. */ - interface ProxyAction { pallet: string extrinsic: string @@ -51,7 +52,9 @@ interface ProxyAction { interface ProxyActionBuilder { buildBalanceAction(): ProxyAction[] buildBountyAction(): ProxyAction[] + buildFastUnstakeAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] + buildNominationPoolsAction(): ProxyAction[] buildStakingAction(): ProxyAction[] buildSystemAction(): ProxyAction[] buildUtilityAction(): ProxyAction[] @@ -90,6 +93,19 @@ class ProxyActionBuilderImpl< return bountyCalls } + buildFastUnstakeAction(): ProxyAction[] { + const fastUnstakeCalls: ProxyAction[] = [] + if (this.client.api.tx.staking) { + fastUnstakeCalls.push({ + pallet: 'staking', + extrinsic: 'fastUnstake', + call: this.client.api.tx.fastUnstake.registerFastUnstake(), + }) + } + + return fastUnstakeCalls + } + buildGovernanceAction(): ProxyAction[] { const governanceCalls: ProxyAction[] = [] if (this.client.api.tx.referenda) { @@ -113,6 +129,19 @@ class ProxyActionBuilderImpl< return governanceCalls } + buildNominationPoolsAction(): ProxyAction[] { + const nominationPoolsCalls: ProxyAction[] = [] + if (this.client.api.tx.nominationPools) { + nominationPoolsCalls.push({ + pallet: 'nominationPools', + extrinsic: 'bond', + call: this.client.api.tx.nominationPools.chill(1), + }) + } + + return nominationPoolsCalls + } + buildStakingAction(): ProxyAction[] { const stakingCalls: ProxyAction[] = [] if (this.client.api.tx.staking) { @@ -175,6 +204,16 @@ function buildProxyAction< ...proxyActionBuilder.buildBountyAction(), ...proxyActionBuilder.buildGovernanceAction(), ]) + .with('Staking', () => [ + ...proxyActionBuilder.buildFastUnstakeAction(), + ...proxyActionBuilder.buildNominationPoolsAction(), + ...proxyActionBuilder.buildStakingAction(), + ...proxyActionBuilder.buildUtilityAction(), + ]) + .with('NominationPools', () => [ + ...proxyActionBuilder.buildNominationPoolsAction(), + ...proxyActionBuilder.buildUtilityAction(), + ]) .otherwise(() => []) return result @@ -273,7 +312,7 @@ async function proxyCallFilteringTestRunner< const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) - const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer'] + const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer', 'Staking', 'NominationPools'] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { // In this network, there might be some proxy types that don't/cannot be tested. From 9a7c60f42fd2e44adf781c5435710ea2d7e6dc1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 16 Apr 2025 23:31:10 +0100 Subject: [PATCH 11/39] Test `CancelProxy` proxy call filtering --- .../assetHubKusama.proxy.e2e.test.ts.snap | 19 +++++++ .../coretimeKusama.proxy.e2e.test.ts.snap | 19 +++++++ .../kusama.proxy.e2e.test.ts.snap | 19 +++++++ .../peopleKusama.proxy.e2e.test.ts.snap | 19 +++++++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 19 +++++++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 19 +++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 19 +++++++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 19 +++++++ .../polkadot.proxy.tests.e2e.test.ts.snap | 19 +++++++ packages/shared/src/proxy.ts | 53 ++++++++++++++++--- 10 files changed, 217 insertions(+), 7 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 c52b0ccbc..732292dd4 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -492,6 +492,25 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 bf9ebdf70..76ab800ec 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -492,6 +492,25 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 663a3b32b..738fcc619 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -658,6 +658,25 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; +exports[`Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 30, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call proposeBounty 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 e7663c011..d2dab2ede 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -444,6 +444,25 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; +exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 3679c9d01..1d82a7294 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -492,6 +492,25 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 22a541a3c..fd5e2a0a9 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -492,6 +492,25 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 0b72dd70f..0002b9778 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -484,6 +484,25 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 9a9c24241..8fe07056c 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -444,6 +444,25 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; +exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 1ba21bf50..41be32890 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -562,6 +562,25 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; +exports[`Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 29, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call proposeBounty 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 2c9335362..321ca33ac 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -49,9 +49,21 @@ interface ProxyAction { call: SubmittableExtrinsic<'promise', ISubmittableResult> } +/** + * A builder for proxy action lists. + * + * Each builder method returns a list of actions from a certain pallet that should/should not bevalid for a given proxy + * type. + * Returning lists allows for: + * 1. no-ops in the form of empty lists, and + * 2. providing multipled extrinsics of interest per pallet + * + * The test for each proxy type is then free to combine these lists as required. + */ interface ProxyActionBuilder { - buildBalanceAction(): ProxyAction[] + buildBalancesAction(): ProxyAction[] buildBountyAction(): ProxyAction[] + buildCancelProxyAction(): ProxyAction[] buildFastUnstakeAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] buildNominationPoolsAction(): ProxyAction[] @@ -67,7 +79,7 @@ class ProxyActionBuilderImpl< { constructor(private client: Client) {} - buildBalanceAction(): ProxyAction[] { + buildBalancesAction(): ProxyAction[] { const balanceCalls: ProxyAction[] = [] if (this.client.api.tx.balances) { balanceCalls.push({ @@ -93,6 +105,20 @@ class ProxyActionBuilderImpl< return bountyCalls } + buildCancelProxyAction(): ProxyAction[] { + const cancelProxyCalls: ProxyAction[] = [] + const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' + if (this.client.api.tx.proxy) { + cancelProxyCalls.push({ + pallet: 'proxy', + extrinsic: 'rejectAnnouncement', + call: this.client.api.tx.proxy.rejectAnnouncement(defaultAccountsSr25519.eve.address, hash), + }) + } + + return cancelProxyCalls + } + buildFastUnstakeAction(): ProxyAction[] { const fastUnstakeCalls: ProxyAction[] = [] if (this.client.api.tx.staking) { @@ -176,6 +202,12 @@ class ProxyActionBuilderImpl< } } +/** + * Given a proxy type and a PJS client, create a list of actions that should/should not be valid for a given proxy + * type. + * + * Pattern matches on the proxy type (as string); if incorrect or nonexistent, the result is an empty list. + */ function buildProxyAction< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, @@ -187,7 +219,7 @@ function buildProxyAction< // Otherwise, it will be empty, and this is a no-op. const result = match(proxyType) .with('Any', () => [ - ...proxyActionBuilder.buildBalanceAction(), + ...proxyActionBuilder.buildBalancesAction(), ...proxyActionBuilder.buildBountyAction(), ...proxyActionBuilder.buildStakingAction(), ...proxyActionBuilder.buildGovernanceAction(), @@ -214,6 +246,7 @@ function buildProxyAction< ...proxyActionBuilder.buildNominationPoolsAction(), ...proxyActionBuilder.buildUtilityAction(), ]) + .with('CancelProxy', () => [...proxyActionBuilder.buildCancelProxyAction()]) .otherwise(() => []) return result @@ -222,9 +255,9 @@ function buildProxyAction< /** * For a particular proxy type: * 1. As Alice, add a proxy account of that type - * 2. As the proxy account, execute an action - on behalf of Alice - that such a proxy type is allowed to execute - * 3. Verify that the action was correctly executed - * - The extrinsic is not required to be well-formed; the transaction can fail, just not because the call was + * 2. As the proxy account, execute actions - on behalf of Alice - that such a proxy type is allowed to execute + * 3. Verify that the actions were correctly executed + * - The extrinsics are not required to be well-formed; the transaction can fail, though not because the call was * filtered over the proxy's lack of permission. * * To see which proxy-type-contingent actions are used, see `buildProxyAction`. @@ -304,6 +337,12 @@ async function proxyCallFilteringSingleTestRunner< } } +/** + * Main test runner for proxy call filtering. + * + * 1. creates proxies of every type (available in the current network) for Alice + * 2. runs the test for each proxy type (if the proxy type is testable) + */ async function proxyCallFilteringTestRunner< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, @@ -312,7 +351,7 @@ async function proxyCallFilteringTestRunner< const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) - const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer', 'Staking', 'NominationPools'] + const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer', 'Staking', 'NominationPools', 'CancelProxy'] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { // In this network, there might be some proxy types that don't/cannot be tested. From 97db08d75e2753b26d8b223fa24edda5fff63bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 17 Apr 2025 15:17:18 +0100 Subject: [PATCH 12/39] Test `Auction` proxy type filtering --- .../kusama.proxy.e2e.test.ts.snap | 57 +++++++++++++++++++ .../polkadot.proxy.tests.e2e.test.ts.snap | 57 +++++++++++++++++++ packages/shared/src/proxy.ts | 51 ++++++++++++++++- 3 files changed, 164 insertions(+), 1 deletion(-) 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 738fcc619..24f0a9b0f 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -658,6 +658,63 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; +exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet auctions, call bid 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet crowdloan, call dissolve 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 73, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call lease 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 71, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` [ { diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 41be32890..8f98d199b 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -562,6 +562,63 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; +exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet auctions, call bid 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet crowdloan, call dissolve 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 73, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call lease 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x06000000", + "index": 70, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 321ca33ac..de02fb30d 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -61,12 +61,15 @@ interface ProxyAction { * The test for each proxy type is then free to combine these lists as required. */ interface ProxyActionBuilder { + buildAuctionAction(): ProxyAction[] buildBalancesAction(): ProxyAction[] buildBountyAction(): ProxyAction[] buildCancelProxyAction(): ProxyAction[] + buildCrowdloanAction(): ProxyAction[] buildFastUnstakeAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] buildNominationPoolsAction(): ProxyAction[] + buildSlotsAction(): ProxyAction[] buildStakingAction(): ProxyAction[] buildSystemAction(): ProxyAction[] buildUtilityAction(): ProxyAction[] @@ -79,6 +82,19 @@ class ProxyActionBuilderImpl< { constructor(private client: Client) {} + buildAuctionAction(): ProxyAction[] { + const auctionCalls: ProxyAction[] = [] + if (this.client.api.tx.auctions) { + auctionCalls.push({ + pallet: 'auctions', + extrinsic: 'bid', + call: this.client.api.tx.auctions.bid(1000, 1, 1, 1, 100e10), + }) + } + + return auctionCalls + } + buildBalancesAction(): ProxyAction[] { const balanceCalls: ProxyAction[] = [] if (this.client.api.tx.balances) { @@ -119,6 +135,19 @@ class ProxyActionBuilderImpl< return cancelProxyCalls } + buildCrowdloanAction(): ProxyAction[] { + const crowdloanCalls: ProxyAction[] = [] + if (this.client.api.tx.crowdloan) { + crowdloanCalls.push({ + pallet: 'crowdloan', + extrinsic: 'dissolve', + call: this.client.api.tx.crowdloan.dissolve(1), + }) + } + + return crowdloanCalls + } + buildFastUnstakeAction(): ProxyAction[] { const fastUnstakeCalls: ProxyAction[] = [] if (this.client.api.tx.staking) { @@ -168,6 +197,19 @@ class ProxyActionBuilderImpl< return nominationPoolsCalls } + buildSlotsAction(): ProxyAction[] { + const slotsCalls: ProxyAction[] = [] + if (this.client.api.tx.slots) { + slotsCalls.push({ + pallet: 'slots', + extrinsic: 'lease', + call: this.client.api.tx.slots.triggerOnboard(1000), + }) + } + + return slotsCalls + } + buildStakingAction(): ProxyAction[] { const stakingCalls: ProxyAction[] = [] if (this.client.api.tx.staking) { @@ -219,6 +261,7 @@ function buildProxyAction< // Otherwise, it will be empty, and this is a no-op. const result = match(proxyType) .with('Any', () => [ + ...proxyActionBuilder.buildAuctionAction(), ...proxyActionBuilder.buildBalancesAction(), ...proxyActionBuilder.buildBountyAction(), ...proxyActionBuilder.buildStakingAction(), @@ -227,6 +270,7 @@ function buildProxyAction< ...proxyActionBuilder.buildUtilityAction(), ]) .with('NonTransfer', () => [ + ...proxyActionBuilder.buildAuctionAction(), ...proxyActionBuilder.buildSystemAction(), ...proxyActionBuilder.buildBountyAction(), ...proxyActionBuilder.buildStakingAction(), @@ -247,6 +291,11 @@ function buildProxyAction< ...proxyActionBuilder.buildUtilityAction(), ]) .with('CancelProxy', () => [...proxyActionBuilder.buildCancelProxyAction()]) + .with('Auction', () => [ + ...proxyActionBuilder.buildAuctionAction(), + ...proxyActionBuilder.buildCrowdloanAction(), + ...proxyActionBuilder.buildSlotsAction(), + ]) .otherwise(() => []) return result @@ -351,7 +400,7 @@ async function proxyCallFilteringTestRunner< const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) - const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer', 'Staking', 'NominationPools', 'CancelProxy'] + const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer', 'Staking', 'NominationPools', 'CancelProxy', 'Auction'] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { // In this network, there might be some proxy types that don't/cannot be tested. From 789ad917132ad9b57d4f9b81d5fe072e58cd4b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 17 Apr 2025 15:28:28 +0100 Subject: [PATCH 13/39] Correct proxy call event snapshot names --- .../assetHubKusama.proxy.e2e.test.ts.snap | 85 ++++++ .../coretimeKusama.proxy.e2e.test.ts.snap | 85 ++++++ .../kusama.proxy.e2e.test.ts.snap | 254 +++++++++++++++++- .../peopleKusama.proxy.e2e.test.ts.snap | 85 ++++++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 85 ++++++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 85 ++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 85 ++++++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 85 ++++++ .../polkadot.proxy.tests.e2e.test.ts.snap | 234 +++++++++++++++- packages/shared/src/proxy.ts | 38 ++- 10 files changed, 1106 insertions(+), 15 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 732292dd4..81116499c 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -475,6 +475,57 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -536,3 +587,37 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; 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 76ab800ec..5e042d4a4 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -475,6 +475,57 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -536,3 +587,37 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; 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 24f0a9b0f..673c8ece5 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -493,15 +493,27 @@ exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob perf exports[`Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet auctions, call bid 1`] = ` [ { "data": { - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, + }, + }, }, - "method": "Upgraded", - "section": "balances", + "method": "ProxyExecuted", + "section": "proxy", }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +[ { "data": { "amount": "(rounded 660000000)", @@ -641,6 +653,57 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -715,6 +778,25 @@ exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy ] `; +exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call triggerOnboard 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 71, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` [ { @@ -795,6 +877,42 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call forceBatch 1`] = ` [ { @@ -812,6 +930,25 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet auctions, call bid 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` [ { @@ -900,6 +1037,60 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Society > events for proxy action: proxy type Society, pallet society, call bid 1`] = ` +[ + { + "data": { + "candidateId": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "offer": 1000000000000, + }, + "method": "Bid", + "section": "society", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call bond 1`] = ` [ { @@ -919,6 +1110,25 @@ exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy ] `; +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call bond 1`] = ` [ { @@ -958,6 +1168,42 @@ exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy ] `; +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call registerFastUnstake 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call forceBatch 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 d2dab2ede..b9843eab0 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -427,6 +427,57 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -488,3 +539,37 @@ exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > event }, ] `; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; 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 1d82a7294..1626786ce 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -475,6 +475,57 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -536,3 +587,37 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > e }, ] `; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; 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 fd5e2a0a9..7afd5a3d6 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -475,6 +475,57 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -536,3 +587,37 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer }, ] `; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; 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 0002b9778..699b0adb8 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -467,6 +467,57 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -528,3 +579,37 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > e }, ] `; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; 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 8fe07056c..a8d3c4c2e 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -427,6 +427,57 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -488,3 +539,37 @@ exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 8f98d199b..fb5c5b198 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -397,15 +397,27 @@ exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob pe exports[`Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet auctions, call bid 1`] = ` [ { "data": { - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, + }, + }, }, - "method": "Upgraded", - "section": "balances", + "method": "ProxyExecuted", + "section": "proxy", }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +[ { "data": { "amount": "(rounded 200000000)", @@ -545,6 +557,57 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` [ { @@ -619,6 +682,25 @@ exports[`Polkadot Proxy > proxy call filtering test for Auction > events for pro ] `; +exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call triggerOnboard 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x06000000", + "index": 70, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` [ { @@ -699,6 +781,42 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 39, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call forceBatch 1`] = ` [ { @@ -716,6 +834,25 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet auctions, call bid 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` [ { @@ -804,6 +941,40 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call bond 1`] = ` [ { @@ -823,6 +994,25 @@ exports[`Polkadot Proxy > proxy call filtering test for Staking > events for pro ] `; +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 39, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call bond 1`] = ` [ { @@ -862,6 +1052,42 @@ exports[`Polkadot Proxy > proxy call filtering test for Staking > events for pro ] `; +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call registerFastUnstake 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 40, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call forceBatch 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index de02fb30d..22752b72c 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -70,6 +70,7 @@ interface ProxyActionBuilder { buildGovernanceAction(): ProxyAction[] buildNominationPoolsAction(): ProxyAction[] buildSlotsAction(): ProxyAction[] + buildSocietyAction(): ProxyAction[] buildStakingAction(): ProxyAction[] buildSystemAction(): ProxyAction[] buildUtilityAction(): ProxyAction[] @@ -153,7 +154,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.staking) { fastUnstakeCalls.push({ pallet: 'staking', - extrinsic: 'fastUnstake', + extrinsic: 'registerFastUnstake', call: this.client.api.tx.fastUnstake.registerFastUnstake(), }) } @@ -189,7 +190,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.nominationPools) { nominationPoolsCalls.push({ pallet: 'nominationPools', - extrinsic: 'bond', + extrinsic: 'chill', call: this.client.api.tx.nominationPools.chill(1), }) } @@ -202,7 +203,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.slots) { slotsCalls.push({ pallet: 'slots', - extrinsic: 'lease', + extrinsic: 'triggerOnboard', call: this.client.api.tx.slots.triggerOnboard(1000), }) } @@ -210,6 +211,19 @@ class ProxyActionBuilderImpl< return slotsCalls } + buildSocietyAction(): ProxyAction[] { + const societyCalls: ProxyAction[] = [] + if (this.client.api.tx.society) { + societyCalls.push({ + pallet: 'society', + extrinsic: 'bid', + call: this.client.api.tx.society.bid(100e10), + }) + } + + return societyCalls + } + buildStakingAction(): ProxyAction[] { const stakingCalls: ProxyAction[] = [] if (this.client.api.tx.staking) { @@ -227,8 +241,8 @@ class ProxyActionBuilderImpl< return [ { pallet: 'system', - extrinsic: 'remark', - call: this.client.api.tx.system.remark('hello'), + extrinsic: 'remarkWithEvent', + call: this.client.api.tx.system.remarkWithEvent('hello'), }, ] } @@ -237,7 +251,7 @@ class ProxyActionBuilderImpl< return [ { pallet: 'utility', - extrinsic: 'forceBatch', + extrinsic: 'batch', call: this.client.api.tx.utility.batch([]), }, ] @@ -296,6 +310,7 @@ function buildProxyAction< ...proxyActionBuilder.buildCrowdloanAction(), ...proxyActionBuilder.buildSlotsAction(), ]) + .with('Society', () => [...proxyActionBuilder.buildSocietyAction()]) .otherwise(() => []) return result @@ -400,7 +415,16 @@ async function proxyCallFilteringTestRunner< const proxyAccounts = createProxyAccounts('Alice', kr, proxyTypes) - const proxyTypesToTest = ['Any', 'Governance', 'NonTransfer', 'Staking', 'NominationPools', 'CancelProxy', 'Auction'] + const proxyTypesToTest = [ + 'Any', + 'Governance', + 'NonTransfer', + 'Staking', + 'NominationPools', + 'CancelProxy', + 'Auction', + 'Society', + ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { // In this network, there might be some proxy types that don't/cannot be tested. From 9c0698102cc421bca875f0a0ee7f46c6b761b83a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 17 Apr 2025 15:31:17 +0100 Subject: [PATCH 14/39] Test `Spokesperson` proxy type filtering --- packages/shared/src/proxy.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 22752b72c..0a8f58e3a 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -239,6 +239,11 @@ class ProxyActionBuilderImpl< buildSystemAction(): ProxyAction[] { return [ + { + pallet: 'system', + extrinsic: 'remark', + call: this.client.api.tx.system.remark('hello'), + }, { pallet: 'system', extrinsic: 'remarkWithEvent', @@ -424,6 +429,7 @@ async function proxyCallFilteringTestRunner< 'CancelProxy', 'Auction', 'Society', + 'Spokesperson', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From b79dfc9bc3ac9e95c9d9fe21c35cc71046538de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 17 Apr 2025 18:18:14 +0100 Subject: [PATCH 15/39] Add and test `ParaRegistration` proxy type filtering Also, enable `Spokesperson` test, mistakenly omitted in previous commit. --- .../kusama.proxy.e2e.test.ts.snap | 60 +++++++++++++++++++ packages/shared/src/helpers/proxyTypes.ts | 2 + packages/shared/src/proxy.ts | 24 ++++++++ 3 files changed, 86 insertions(+) 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 673c8ece5..91679fe52 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -1091,6 +1091,66 @@ exports[`Kusama Proxy > proxy call filtering test for Society > events for proxy ] `; +exports[`Kusama Proxy > proxy call filtering test for Spokesperson > events for proxy action: proxy type Spokesperson, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Spokesperson > events for proxy action: proxy type Spokesperson, pallet system, call remarkWithEvent 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call bond 1`] = ` [ { diff --git a/packages/shared/src/helpers/proxyTypes.ts b/packages/shared/src/helpers/proxyTypes.ts index 59a97503d..ed0204690 100644 --- a/packages/shared/src/helpers/proxyTypes.ts +++ b/packages/shared/src/helpers/proxyTypes.ts @@ -6,6 +6,7 @@ export const PolkadotProxyTypes = { CancelProxy: 6, Auction: 7, NominationPools: 8, + ParaRegistration: 9, } export const KusamaProxyTypes = { @@ -18,6 +19,7 @@ export const KusamaProxyTypes = { Society: 7, NominationPools: 8, Spokesperson: 9, + ParaRegistration: 10, } export const AssetHubProxyTypes = { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 0a8f58e3a..4edbed76e 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -69,6 +69,7 @@ interface ProxyActionBuilder { buildFastUnstakeAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] buildNominationPoolsAction(): ProxyAction[] + buildParasRegistrarAction(): ProxyAction[] buildSlotsAction(): ProxyAction[] buildSocietyAction(): ProxyAction[] buildStakingAction(): ProxyAction[] @@ -198,6 +199,26 @@ class ProxyActionBuilderImpl< return nominationPoolsCalls } + buildParasRegistrarAction(): ProxyAction[] { + const parasRegistrarCalls: ProxyAction[] = [] + if (this.client.api.tx.parasRegistrar) { + parasRegistrarCalls.concat([ + { + pallet: 'parasRegistrar', + extrinsic: 'reserve', + call: this.client.api.tx.parasRegistrar.reserve(), + }, + { + pallet: 'parasRegistrar', + extrinsic: 'register', + call: this.client.api.tx.parasRegistrar.register(1000, 'genesis head', 'validation code'), + }, + ]) + } + + return parasRegistrarCalls + } + buildSlotsAction(): ProxyAction[] { const slotsCalls: ProxyAction[] = [] if (this.client.api.tx.slots) { @@ -316,6 +337,8 @@ function buildProxyAction< ...proxyActionBuilder.buildSlotsAction(), ]) .with('Society', () => [...proxyActionBuilder.buildSocietyAction()]) + .with('Spokesperson', () => [...proxyActionBuilder.buildSystemAction()]) + .with('ParaRegistration', () => [...proxyActionBuilder.buildParasRegistrarAction()]) .otherwise(() => []) return result @@ -430,6 +453,7 @@ async function proxyCallFilteringTestRunner< 'Auction', 'Society', 'Spokesperson', + 'ParaRegistration', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From decbf953b0b28b4db6b0b94e28c2f18de41c7714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 17 Apr 2025 20:03:32 +0100 Subject: [PATCH 16/39] Test call filtering for asset proxy types --- .../assetHubKusama.proxy.e2e.test.ts.snap | 286 ++++++++++++++++++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 286 ++++++++++++++++++ packages/shared/src/helpers/proxyTypes.ts | 3 + packages/shared/src/proxy.ts | 205 ++++++++++++- 4 files changed, 773 insertions(+), 7 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 81116499c..22aef3b07 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -543,6 +543,292 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet nfts, call set_metadata 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 52, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet uniques, call mint 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x02000000", + "index": 51, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet nfts, call destroy 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 52, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet uniques, call create 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 51, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` [ { 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 1626786ce..59f605883 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -543,6 +543,292 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet nfts, call set_metadata 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 52, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet uniques, call mint 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 51, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet nfts, call destroy 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 52, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet uniques, call create 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 51, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` [ { diff --git a/packages/shared/src/helpers/proxyTypes.ts b/packages/shared/src/helpers/proxyTypes.ts index ed0204690..22c63b2b4 100644 --- a/packages/shared/src/helpers/proxyTypes.ts +++ b/packages/shared/src/helpers/proxyTypes.ts @@ -1,3 +1,6 @@ +/** + * Proxy types in the Polkadot relay chain. + */ export const PolkadotProxyTypes = { Any: 0, NonTransfer: 1, diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 4edbed76e..9befc8bef 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -61,6 +61,12 @@ interface ProxyAction { * The test for each proxy type is then free to combine these lists as required. */ interface ProxyActionBuilder { + // The `Asset, `AssetOwner` and `AssetManager` proxy types rely on the same pallets, but different call filters. + // They are differentiated here to clarify which all types can make, and which only some can. + // The same applies to `Uniques` and `Nfts` + buildAssetsAction(): ProxyAction[] + buildAssetsManagerAction(): ProxyAction[] + buildAssetsOwnerAction(): ProxyAction[] buildAuctionAction(): ProxyAction[] buildBalancesAction(): ProxyAction[] buildBountyAction(): ProxyAction[] @@ -68,12 +74,19 @@ interface ProxyActionBuilder { buildCrowdloanAction(): ProxyAction[] buildFastUnstakeAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] + buildMultisigAction(): ProxyAction[] + buildNftsAction(): ProxyAction[] + buildNftsManagerAction(): ProxyAction[] + buildNftsOwnerAction(): ProxyAction[] buildNominationPoolsAction(): ProxyAction[] buildParasRegistrarAction(): ProxyAction[] buildSlotsAction(): ProxyAction[] buildSocietyAction(): ProxyAction[] buildStakingAction(): ProxyAction[] buildSystemAction(): ProxyAction[] + buildUniquesAction(): ProxyAction[] + buildUniquesManagerAction(): ProxyAction[] + buildUniquesOwnerAction(): ProxyAction[] buildUtilityAction(): ProxyAction[] } @@ -84,6 +97,45 @@ class ProxyActionBuilderImpl< { constructor(private client: Client) {} + buildAssetsAction(): ProxyAction[] { + const assetsCalls: ProxyAction[] = [] + if (this.client.api.tx.assets) { + assetsCalls.concat([...this.buildAssetsManagerAction(), ...this.buildAssetsOwnerAction()]) + } + + return assetsCalls + } + + buildAssetsManagerAction(): ProxyAction[] { + const assetsCalls: ProxyAction[] = [] + if (this.client.api.tx.assets) { + assetsCalls.concat([ + { + pallet: 'assets', + extrinsic: 'mint', + call: this.client.api.tx.assets.mint(1, defaultAccountsSr25519.eve.address, 1e10), + }, + ]) + } + + return assetsCalls + } + + buildAssetsOwnerAction(): ProxyAction[] { + const assetsCalls: ProxyAction[] = [] + if (this.client.api.tx.assets) { + assetsCalls.concat([ + { + pallet: 'assets', + extrinsic: 'create', + call: this.client.api.tx.assets.create(1, defaultAccountsSr25519.eve.address, 1e10), + }, + ]) + } + + return assetsCalls + } + buildAuctionAction(): ProxyAction[] { const auctionCalls: ProxyAction[] = [] if (this.client.api.tx.auctions) { @@ -186,6 +238,58 @@ class ProxyActionBuilderImpl< return governanceCalls } + buildMultisigAction(): ProxyAction[] { + const testCall = this.client.api.tx.system.remark('hello').method.toHex() + const multisigCalls: ProxyAction[] = [] + if (this.client.api.tx.multisig) { + multisigCalls.push({ + pallet: 'multisig', + extrinsic: 'asMulti', + call: this.client.api.tx.multisig.asMulti(0, [], null, testCall, { refTime: 0, proofSize: 0 }), + }) + } + + return multisigCalls + } + + buildNftsAction(): ProxyAction[] { + const nftsCalls: ProxyAction[] = [] + if (this.client.api.tx.nfts) { + nftsCalls.concat([...this.buildNftsManagerAction(), ...this.buildNftsOwnerAction()]) + } + + return nftsCalls + } + + buildNftsManagerAction(): ProxyAction[] { + const nftsCalls: ProxyAction[] = [] + if (this.client.api.tx.nfts) { + nftsCalls.push({ + pallet: 'nfts', + extrinsic: 'set_metadata', + call: this.client.api.tx.nfts.setMetadata(1, 1, 'test'), + }) + } + + return nftsCalls + } + + buildNftsOwnerAction(): ProxyAction[] { + const nftsCalls: ProxyAction[] = [] + if (this.client.api.tx.nfts) { + nftsCalls.push({ + pallet: 'nfts', + extrinsic: 'destroy', + call: this.client.api.tx.nfts.destroy(1, { + item_metadatas: 1, + item_configs: 1, + attributes: 1, + } as any), + }) + } + + return nftsCalls + } buildNominationPoolsAction(): ProxyAction[] { const nominationPoolsCalls: ProxyAction[] = [] if (this.client.api.tx.nominationPools) { @@ -273,6 +377,41 @@ class ProxyActionBuilderImpl< ] } + buildUniquesAction(): ProxyAction[] { + const uniquesCalls: ProxyAction[] = [] + if (this.client.api.tx.uniques) { + uniquesCalls.concat([...this.buildUniquesManagerAction(), ...this.buildUniquesOwnerAction()]) + } + + return uniquesCalls + } + + buildUniquesManagerAction(): ProxyAction[] { + const uniquesCalls: ProxyAction[] = [] + if (this.client.api.tx.uniques) { + uniquesCalls.push({ + pallet: 'uniques', + extrinsic: 'mint', + call: this.client.api.tx.uniques.mint(1, 1, defaultAccountsSr25519.eve.address), + }) + } + + return uniquesCalls + } + + buildUniquesOwnerAction(): ProxyAction[] { + const uniquesCalls: ProxyAction[] = [] + if (this.client.api.tx.uniques) { + uniquesCalls.push({ + pallet: 'uniques', + extrinsic: 'create', + call: this.client.api.tx.uniques.create(1, defaultAccountsSr25519.eve.address), + }) + } + + return uniquesCalls + } + buildUtilityAction(): ProxyAction[] { return [ { @@ -280,6 +419,16 @@ class ProxyActionBuilderImpl< extrinsic: 'batch', call: this.client.api.tx.utility.batch([]), }, + { + pallet: 'utility', + extrinsic: 'batchAll', + call: this.client.api.tx.utility.batchAll([]), + }, + { + pallet: 'utility', + extrinsic: 'forceBatch', + call: this.client.api.tx.utility.forceBatch([]), + }, ] } } @@ -300,10 +449,13 @@ function buildProxyAction< // builder won't be empty. // Otherwise, it will be empty, and this is a no-op. const result = match(proxyType) + // Common + .with('Any', () => [ ...proxyActionBuilder.buildAuctionAction(), ...proxyActionBuilder.buildBalancesAction(), ...proxyActionBuilder.buildBountyAction(), + ...proxyActionBuilder.buildMultisigAction(), ...proxyActionBuilder.buildStakingAction(), ...proxyActionBuilder.buildGovernanceAction(), ...proxyActionBuilder.buildSystemAction(), @@ -313,8 +465,19 @@ function buildProxyAction< ...proxyActionBuilder.buildAuctionAction(), ...proxyActionBuilder.buildSystemAction(), ...proxyActionBuilder.buildBountyAction(), - ...proxyActionBuilder.buildStakingAction(), ...proxyActionBuilder.buildGovernanceAction(), + ...proxyActionBuilder.buildMultisigAction(), + ...proxyActionBuilder.buildStakingAction(), + ...proxyActionBuilder.buildUtilityAction(), + ]) + .with('CancelProxy', () => [...proxyActionBuilder.buildCancelProxyAction()]) + + // Polkadot / Kusama + + .with('Auction', () => [ + ...proxyActionBuilder.buildAuctionAction(), + ...proxyActionBuilder.buildCrowdloanAction(), + ...proxyActionBuilder.buildSlotsAction(), ]) .with('Governance', () => [ ...proxyActionBuilder.buildBountyAction(), @@ -330,15 +493,35 @@ function buildProxyAction< ...proxyActionBuilder.buildNominationPoolsAction(), ...proxyActionBuilder.buildUtilityAction(), ]) - .with('CancelProxy', () => [...proxyActionBuilder.buildCancelProxyAction()]) - .with('Auction', () => [ - ...proxyActionBuilder.buildAuctionAction(), - ...proxyActionBuilder.buildCrowdloanAction(), - ...proxyActionBuilder.buildSlotsAction(), - ]) + .with('Society', () => [...proxyActionBuilder.buildSocietyAction()]) .with('Spokesperson', () => [...proxyActionBuilder.buildSystemAction()]) .with('ParaRegistration', () => [...proxyActionBuilder.buildParasRegistrarAction()]) + + // Asset Hubs + + .with('Assets', () => [ + ...proxyActionBuilder.buildAssetsAction(), + ...proxyActionBuilder.buildMultisigAction(), + ...proxyActionBuilder.buildNftsAction(), + ...proxyActionBuilder.buildUniquesAction(), + ...proxyActionBuilder.buildUtilityAction(), + ]) + .with('AssetManager', () => [ + ...proxyActionBuilder.buildAssetsManagerAction(), + ...proxyActionBuilder.buildMultisigAction(), + ...proxyActionBuilder.buildNftsManagerAction(), + ...proxyActionBuilder.buildUniquesManagerAction(), + ...proxyActionBuilder.buildUtilityAction(), + ]) + .with('AssetOwner', () => [ + ...proxyActionBuilder.buildAssetsOwnerAction(), + ...proxyActionBuilder.buildMultisigAction(), + ...proxyActionBuilder.buildNftsOwnerAction(), + ...proxyActionBuilder.buildUniquesOwnerAction(), + ...proxyActionBuilder.buildUtilityAction(), + ]) + .otherwise(() => []) return result @@ -416,6 +599,8 @@ async function proxyCallFilteringSingleTestRunner< const proxyExecutedData = record.event.data if (proxyExecutedData.result.isErr) { const error = proxyExecutedData.result.asErr + // The error must be a module error (`system` is where `CallFiltered` exists), and no other e.g. `BadOrigin`. + // It is assumed that the calls chosen can be executed with signed origins. assert(error.isModule) // A call can have failed due to e.g. being semantically incorrect, but it can *never* have failed @@ -434,6 +619,8 @@ async function proxyCallFilteringSingleTestRunner< * * 1. creates proxies of every type (available in the current network) for Alice * 2. runs the test for each proxy type (if the proxy type is testable) + * + * To disable a proxy type from being tested, remove it from the `proxyTypesToTest` array. */ async function proxyCallFilteringTestRunner< TCustom extends Record | undefined, @@ -454,6 +641,10 @@ async function proxyCallFilteringTestRunner< 'Society', 'Spokesperson', 'ParaRegistration', + + 'Assets', + 'AssetOwner', + 'AssetManager', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From d1231a34652a595d525df0fd1735b0f886b74c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 17 Apr 2025 20:21:54 +0100 Subject: [PATCH 17/39] Test call filtering for collator proxy type --- .../assetHubKusama.proxy.e2e.test.ts.snap | 19 +++++++++++++++++++ .../coretimeKusama.proxy.e2e.test.ts.snap | 19 +++++++++++++++++++ .../peopleKusama.proxy.e2e.test.ts.snap | 19 +++++++++++++++++++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 19 +++++++++++++++++++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 19 +++++++++++++++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 19 +++++++++++++++++++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 19 +++++++++++++++++++ packages/shared/src/proxy.ts | 16 ++++++++++++++++ 8 files changed, 149 insertions(+) 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 22aef3b07..3e25a0bcc 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -848,6 +848,25 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > eve ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 21, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 5e042d4a4..9091fddec 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -562,6 +562,25 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > eve ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 21, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 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 b9843eab0..62fea0be5 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -514,6 +514,25 @@ exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > event ] `; +exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 21, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 59f605883..bf17c55d4 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -848,6 +848,25 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > e ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 21, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 7afd5a3d6..7e9a6b7dd 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -562,6 +562,25 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 21, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 699b0adb8..06b905474 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -554,6 +554,25 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > e ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 21, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { 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 a8d3c4c2e..35d990f15 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -514,6 +514,25 @@ exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > eve ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 21, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 9befc8bef..1e7f300bf 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -71,6 +71,7 @@ interface ProxyActionBuilder { buildBalancesAction(): ProxyAction[] buildBountyAction(): ProxyAction[] buildCancelProxyAction(): ProxyAction[] + buildCollatorSelectionAction(): ProxyAction[] buildCrowdloanAction(): ProxyAction[] buildFastUnstakeAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] @@ -189,6 +190,19 @@ class ProxyActionBuilderImpl< return cancelProxyCalls } + buildCollatorSelectionAction(): ProxyAction[] { + const collatorSelectionCalls: ProxyAction[] = [] + if (this.client.api.tx.collatorSelection) { + collatorSelectionCalls.push({ + pallet: 'collatorSelection', + extrinsic: 'registerAsCandidate', + call: this.client.api.tx.collatorSelection.registerAsCandidate(), + }) + } + + return collatorSelectionCalls + } + buildCrowdloanAction(): ProxyAction[] { const crowdloanCalls: ProxyAction[] = [] if (this.client.api.tx.crowdloan) { @@ -521,6 +535,7 @@ function buildProxyAction< ...proxyActionBuilder.buildUniquesOwnerAction(), ...proxyActionBuilder.buildUtilityAction(), ]) + .with('Collator', () => [...proxyActionBuilder.buildCollatorSelectionAction()]) .otherwise(() => []) @@ -645,6 +660,7 @@ async function proxyCallFilteringTestRunner< 'Assets', 'AssetOwner', 'AssetManager', + 'Collator', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From 2ba641876ff3f9365c9945debcadf7e4b0e42237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 22 Apr 2025 19:37:03 +0100 Subject: [PATCH 18/39] Test alliance proxy type call filtering --- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 108 ++++++++++++++++++ packages/shared/src/proxy.ts | 46 +++++++- 2 files changed, 153 insertions(+), 1 deletion(-) 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 7e9a6b7dd..71c7211ad 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -397,6 +397,114 @@ exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events exports[`Polkadot Collectives Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet alliance, call join_alliance 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0c000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet collectives, call propose 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 51, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 1e7f300bf..8749a7c72 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -61,6 +61,8 @@ interface ProxyAction { * The test for each proxy type is then free to combine these lists as required. */ interface ProxyActionBuilder { + buildAllianceAction(): ProxyAction[] + buildAllianceMotionAction(): ProxyAction[] // The `Asset, `AssetOwner` and `AssetManager` proxy types rely on the same pallets, but different call filters. // They are differentiated here to clarify which all types can make, and which only some can. // The same applies to `Uniques` and `Nfts` @@ -98,6 +100,34 @@ class ProxyActionBuilderImpl< { constructor(private client: Client) {} + buildAllianceAction(): ProxyAction[] { + const allianceCalls: ProxyAction[] = [] + if (this.client.api.tx.alliance) { + allianceCalls.push({ + pallet: 'alliance', + extrinsic: 'join_alliance', + call: this.client.api.tx.alliance.joinAlliance(), + }) + } + + return allianceCalls + } + + buildAllianceMotionAction(): ProxyAction[] { + const allianceMotionCalls: ProxyAction[] = [] + if (this.client.api.tx.allianceMotion) { + const proposal = this.client.api.tx.system.remark('hello') + + allianceMotionCalls.push({ + pallet: 'collectives', + extrinsic: 'propose', + call: this.client.api.tx.allianceMotion.propose(1, proposal.method.toHex(), proposal.method.toHex().length), + }) + } + + return allianceMotionCalls + } + buildAssetsAction(): ProxyAction[] { const assetsCalls: ProxyAction[] = [] if (this.client.api.tx.assets) { @@ -512,6 +542,10 @@ function buildProxyAction< .with('Spokesperson', () => [...proxyActionBuilder.buildSystemAction()]) .with('ParaRegistration', () => [...proxyActionBuilder.buildParasRegistrarAction()]) + // System Parachains + + .with('Collator', () => [...proxyActionBuilder.buildCollatorSelectionAction()]) + // Asset Hubs .with('Assets', () => [ @@ -535,7 +569,15 @@ function buildProxyAction< ...proxyActionBuilder.buildUniquesOwnerAction(), ...proxyActionBuilder.buildUtilityAction(), ]) - .with('Collator', () => [...proxyActionBuilder.buildCollatorSelectionAction()]) + + // Collectives + + .with('Alliance', () => [ + ...proxyActionBuilder.buildAllianceAction(), + ...proxyActionBuilder.buildAllianceMotionAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) .otherwise(() => []) @@ -661,6 +703,8 @@ async function proxyCallFilteringTestRunner< 'AssetOwner', 'AssetManager', 'Collator', + + 'Alliance', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From a9d82d53dc4132f386cc7bc3e892563d8dfd2952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 22 Apr 2025 20:09:08 +0100 Subject: [PATCH 19/39] Create Fellowship proxy type call filtering test --- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 89 +++++++++++++++++++ packages/shared/src/proxy.ts | 49 +++++++--- 2 files changed, 124 insertions(+), 14 deletions(-) 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 71c7211ad..50cef77be 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -689,6 +689,95 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > e ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet fellowshipCore, call bump 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x07000000", + "index": 63, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet multisig, call asMulti 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call batchAll 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call forceBatch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 8749a7c72..6a9536e41 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -76,6 +76,7 @@ interface ProxyActionBuilder { buildCollatorSelectionAction(): ProxyAction[] buildCrowdloanAction(): ProxyAction[] buildFastUnstakeAction(): ProxyAction[] + buildFellowshipCoreAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] buildMultisigAction(): ProxyAction[] buildNftsAction(): ProxyAction[] @@ -185,7 +186,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.balances) { balanceCalls.push({ pallet: 'balances', - extrinsic: 'transferKeepAlive', + extrinsic: 'transfer_keep_alive', call: this.client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10), }) } @@ -198,7 +199,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.bounties) { bountyCalls.push({ pallet: 'bounties', - extrinsic: 'proposeBounty', + extrinsic: 'propose_bounty', call: this.client.api.tx.bounties.proposeBounty(100e10, 'Test Bounty'), }) } @@ -212,7 +213,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.proxy) { cancelProxyCalls.push({ pallet: 'proxy', - extrinsic: 'rejectAnnouncement', + extrinsic: 'reject_announcement', call: this.client.api.tx.proxy.rejectAnnouncement(defaultAccountsSr25519.eve.address, hash), }) } @@ -224,8 +225,8 @@ class ProxyActionBuilderImpl< const collatorSelectionCalls: ProxyAction[] = [] if (this.client.api.tx.collatorSelection) { collatorSelectionCalls.push({ - pallet: 'collatorSelection', - extrinsic: 'registerAsCandidate', + pallet: 'collator_selection', + extrinsic: 'register_as_candidate', call: this.client.api.tx.collatorSelection.registerAsCandidate(), }) } @@ -251,7 +252,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.staking) { fastUnstakeCalls.push({ pallet: 'staking', - extrinsic: 'registerFastUnstake', + extrinsic: 'register_fast_unstake', call: this.client.api.tx.fastUnstake.registerFastUnstake(), }) } @@ -259,6 +260,19 @@ class ProxyActionBuilderImpl< return fastUnstakeCalls } + buildFellowshipAction(): ProxyAction[] { + const fellowshipCalls: ProxyAction[] = [] + if (this.client.api.tx.fellowshipCore) { + fellowshipCalls.push({ + pallet: 'fellowship_core', + extrinsic: 'bump', + call: this.client.api.tx.fellowshipCore.bump(defaultAccountsSr25519.eve.address), + }) + } + + return fellowshipCalls + } + buildGovernanceAction(): ProxyAction[] { const governanceCalls: ProxyAction[] = [] if (this.client.api.tx.referenda) { @@ -288,7 +302,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.multisig) { multisigCalls.push({ pallet: 'multisig', - extrinsic: 'asMulti', + extrinsic: 'as_multi', call: this.client.api.tx.multisig.asMulti(0, [], null, testCall, { refTime: 0, proofSize: 0 }), }) } @@ -334,11 +348,12 @@ class ProxyActionBuilderImpl< return nftsCalls } + buildNominationPoolsAction(): ProxyAction[] { const nominationPoolsCalls: ProxyAction[] = [] if (this.client.api.tx.nominationPools) { nominationPoolsCalls.push({ - pallet: 'nominationPools', + pallet: 'nomination_pools', extrinsic: 'chill', call: this.client.api.tx.nominationPools.chill(1), }) @@ -352,12 +367,12 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.parasRegistrar) { parasRegistrarCalls.concat([ { - pallet: 'parasRegistrar', + pallet: 'paras_registrar', extrinsic: 'reserve', call: this.client.api.tx.parasRegistrar.reserve(), }, { - pallet: 'parasRegistrar', + pallet: 'paras_registrar', extrinsic: 'register', call: this.client.api.tx.parasRegistrar.register(1000, 'genesis head', 'validation code'), }, @@ -372,7 +387,7 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.slots) { slotsCalls.push({ pallet: 'slots', - extrinsic: 'triggerOnboard', + extrinsic: 'trigger_onboard', call: this.client.api.tx.slots.triggerOnboard(1000), }) } @@ -415,7 +430,7 @@ class ProxyActionBuilderImpl< }, { pallet: 'system', - extrinsic: 'remarkWithEvent', + extrinsic: 'remark_with_event', call: this.client.api.tx.system.remarkWithEvent('hello'), }, ] @@ -465,12 +480,12 @@ class ProxyActionBuilderImpl< }, { pallet: 'utility', - extrinsic: 'batchAll', + extrinsic: 'batch_all', call: this.client.api.tx.utility.batchAll([]), }, { pallet: 'utility', - extrinsic: 'forceBatch', + extrinsic: 'force_batch', call: this.client.api.tx.utility.forceBatch([]), }, ] @@ -578,6 +593,11 @@ function buildProxyAction< ...proxyActionBuilder.buildUtilityAction(), ...proxyActionBuilder.buildMultisigAction(), ]) + .with('Fellowship', () => [ + ...proxyActionBuilder.buildFellowshipAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) .otherwise(() => []) @@ -705,6 +725,7 @@ async function proxyCallFilteringTestRunner< 'Collator', 'Alliance', + 'Fellowship', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From 0d2c96eedfab32035d88d3aefaf482f050dc8526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 02:15:41 +0100 Subject: [PATCH 20/39] Complete Fellowship proxy type call filtering test --- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 110 ++++++++++++++++++ packages/shared/src/proxy.ts | 53 ++++++++- 2 files changed, 159 insertions(+), 4 deletions(-) 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 50cef77be..858d2a689 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -689,6 +689,25 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > e ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x07000000", + "index": 63, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet fellowshipCore, call bump 1`] = ` [ { @@ -708,6 +727,25 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet multisig, call asMulti 1`] = ` [ { @@ -727,6 +765,44 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet referenda, call place_decision_deposit 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 61, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet salary, call init 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 64, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call batch 1`] = ` [ { @@ -744,6 +820,23 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call batchAll 1`] = ` [ { @@ -761,6 +854,23 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call forceBatch 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 6a9536e41..be68ec884 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -56,7 +56,7 @@ interface ProxyAction { * type. * Returning lists allows for: * 1. no-ops in the form of empty lists, and - * 2. providing multipled extrinsics of interest per pallet + * 2. providing multiple extrinsics of interest per pallet * * The test for each proxy type is then free to combine these lists as required. */ @@ -76,7 +76,10 @@ interface ProxyActionBuilder { buildCollatorSelectionAction(): ProxyAction[] buildCrowdloanAction(): ProxyAction[] buildFastUnstakeAction(): ProxyAction[] + buildFellowshipCollectiveAction(): ProxyAction[] buildFellowshipCoreAction(): ProxyAction[] + buildFellowshipReferendaAction(): ProxyAction[] + buildFellowshipSalaryAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] buildMultisigAction(): ProxyAction[] buildNftsAction(): ProxyAction[] @@ -260,11 +263,24 @@ class ProxyActionBuilderImpl< return fastUnstakeCalls } - buildFellowshipAction(): ProxyAction[] { + buildFellowshipCollectiveAction(): ProxyAction[] { + const fellowshipCollectiveCalls: ProxyAction[] = [] + if (this.client.api.tx.rankedCollective) { + fellowshipCollectiveCalls.push({ + pallet: 'ranked_collective', + extrinsic: 'vote', + call: this.client.api.tx.rankedCollective.vote(1, true), + }) + } + + return fellowshipCollectiveCalls + } + + buildFellowshipCoreAction(): ProxyAction[] { const fellowshipCalls: ProxyAction[] = [] if (this.client.api.tx.fellowshipCore) { fellowshipCalls.push({ - pallet: 'fellowship_core', + pallet: 'core_fellowship', extrinsic: 'bump', call: this.client.api.tx.fellowshipCore.bump(defaultAccountsSr25519.eve.address), }) @@ -273,6 +289,32 @@ class ProxyActionBuilderImpl< return fellowshipCalls } + buildFellowshipReferendaAction(): ProxyAction[] { + const fellowshipReferendaCalls: ProxyAction[] = [] + if (this.client.api.tx.fellowshipReferenda) { + fellowshipReferendaCalls.push({ + pallet: 'referenda', + extrinsic: 'place_decision_deposit', + call: this.client.api.tx.fellowshipReferenda.placeDecisionDeposit(1), + }) + } + + return fellowshipReferendaCalls + } + + buildFellowshipSalaryAction(): ProxyAction[] { + const fellowshipSalaryCalls: ProxyAction[] = [] + if (this.client.api.tx.fellowshipSalary) { + fellowshipSalaryCalls.push({ + pallet: 'salary', + extrinsic: 'init', + call: this.client.api.tx.fellowshipSalary.init(), + }) + } + + return fellowshipSalaryCalls + } + buildGovernanceAction(): ProxyAction[] { const governanceCalls: ProxyAction[] = [] if (this.client.api.tx.referenda) { @@ -594,7 +636,10 @@ function buildProxyAction< ...proxyActionBuilder.buildMultisigAction(), ]) .with('Fellowship', () => [ - ...proxyActionBuilder.buildFellowshipAction(), + ...proxyActionBuilder.buildFellowshipCollectiveAction(), + ...proxyActionBuilder.buildFellowshipCoreAction(), + ...proxyActionBuilder.buildFellowshipReferendaAction(), + ...proxyActionBuilder.buildFellowshipSalaryAction(), ...proxyActionBuilder.buildUtilityAction(), ...proxyActionBuilder.buildMultisigAction(), ]) From abed020a8ecd4aa50eb75208b86363de8e66a4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 02:25:30 +0100 Subject: [PATCH 21/39] Update proxy test snapshots --- .../assetHubKusama.proxy.e2e.test.ts.snap | 136 ++++++++-- .../coretimeKusama.proxy.e2e.test.ts.snap | 118 ++++++++- .../kusama.proxy.e2e.test.ts.snap | 250 +++++++++++++----- .../peopleKusama.proxy.e2e.test.ts.snap | 118 ++++++++- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 136 ++++++++-- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 166 +++++++----- .../coretimePolkadot.proxy.e2e.test.ts.snap | 118 ++++++++- .../peoplePolkadot.proxy.e2e.test.ts.snap | 118 ++++++++- .../polkadot.proxy.tests.e2e.test.ts.snap | 228 ++++++++++++---- 9 files changed, 1141 insertions(+), 247 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 3e25a0bcc..771e09bd3 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -449,6 +449,25 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -475,7 +494,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -526,7 +545,24 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -543,7 +579,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet multisig, call asMulti 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -617,7 +653,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > ev ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batchAll 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -634,7 +670,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > ev ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call forceBatch 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -651,7 +687,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetManager > ev ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet multisig, call asMulti 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -725,7 +761,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > even ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batchAll 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -742,7 +778,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > even ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call forceBatch 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -759,7 +795,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for AssetOwner > even ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet multisig, call asMulti 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -795,7 +831,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events f ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batchAll 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -812,7 +848,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events f ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call forceBatch 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -829,7 +865,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Assets > events f ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -848,7 +884,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > eve ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -867,6 +903,25 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -893,7 +948,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > eve ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -926,3 +981,54 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 9091fddec..c0099ce7d 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -449,6 +449,25 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -475,7 +494,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -526,7 +545,24 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -543,7 +579,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -562,7 +598,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > eve ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -581,6 +617,25 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -607,7 +662,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > eve ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -640,3 +695,54 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 91679fe52..03057593f 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -92,6 +92,16 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "method": "ProxyAdded", "section": "proxy", }, + { + "data": { + "delay": 0, + "delegatee": "DAbUwtseJVK8571h1MgjeuPTBCW6NZt5G7moDa1iGJZQ8FL", + "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxyType": "ParaRegistration", + }, + "method": "ProxyAdded", + "section": "proxy", + }, ] `; @@ -189,6 +199,16 @@ exports[`Kusama Proxy > add proxies (with/without delay) to an account, and remo "method": "ProxyRemoved", "section": "proxy", }, + { + "data": { + "delay": 0, + "delegatee": "DAbUwtseJVK8571h1MgjeuPTBCW6NZt5G7moDa1iGJZQ8FL", + "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxyType": "ParaRegistration", + }, + "method": "ProxyRemoved", + "section": "proxy", + }, ] `; @@ -275,6 +295,15 @@ exports[`Kusama Proxy > create and kill pure proxies > events when creating pure "method": "PureCreated", "section": "proxy", }, + { + "data": { + "disambiguationIndex": 0, + "proxyType": "ParaRegistration", + "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "PureCreated", + "section": "proxy", + }, ] `; @@ -442,6 +471,25 @@ 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`] = ` +[ + { + "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`] = ` [ { @@ -512,7 +560,7 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -565,7 +613,7 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet bounties, call proposeBounty 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -584,6 +632,25 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 31, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { @@ -653,7 +720,7 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -704,7 +771,7 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -721,18 +788,16 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet auctions, call bid 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x03000000", - "index": 72, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -740,15 +805,15 @@ exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet crowdloan, call dissolve 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet auctions, call bid 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x08000000", - "index": 73, + "error": "0x03000000", + "index": 72, }, }, }, @@ -759,15 +824,15 @@ exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call lease 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet crowdloan, call dissolve 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x00000000", - "index": 71, + "error": "0x08000000", + "index": 73, }, }, }, @@ -778,7 +843,7 @@ exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call triggerOnboard 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call trigger_onboard 1`] = ` [ { "data": { @@ -797,7 +862,7 @@ exports[`Kusama Proxy > proxy call filtering test for Auction > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -816,7 +881,7 @@ exports[`Kusama Proxy > proxy call filtering test for CancelProxy > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call proposeBounty 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -858,7 +923,7 @@ exports[`Kusama Proxy > proxy call filtering test for Governance > events for pr ] `; -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call bond 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -877,18 +942,16 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call chill 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x0b000000", - "index": 41, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -896,7 +959,7 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -913,7 +976,7 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call forceBatch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -949,7 +1012,7 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -968,6 +1031,25 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 31, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` [ { @@ -1037,7 +1119,7 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1071,6 +1153,57 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Society > events for proxy action: proxy type Society, pallet society, call bid 1`] = ` [ { @@ -1117,7 +1250,7 @@ exports[`Kusama Proxy > proxy call filtering test for Spokesperson > events for ] `; -exports[`Kusama Proxy > proxy call filtering test for Spokesperson > events for proxy action: proxy type Spokesperson, pallet system, call remarkWithEvent 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Spokesperson > events for proxy action: proxy type Spokesperson, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -1151,26 +1284,7 @@ exports[`Kusama Proxy > proxy call filtering test for Spokesperson > events for ] `; -exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call bond 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x0b000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call chill 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -1209,7 +1323,7 @@ exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call fastUnstake 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call register_fast_unstake 1`] = ` [ { "data": { @@ -1228,18 +1342,16 @@ exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call registerFastUnstake 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 42, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -1247,7 +1359,7 @@ exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1264,7 +1376,7 @@ exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy ] `; -exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call forceBatch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call force_batch 1`] = ` [ { "data": {}, 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 62fea0be5..8480cbb3a 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -349,7 +349,7 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -401,6 +401,25 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -427,7 +446,7 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -478,7 +497,24 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -495,7 +531,7 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -514,7 +550,7 @@ exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > event ] `; -exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -533,6 +569,25 @@ exports[`People Kusama Proxy > proxy call filtering test for Collator > events f ] `; +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -559,7 +614,7 @@ exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > event ] `; -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -592,3 +647,54 @@ exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > event }, ] `; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 bf17c55d4..bfdc79102 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -449,6 +449,25 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -475,7 +494,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -526,7 +545,24 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -543,7 +579,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet multisig, call asMulti 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -617,7 +653,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batchAll 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -634,7 +670,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > events for proxy action: proxy type AssetManager, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -651,7 +687,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetManager > ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet multisig, call asMulti 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -725,7 +761,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > ev ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batchAll 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -742,7 +778,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > ev ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > events for proxy action: proxy type AssetOwner, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -759,7 +795,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for AssetOwner > ev ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet multisig, call asMulti 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -795,7 +831,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batchAll 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -812,7 +848,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events for proxy action: proxy type Assets, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -829,7 +865,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Assets > events ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -848,7 +884,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > e ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -867,6 +903,25 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > even ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -893,7 +948,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > e ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -926,3 +981,54 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > e }, ] `; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 858d2a689..fa1af5978 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -435,7 +435,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > e ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet multisig, call asMulti 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet multisig, call as_multi 1`] = ` [ { "data": { @@ -471,7 +471,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > e ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet utility, call batchAll 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -488,7 +488,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > e ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > events for proxy action: proxy type Alliance, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -505,7 +505,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > e ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -557,6 +557,25 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -583,7 +602,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -634,7 +653,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -651,18 +670,16 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x01000000", - "index": 42, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -670,15 +687,15 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x08000000", - "index": 21, + "error": "0x01000000", + "index": 42, }, }, }, @@ -689,15 +706,15 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > e ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x07000000", - "index": 63, + "error": "0x08000000", + "index": 21, }, }, }, @@ -708,7 +725,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet fellowshipCore, call bump 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` [ { "data": { @@ -746,25 +763,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet multisig, call asMulti 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet referenda, call place_decision_deposit 1`] = ` [ { @@ -837,23 +835,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call batchAll 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call force_batch 1`] = ` [ { @@ -871,16 +852,18 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -914,7 +897,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -947,3 +930,54 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer }, ] `; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 06b905474..daa616043 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -441,6 +441,25 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -467,7 +486,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -518,7 +537,24 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -535,7 +571,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -554,7 +590,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > e ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -573,6 +609,25 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > even ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -599,7 +654,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > e ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -632,3 +687,54 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > e }, ] `; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 35d990f15..12ec16fea 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -349,7 +349,7 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -401,6 +401,25 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -427,7 +446,7 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -478,7 +497,24 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -495,7 +531,7 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; -exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -514,7 +550,7 @@ exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > eve ] `; -exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collatorSelection, call registerAsCandidate 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { "data": { @@ -533,6 +569,25 @@ exports[`People Polkadot Proxy > proxy call filtering test for Collator > events ] `; +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -559,7 +614,7 @@ exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > eve ] `; -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -592,3 +647,54 @@ exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index fb5c5b198..087003b0f 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -72,6 +72,16 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "method": "ProxyAdded", "section": "proxy", }, + { + "data": { + "delay": 0, + "delegatee": "1bGxxp4sijroxJ5swbdyrNYACuuz1JqhP1WZrHQnZ7aqTnm", + "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxyType": "ParaRegistration", + }, + "method": "ProxyAdded", + "section": "proxy", + }, ] `; @@ -149,6 +159,16 @@ exports[`Polkadot Proxy > add proxies (with/without delay) to an account, and re "method": "ProxyRemoved", "section": "proxy", }, + { + "data": { + "delay": 0, + "delegatee": "1bGxxp4sijroxJ5swbdyrNYACuuz1JqhP1WZrHQnZ7aqTnm", + "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxyType": "ParaRegistration", + }, + "method": "ProxyRemoved", + "section": "proxy", + }, ] `; @@ -217,6 +237,15 @@ exports[`Polkadot Proxy > create and kill pure proxies > events when creating pu "method": "PureCreated", "section": "proxy", }, + { + "data": { + "disambiguationIndex": 0, + "proxyType": "ParaRegistration", + "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "PureCreated", + "section": "proxy", + }, ] `; @@ -346,6 +375,25 @@ 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`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > perform proxy call on behalf of delegator > events when Bob transfers funds to Charlie as Alice's proxy 1`] = ` [ { @@ -416,7 +464,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transferKeepAlive 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { "data": { @@ -469,7 +517,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet bounties, call proposeBounty 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -488,6 +536,25 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 30, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { @@ -557,7 +624,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -608,7 +675,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -625,18 +692,16 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet auctions, call bid 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet utility, call force_batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x03000000", - "index": 72, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -644,15 +709,15 @@ exports[`Polkadot Proxy > proxy call filtering test for Auction > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet crowdloan, call dissolve 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet auctions, call bid 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x08000000", - "index": 73, + "error": "0x03000000", + "index": 72, }, }, }, @@ -663,15 +728,15 @@ exports[`Polkadot Proxy > proxy call filtering test for Auction > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call lease 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet crowdloan, call dissolve 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x06000000", - "index": 70, + "error": "0x08000000", + "index": 73, }, }, }, @@ -682,7 +747,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Auction > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call triggerOnboard 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Auction > events for proxy action: proxy type Auction, pallet slots, call trigger_onboard 1`] = ` [ { "data": { @@ -701,7 +766,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Auction > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call rejectAnnouncement 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { "data": { @@ -720,7 +785,7 @@ exports[`Polkadot Proxy > proxy call filtering test for CancelProxy > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call proposeBounty 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -762,7 +827,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Governance > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call bond 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -781,18 +846,16 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nominationPools, call chill 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x0b000000", - "index": 39, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -800,7 +863,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -817,7 +880,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -853,7 +916,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call proposeBounty 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` [ { "data": { @@ -872,6 +935,25 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 30, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` [ { @@ -941,7 +1023,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remarkWithEvent 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` [ { "data": { @@ -975,18 +1057,33 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call bond 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x0b000000", - "index": 39, - }, - }, - }, + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -994,7 +1091,24 @@ exports[`Polkadot Proxy > proxy call filtering test for Staking > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nominationPools, call chill 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nomination_pools, call chill 1`] = ` [ { "data": { @@ -1033,7 +1147,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Staking > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call fastUnstake 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call register_fast_unstake 1`] = ` [ { "data": { @@ -1052,18 +1166,16 @@ exports[`Polkadot Proxy > proxy call filtering test for Staking > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet staking, call registerFastUnstake 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch 1`] = ` [ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, { "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 40, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -1071,7 +1183,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Staking > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1088,7 +1200,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Staking > events for pro ] `; -exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call forceBatch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet utility, call force_batch 1`] = ` [ { "data": {}, From 7ca2d8b2382a40d5ea5e84043c4c8c53d57d6e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 02:40:39 +0100 Subject: [PATCH 22/39] Test ambassador proxy type call filtering --- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 139 ++++++++++++++++++ packages/shared/src/proxy.ts | 65 ++++++++ 2 files changed, 204 insertions(+) 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 fa1af5978..29bb7359e 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -505,6 +505,145 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Alliance > e ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet core_fellowship, call bump 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x07000000", + "index": 73, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet ranked_collective, call vote 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 70, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet referenda, call place_decision_deposit 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 71, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet salary, call init 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > events for proxy action: proxy type Ambassador, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index be68ec884..e52e7ff7f 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -66,6 +66,10 @@ interface ProxyActionBuilder { // The `Asset, `AssetOwner` and `AssetManager` proxy types rely on the same pallets, but different call filters. // They are differentiated here to clarify which all types can make, and which only some can. // The same applies to `Uniques` and `Nfts` + buildAmbassadorCollectiveAction(): ProxyAction[] + buildAmbassadorCoreAction(): ProxyAction[] + buildAmbassadorReferendaAction(): ProxyAction[] + buildAmbassadorSalaryAction(): ProxyAction[] buildAssetsAction(): ProxyAction[] buildAssetsManagerAction(): ProxyAction[] buildAssetsOwnerAction(): ProxyAction[] @@ -132,6 +136,58 @@ class ProxyActionBuilderImpl< return allianceMotionCalls } + buildAmbassadorCollectiveAction(): ProxyAction[] { + const ambassadorCollectiveCalls: ProxyAction[] = [] + if (this.client.api.tx.ambassadorCollective) { + ambassadorCollectiveCalls.push({ + pallet: 'ranked_collective', + extrinsic: 'vote', + call: this.client.api.tx.ambassadorCollective.vote(1, true), + }) + } + + return ambassadorCollectiveCalls + } + + buildAmbassadorCoreAction(): ProxyAction[] { + const ambassadorCoreCalls: ProxyAction[] = [] + if (this.client.api.tx.ambassadorCore) { + ambassadorCoreCalls.push({ + pallet: 'core_fellowship', + extrinsic: 'bump', + call: this.client.api.tx.ambassadorCore.bump(defaultAccountsSr25519.eve.address), + }) + } + + return ambassadorCoreCalls + } + + buildAmbassadorReferendaAction(): ProxyAction[] { + const ambassadorReferendaCalls: ProxyAction[] = [] + if (this.client.api.tx.ambassadorReferenda) { + ambassadorReferendaCalls.push({ + pallet: 'referenda', + extrinsic: 'place_decision_deposit', + call: this.client.api.tx.ambassadorReferenda.placeDecisionDeposit(1), + }) + } + + return ambassadorReferendaCalls + } + + buildAmbassadorSalaryAction(): ProxyAction[] { + const ambassadorSalaryCalls: ProxyAction[] = [] + if (this.client.api.tx.ambassadorSalary) { + ambassadorSalaryCalls.push({ + pallet: 'salary', + extrinsic: 'init', + call: this.client.api.tx.ambassadorSalary.init(), + }) + } + + return ambassadorSalaryCalls + } + buildAssetsAction(): ProxyAction[] { const assetsCalls: ProxyAction[] = [] if (this.client.api.tx.assets) { @@ -643,6 +699,14 @@ function buildProxyAction< ...proxyActionBuilder.buildUtilityAction(), ...proxyActionBuilder.buildMultisigAction(), ]) + .with('Ambassador', () => [ + ...proxyActionBuilder.buildAmbassadorCollectiveAction(), + ...proxyActionBuilder.buildAmbassadorCoreAction(), + ...proxyActionBuilder.buildAmbassadorReferendaAction(), + ...proxyActionBuilder.buildAmbassadorSalaryAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) .otherwise(() => []) @@ -771,6 +835,7 @@ async function proxyCallFilteringTestRunner< 'Alliance', 'Fellowship', + 'Ambassador', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From 15cd431f1c311e63f4f74af197e144b62375170d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 03:01:27 +0100 Subject: [PATCH 23/39] Swap extrinsics from balances pallet in call filtering tests --- .../assetHubKusama.proxy.e2e.test.ts.snap | 21 +++++------------ .../coretimeKusama.proxy.e2e.test.ts.snap | 21 +++++------------ .../kusama.proxy.e2e.test.ts.snap | 23 ++++++------------- .../peopleKusama.proxy.e2e.test.ts.snap | 21 +++++------------ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 21 +++++------------ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 21 +++++------------ .../coretimePolkadot.proxy.e2e.test.ts.snap | 19 ++++----------- .../peoplePolkadot.proxy.e2e.test.ts.snap | 21 +++++------------ .../polkadot.proxy.tests.e2e.test.ts.snap | 23 ++++++------------- packages/shared/src/proxy.ts | 4 ++-- 10 files changed, 57 insertions(+), 138 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 771e09bd3..f204070df 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -408,7 +408,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for }, { "data": { - "amount": "(rounded 93000000)", + "amount": "(rounded 69000000)", "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", }, "method": "Withdraw", @@ -416,19 +416,10 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for }, { "data": { - "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "amount": 1, + "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -440,7 +431,7 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for }, { "data": { - "amount": "(rounded 93000000)", + "amount": "(rounded 69000000)", "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", }, "method": "Deposit", 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 c0099ce7d..b7172cd2e 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -408,7 +408,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for }, { "data": { - "amount": "(rounded 93000000)", + "amount": "(rounded 69000000)", "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", }, "method": "Withdraw", @@ -416,19 +416,10 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for }, { "data": { - "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "amount": 1, + "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -440,7 +431,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for }, { "data": { - "amount": "(rounded 93000000)", + "amount": "(rounded 69000000)", "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", }, "method": "Deposit", 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 03057593f..df24963e9 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -560,11 +560,11 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { - "amount": "(rounded 660000000)", + "amount": "(rounded 530000000)", "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", }, "method": "Withdraw", @@ -572,19 +572,10 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act }, { "data": { - "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "amount": 1, + "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -596,7 +587,7 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act }, { "data": { - "amount": "(rounded 520000000)", + "amount": "(rounded 420000000)", "who": "F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29", }, "method": "Deposit", @@ -604,7 +595,7 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act }, { "data": { - "amount": "(rounded 130000000)", + "amount": "(rounded 110000000)", "who": "FUqYp7AtDTKeeBW63rHEaoBdEf7xMaPJTY5bY6dNsx8jtU2", }, "method": "Deposit", 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 8480cbb3a..faf05d11e 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -349,7 +349,7 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -360,7 +360,7 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr }, { "data": { - "amount": "(rounded 92000000)", + "amount": "(rounded 68000000)", "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", }, "method": "Withdraw", @@ -368,19 +368,10 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr }, { "data": { - "account": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "to": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "amount": 1, + "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -392,7 +383,7 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr }, { "data": { - "amount": "(rounded 92000000)", + "amount": "(rounded 68000000)", "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", }, "method": "Deposit", 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 bfdc79102..d481dba8d 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -408,7 +408,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo }, { "data": { - "amount": "(rounded 14000000)", + "amount": "(rounded 10000000)", "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", }, "method": "Withdraw", @@ -416,19 +416,10 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo }, { "data": { - "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "amount": 1, + "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -440,7 +431,7 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo }, { "data": { - "amount": "(rounded 14000000)", + "amount": "(rounded 10000000)", "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", }, "method": "Deposit", 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 29bb7359e..9a82c9255 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -644,7 +644,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -655,7 +655,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events }, { "data": { - "amount": "(rounded 14000000)", + "amount": "(rounded 10000000)", "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", }, "method": "Withdraw", @@ -663,19 +663,10 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events }, { "data": { - "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "amount": 1, + "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -687,7 +678,7 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events }, { "data": { - "amount": "(rounded 14000000)", + "amount": "(rounded 10000000)", "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", }, "method": "Deposit", 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 daa616043..2d129d2a3 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -397,7 +397,7 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -408,7 +408,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo }, { "data": { - "amount": "(rounded 23000000)", + "amount": "(rounded 18000000)", "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", }, "method": "Withdraw", @@ -416,19 +416,10 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo }, { "data": { - "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "amount": 1, + "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { 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 12ec16fea..f85917281 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -349,7 +349,7 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { @@ -360,7 +360,7 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for }, { "data": { - "amount": "(rounded 23000000)", + "amount": "(rounded 18000000)", "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", }, "method": "Withdraw", @@ -368,19 +368,10 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for }, { "data": { - "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "amount": 1, + "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -392,7 +383,7 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for }, { "data": { - "amount": "(rounded 23000000)", + "amount": "(rounded 18000000)", "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", }, "method": "Deposit", diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 087003b0f..c55425503 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -464,11 +464,11 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call transfer_keep_alive 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { - "amount": "(rounded 200000000)", + "amount": "(rounded 160000000)", "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", }, "method": "Withdraw", @@ -476,19 +476,10 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a }, { "data": { - "account": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "freeBalance": 1000000000000, - }, - "method": "Endowed", - "section": "balances", - }, - { - "data": { - "amount": 1000000000000, - "from": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "to": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "amount": 1, + "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", }, - "method": "Transfer", + "method": "Burned", "section": "balances", }, { @@ -500,7 +491,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a }, { "data": { - "amount": "(rounded 160000000)", + "amount": "(rounded 130000000)", "who": "13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB", }, "method": "Deposit", @@ -508,7 +499,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a }, { "data": { - "amount": "(rounded 39000000)", + "amount": "(rounded 32000000)", "who": "1ZKHNRib33noQn1FpjFsPCHuVYUfci5TXy4Lif1FcUUwZe6", }, "method": "Deposit", diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index e52e7ff7f..d5ae2df0e 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -245,8 +245,8 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.balances) { balanceCalls.push({ pallet: 'balances', - extrinsic: 'transfer_keep_alive', - call: this.client.api.tx.balances.transferKeepAlive(defaultAccountsSr25519.eve.address, 100e10), + extrinsic: 'burn', + call: this.client.api.tx.balances.burn(1, false), }) } From eed6bf24019fd5f656aeea8776127667e9939d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 03:05:37 +0100 Subject: [PATCH 24/39] Test `Broker` proxy type call filtering --- .../coretimeKusama.proxy.e2e.test.ts.snap | 89 +++++++++++++++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 89 +++++++++++++++++++ packages/shared/src/proxy.ts | 24 +++++ 3 files changed, 202 insertions(+) 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 b7172cd2e..f33091a4e 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -570,6 +570,95 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet broker, call purchase 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { 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 2d129d2a3..f771652d6 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -562,6 +562,95 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet broker, call purchase 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0f000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet proxy, call reject_announcement 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index d5ae2df0e..ef4b8597c 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -76,6 +76,7 @@ interface ProxyActionBuilder { buildAuctionAction(): ProxyAction[] buildBalancesAction(): ProxyAction[] buildBountyAction(): ProxyAction[] + buildBrokerAction(): ProxyAction[] buildCancelProxyAction(): ProxyAction[] buildCollatorSelectionAction(): ProxyAction[] buildCrowdloanAction(): ProxyAction[] @@ -266,6 +267,19 @@ class ProxyActionBuilderImpl< return bountyCalls } + buildBrokerAction(): ProxyAction[] { + const brokerCalls: ProxyAction[] = [] + if (this.client.api.tx.broker) { + brokerCalls.push({ + pallet: 'broker', + extrinsic: 'purchase', + call: this.client.api.tx.broker.purchase(100e10), + }) + } + + return brokerCalls + } + buildCancelProxyAction(): ProxyAction[] { const cancelProxyCalls: ProxyAction[] = [] const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' @@ -708,6 +722,14 @@ function buildProxyAction< ...proxyActionBuilder.buildMultisigAction(), ]) + // Coretime + + .with('Broker', () => [ + ...proxyActionBuilder.buildBrokerAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) + .otherwise(() => []) return result @@ -836,6 +858,8 @@ async function proxyCallFilteringTestRunner< 'Alliance', 'Fellowship', 'Ambassador', + + 'Broker', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From 74c900dfa49bdf70b0b21d537844ffde60a4c70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 03:18:37 +0100 Subject: [PATCH 25/39] Exclude some unstable events from `balances` pallet --- .../assetHubKusama.proxy.e2e.test.ts.snap | 31 ------------------ .../coretimeKusama.proxy.e2e.test.ts.snap | 31 ------------------ .../kusama.proxy.e2e.test.ts.snap | 32 ------------------- .../peopleKusama.proxy.e2e.test.ts.snap | 31 ------------------ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 31 ------------------ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 31 ------------------ .../coretimePolkadot.proxy.e2e.test.ts.snap | 23 ------------- .../peoplePolkadot.proxy.e2e.test.ts.snap | 31 ------------------ .../polkadot.proxy.tests.e2e.test.ts.snap | 32 ------------------- packages/shared/src/proxy.ts | 13 ++++++-- 10 files changed, 11 insertions(+), 275 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 f204070df..13be60216 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -399,29 +399,6 @@ exports[`Kusama AssetHub Proxy > proxy announcement lifecycle test > events when exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - }, - "method": "Upgraded", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 69000000)", - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -429,14 +406,6 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 69000000)", - "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", - }, - "method": "Deposit", - "section": "balances", - }, ] `; 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 f33091a4e..fa1886679 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -399,29 +399,6 @@ exports[`Kusama Coretime Proxy > proxy announcement lifecycle test > events when exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - }, - "method": "Upgraded", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 69000000)", - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -429,14 +406,6 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 69000000)", - "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", - }, - "method": "Deposit", - "section": "balances", - }, ] `; 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 df24963e9..75b46ef6d 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -562,22 +562,6 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "amount": "(rounded 530000000)", - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -585,22 +569,6 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 420000000)", - "who": "F3opxRbN5ZbjJNU511Kj2TLuzFcDq9BGduA9TgiECafpg29", - }, - "method": "Deposit", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 110000000)", - "who": "FUqYp7AtDTKeeBW63rHEaoBdEf7xMaPJTY5bY6dNsx8jtU2", - }, - "method": "Deposit", - "section": "balances", - }, ] `; 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 faf05d11e..76032c256 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -351,29 +351,6 @@ exports[`People Kusama Proxy > proxy announcement lifecycle test > events when B exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - }, - "method": "Upgraded", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 68000000)", - "who": "CuW7GM1JCXTG5Whmw7yV53Wi4trhqRFmDC49NSc4ZQ36UCg", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -381,14 +358,6 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 68000000)", - "who": "F3opxRUwkBj1LqjZ7DyiHCRh9Z4zVPLaVjoxfD5ddbip8mt", - }, - "method": "Deposit", - "section": "balances", - }, ] `; 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 d481dba8d..185c47c3a 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -399,29 +399,6 @@ exports[`Polkadot AssetHub Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Upgraded", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 10000000)", - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -429,14 +406,6 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 10000000)", - "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", - }, - "method": "Deposit", - "section": "balances", - }, ] `; 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 9a82c9255..1f0f962d2 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -646,29 +646,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Ambassador > exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Upgraded", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 10000000)", - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -676,14 +653,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 10000000)", - "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", - }, - "method": "Deposit", - "section": "balances", - }, ] `; 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 f771652d6..b7dc75dad 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -399,29 +399,6 @@ exports[`Polkadot Coretime Proxy > proxy announcement lifecycle test > events wh exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Upgraded", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 18000000)", - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", 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 f85917281..50137404b 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -351,29 +351,6 @@ exports[`People Polkadot Proxy > proxy announcement lifecycle test > events when exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Upgraded", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 18000000)", - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -381,14 +358,6 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 18000000)", - "who": "13UVJyLgBASGhE2ok3TvxUfaQBGUt88JCcdYjHvUhvQkFTTx", - }, - "method": "Deposit", - "section": "balances", - }, ] `; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index c55425503..fc022113e 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -466,22 +466,6 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ - { - "data": { - "amount": "(rounded 160000000)", - "who": "1LBbHGCXcmzwxhmxsMvjGWfR6cGbUADPL5nv1A18rD4Xf4R", - }, - "method": "Withdraw", - "section": "balances", - }, - { - "data": { - "amount": 1, - "who": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Burned", - "section": "balances", - }, { "data": { "result": "Ok", @@ -489,22 +473,6 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "amount": "(rounded 130000000)", - "who": "13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB", - }, - "method": "Deposit", - "section": "balances", - }, - { - "data": { - "amount": "(rounded 32000000)", - "who": "1ZKHNRib33noQn1FpjFsPCHuVYUfci5TXy4Lif1FcUUwZe6", - }, - "method": "Deposit", - "section": "balances", - }, ] `; diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index ef4b8597c..da081951a 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -1,4 +1,4 @@ -import { sendTransaction } from '@acala-network/chopsticks-testing' +import { type Checker, sendTransaction } from '@acala-network/chopsticks-testing' import { type Chain, defaultAccountsSr25519 } from '@e2e-test/networks' import { type Client, setupNetworks } from '@e2e-test/shared' @@ -792,7 +792,16 @@ async function proxyCallFilteringSingleTestRunner< for (const [actionKey, proxyActionEvents] of Object.entries(transactionResults)) { const [pallet, extrinsic] = actionKey.split('.') - await checkEvents(proxyActionEvents, 'proxy', pallet).toMatchSnapshot( + // If the pallet being tested is `balances`, its events should not be included in the snapshot + // to avoid including block-specific fee events, which are unstable inbetween runs. + let eventChecker: Checker + if (pallet !== 'balances') { + eventChecker = checkEvents(proxyActionEvents, 'proxy', pallet) + } else { + eventChecker = checkEvents(proxyActionEvents, 'proxy') + } + + await eventChecker.toMatchSnapshot( `events for proxy action: proxy type ${proxyType}, pallet ${pallet}, call ${extrinsic}`, ) From b9bb4e9be41f7c7fb3f54e4bde6eb66468363288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 03:24:23 +0100 Subject: [PATCH 26/39] Test `CoretimeRenewer` proxy type call filtering --- .../coretimeKusama.proxy.e2e.test.ts.snap | 19 +++++++++++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 19 +++++++++++++++ packages/shared/src/proxy.ts | 23 ++++++++++++++++++- 3 files changed, 60 insertions(+), 1 deletion(-) 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 fa1886679..b357919a9 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -558,6 +558,25 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events f ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet broker, call renew 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet multisig, call as_multi 1`] = ` [ { 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 b7dc75dad..0badfd0fb 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -558,6 +558,25 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet broker, call renew 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0d000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events for proxy action: proxy type Broker, pallet multisig, call as_multi 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index da081951a..56f5db2f3 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -77,6 +77,7 @@ interface ProxyActionBuilder { buildBalancesAction(): ProxyAction[] buildBountyAction(): ProxyAction[] buildBrokerAction(): ProxyAction[] + buildBrokerRenewerAction(): ProxyAction[] buildCancelProxyAction(): ProxyAction[] buildCollatorSelectionAction(): ProxyAction[] buildCrowdloanAction(): ProxyAction[] @@ -268,7 +269,7 @@ class ProxyActionBuilderImpl< } buildBrokerAction(): ProxyAction[] { - const brokerCalls: ProxyAction[] = [] + const brokerCalls: ProxyAction[] = [...this.buildBrokerRenewerAction()] if (this.client.api.tx.broker) { brokerCalls.push({ pallet: 'broker', @@ -280,6 +281,19 @@ class ProxyActionBuilderImpl< return brokerCalls } + buildBrokerRenewerAction(): ProxyAction[] { + const brokerRenewerCalls: ProxyAction[] = [] + if (this.client.api.tx.broker) { + brokerRenewerCalls.push({ + pallet: 'broker', + extrinsic: 'renew', + call: this.client.api.tx.broker.renew(1), + }) + } + + return brokerRenewerCalls + } + buildCancelProxyAction(): ProxyAction[] { const cancelProxyCalls: ProxyAction[] = [] const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' @@ -730,6 +744,12 @@ function buildProxyAction< ...proxyActionBuilder.buildMultisigAction(), ]) + .with('CoretimeRenewer', () => [ + ...proxyActionBuilder.buildBrokerRenewerAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) + .otherwise(() => []) return result @@ -869,6 +889,7 @@ async function proxyCallFilteringTestRunner< 'Ambassador', 'Broker', + 'CoretimeRenewer', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From 490ed3914464503365baedbb2c10776853e28993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 16:04:49 +0100 Subject: [PATCH 27/39] Disable credit purchase call in coretime filtering tests --- .../coretimeKusama.proxy.e2e.test.ts.snap | 159 ++++++++++++++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 159 ++++++++++++++++++ packages/shared/src/proxy.ts | 28 ++- 3 files changed, 345 insertions(+), 1 deletion(-) 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 b357919a9..b8061e1a5 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -685,6 +685,95 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet broker, call renew 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { @@ -814,3 +903,73 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`Kusama Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 0badfd0fb..ce04ef2c3 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -685,6 +685,95 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > even ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet broker, call renew 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0d000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { @@ -814,3 +903,73 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > e }, ] `; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 56f5db2f3..df5e0dd8d 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -77,6 +77,7 @@ interface ProxyActionBuilder { buildBalancesAction(): ProxyAction[] buildBountyAction(): ProxyAction[] buildBrokerAction(): ProxyAction[] + buildBrokerPurchaseCreditAction(): ProxyAction[] buildBrokerRenewerAction(): ProxyAction[] buildCancelProxyAction(): ProxyAction[] buildCollatorSelectionAction(): ProxyAction[] @@ -269,7 +270,7 @@ class ProxyActionBuilderImpl< } buildBrokerAction(): ProxyAction[] { - const brokerCalls: ProxyAction[] = [...this.buildBrokerRenewerAction()] + const brokerCalls: ProxyAction[] = [...this.buildBrokerRenewerAction(), ...this.buildBrokerPurchaseCreditAction()] if (this.client.api.tx.broker) { brokerCalls.push({ pallet: 'broker', @@ -281,6 +282,22 @@ class ProxyActionBuilderImpl< return brokerCalls } + buildBrokerPurchaseCreditAction(): ProxyAction[] { + const brokerPurchaseCreditCalls: ProxyAction[] = [] + + // TODO: Call disabled due to AHM. Credit must be purchased through the relay chain. + // Add this back in once the call is available. + /* if (this.client.api.tx.broker) { + brokerPurchaseCreditCalls.push({ + pallet: 'broker', + extrinsic: 'purchase_credit', + call: this.client.api.tx.broker.purchaseCredit(100e10, defaultAccountsSr25519.eve.address), + }) + } */ + + return brokerPurchaseCreditCalls + } + buildBrokerRenewerAction(): ProxyAction[] { const brokerRenewerCalls: ProxyAction[] = [] if (this.client.api.tx.broker) { @@ -750,6 +767,14 @@ function buildProxyAction< ...proxyActionBuilder.buildMultisigAction(), ]) + .with('OnDemandPurchaser', () => [ + // TODO: Call disabled due to AHM. Credit must be purchased through the relay chain. + // Add this back in once the call is available. + //...proxyActionBuilder.buildBrokerPurchaseCreditAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) + .otherwise(() => []) return result @@ -890,6 +915,7 @@ async function proxyCallFilteringTestRunner< 'Broker', 'CoretimeRenewer', + 'OnDemandPurchaser', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From 51621ac504449471588bec5b7cd7217083c10cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 17:32:32 +0100 Subject: [PATCH 28/39] Extend `Collator` proxy type call filtering test --- .../assetHubKusama.proxy.e2e.test.ts.snap | 70 +++++++++++++++++++ .../coretimeKusama.proxy.e2e.test.ts.snap | 70 +++++++++++++++++++ .../peopleKusama.proxy.e2e.test.ts.snap | 70 +++++++++++++++++++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 70 +++++++++++++++++++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 70 +++++++++++++++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 70 +++++++++++++++++++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 70 +++++++++++++++++++ packages/shared/src/proxy.ts | 6 +- 8 files changed, 495 insertions(+), 1 deletion(-) 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 13be60216..d9869b010 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -863,6 +863,76 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { 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 b8061e1a5..265d5141f 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -685,6 +685,76 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet broker, call renew 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 76032c256..11c0c89af 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -529,6 +529,76 @@ exports[`People Kusama Proxy > proxy call filtering test for Collator > events f ] `; +exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { 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 185c47c3a..54c224a26 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -863,6 +863,76 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > even ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { 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 1f0f962d2..faed39e34 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -824,6 +824,76 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > e ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > events for proxy action: proxy type Fellowship, pallet core_fellowship, call bump 1`] = ` [ { 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 ce04ef2c3..d649db04c 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -685,6 +685,76 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > even ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer > events for proxy action: proxy type CoretimeRenewer, pallet broker, call renew 1`] = ` [ { 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 50137404b..b8351f1e4 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -529,6 +529,76 @@ exports[`People Polkadot Proxy > proxy call filtering test for Collator > events ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index df5e0dd8d..bb1fcc936 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -702,7 +702,11 @@ function buildProxyAction< // System Parachains - .with('Collator', () => [...proxyActionBuilder.buildCollatorSelectionAction()]) + .with('Collator', () => [ + ...proxyActionBuilder.buildCollatorSelectionAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) // Asset Hubs From ccf5e3de2618ce1aced63abcbbd35d4db18b90b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 20:06:22 +0100 Subject: [PATCH 29/39] Display logging information in proxy call filtering test In case such a test fails, a message will now be displayed showing which call caused the failure. --- packages/shared/src/proxy.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index bb1fcc936..bdacfc8dc 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -871,7 +871,11 @@ async function proxyCallFilteringSingleTestRunner< // A call can have failed due to e.g. being semantically incorrect, but it can *never* have failed // due to having been filtered, as each proxy type is only given calls it is allowed to execute. - expect(client.api.errors.system.CallFiltered.is(error.asModule)).toBe(false) + expect( + client.api.errors.system.CallFiltered.is(error.asModule), + // Show failing pallet and extrinsic + `Call ${pallet}.${extrinsic} failed due to call filtering`, + ).toBe(false) } else { // The call was executed successfully - nothing to check. expect(proxyExecutedData.result.isOk).toBe(true) From 2881013f5631dba508b622541ec4427f40f6bcee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 22:49:47 +0100 Subject: [PATCH 30/39] Update block numbers --- KNOWN_GOOD_BLOCK_NUMBERS.env | 38 +++++++++---------- .../coretimePolkadot.proxy.e2e.test.ts.snap | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/KNOWN_GOOD_BLOCK_NUMBERS.env b/KNOWN_GOOD_BLOCK_NUMBERS.env index a7e46d711..e3e076f31 100644 --- a/KNOWN_GOOD_BLOCK_NUMBERS.env +++ b/KNOWN_GOOD_BLOCK_NUMBERS.env @@ -1,19 +1,19 @@ -ACALA_BLOCK_NUMBER=8348344 -ASSETHUBKUSAMA_BLOCK_NUMBER=9149521 -ASSETHUBPOLKADOT_BLOCK_NUMBER=8590096 -ASTAR_BLOCK_NUMBER=8478109 -BASILISK_BLOCK_NUMBER=8946191 -BRIDGEHUBKUSAMA_BLOCK_NUMBER=5509241 -BRIDGEHUBPOLKADOT_BLOCK_NUMBER=4905609 -COLLECTIVESPOLKADOT_BLOCK_NUMBER=6110340 -CORETIMEKUSAMA_BLOCK_NUMBER=2479503 -CORETIMEPOLKADOT_BLOCK_NUMBER=1525981 -HYDRATION_BLOCK_NUMBER=7297362 -KARURA_BLOCK_NUMBER=8911986 -KUSAMA_BLOCK_NUMBER=27838472 -MOONBEAM_BLOCK_NUMBER=10367247 -MOONRIVER_BLOCK_NUMBER=11069016 -PEOPLEKUSAMA_BLOCK_NUMBER=3684663 -PEOPLEPOLKADOT_BLOCK_NUMBER=1852078 -POLKADOT_BLOCK_NUMBER=25487822 -SHIDEN_BLOCK_NUMBER=9739208 +ACALA_BLOCK_NUMBER=8454981 +ASSETHUBKUSAMA_BLOCK_NUMBER=9249386 +ASSETHUBPOLKADOT_BLOCK_NUMBER=8699225 +ASTAR_BLOCK_NUMBER=8587493 +BASILISK_BLOCK_NUMBER=9159427 +BRIDGEHUBKUSAMA_BLOCK_NUMBER=5615934 +BRIDGEHUBPOLKADOT_BLOCK_NUMBER=5014653 +COLLECTIVESPOLKADOT_BLOCK_NUMBER=6219619 +CORETIMEKUSAMA_BLOCK_NUMBER=2584472 +CORETIMEPOLKADOT_BLOCK_NUMBER=1634813 +HYDRATION_BLOCK_NUMBER=7396934 +KARURA_BLOCK_NUMBER=9016188 +KUSAMA_BLOCK_NUMBER=28056920 +MOONBEAM_BLOCK_NUMBER=10584611 +MOONRIVER_BLOCK_NUMBER=11283833 +PEOPLEKUSAMA_BLOCK_NUMBER=3895556 +PEOPLEPOLKADOT_BLOCK_NUMBER=1960563 +POLKADOT_BLOCK_NUMBER=25707393 +SHIDEN_BLOCK_NUMBER=9951829 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 d649db04c..fe874632b 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -762,7 +762,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer "result": { "Err": { "Module": { - "error": "0x0d000000", + "error": "0x0b000000", "index": 50, }, }, From 3aeed150f12041eb5c85777b1b4a3b012300f4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Wed, 23 Apr 2025 23:20:52 +0100 Subject: [PATCH 31/39] Update `Broker` proxy type filtering test snapshots --- .../src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 fe874632b..bcfe66db6 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -546,7 +546,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events "result": { "Err": { "Module": { - "error": "0x0f000000", + "error": "0x0b000000", "index": 50, }, }, @@ -565,7 +565,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events "result": { "Err": { "Module": { - "error": "0x0d000000", + "error": "0x0b000000", "index": 50, }, }, From d3eb8e14f94919a44a8b98baa0e9ec1041ce23ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 24 Apr 2025 02:54:03 +0100 Subject: [PATCH 32/39] Improve stability of `Broker` proxy filtering test --- .../__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap | 2 +- .../coretimePolkadot.proxy.e2e.test.ts.snap | 2 +- packages/shared/src/proxy.ts | 9 +++++++++ 3 files changed, 11 insertions(+), 2 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 265d5141f..1a8b4c6b3 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -565,7 +565,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events f "result": { "Err": { "Module": { - "error": "0x0b000000", + "error": "0x0e000000", "index": 50, }, }, 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 bcfe66db6..5cfdb17c1 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -565,7 +565,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events "result": { "Err": { "Module": { - "error": "0x0b000000", + "error": "0x0e000000", "index": 50, }, }, diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index bdacfc8dc..42c08a7c1 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -301,6 +301,15 @@ class ProxyActionBuilderImpl< buildBrokerRenewerAction(): ProxyAction[] { const brokerRenewerCalls: ProxyAction[] = [] if (this.client.api.tx.broker) { + // Coretime renewal can fail for different reasons at different times, and this can cause unstable snapshots. + // To control which failure occurs, the global Coretime parachain's `Configuration` is set to `null`, + // as this way the call to `renew` will predictably fail on the nonexistence of a configuration. + this.client.dev.setStorage({ + Broker: { + Configuration: null, + }, + }) + brokerRenewerCalls.push({ pallet: 'broker', extrinsic: 'renew', From 0452ae27e2c7e3b3f098256e44601204fa2e7675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 24 Apr 2025 03:22:22 +0100 Subject: [PATCH 33/39] Test call fltering for identity proxy types --- .../peopleKusama.proxy.e2e.test.ts.snap | 197 ++++++++++++++++++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 197 ++++++++++++++++++ packages/shared/src/proxy.ts | 51 ++++- 3 files changed, 444 insertions(+), 1 deletion(-) 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 11c0c89af..922905ea4 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -599,6 +599,203 @@ exports[`People Kusama Proxy > proxy call filtering test for Collator > events f ] `; +exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet identity, call clear_identity 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet identity, call provide_judgement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet identity, call provide_judgement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { 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 b8351f1e4..6d5071b83 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -599,6 +599,203 @@ exports[`People Polkadot Proxy > proxy call filtering test for Collator > events ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet identity, call clear_identity 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet identity, call provide_judgement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet identity, call provide_judgement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for IdentityJudgement > events for proxy action: proxy type IdentityJudgement, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 42c08a7c1..ce789f520 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -88,6 +88,8 @@ interface ProxyActionBuilder { buildFellowshipReferendaAction(): ProxyAction[] buildFellowshipSalaryAction(): ProxyAction[] buildGovernanceAction(): ProxyAction[] + buildIdentityAction(): ProxyAction[] + buildIdentityJudgementAction(): ProxyAction[] buildMultisigAction(): ProxyAction[] buildNftsAction(): ProxyAction[] buildNftsManagerAction(): ProxyAction[] @@ -322,8 +324,9 @@ class ProxyActionBuilderImpl< buildCancelProxyAction(): ProxyAction[] { const cancelProxyCalls: ProxyAction[] = [] - const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' if (this.client.api.tx.proxy) { + const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' + cancelProxyCalls.push({ pallet: 'proxy', extrinsic: 'reject_announcement', @@ -448,6 +451,34 @@ class ProxyActionBuilderImpl< return governanceCalls } + buildIdentityAction(): ProxyAction[] { + const identityCalls: ProxyAction[] = [...this.buildIdentityJudgementAction()] + if (this.client.api.tx.identity) { + identityCalls.push({ + pallet: 'identity', + extrinsic: 'clear_identity', + call: this.client.api.tx.identity.clearIdentity(), + }) + } + + return identityCalls + } + + buildIdentityJudgementAction(): ProxyAction[] { + const identityJudgementCalls: ProxyAction[] = [] + if (this.client.api.tx.identity) { + const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' + + identityJudgementCalls.push({ + pallet: 'identity', + extrinsic: 'provide_judgement', + call: this.client.api.tx.identity.provideJudgement(0, defaultAccountsSr25519.eve.address, 'FeePaid', hash), + }) + } + + return identityJudgementCalls + } + buildMultisigAction(): ProxyAction[] { const testCall = this.client.api.tx.system.remark('hello').method.toHex() const multisigCalls: ProxyAction[] = [] @@ -788,6 +819,21 @@ function buildProxyAction< ...proxyActionBuilder.buildMultisigAction(), ]) + // Identity + + .with('Identity', () => [ + ...proxyActionBuilder.buildIdentityAction(), + ...proxyActionBuilder.buildIdentityJudgementAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) + + .with('IdentityJudgement', () => [ + ...proxyActionBuilder.buildIdentityJudgementAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildMultisigAction(), + ]) + .otherwise(() => []) return result @@ -933,6 +979,9 @@ async function proxyCallFilteringTestRunner< 'Broker', 'CoretimeRenewer', 'OnDemandPurchaser', + + 'Identity', + 'IdentityJudgement', ] for (const [proxyType, proxyTypeIx] of Object.entries(proxyTypes)) { From 628333bb0656fe5fa2a1c7459d890c63e15e3611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Thu, 24 Apr 2025 03:31:43 +0100 Subject: [PATCH 34/39] Update missing `CoretimeRenewer` proxy test snapshots --- .../src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap | 2 +- .../src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap | 2 +- 2 files changed, 2 insertions(+), 2 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 1a8b4c6b3..e2669c0f8 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -762,7 +762,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > "result": { "Err": { "Module": { - "error": "0x0b000000", + "error": "0x0e000000", "index": 50, }, }, 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 5cfdb17c1..fb9a111c6 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -762,7 +762,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer "result": { "Err": { "Module": { - "error": "0x0b000000", + "error": "0x0e000000", "index": 50, }, }, From ec184bbeed012ea46eec22ae8f238d03ab02ed89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Fri, 25 Apr 2025 13:53:20 +0100 Subject: [PATCH 35/39] Add missing utility/system actions to some proxy types --- .../assetHubKusama.proxy.e2e.test.ts.snap | 126 ++-------- .../coretimeKusama.proxy.e2e.test.ts.snap | 126 ++-------- .../kusama.proxy.e2e.test.ts.snap | 229 ++++++------------ .../peopleKusama.proxy.e2e.test.ts.snap | 126 ++-------- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 126 ++-------- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 126 ++-------- .../coretimePolkadot.proxy.e2e.test.ts.snap | 126 ++-------- .../peoplePolkadot.proxy.e2e.test.ts.snap | 126 ++-------- .../polkadot.proxy.tests.e2e.test.ts.snap | 190 ++++++--------- packages/shared/src/proxy.ts | 97 ++++++-- 10 files changed, 384 insertions(+), 1014 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 d9869b010..a89a17f7e 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -428,6 +428,28 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -933,25 +955,6 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -977,88 +980,3 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > eve }, ] `; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "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 e2669c0f8..bd0eb9c50 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -428,6 +428,28 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -844,25 +866,6 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -889,91 +892,6 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > eve ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` [ { 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 75b46ef6d..cf2a9a4c2 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -610,6 +610,47 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet nomination_pools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { @@ -882,26 +923,7 @@ exports[`Kusama Proxy > proxy call filtering test for Governance > events for pr ] `; -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x0b000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -918,7 +940,7 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -935,7 +957,7 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; -exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -952,53 +974,15 @@ exports[`Kusama Proxy > proxy call filtering test for NominationPools > events f ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet auctions, call bid 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x03000000", - "index": 72, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` -[ - { - "data": { - "index": 35, - }, - "method": "BountyProposed", - "section": "bounties", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x00000000", - "index": 31, + "error": "0x0b000000", + "index": 41, }, }, }, @@ -1009,51 +993,13 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` -[ - { - "data": { - "index": "(rounded 520)", - "proposal": { - "Inline": "0x00001468656c6c6f", - }, - "track": 30, - }, - "method": "Submitted", - "section": "referenda", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet staking, call bond 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` [ { - "data": { - "amount": 1000000000000, - "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Bonded", - "section": "staking", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", + "data": {}, + "method": "BatchCompleted", + "section": "utility", }, -] -`; - -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` -[ { "data": { "result": "Ok", @@ -1061,32 +1007,15 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch_all 1`] = ` [ { - "data": { - "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Remarked", - "section": "system", + "data": {}, + "method": "BatchCompleted", + "section": "utility", }, { "data": { @@ -1095,24 +1024,10 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p "method": "ProxyExecuted", "section": "proxy", }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -1129,16 +1044,18 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet auctions, call bid 1`] = ` [ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -1146,16 +1063,18 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Kusama Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` [ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x05000000", + "index": 0, + }, + }, + }, }, "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 922905ea4..fa455aedf 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -380,6 +380,28 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", + "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -796,25 +818,6 @@ exports[`People Kusama Proxy > proxy call filtering test for IdentityJudgement > ] `; -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -840,88 +843,3 @@ exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > event }, ] `; - -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "hash_": "(hash)", - "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 280000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "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 54c224a26..a6049f180 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -428,6 +428,28 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -933,25 +955,6 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > even ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -977,88 +980,3 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > e }, ] `; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "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 faed39e34..9d8507c4d 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -675,6 +675,28 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -1021,25 +1043,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -1065,88 +1068,3 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer }, ] `; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "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 fb9a111c6..a3df9ad98 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -428,6 +428,28 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -844,25 +866,6 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -889,91 +892,6 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > e ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 300000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` [ { 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 6d5071b83..e466be9e9 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -380,6 +380,28 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -796,25 +818,6 @@ exports[`People Polkadot Proxy > proxy call filtering test for IdentityJudgement ] `; -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -840,88 +843,3 @@ exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > eve }, ] `; - -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` -[ - { - "data": { - "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 280000000)", - }, - }, - }, - "method": "ExtrinsicSuccess", - "section": "system", - }, -] -`; - -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index fc022113e..6a228611a 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -514,6 +514,47 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet nomination_pools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 39, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +[ + { + "data": { + "delay": 0, + "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", + "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + "proxyType": "Any", + }, + "method": "ProxyAdded", + "section": "proxy", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { @@ -786,26 +827,7 @@ exports[`Polkadot Proxy > proxy call filtering test for Governance > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x0b000000", - "index": 39, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -822,7 +844,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -839,7 +861,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; -exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for Governance > events for proxy action: proxy type Governance, pallet utility, call force_batch 1`] = ` [ { "data": {}, @@ -856,15 +878,15 @@ exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet auctions, call bid 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet nomination_pools, call chill 1`] = ` [ { "data": { "result": { "Err": { "Module": { - "error": "0x03000000", - "index": 72, + "error": "0x0b000000", + "index": 39, }, }, }, @@ -875,14 +897,12 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch 1`] = ` [ { - "data": { - "index": 66, - }, - "method": "BountyProposed", - "section": "bounties", + "data": {}, + "method": "BatchCompleted", + "section": "utility", }, { "data": { @@ -894,37 +914,12 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 30, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call batch_all 1`] = ` [ { - "data": { - "index": "(rounded 1500)", - "proposal": { - "Inline": "0x00001468656c6c6f", - }, - "track": 30, - }, - "method": "Submitted", - "section": "referenda", + "data": {}, + "method": "BatchCompleted", + "section": "utility", }, { "data": { @@ -936,15 +931,12 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet staking, call bond 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NominationPools > events for proxy action: proxy type NominationPools, pallet utility, call force_batch 1`] = ` [ { - "data": { - "amount": 1000000000000, - "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Bonded", - "section": "staking", + "data": {}, + "method": "BatchCompleted", + "section": "utility", }, { "data": { @@ -956,67 +948,45 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet auctions, call bid 1`] = ` [ { "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 270000000)", + "result": { + "Err": { + "Module": { + "error": "0x03000000", + "index": 72, + }, }, }, }, - "method": "ExtrinsicSuccess", - "section": "system", + "method": "ProxyExecuted", + "section": "proxy", }, ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` [ { "data": { - "hash_": "(hash)", - "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - }, - "method": "Remarked", - "section": "system", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, - { - "data": { - "dispatchInfo": { - "class": "Normal", - "paysFee": "Yes", - "weight": { - "proofSize": "(rounded 4700)", - "refTime": "(rounded 280000000)", + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 29, + }, }, }, }, - "method": "ExtrinsicSuccess", - "section": "system", + "method": "ProxyExecuted", + "section": "proxy", }, ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet utility, call batch 1`] = ` [ { "data": {}, @@ -1033,7 +1003,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet utility, call batch_all 1`] = ` [ { "data": {}, @@ -1050,7 +1020,7 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet utility, call force_batch 1`] = ` [ { "data": {}, diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index ce789f520..7cbf6be90 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -6,7 +6,7 @@ import type { Keyring } from '@polkadot/api' import type { SubmittableExtrinsic } from '@polkadot/api/types' import type { KeyringPair } from '@polkadot/keyring/types' import type { Vec } from '@polkadot/types' -import type { PalletProxyProxyDefinition } from '@polkadot/types/lookup' +import type { FrameSystemEventRecord, PalletProxyProxyDefinition } from '@polkadot/types/lookup' import type { Codec, ISubmittableResult } from '@polkadot/types/types' import { encodeAddress } from '@polkadot/util-crypto' import { assert, describe, expect, test } from 'vitest' @@ -79,7 +79,6 @@ interface ProxyActionBuilder { buildBrokerAction(): ProxyAction[] buildBrokerPurchaseCreditAction(): ProxyAction[] buildBrokerRenewerAction(): ProxyAction[] - buildCancelProxyAction(): ProxyAction[] buildCollatorSelectionAction(): ProxyAction[] buildCrowdloanAction(): ProxyAction[] buildFastUnstakeAction(): ProxyAction[] @@ -96,6 +95,9 @@ interface ProxyActionBuilder { buildNftsOwnerAction(): ProxyAction[] buildNominationPoolsAction(): ProxyAction[] buildParasRegistrarAction(): ProxyAction[] + buildProxyAction(): ProxyAction[] + buildProxyRejectAnnouncementAction(): ProxyAction[] + buildProxyRemoveProxyAction(): ProxyAction[] buildSlotsAction(): ProxyAction[] buildSocietyAction(): ProxyAction[] buildStakingAction(): ProxyAction[] @@ -322,21 +324,6 @@ class ProxyActionBuilderImpl< return brokerRenewerCalls } - buildCancelProxyAction(): ProxyAction[] { - const cancelProxyCalls: ProxyAction[] = [] - if (this.client.api.tx.proxy) { - const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' - - cancelProxyCalls.push({ - pallet: 'proxy', - extrinsic: 'reject_announcement', - call: this.client.api.tx.proxy.rejectAnnouncement(defaultAccountsSr25519.eve.address, hash), - }) - } - - return cancelProxyCalls - } - buildCollatorSelectionAction(): ProxyAction[] { const collatorSelectionCalls: ProxyAction[] = [] if (this.client.api.tx.collatorSelection) { @@ -565,6 +552,56 @@ class ProxyActionBuilderImpl< return parasRegistrarCalls } + buildProxyAction(): ProxyAction[] { + const proxyCalls: ProxyAction[] = [] + if (this.client.api.tx.proxy) { + proxyCalls.concat([ + ...this.buildProxyRejectAnnouncementAction(), + // Can't include `remove_proxy` action, because the proxy type it will be called from may be a supertype of + // the calling proxy type. + ]) + + proxyCalls.push({ + pallet: 'proxy', + extrinsic: 'add_proxy', + call: this.client.api.tx.proxy.addProxy(defaultAccountsSr25519.eve.address, 'Any', 0), + }) + } + + return proxyCalls + } + + buildProxyRejectAnnouncementAction(): ProxyAction[] { + const cancelProxyCalls: ProxyAction[] = [] + if (this.client.api.tx.proxy) { + const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' + + cancelProxyCalls.push({ + pallet: 'proxy', + extrinsic: 'reject_announcement', + call: this.client.api.tx.proxy.rejectAnnouncement(defaultAccountsSr25519.eve.address, hash), + }) + } + + return cancelProxyCalls + } + + buildProxyRemoveProxyAction(): ProxyAction[] { + const proxyRemoveProxyCalls: ProxyAction[] = [] + if (this.client.api.tx.proxy) { + proxyRemoveProxyCalls.push({ + pallet: 'proxy', + extrinsic: 'remove_proxy', + // Careful not to ellicit 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, 9, 0), + }) + } + + return proxyRemoveProxyCalls + } + buildSlotsAction(): ProxyAction[] { const slotsCalls: ProxyAction[] = [] if (this.client.api.tx.slots) { @@ -697,9 +734,11 @@ function buildProxyAction< ...proxyActionBuilder.buildAuctionAction(), ...proxyActionBuilder.buildBalancesAction(), ...proxyActionBuilder.buildBountyAction(), + ...proxyActionBuilder.buildGovernanceAction(), ...proxyActionBuilder.buildMultisigAction(), + ...proxyActionBuilder.buildNominationPoolsAction(), + ...proxyActionBuilder.buildProxyAction(), ...proxyActionBuilder.buildStakingAction(), - ...proxyActionBuilder.buildGovernanceAction(), ...proxyActionBuilder.buildSystemAction(), ...proxyActionBuilder.buildUtilityAction(), ]) @@ -709,10 +748,19 @@ function buildProxyAction< ...proxyActionBuilder.buildBountyAction(), ...proxyActionBuilder.buildGovernanceAction(), ...proxyActionBuilder.buildMultisigAction(), + ...proxyActionBuilder.buildNominationPoolsAction(), + ...proxyActionBuilder.buildProxyAction(), ...proxyActionBuilder.buildStakingAction(), + ...proxyActionBuilder.buildSystemAction(), ...proxyActionBuilder.buildUtilityAction(), ]) - .with('CancelProxy', () => [...proxyActionBuilder.buildCancelProxyAction()]) + .with('CancelProxy', () => [ + // TODO: utility and system calls should be callable by such proxies, but on relay chains this is + // currently not the case, pending a PR to the `runtimes` repository. + ...proxyActionBuilder.buildProxyRejectAnnouncementAction(), + ...proxyActionBuilder.buildUtilityAction(), + ...proxyActionBuilder.buildSystemAction(), + ]) // Polkadot / Kusama @@ -724,6 +772,7 @@ function buildProxyAction< .with('Governance', () => [ ...proxyActionBuilder.buildBountyAction(), ...proxyActionBuilder.buildGovernanceAction(), + ...proxyActionBuilder.buildUtilityAction(), ]) .with('Staking', () => [ ...proxyActionBuilder.buildFastUnstakeAction(), @@ -738,7 +787,13 @@ function buildProxyAction< .with('Society', () => [...proxyActionBuilder.buildSocietyAction()]) .with('Spokesperson', () => [...proxyActionBuilder.buildSystemAction()]) - .with('ParaRegistration', () => [...proxyActionBuilder.buildParasRegistrarAction()]) + .with('ParaRegistration', () => [ + ...proxyActionBuilder.buildParasRegistrarAction(), + ...proxyActionBuilder.buildProxyRemoveProxyAction(), + // This proxy type can only call batch extrinsics from `pallet_utility`, which happens to coincide with the + // current implementation of `buildUtilityAction`. + ...proxyActionBuilder.buildUtilityAction(), + ]) // System Parachains @@ -915,7 +970,7 @@ async function proxyCallFilteringSingleTestRunner< const { event } = record return event.section === 'proxy' && event.method === 'ProxyExecuted' }) - .forEach((record) => { + .forEach((record: FrameSystemEventRecord) => { assert(client.api.events.proxy.ProxyExecuted.is(record.event)) const proxyExecutedData = record.event.data if (proxyExecutedData.result.isErr) { From d336b745bd628ba5be51ed4cc03366616e030a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Fri, 25 Apr 2025 16:06:43 +0100 Subject: [PATCH 36/39] Disable some call filtering tests pending fixes 1. Kusama `ParaRegistration` proxy type cannot call `remove_proxy` 2. `CancelProxy` types outside of relay chains cannot call utility/system actions --- .../assetHubKusama.proxy.e2e.test.ts.snap | 253 ++++++++++++++ .../coretimeKusama.proxy.e2e.test.ts.snap | 253 ++++++++++++++ .../kusama.proxy.e2e.test.ts.snap | 309 ++++++++++++++++++ .../peopleKusama.proxy.e2e.test.ts.snap | 272 +++++++++++++++ .../assetHubPolkadot.proxy.e2e.test.ts.snap | 253 ++++++++++++++ ...collectivesPolkadot.proxy.e2e.test.ts.snap | 253 ++++++++++++++ .../coretimePolkadot.proxy.e2e.test.ts.snap | 253 ++++++++++++++ .../peoplePolkadot.proxy.e2e.test.ts.snap | 272 +++++++++++++++ .../polkadot.proxy.tests.e2e.test.ts.snap | 309 ++++++++++++++++++ packages/shared/src/proxy.ts | 133 ++++---- packages/shared/src/vesting.ts | 2 +- 11 files changed, 2497 insertions(+), 65 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 a89a17f7e..160804a44 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -450,6 +450,25 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -866,6 +885,57 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > eve ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { @@ -955,6 +1025,44 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events ] `; +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -980,3 +1088,148 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 bd0eb9c50..af8d134e9 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -450,6 +450,25 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -688,6 +707,57 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > eve ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { @@ -866,6 +936,44 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for CoretimeRenewer > ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -892,6 +1000,151 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > eve ] `; +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` [ { 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 cf2a9a4c2..335159c9e 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -651,6 +651,25 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; +exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 30, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { @@ -1063,6 +1082,296 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` +[ + { + "data": { + "index": 35, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 31, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet nomination_pools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 30, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` +[ + { + "data": { + "index": "(rounded 520)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet staking, call bond 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Kusama Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet proxy, call remove_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 fa455aedf..573ad1e04 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -402,6 +402,25 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -532,6 +551,57 @@ exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > event ] `; +exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { @@ -659,6 +729,25 @@ exports[`People Kusama Proxy > proxy call filtering test for Identity > events f ] `; +exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet identity, call provide_judgement 2`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet multisig, call as_multi 1`] = ` [ { @@ -818,6 +907,44 @@ exports[`People Kusama Proxy > proxy call filtering test for IdentityJudgement > ] `; +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -843,3 +970,148 @@ exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > event }, ] `; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 a6049f180..215ba2221 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -450,6 +450,25 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -866,6 +885,57 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > e ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { @@ -955,6 +1025,44 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > even ] `; +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -980,3 +1088,148 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > e }, ] `; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot AssetHub Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 9d8507c4d..77effe711 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -697,6 +697,25 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -827,6 +846,57 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { @@ -1043,6 +1113,44 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Fellowship > ] `; +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -1068,3 +1176,148 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer }, ] `; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Collectives Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "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 a3df9ad98..4d0e0d3c6 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -450,6 +450,25 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -688,6 +707,57 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > e ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { @@ -866,6 +936,44 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CoretimeRenewer ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -892,6 +1000,151 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > e ] `; +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 300000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Coretime Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Coretime Proxy > proxy call filtering test for OnDemandPurchaser > events for proxy action: proxy type OnDemandPurchaser, pallet multisig, call as_multi 1`] = ` [ { 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 e466be9e9..9304aa827 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -402,6 +402,25 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet system, call remark 1`] = ` [ { @@ -532,6 +551,57 @@ exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > eve ] `; +exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { @@ -659,6 +729,25 @@ exports[`People Polkadot Proxy > proxy call filtering test for Identity > events ] `; +exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet identity, call provide_judgement 2`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x08000000", + "index": 50, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for Identity > events for proxy action: proxy type Identity, pallet multisig, call as_multi 1`] = ` [ { @@ -818,6 +907,44 @@ exports[`People Polkadot Proxy > proxy call filtering test for IdentityJudgement ] `; +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 42, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` [ { @@ -843,3 +970,148 @@ exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > eve }, ] `; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`People Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 6a228611a..52534181d 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -555,6 +555,25 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; +exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 29, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet referenda, call submit 1`] = ` [ { @@ -967,6 +986,296 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet bounties, call propose_bounty 1`] = ` +[ + { + "data": { + "index": 66, + }, + "method": "BountyProposed", + "section": "bounties", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet multisig, call as_multi 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 30, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet nomination_pools, call chill 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x0b000000", + "index": 39, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet proxy, call remove_announcement 1`] = ` +[ + { + "data": { + "result": { + "Err": { + "Module": { + "error": "0x01000000", + "index": 29, + }, + }, + }, + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet referenda, call submit 1`] = ` +[ + { + "data": { + "index": "(rounded 1500)", + "proposal": { + "Inline": "0x00001468656c6c6f", + }, + "track": 30, + }, + "method": "Submitted", + "section": "referenda", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet staking, call bond 1`] = ` +[ + { + "data": { + "amount": 1000000000000, + "stash": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Bonded", + "section": "staking", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 1`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 270000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark 2`] = ` +[ + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 270000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 1`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet system, call remark_with_event 2`] = ` +[ + { + "data": { + "hash_": "(hash)", + "sender": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", + }, + "method": "Remarked", + "section": "system", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, + { + "data": { + "dispatchInfo": { + "class": "Normal", + "paysFee": "Yes", + "weight": { + "proofSize": "(rounded 4700)", + "refTime": "(rounded 280000000)", + }, + }, + }, + "method": "ExtrinsicSuccess", + "section": "system", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call batch_all 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + +exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for proxy action: proxy type NonTransfer, pallet utility, call force_batch 1`] = ` +[ + { + "data": {}, + "method": "BatchCompleted", + "section": "utility", + }, + { + "data": { + "result": "Ok", + }, + "method": "ProxyExecuted", + "section": "proxy", + }, +] +`; + exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` [ { diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 7cbf6be90..32915916f 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -6,8 +6,8 @@ import type { Keyring } from '@polkadot/api' import type { SubmittableExtrinsic } from '@polkadot/api/types' import type { KeyringPair } from '@polkadot/keyring/types' import type { Vec } from '@polkadot/types' -import type { FrameSystemEventRecord, PalletProxyProxyDefinition } from '@polkadot/types/lookup' -import type { Codec, ISubmittableResult } from '@polkadot/types/types' +import type { PalletProxyProxyDefinition } from '@polkadot/types/lookup' +import type { ISubmittableResult } from '@polkadot/types/types' import { encodeAddress } from '@polkadot/util-crypto' import { assert, describe, expect, test } from 'vitest' import { check, checkEvents } from './helpers/index.js' @@ -557,14 +557,15 @@ class ProxyActionBuilderImpl< if (this.client.api.tx.proxy) { proxyCalls.concat([ ...this.buildProxyRejectAnnouncementAction(), - // Can't include `remove_proxy` action, because the proxy type it will be called from may be a supertype of + // Can't include `add_proxy/remove_proxy` action, because the proxy type it will be called from may be a supertype of // the calling proxy type. ]) + const hash = '0x0000000000000000000000000000000000000000000000000000000000000000' proxyCalls.push({ pallet: 'proxy', - extrinsic: 'add_proxy', - call: this.client.api.tx.proxy.addProxy(defaultAccountsSr25519.eve.address, 'Any', 0), + extrinsic: 'remove_announcement', + call: this.client.api.tx.proxy.removeAnnouncement(defaultAccountsSr25519.eve.address, hash), }) } @@ -718,12 +719,14 @@ class ProxyActionBuilderImpl< * * Pattern matches on the proxy type (as string); if incorrect or nonexistent, the result is an empty list. */ -function buildProxyAction< +async function buildProxyAction< TCustom extends Record | undefined, TInitStorages extends Record> | undefined, ->(proxyType: string, client: Client): ProxyAction[] { +>(proxyType: string, client: Client): Promise { const proxyActionBuilder = new ProxyActionBuilderImpl(client) + const c = await client.api.rpc.system.chain() + // Note the pattern used: if the network has a certain pallet available, the list returned by the proxy action // builder won't be empty. // Otherwise, it will be empty, and this is a no-op. @@ -758,8 +761,8 @@ function buildProxyAction< // TODO: utility and system calls should be callable by such proxies, but on relay chains this is // currently not the case, pending a PR to the `runtimes` repository. ...proxyActionBuilder.buildProxyRejectAnnouncementAction(), - ...proxyActionBuilder.buildUtilityAction(), - ...proxyActionBuilder.buildSystemAction(), + //...proxyActionBuilder.buildUtilityAction(), + //...proxyActionBuilder.buildSystemAction(), ]) // Polkadot / Kusama @@ -787,13 +790,23 @@ function buildProxyAction< .with('Society', () => [...proxyActionBuilder.buildSocietyAction()]) .with('Spokesperson', () => [...proxyActionBuilder.buildSystemAction()]) - .with('ParaRegistration', () => [ - ...proxyActionBuilder.buildParasRegistrarAction(), - ...proxyActionBuilder.buildProxyRemoveProxyAction(), - // This proxy type can only call batch extrinsics from `pallet_utility`, which happens to coincide with the - // current implementation of `buildUtilityAction`. - ...proxyActionBuilder.buildUtilityAction(), - ]) + .with('ParaRegistration', () => { + const paraRegistrationCalls: ProxyAction[] = [] + + paraRegistrationCalls.concat([ + ...proxyActionBuilder.buildParasRegistrarAction(), + // This proxy type can only call batch extrinsics from `pallet_utility`, which happens to coincide with the + // current implementation of `buildUtilityAction`. + ...proxyActionBuilder.buildUtilityAction(), + ]) + // TODO: `ParaRegistration` proxy type cannot call `remove_proxy`, cause unknown. + // Pending a fix in `runtimes` repository, this can be re-enabled. + if (!c.toString().includes('Kusama')) { + paraRegistrationCalls.concat([...proxyActionBuilder.buildProxyRemoveProxyAction()]) + } + + return paraRegistrationCalls + }) // System Parachains @@ -917,7 +930,7 @@ async function proxyCallFilteringSingleTestRunner< await client.dev.newBlock() - const proxyActions = buildProxyAction(proxyType, client) + const proxyActions = await buildProxyAction(proxyType, client) if (proxyActions.length === 0) { return } @@ -930,67 +943,59 @@ async function proxyCallFilteringSingleTestRunner< let proxyAccountNonce = (await client.api.rpc.system.accountNextIndex(proxyAccount.address)).toNumber() - // Create a record to store transaction results - const transactionResults: Record }> = {} - - // First, send all of the proxy extrinsics. + // Execute each proxy action in its own block and check its results immediately for (const proxyAction of proxyActions) { - // Recall that `proxyActions` is an array of extrinsics meant to be executed by the proxy, on behalf of the - // delegating account. const proxyTx = client.api.tx.proxy.proxy(alice.address, proxyTypeIx, proxyAction.call) + const result = await sendTransaction(proxyTx.signAsync(proxyAccount, { nonce: proxyAccountNonce++ })) - transactionResults[`${proxyAction.pallet}.${proxyAction.extrinsic}`] = await sendTransaction( - proxyTx.signAsync(proxyAccount, { nonce: proxyAccountNonce++ }), - ) - } + // Advance to the next block to ensure events are processed + await client.dev.newBlock() - // Advance through a single block. - await client.dev.newBlock() + // Check the events for this specific call + const events = await client.api.query.system.events() + const proxyExecutedEvents = events.filter((record) => { + const { event } = record + return event.section === 'proxy' && event.method === 'ProxyExecuted' + }) - // Then, for all of the emitted events, verify proxy call execution results. - for (const [actionKey, proxyActionEvents] of Object.entries(transactionResults)) { - const [pallet, extrinsic] = actionKey.split('.') + // We should have exactly one ProxyExecuted event for this call + expect(proxyExecutedEvents.length).toBe(1) + + // Check the result of this specific call + const proxyExecutedEvent = proxyExecutedEvents[0] + assert(client.api.events.proxy.ProxyExecuted.is(proxyExecutedEvent.event)) + const proxyExecutedData = proxyExecutedEvent.event.data + + if (proxyExecutedData.result.isErr) { + const error = proxyExecutedData.result.asErr + // The error must be a module error (`system` is where `CallFiltered` exists), and no other e.g. `BadOrigin`. + // It is assumed that the calls chosen can be executed with signed origins. + assert(error.isModule) + + // A call can have failed due to e.g. being semantically incorrect, but it can *never* have failed + // due to having been filtered, as each proxy type is only given calls it is allowed to execute. + expect( + client.api.errors.system.CallFiltered.is(error.asModule), + // Show failing pallet and extrinsic + `Call ${proxyAction.pallet}.${proxyAction.extrinsic} failed due to call filtering`, + ).toBe(false) + } else { + // The call was executed successfully - nothing to check. + expect(proxyExecutedData.result.isOk).toBe(true) + } // If the pallet being tested is `balances`, its events should not be included in the snapshot // to avoid including block-specific fee events, which are unstable inbetween runs. let eventChecker: Checker - if (pallet !== 'balances') { - eventChecker = checkEvents(proxyActionEvents, 'proxy', pallet) + if (proxyAction.pallet !== 'balances') { + eventChecker = checkEvents(result, 'proxy', proxyAction.pallet) } else { - eventChecker = checkEvents(proxyActionEvents, 'proxy') + eventChecker = checkEvents(result, 'proxy') } await eventChecker.toMatchSnapshot( - `events for proxy action: proxy type ${proxyType}, pallet ${pallet}, call ${extrinsic}`, + `events for proxy action: proxy type ${proxyType}, pallet ${proxyAction.pallet}, call ${proxyAction.extrinsic}`, ) - - const events = await client.api.query.system.events() - events - .filter((record) => { - const { event } = record - return event.section === 'proxy' && event.method === 'ProxyExecuted' - }) - .forEach((record: FrameSystemEventRecord) => { - assert(client.api.events.proxy.ProxyExecuted.is(record.event)) - const proxyExecutedData = record.event.data - if (proxyExecutedData.result.isErr) { - const error = proxyExecutedData.result.asErr - // The error must be a module error (`system` is where `CallFiltered` exists), and no other e.g. `BadOrigin`. - // It is assumed that the calls chosen can be executed with signed origins. - assert(error.isModule) - - // A call can have failed due to e.g. being semantically incorrect, but it can *never* have failed - // due to having been filtered, as each proxy type is only given calls it is allowed to execute. - expect( - client.api.errors.system.CallFiltered.is(error.asModule), - // Show failing pallet and extrinsic - `Call ${pallet}.${extrinsic} failed due to call filtering`, - ).toBe(false) - } else { - // The call was executed successfully - nothing to check. - expect(proxyExecutedData.result.isOk).toBe(true) - } - }) } } diff --git a/packages/shared/src/vesting.ts b/packages/shared/src/vesting.ts index e1446f728..3392e1683 100644 --- a/packages/shared/src/vesting.ts +++ b/packages/shared/src/vesting.ts @@ -442,7 +442,7 @@ export function vestingE2ETests< const c = await client.api.rpc.system.chain() // The vesting pallet will be disabled on Asset Hubs while the AHM is prepared/ongoing, so this ensures some tests - // using `vesting.vestedTrasnfer` are only run on relay chains. + // using `vesting.vestedTransfer` are only run on relay chains. // Furthermore, some tests use the `scheduler` pallet, which is not present on Asset Hubs, so they are put here // even if they do not include on vested transfers. if (!c.toString().includes('Asset Hub')) { From 97cc1a8c502bccdf267d1c4dc7ac0c5e122c293b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Fri, 25 Apr 2025 16:22:26 +0100 Subject: [PATCH 37/39] Update snapshots --- .../assetHubKusama.proxy.e2e.test.ts.snap | 73 ------------- .../coretimeKusama.proxy.e2e.test.ts.snap | 73 ------------- .../kusama.proxy.e2e.test.ts.snap | 41 ------- .../peopleKusama.proxy.e2e.test.ts.snap | 103 +++++------------- .../assetHubPolkadot.proxy.e2e.test.ts.snap | 73 ------------- ...collectivesPolkadot.proxy.e2e.test.ts.snap | 73 ------------- .../coretimePolkadot.proxy.e2e.test.ts.snap | 73 ------------- .../peoplePolkadot.proxy.e2e.test.ts.snap | 73 ------------- .../polkadot.proxy.tests.e2e.test.ts.snap | 92 ---------------- 9 files changed, 30 insertions(+), 644 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 160804a44..1883318a0 100644 --- a/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/assetHubKusama.proxy.e2e.test.ts.snap @@ -428,28 +428,6 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -885,57 +863,6 @@ exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > eve ] `; -exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { 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 af8d134e9..9944c4c05 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -428,28 +428,6 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -707,57 +685,6 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > eve ] `; -exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Kusama Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { 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 335159c9e..a3e0e10f2 100644 --- a/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/kusama.proxy.e2e.test.ts.snap @@ -629,28 +629,6 @@ exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy act ] `; -exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -1372,25 +1350,6 @@ exports[`Kusama Proxy > proxy call filtering test for NonTransfer > events for p ] `; -exports[`Kusama Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x05000000", - "index": 0, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Kusama Proxy > proxy call filtering test for Society > events for proxy action: proxy type Society, pallet society, call bid 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 573ad1e04..37aecde52 100644 --- a/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/peopleKusama.proxy.e2e.test.ts.snap @@ -321,6 +321,8 @@ exports[`People Kusama Proxy > perform proxy call on behalf of delegator > event exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Alice rejects Bob's proxy call announcement 1`] = `[]`; +exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Alice rejects Bob's proxy call announcement 2`] = `[]`; + exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 1`] = ` [ { @@ -335,21 +337,21 @@ 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`] = ` +exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob announces a proxy call 2`] = ` [ { "data": { - "result": "Ok", + "callHash": "(hash)", + "proxy": "FoQJpPyadYccjavVdTWxpxU7rUEaYhfLCPwXgkfD6Zat9QP", + "real": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", }, - "method": "ProxyExecuted", + "method": "Announced", "section": "proxy", }, ] `; -exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; - -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` +exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 1`] = ` [ { "data": { @@ -361,18 +363,11 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob performs the announced proxy call 2`] = ` [ { "data": { - "result": { - "Err": { - "Module": { - "error": "0x00000000", - "index": 41, - }, - }, - }, + "result": "Ok", }, "method": "ProxyExecuted", "section": "proxy", @@ -380,21 +375,34 @@ exports[`People Kusama Proxy > proxy call filtering test for Any > events for pr ] `; -exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` +exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 1`] = `[]`; + +exports[`People Kusama Proxy > proxy announcement lifecycle test > events when Bob removes their proxy call announcement 2`] = `[]`; + +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet balances, call burn 1`] = ` [ { "data": { - "delay": 0, - "delegatee": "HnMAUz7r2G8G3hB27SYNyit5aJmh2a5P4eMdDtACtMFDbam", - "delegator": "HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F", - "proxyType": "Any", + "result": "Ok", }, - "method": "ProxyAdded", + "method": "ProxyExecuted", "section": "proxy", }, +] +`; + +exports[`People Kusama Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet multisig, call as_multi 1`] = ` +[ { "data": { - "result": "Ok", + "result": { + "Err": { + "Module": { + "error": "0x00000000", + "index": 41, + }, + }, + }, }, "method": "ProxyExecuted", "section": "proxy", @@ -551,57 +559,6 @@ exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > event ] `; -exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Kusama Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`People Kusama Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { 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 215ba2221..c16d1005a 100644 --- a/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/assetHubPolkadot.proxy.e2e.test.ts.snap @@ -428,28 +428,6 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot AssetHub Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -885,57 +863,6 @@ exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > e ] `; -exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot AssetHub Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot AssetHub Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { 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 77effe711..b7756d102 100644 --- a/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/collectivesPolkadot.proxy.e2e.test.ts.snap @@ -675,28 +675,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Collectives Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -846,57 +824,6 @@ exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy ] `; -exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Collectives Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Collectives Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { 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 4d0e0d3c6..55aa413bc 100644 --- a/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap @@ -428,28 +428,6 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events fo ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Coretime Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -707,57 +685,6 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > e ] `; -exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Coretime Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Coretime Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { 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 9304aa827..f80a47bae 100644 --- a/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/peoplePolkadot.proxy.e2e.test.ts.snap @@ -380,28 +380,6 @@ exports[`People Polkadot Proxy > proxy call filtering test for Any > events for ] `; -exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`People Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -551,57 +529,6 @@ exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > eve ] `; -exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`People Polkadot Proxy > proxy call filtering test for CancelProxy > events for proxy action: proxy type CancelProxy, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`People Polkadot Proxy > proxy call filtering test for Collator > events for proxy action: proxy type Collator, pallet collator_selection, call register_as_candidate 1`] = ` [ { diff --git a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap index 52534181d..e0c12b0ba 100644 --- a/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap +++ b/packages/polkadot/src/__snapshots__/polkadot.proxy.tests.e2e.test.ts.snap @@ -533,28 +533,6 @@ exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy a ] `; -exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call add_proxy 1`] = ` -[ - { - "data": { - "delay": 0, - "delegatee": "16D2eVuK5SWfwvtFD3gVdBC2nc2BafK31BY6PrbZHBAGew7L", - "delegator": "15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5", - "proxyType": "Any", - }, - "method": "ProxyAdded", - "section": "proxy", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Proxy > proxy call filtering test for Any > events for proxy action: proxy type Any, pallet proxy, call remove_announcement 1`] = ` [ { @@ -1276,76 +1254,6 @@ exports[`Polkadot Proxy > proxy call filtering test for NonTransfer > events for ] `; -exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet proxy, call remove_proxy 1`] = ` -[ - { - "data": { - "result": { - "Err": { - "Module": { - "error": "0x01000000", - "index": 29, - }, - }, - }, - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet utility, call batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet utility, call batch_all 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - -exports[`Polkadot Proxy > proxy call filtering test for ParaRegistration > events for proxy action: proxy type ParaRegistration, pallet utility, call force_batch 1`] = ` -[ - { - "data": {}, - "method": "BatchCompleted", - "section": "utility", - }, - { - "data": { - "result": "Ok", - }, - "method": "ProxyExecuted", - "section": "proxy", - }, -] -`; - exports[`Polkadot Proxy > proxy call filtering test for Staking > events for proxy action: proxy type Staking, pallet nomination_pools, call chill 1`] = ` [ { From bf42b50f5279ff4683ae9794d7e7f2ad646666a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 29 Apr 2025 00:44:09 +0100 Subject: [PATCH 38/39] Remove duplicate TODO note --- packages/shared/src/proxy.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/shared/src/proxy.ts b/packages/shared/src/proxy.ts index 32915916f..b6a836c58 100644 --- a/packages/shared/src/proxy.ts +++ b/packages/shared/src/proxy.ts @@ -799,8 +799,8 @@ async function buildProxyAction< // current implementation of `buildUtilityAction`. ...proxyActionBuilder.buildUtilityAction(), ]) - // TODO: `ParaRegistration` proxy type cannot call `remove_proxy`, cause unknown. - // Pending a fix in `runtimes` repository, this can be re-enabled. + // TODO: In Kusama, `ParaRegistration` proxy type cannot call `remove_proxy`, cause unknown. + // Pending a fix in the `runtimes` repository, this can be re-enabled. if (!c.toString().includes('Kusama')) { paraRegistrationCalls.concat([...proxyActionBuilder.buildProxyRemoveProxyAction()]) } @@ -880,9 +880,7 @@ async function buildProxyAction< ]) .with('OnDemandPurchaser', () => [ - // TODO: Call disabled due to AHM. Credit must be purchased through the relay chain. - // Add this back in once the call is available. - //...proxyActionBuilder.buildBrokerPurchaseCreditAction(), + ...proxyActionBuilder.buildBrokerPurchaseCreditAction(), ...proxyActionBuilder.buildUtilityAction(), ...proxyActionBuilder.buildMultisigAction(), ]) From 82bb5a503ae440aa7be09d3fbd146095f3fa5963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bald=C3=A9?= Date: Tue, 29 Apr 2025 01:11:02 +0100 Subject: [PATCH 39/39] Update snapshot --- .../src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9944c4c05..51e4f2b0f 100644 --- a/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap +++ b/packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap @@ -565,7 +565,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events f "result": { "Err": { "Module": { - "error": "0x0b000000", + "error": "0x0f000000", "index": 50, }, },