From 3f1442aee41b5ead40ae0f5ff6b146cd77ee8be6 Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Mon, 30 Sep 2024 17:26:05 -0700 Subject: [PATCH] docs: add details on install handling when building proposals --- packages/deploy-script-support/README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/deploy-script-support/README.md b/packages/deploy-script-support/README.md index 048cff205fa..0fb33dd15d4 100644 --- a/packages/deploy-script-support/README.md +++ b/packages/deploy-script-support/README.md @@ -5,7 +5,8 @@ generate a proposal, and write a script to build the core proposal. The proposals have limited access to bootstrap powers, described by their manifests. There are collections of proposals in .../vats/src/proposals, -smart-wallet/src/proposals, orchestration/src/proposals, pegasus/src/proposals. +smart-wallet/src/proposals, orchestration/src/proposals, pegasus/src/proposals, +and inter-protocol/src/proposals. The overall format is a proposalBuilder script (There are several in .../builders/scripts/vats/) which has a default export that passes resources to @@ -20,7 +21,9 @@ proposal to run is '@agoric/inter-protocol/src/proposals/upgrade-vaults.js', lists the manifest there as `'getManifestForUpgradeVaults'`, and directs the creation of a bundle from '@agoric/inter-protocol/src/vaultFactory/vaultFactory.js', which will be made -available to the proposal as `vaultsRef` in options. +available to the proposal as `vaultsRef` in options. The contents of the +bundle will also be installed with Zoe, and added to the promise space in +`consume.installation.vaults`. `upgrade-vaults.js` defines `getManifestForUpgradeVaults()`, which returns a `manifest` that says `upgradeVaults()` should be executed, and specifies what @@ -61,8 +64,6 @@ export const getManifestForFoo = (powers, options) => { `manifest` contains descriptions of powers to be provided to the proposals. -**TODO** what happens with the `installations` in [`startPsm.js`](https://github.com/Agoric/agoric-sdk/blob/b13743a2cccf0cb63a412b54384435596d4e81ea/packages/inter-protocol/src/proposals/startPSM.js#L496)? - `options` allows the proposal to be provided with arbitray other powerful objects. @@ -99,9 +100,10 @@ export default async (homeP, endowments) => { The first element of `getManifestCall` is interpreted as the name of a proposal. The second element of `getManifestCall` produces the `options` argument passed -to the proposal. (`fooRef` in the example above). A common thing to want to pass -in options is a reference to code to be installed on-chain. The `fooRef` example -above shows how. `publishRef(install())` is built from sources in the -sdk, and passed as a `bundleRef`, which contains a `bundleID` suitable for -passing to Zoe (for contracts) or `vatAdminService` (for non-contract vat code). +to the proposal. (`{ fooRef, ... }` in the example above). A common thing to +want to pass in options is a reference to code to be installed on-chain. The +`fooRef` example above shows how. `publishRef(install())` is built from +sources in the sdk, and passed as a `bundleRef`, which contains a `bundleID` +suitable for passing to Zoe (for contracts) or `vatAdminService` (for +non-contract vat code).