Skip to content

Commit

Permalink
Merge branch 'master' into markm-asyncFlow-no-E
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 9, 2024
2 parents ecd8a2e + 721b875 commit b1796b5
Show file tree
Hide file tree
Showing 41 changed files with 176 additions and 151 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: './init-proposal.js',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: './upgrade-proposal.js',
Expand Down
10 changes: 5 additions & 5 deletions packages/builders/scripts/inter-protocol/add-STARS.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { makeHelpers } from '@agoric/deploy-script-support';
import { defaultProposalBuilder as vaultProposalBuilder } from './add-collateral-core.js';
import { defaultProposalBuilder as oraclesProposalBuilder } from './price-feed-core.js';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const starsVaultProposalBuilder = async powers => {
return vaultProposalBuilder(powers, {
interchainAssetOptions: {
Expand All @@ -17,7 +17,7 @@ export const starsVaultProposalBuilder = async powers => {
});
};

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const starsOraclesProposalBuilder = async powers => {
return oraclesProposalBuilder(powers, {
AGORIC_INSTANCE_NAME: `STARS-USD price feed`,
Expand All @@ -37,7 +37,7 @@ export const starsOraclesProposalBuilder = async powers => {
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('add-STARS', starsVaultProposalBuilder);
await writeCoreProposal('add-STARS-oracles', starsOraclesProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('add-STARS', starsVaultProposalBuilder);
await writeCoreEval('add-STARS-oracles', starsOraclesProposalBuilder);
};
10 changes: 5 additions & 5 deletions packages/builders/scripts/inter-protocol/add-collateral-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getManifestForAddAssetToVault } from '@agoric/inter-protocol/src/propos
import { getManifestForPsm } from '@agoric/inter-protocol/src/proposals/startPSM.js';
import { makeInstallCache } from '@agoric/inter-protocol/src/proposals/utils.js';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async (
{ publishRef, install: install0, wrapInstall },
{
Expand Down Expand Up @@ -62,7 +62,7 @@ export const defaultProposalBuilder = async (
});
};

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const psmProposalBuilder = async (
{ publishRef, install: install0, wrapInstall },
{ anchorOptions = /** @type {object} */ ({}) } = {},
Expand Down Expand Up @@ -104,14 +104,14 @@ export const psmProposalBuilder = async (
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
const { writeCoreEval } = await makeHelpers(homeP, endowments);

const tool = await makeInstallCache(homeP, {
loadBundle: spec => import(spec),
});

await writeCoreProposal('gov-add-collateral', defaultProposalBuilder);
await writeCoreProposal('gov-start-psm', opts =>
await writeCoreEval('gov-add-collateral', defaultProposalBuilder);
await writeCoreEval('gov-start-psm', opts =>
// @ts-expect-error XXX makeInstallCache types
psmProposalBuilder({ ...opts, wrapInstall: tool.wrapInstall }),
);
Expand Down
8 changes: 4 additions & 4 deletions packages/builders/scripts/inter-protocol/init-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const mainProposalBuilder = async ({
};

// Build proposal for sim-chain etc.
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async (
{ publishRef, install },
options = {},
Expand Down Expand Up @@ -185,17 +185,17 @@ export const defaultProposalBuilder = async (
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
const { writeCoreEval } = await makeHelpers(homeP, endowments);

const tool = await makeInstallCache(homeP, {
loadBundle: spec => import(spec),
});
await Promise.all([
writeCoreProposal('gov-econ-committee', opts =>
writeCoreEval('gov-econ-committee', opts =>
// @ts-expect-error XXX makeInstallCache types
committeeProposalBuilder({ ...opts, wrapInstall: tool.wrapInstall }),
),
writeCoreProposal('gov-amm-vaults-etc', opts =>
writeCoreEval('gov-amm-vaults-etc', opts =>
// @ts-expect-error XXX makeInstallCache types
mainProposalBuilder({ ...opts, wrapInstall: tool.wrapInstall }),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { makeHelpers } from '@agoric/deploy-script-support';
import { getManifestForInviteCommittee } from '@agoric/inter-protocol/src/proposals/committee-proposal.js';

// Build proposal for sim-chain etc.
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async (
{ publishRef, install },
options = {},
Expand Down Expand Up @@ -37,6 +37,6 @@ export const defaultProposalBuilder = async (
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('gov-invite-committee', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('gov-invite-committee', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/inter-protocol/price-feed-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const DEFAULT_CONTRACT_TERMS = {
maxSubmissionValue: 2n ** 256n,
};

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async (
{ publishRef, install },
options = {},
Expand Down Expand Up @@ -84,7 +84,7 @@ export const createGov = async (homeP, endowments) => {

const oracleAddresses = ORACLE_ADDRESSES.split(',');

const { writeCoreProposal } = await makeHelpers(homeP, endowments);
const { writeCoreEval } = await makeHelpers(homeP, endowments);

const inLookup = JSON.parse(IN_BRAND_LOOKUP);
const outLookup = JSON.parse(OUT_BRAND_LOOKUP);
Expand All @@ -98,7 +98,7 @@ export const createGov = async (homeP, endowments) => {
brandIn: lookup(inLookup).catch(() => undefined),
brandOut: lookup(outLookup).catch(() => undefined),
});
await writeCoreProposal('gov-price-feed', proposalBuilder); // gov-price-feed.js gov-price-feed-permit.json
await writeCoreEval('gov-price-feed', proposalBuilder); // gov-price-feed.js gov-price-feed-permit.json
};

export default createGov;
6 changes: 3 additions & 3 deletions packages/builders/scripts/orchestration/init-stakeAtom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async (
{ publishRef, install },
options = {},
Expand Down Expand Up @@ -29,6 +29,6 @@ export const defaultProposalBuilder = async (
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('start-stakeAtom', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('start-stakeAtom', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/orchestration/init-stakeBld.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeBld.js',
Expand All @@ -18,6 +18,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('start-stakeBld', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('start-stakeBld', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/pegasus/init-core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/pegasus/src/proposals/core-proposal.js',
Expand All @@ -18,6 +18,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('gov-pegasus', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('gov-pegasus', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/smart-wallet/build-game1-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { makeHelpers } from '@agoric/deploy-script-support';
import { getManifestForGame1 } from '@agoric/smart-wallet/test/start-game1-proposal.js';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const game1ProposalBuilder = async ({ publishRef, install }) => {
return harden({
sourceSpec: '@agoric/smart-wallet/test/start-game1-proposal.js',
Expand All @@ -28,6 +28,6 @@ export const game1ProposalBuilder = async ({ publishRef, install }) => {
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('start-game1', game1ProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('start-game1', game1ProposalBuilder);
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { makeHelpers } from '@agoric/deploy-script-support';
* also prints helpful instructions for copying the files and installing them.
*/

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec:
Expand All @@ -23,6 +23,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('upgrade-wallet-factory', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('upgrade-wallet-factory', defaultProposalBuilder);
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { makeHelpers } from '@agoric/deploy-script-support';
import { getManifestForUpgrade } from '@agoric/smart-wallet/src/proposals/upgrade-walletFactory-proposal.js';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) => {
return harden({
sourceSpec:
Expand All @@ -29,6 +29,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('upgrade-walletFactory', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('upgrade-walletFactory', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/vats/add-auction.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async () => {
return harden({
sourceSpec: '@agoric/inter-protocol/src/proposals/add-auction.js',
Expand All @@ -9,6 +9,6 @@ export const defaultProposalBuilder = async () => {
};

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('add-auction', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('add-auction', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/vats/init-core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/vats/src/core/startWalletFactory.js',
Expand All @@ -26,6 +26,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('gov-vats', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('gov-vats', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/vats/init-localchain.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/vats/src/proposals/localchain-proposal.js',
Expand All @@ -15,6 +15,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('gov-localchain', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('gov-localchain', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/vats/init-network.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/vats/src/proposals/network-proposal.js',
Expand All @@ -14,6 +14,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('gov-network', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('gov-network', defaultProposalBuilder);
};
6 changes: 3 additions & 3 deletions packages/builders/scripts/vats/init-orchestration.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/orchestration/src/proposals/orchestration-proposal.js',
Expand All @@ -15,6 +15,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('gov-orchestration', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('gov-orchestration', defaultProposalBuilder);
};
2 changes: 1 addition & 1 deletion packages/builders/scripts/vats/init-transfer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/vats/src/proposals/transfer-proposal.js',
Expand Down
2 changes: 1 addition & 1 deletion packages/builders/scripts/vats/priceFeedSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ORACLE_ADDRESSES = [
/**
* modified copy of ../inter-protocol/price-feed-core.js
*
* @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder}
* @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder}
*/
export const priceFeedProposalBuilder = async (
{ publishRef, install },
Expand Down
6 changes: 3 additions & 3 deletions packages/builders/scripts/vats/probe-zcf-bundle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeHelpers } from '@agoric/deploy-script-support';

/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
export const defaultProposalBuilder = async ({ publishRef, install }) =>
harden({
sourceSpec: '@agoric/vats/src/proposals/probeZcfBundle.js',
Expand All @@ -17,6 +17,6 @@ export const defaultProposalBuilder = async ({ publishRef, install }) =>
});

export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('probeZcfBundle', defaultProposalBuilder);
const { writeCoreEval } = await makeHelpers(homeP, endowments);
await writeCoreEval('probeZcfBundle', defaultProposalBuilder);
};
Loading

0 comments on commit b1796b5

Please sign in to comment.