From 2df933456ef804e7995f2e2035b7998fc9c5b354 Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Tue, 21 Feb 2023 12:45:26 -0800 Subject: [PATCH] fix(governance): some governance invitations use proposal patterns --- packages/governance/src/committee.js | 14 ++++++++++---- packages/governance/src/electorateTools.js | 8 +++++++- packages/governance/src/noActionElectorate.js | 3 +++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/governance/src/committee.js b/packages/governance/src/committee.js index 96e68d61ae6b..17d496dc928e 100644 --- a/packages/governance/src/committee.js +++ b/packages/governance/src/committee.js @@ -5,6 +5,7 @@ import { E } from '@endo/eventual-send'; import { StorageNodeShape } from '@agoric/internal'; import { prepareExo, provideDurableMapStore } from '@agoric/vat-data'; +import { EmptyProposalShape } from '@agoric/zoe/src/typeGuards.js'; import { getOpenQuestions, getPoserInvitation, @@ -79,10 +80,15 @@ export const start = (zcf, privateArgs, baggage) => { // This will produce unique descriptions because // makeCommitteeVoterInvitation() is only called within the following loop, // which is only called once per Electorate. - return zcf.makeInvitation(seat => { - seat.exit(); - return makeVoterKit(index); - }, `Voter${index}`); + return zcf.makeInvitation( + seat => { + seat.exit(); + return makeVoterKit(index); + }, + `Voter${index}`, + undefined, + EmptyProposalShape, + ); }; const { committeeName, committeeSize } = zcf.getTerms(); diff --git a/packages/governance/src/electorateTools.js b/packages/governance/src/electorateTools.js index 5d2f000977db..11ea8355fa5f 100644 --- a/packages/governance/src/electorateTools.js +++ b/packages/governance/src/electorateTools.js @@ -1,3 +1,4 @@ +import { EmptyProposalShape } from '@agoric/zoe/src/typeGuards.js'; import { E } from '@endo/eventual-send'; import { deeplyFulfilled, Far } from '@endo/marshal'; @@ -95,7 +96,12 @@ const getPoserInvitation = (zcf, addQuestion) => { seat.exit(); return Far(`questionPoser`, { addQuestion }); }; - return zcf.makeInvitation(questionPoserHandler, `questionPoser`); + return zcf.makeInvitation( + questionPoserHandler, + `questionPoser`, + undefined, + EmptyProposalShape, + ); }; harden(startCounter); diff --git a/packages/governance/src/noActionElectorate.js b/packages/governance/src/noActionElectorate.js index 7f39dfa00a71..b18314f99d8c 100644 --- a/packages/governance/src/noActionElectorate.js +++ b/packages/governance/src/noActionElectorate.js @@ -1,6 +1,7 @@ import { makePublishKit } from '@agoric/notifier'; import { makePromiseKit } from '@endo/promise-kit'; import { makeExo } from '@agoric/store'; +import { EmptyProposalShape } from '@agoric/zoe/src/typeGuards.js'; import { ElectoratePublicI, ElectorateCreatorI } from './typeGuards.js'; @@ -40,6 +41,8 @@ const start = zcf => { return zcf.makeInvitation( () => {}, `noActionElectorate doesn't allow posing questions`, + undefined, + EmptyProposalShape, ); }, addQuestion(_instance, _question) {