Skip to content

Commit

Permalink
chore: use startUpgradable
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique authored and frazarshad committed Oct 8, 2024
1 parent 1f1e8f6 commit ca27d2f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
const configurations = {
MAINNET: {
committeeName: 'Economic Committee',
// TODO: Update the addresses after confirmation
// UNTIL https://github.com/Agoric/agoric-sdk/issues/10194
voterAddresses: {
gov1: 'agoric1gx9uu7y6c90rqruhesae2t7c2vlw4uyyxlqxrx',
gov2: 'agoric1d4228cvelf8tj65f4h7n2td90sscavln2283h5',
Expand Down
30 changes: 14 additions & 16 deletions packages/inter-protocol/src/proposals/replaceElectorate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

// @ts-check
import { E } from '@endo/eventual-send';
import { Fail } from '@endo/errors';
import {
assertPathSegment,
makeStorageNodeChild,
Expand Down Expand Up @@ -63,13 +62,8 @@ const handlehighPrioritySendersList = async (
const HIGH_PRIORITY_SENDERS_NAMESPACE = 'economicCommittee';
const highPrioritySendersManager = await highPrioritySendersManagerP;

assert(
highPrioritySendersManager,
`highPriority SendersManager is not defined`,
);

if (!highPrioritySendersManager) {
Fail`highPrioritySendersManager is not defined`;
throw assert.error(`highPrioritySendersManager is not defined`);
}

const { addressesToAdd, addressesToRemove } = highPrioritySendersConfig;
Expand Down Expand Up @@ -162,7 +156,7 @@ const inviteECMembers = async (
*/
const startNewEconomicCommittee = async (
{
consume: { board, chainStorage, zoe },
consume: { board, chainStorage, startUpgradable },
produce: { economicCommitteeKit, economicCommitteeCreatorFacet },
installation: {
consume: { committee },
Expand Down Expand Up @@ -197,13 +191,18 @@ const startNewEconomicCommittee = async (
marshaller,
};

const startResult = await E(zoe).startInstance(
committee,
{},
{ committeeName, committeeSize },
const terms = {
committeeName,
committeeSize,
};

const startResult = await E(startUpgradable)({
label: 'economicCommittee',
installation: committee,
privateArgs,
'economicCommittee',
);
terms,
});

const { instance, creatorFacet } = startResult;

trace('Started new EC Committee Instance Successfully');
Expand Down Expand Up @@ -315,12 +314,11 @@ export const getManifestForReplaceAllElectorates = async (
psmKit: true,
governedContractKits: true,
chainStorage: true,
diagnostics: true,
highPrioritySendersManager: true,
namesByAddressAdmin: true,
// Rest of these are designed to be widely shared
board: true,
zoe: true,
startUpgradable: true,
},
produce: {
economicCommitteeKit: true,
Expand Down

0 comments on commit ca27d2f

Please sign in to comment.