diff --git a/a3p-integration/proposals/a:vaults-auctions/upgradeVaults.test.js b/a3p-integration/proposals/a:vaults-auctions/upgradeVaults.test.js index 17b0d213367..ceb07eee31b 100644 --- a/a3p-integration/proposals/a:vaults-auctions/upgradeVaults.test.js +++ b/a3p-integration/proposals/a:vaults-auctions/upgradeVaults.test.js @@ -73,19 +73,20 @@ const triggerAuction = async t => { t.is(atomOut, '+5200000'); }; -function newAuctioneerFromNewBundle(details) { +// contract vat names are based on bundleID +const ORIGINAL_AUCTION_VAT_NAME = 'zcf-b1-a5683-auctioneer'; + +const newAuctioneerFromNewBundle = details => { for (const detail of details) { - // contract vat names are based on bundleID - const originalAuctionVatName = 'zcf-b1-a5683-auctioneer'; if ( !detail.vatName.includes('governor') && - detail.vatName !== originalAuctionVatName + detail.vatName !== ORIGINAL_AUCTION_VAT_NAME ) { return true; } } return false; -} +}; const checkAuctionVat = async t => { const details = await getDetailsMatchingVats('auctioneer'); diff --git a/packages/inter-protocol/src/proposals/add-auction.js b/packages/inter-protocol/src/proposals/add-auction.js index 226ff498c54..81411f6ebf8 100644 --- a/packages/inter-protocol/src/proposals/add-auction.js +++ b/packages/inter-protocol/src/proposals/add-auction.js @@ -26,7 +26,6 @@ export const addAuction = async ( priceAuthority, chainStorage, economicCommitteeCreatorFacet: electorateCreatorFacet, - agoricNamesAdmin, auctioneerKit: legacyKitP, }, produce: { newAuctioneerKit, auctionsUpgradeComplete }, @@ -35,6 +34,7 @@ export const addAuction = async ( }, installation: { consume: { contractGovernor: contractGovernorInstallation }, + produce: { auctioneer: produceInstallation }, }, issuer: { consume: { [Stable.symbol]: stableIssuerP }, @@ -54,6 +54,8 @@ export const addAuction = async ( * >} */ const installationP = E(zoe).installBundleID(bundleID); + produceInstallation.reset(); + produceInstallation.resolve(installationP); const [ initialPoserInvitation, @@ -67,16 +69,6 @@ export const addAuction = async ( legacyKitP, ]); - await E.when( - installationP, - installation => - E(E(agoricNamesAdmin).lookupAdmin('installation')).update( - 'auctioneer', - installation, - ), - err => console.error(`🚨 failed to update vaultFactory installation`, err), - ); - // Each field has an extra layer of type + value: // AuctionStartDelay: { type: 'relativeTime', value: { relValue: 2n, timerBrand: Object [Alleged: timerBrand] {} } } /** @type {any} */ @@ -187,7 +179,6 @@ export const ADD_AUCTION_MANIFEST = harden({ priceAuthority: true, chainStorage: true, economicCommitteeCreatorFacet: true, - agoricNamesAdmin: true, auctioneerKit: true, }, produce: { @@ -202,6 +193,7 @@ export const ADD_AUCTION_MANIFEST = harden({ auctioneer: true, contractGovernor: true, }, + produce: { auctioneer: true }, }, issuer: { consume: { [Stable.symbol]: true }, diff --git a/packages/inter-protocol/src/proposals/upgrade-vaults.js b/packages/inter-protocol/src/proposals/upgrade-vaults.js index fe87d634ad8..4b6bc0e7349 100644 --- a/packages/inter-protocol/src/proposals/upgrade-vaults.js +++ b/packages/inter-protocol/src/proposals/upgrade-vaults.js @@ -58,6 +58,9 @@ export const upgradeVaults = async ( newAuctioneerKit: tempAuctioneerKit, auctionsUpgradeComplete: auctionsUpgradeCompleteProducer, }, + installation: { + produce: { VaultFactory: produceVaultInstallation }, + }, instance: { produce: { auctioneer: auctioneerProducer }, }, @@ -78,27 +81,13 @@ export const upgradeVaults = async ( * Installation * >} */ - let installationP; + const installationP = E(zoe).installBundleID(bundleID); + produceVaultInstallation.reset(); + produceVaultInstallation.resolve(installationP); await auctionsUpgradeComplete; auctionsUpgradeCompleteProducer.reset(); - if (vaultsRef) { - if (bundleID) { - installationP = E(zoe).installBundleID(bundleID); - await E.when( - installationP, - installation => - E(E(agoricNamesAdmin).lookupAdmin('installation')).update( - 'vaultFactory', - installation, - ), - err => - console.error(`🚨 failed to update vaultFactory installation`, err), - ); - } - } - const readCurrentDirectorParams = async () => { const { publicFacet: directorPF } = kit; @@ -282,6 +271,9 @@ export const getManifestForUpgradeVaults = async ( newAuctioneerKit: uV, auctionsUpgradeComplete: uV, }, + installation: { + produce: { VaultFactory: true }, + }, instance: { produce: { auctioneer: uV, newAuctioneerKit: uV } }, }, },