Skip to content

Commit

Permalink
Multisig example
Browse files Browse the repository at this point in the history
  • Loading branch information
KarishmaBothara committed Oct 30, 2024
1 parent c223ba3 commit 3f7568d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ 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(
threshold,
signatoryList,
maybeTimepoint,
encodedCallData,
storeCall,
maxWeight
);
const proxyExtrinsic = await api.tx.futurepass.proxyExtrinsic(fpassAccount, multiSigCall);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -40,14 +39,14 @@ withChainApi("porcini", async (api, caller, logger) => {
}
);
const maybeTimepoint = api.registry.createType("Option<Timepoint>", 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
);

Expand Down
9 changes: 4 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3f7568d

Please sign in to comment.