Skip to content

Commit

Permalink
update collective manipulation for OpenTechCommitteeCollective (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
noandrea authored Apr 29, 2024
1 parent 8c2f3f4 commit 9f889cd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
5 changes: 2 additions & 3 deletions src/libs/helpers/state-manipulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ await processState(stateFile, stateFile.replace(/.json$/, ".mod.json"), [
relayChain: `rococo-local`,
}),

// Make the Council & Technical committee governed by Alith
new CollectiveManipulator("TechCommitteeCollective", [ALITH_ADDRESS]),
new CollectiveManipulator("CouncilCollective", [ALITH_ADDRESS]),
// Make the Open Technical committee governed by Alith
new CollectiveManipulator("OpenTechCommitteeCollective", [ALITH_ADDRESS]),

// Reset the validation data
new ValidationManipulator(),
Expand Down
6 changes: 2 additions & 4 deletions src/libs/helpers/state-manipulator/state-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ export async function neutralizeExportedState(
name: `Fork Network`,
relayChain: `rococo-local`,
}),
new CollectiveManipulator("TechCommitteeCollective", [ALITH_ADDRESS]),
new CollectiveManipulator("CouncilCollective", [ALITH_ADDRESS]),
new CollectiveManipulator("OpenTechCommitteeCollective", [ALITH_ADDRESS]),
new ValidationManipulator(),
new XCMPManipulator(),
new BalancesManipulator([
Expand Down Expand Up @@ -259,8 +258,7 @@ export async function insertParachainCodeIntoRelay(inFile: string, outFile: stri
name: `Fork Network`,
relayChain: `rococo-local`,
}),
new CollectiveManipulator("TechCommitteeCollective", [ALITH_ADDRESS]),
new CollectiveManipulator("CouncilCollective", [ALITH_ADDRESS]),
new CollectiveManipulator("OpenTechCommitteeCollective", [ALITH_ADDRESS]),
new ValidationManipulator(),
new XCMPManipulator(),
new BalancesManipulator([{ account: ALITH_ADDRESS, amount: 10_000n * 10n ** 18n }]),
Expand Down
8 changes: 4 additions & 4 deletions src/tools/fast-execute-chopstick-proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ const main = async () => {
const callHash = ongoingData.proposal.isLookup
? ongoingData.proposal.asLookup.toHex()
: ongoingData.proposal.isInline
? blake2AsHex(ongoingData.proposal.asInline.toHex())
: ongoingData.proposal.asLegacy.toHex();
? blake2AsHex(ongoingData.proposal.asInline.toHex())
: ongoingData.proposal.asLegacy.toHex();

const proposalBlockTarget = (await api.rpc.chain.getHeader()).number.toNumber();
const fastProposalData = {
Expand Down Expand Up @@ -219,8 +219,8 @@ const main = async () => {
call.isLookup
? call.asLookup.toHex() == callHash
: call.isInline
? blake2AsHex(call.asInline.toHex()) == callHash
: call.asLegacy.toHex() == callHash
? blake2AsHex(call.asInline.toHex()) == callHash
: call.asLegacy.toHex() == callHash,
);

console.log(
Expand Down
3 changes: 1 addition & 2 deletions test/state-manipulation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ describe("State Manipulation", () => {
),
new CollatorManipulator(CHARLETH_ADDRESS, CHARLETH_SESSION_ADDRESS),
new HRMPManipulator(),
new CollectiveManipulator("TechCommitteeCollective", [CHARLETH_ADDRESS, HEATH_ADDRESS]),
new CollectiveManipulator("CouncilCollective", [JUDITH_ADDRESS]),
new CollectiveManipulator("OpenTechCommitteeCollective", [CHARLETH_ADDRESS, HEATH_ADDRESS]),
new ValidationManipulator(),
new XCMPManipulator(),
new SpecManipulator({
Expand Down

0 comments on commit 9f889cd

Please sign in to comment.