Skip to content

Commit

Permalink
docs: add details on install handling when building proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Oct 1, 2024
1 parent 442f07c commit 3f1442a
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/deploy-script-support/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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(<path>))` 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(<path>))` 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).

0 comments on commit 3f1442a

Please sign in to comment.