diff --git a/packages/inter-protocol/src/proposals/add-auction.js b/packages/inter-protocol/src/proposals/add-auction.js index 9bc60bcdb5f..1eafb2e747f 100644 --- a/packages/inter-protocol/src/proposals/add-auction.js +++ b/packages/inter-protocol/src/proposals/add-auction.js @@ -125,7 +125,6 @@ export const addAuction = async ({ ), ); - // don't overwrite auctioneerKit yet newAuctioneerKit.resolve( harden({ label: 'auctioneer', @@ -139,7 +138,8 @@ export const addAuction = async ({ governorAdminFacet: governorStartResult.adminFacet, }), ); - // don't replace auction instance yet. + // don't overwrite auctioneerKit or auction instance yet. Wait until + // upgrade-vault.js }; export const ADD_AUCTION_MANIFEST = harden({ diff --git a/packages/inter-protocol/src/proposals/upgrade-vaults.js b/packages/inter-protocol/src/proposals/upgrade-vaults.js index 2d54f8de6db..60b8b732da5 100644 --- a/packages/inter-protocol/src/proposals/upgrade-vaults.js +++ b/packages/inter-protocol/src/proposals/upgrade-vaults.js @@ -30,13 +30,17 @@ export const upgradeVaults = async (powers, { options }) => { const { consume: { agoricNamesAdmin, - auctioneerKit: auctioneerKitP, + newAuctioneerKit: auctioneerKitP, priceAuthority, vaultFactoryKit, zoe, economicCommitteeCreatorFacet: electorateCreatorFacet, reserveKit, }, + produce: { auctioneerKit: auctioneerKitProducer }, + instance: { + produce: { auctioneer: auctioneerProducer }, + }, } = powers; const { vaultsRef } = options; const kit = await vaultFactoryKit; @@ -128,7 +132,13 @@ export const upgradeVaults = async (powers, { options }) => { E(priceAuthority).quoteGiven(AmountMath.make(brand, 10n), istBrand), ), ), - () => upgradeVaultFactory(), + async () => { + await upgradeVaultFactory(); + auctioneerKitProducer.reset(); + auctioneerKitProducer.resolve(auctioneerKit); + auctioneerProducer.reset(); + auctioneerProducer.resolve(auctioneerKit.instance); + }, ); console.log(`upgradeVaults scheduled; waiting for priceFeeds`); @@ -149,7 +159,7 @@ export const getManifestForUpgradeVaults = async ( [upgradeVaults.name]: { consume: { agoricNamesAdmin: t, - auctioneerKit: t, + newAuctioneerKit: t, economicCommitteeCreatorFacet: t, priceAuthority: t, reserveKit: t, @@ -157,6 +167,8 @@ export const getManifestForUpgradeVaults = async ( board: t, zoe: t, }, + produce: { auctioneerKit: t }, + instance: { produce: { auctioneer: t } }, }, }, options: { ...vaultUpgradeOptions },