Skip to content

Commit

Permalink
refactor: upgrade-zoe proposal name
Browse files Browse the repository at this point in the history
it's not necessarily null. it's whatever the version is that's built.
  • Loading branch information
turadg committed Nov 8, 2023
1 parent f2d5ab4 commit 8f0f907
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const checkFlow1 = async (
// restart Zoe
// /////// Upgrading ////////////////////////////////
await buildAndExecuteProposal(
'@agoric/builders/scripts/vats/null-upgrade-zoe-proposal.js',
'@agoric/builders/scripts/vats/upgrade-zoe-proposal.js',
);

await buyer.tryExitOffer(`${collateralBrandKey}-bid3`);
Expand Down
3 changes: 1 addition & 2 deletions packages/builders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"scripts": {
"build": "exit 0",
"build:add-STARS-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/inter-protocol/add-STARS.js",
"build:restart-vats-proposal": "echo echo This command has been deprecated. Please run this instead: agoric run scripts/vats/restart-vats.js",
"build:restart-vats-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/restart-vats.js",
"build:zcf-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/replace-zoe.js",
"build:null-upgrade-zoe-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/replace-zoe.js",
"prepack": "tsc --build tsconfig.build.json",
"postpack": "git clean -f '*.d.ts*'",
"test": "ava",
Expand Down
4 changes: 2 additions & 2 deletions packages/builders/scripts/vats/upgrade-zoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { makeHelpers } from '@agoric/deploy-script-support';
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/vats/src/proposals/null-upgrade-zoe-proposal.js',
sourceSpec: '@agoric/vats/src/proposals/upgrade-zoe-proposal.js',
getManifestCall: [
'getManifestForUpgradingZoe',
{
Expand All @@ -14,5 +14,5 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('null-upgrade-zoe', defaultProposalBuilder);
await writeCoreProposal('upgrade-zoe', defaultProposalBuilder);
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import { E } from '@endo/far';
* @param {object} options
* @param {{ zoeRef: VatSourceRef; zcfRef: VatSourceRef }} options.options
*/
export const nullUpgradeZoe = async (
{ consume: { vatAdminSvc, vatStore } },
options,
) => {
const upgradeZoe = async ({ consume: { vatAdminSvc, vatStore } }, options) => {
const { zoeRef } = options.options;

const zoeBundleCap = await E(vatAdminSvc).getBundleCap(zoeRef.bundleID);
Expand All @@ -26,7 +23,7 @@ export const nullUpgradeZoe = async (

export const getManifestForUpgradingZoe = (_powers, { zoeRef }) => ({
manifest: {
[nullUpgradeZoe.name]: {
[upgradeZoe.name]: {
consume: {
vatAdminSvc: 'vatAdminSvc',
vatStore: 'vatStore',
Expand Down

0 comments on commit 8f0f907

Please sign in to comment.