From 3f7568dce5dabfbf95d633839cfd55bcde0a23cf Mon Sep 17 00:00:00 2001 From: KarishmaBothara Date: Wed, 30 Oct 2024 14:41:40 +0400 Subject: [PATCH] Multisig example --- .../use-fp-multisig-wallet/src/createMultiSigWallet.ts | 2 +- .../use-fp-multisig-wallet/src/createProxyExtrinsic.ts | 2 -- .../use-fp-multisig-wallet/src/signBySecondHolder.ts | 5 ++--- pnpm-lock.yaml | 9 ++++----- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/examples/substrate/use-fp-multisig-wallet/src/createMultiSigWallet.ts b/examples/substrate/use-fp-multisig-wallet/src/createMultiSigWallet.ts index 33c1d4b..1f325de 100644 --- a/examples/substrate/use-fp-multisig-wallet/src/createMultiSigWallet.ts +++ b/examples/substrate/use-fp-multisig-wallet/src/createMultiSigWallet.ts @@ -8,7 +8,7 @@ export const command = "createMultiSigWallet"; export const desc = "Create a multisig wallet from given addresses"; // Create a multisig wallet from given addresses" -withChainApi("porcini", async (api, caller, logger) => { +withChainApi("porcini", async (api, ) => { const genesisHash = api.genesisHash; const signatoryList = [ "0xFFfFffFF000000000000000000000000000003CD", diff --git a/examples/substrate/use-fp-multisig-wallet/src/createProxyExtrinsic.ts b/examples/substrate/use-fp-multisig-wallet/src/createProxyExtrinsic.ts index 2b863c4..c334269 100644 --- a/examples/substrate/use-fp-multisig-wallet/src/createProxyExtrinsic.ts +++ b/examples/substrate/use-fp-multisig-wallet/src/createProxyExtrinsic.ts @@ -24,7 +24,6 @@ withChainApi("porcini", async (api, caller, logger) => { console.log("signatoryList::", signatoryList); const threshold = signatoryList.length; const maybeTimepoint = null; - const storeCall = false; const maxWeight = 0; const multiSigCall = await api.tx.multisig.asMulti( @@ -32,7 +31,6 @@ withChainApi("porcini", async (api, caller, logger) => { signatoryList, maybeTimepoint, encodedCallData, - storeCall, maxWeight ); const proxyExtrinsic = await api.tx.futurepass.proxyExtrinsic(fpassAccount, multiSigCall); diff --git a/examples/substrate/use-fp-multisig-wallet/src/signBySecondHolder.ts b/examples/substrate/use-fp-multisig-wallet/src/signBySecondHolder.ts index 1fbc0ce..e1cb35c 100644 --- a/examples/substrate/use-fp-multisig-wallet/src/signBySecondHolder.ts +++ b/examples/substrate/use-fp-multisig-wallet/src/signBySecondHolder.ts @@ -25,7 +25,6 @@ withChainApi("porcini", async (api, caller, logger) => { const multiSigWallet = "0xe944FAd69B79125706D2481f58b66fcDbED358d7"; console.log("signatoryList::", signatoryList); const threshold = signatoryList.length; - const storeCall = false; let timepoint = {}; const allEntries = await api.query.multisig.multisigs.entries(multiSigWallet); allEntries.forEach( @@ -40,14 +39,14 @@ withChainApi("porcini", async (api, caller, logger) => { } ); const maybeTimepoint = api.registry.createType("Option", timepoint); - const maxWeight = 882400098; + const proofSize = 882400098; console.log("maybeTimepointData::", maybeTimepoint.toHuman()); + const maxWeight = api.registry.createType("SpWeightsWeightV2Weight", {refTime: 646755879000, proofSize }); const multiSigCall = await api.tx.multisig.asMulti( threshold, signatoryList, maybeTimepoint, encodedCallData, - storeCall, maxWeight ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index baf25e3..dc35c9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -80,10 +80,6 @@ importers: examples/evm/use-forge: {} - examples/evm/use-forge/lib/forge-std: {} - - examples/evm/use-forge/lib/forge-std/lib/ds-test: {} - examples/evm/use-futurepass: {} examples/evm/use-hardhat: @@ -149,6 +145,8 @@ importers: examples/substrate/use-feeProxy: {} + examples/substrate/use-fp-multisig-wallet: {} + examples/substrate/use-futurepass: {} examples/substrate/use-marketplace: {} @@ -3990,6 +3988,7 @@ packages: /glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + deprecated: Glob versions prior to v9 are no longer supported dependencies: fs.realpath: 1.0.0 inflight: 1.0.6