@agoric/builders 0.1.1-dev-da94029.0 → 0.1.1-dev-d950170.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/scripts/vats/upgrade-vats.js +30 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-d950170.0+d950170",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"typeCoverage": {
|
|
83
83
|
"atLeast": 90.62
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "d9501704148a9118bc62a9d84aada966dc2deb0f"
|
|
86
86
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
2
2
|
export const upgradeVatsProposalBuilder = async (
|
|
3
3
|
{ publishRef, install },
|
|
4
|
-
|
|
4
|
+
vatNameToEntrypoint,
|
|
5
5
|
) => {
|
|
6
|
-
if (!
|
|
7
|
-
throw Error('Missing
|
|
6
|
+
if (!vatNameToEntrypoint) {
|
|
7
|
+
throw Error('Missing vatNameToEntrypoint');
|
|
8
8
|
}
|
|
9
9
|
return harden({
|
|
10
10
|
sourceSpec: '@agoric/vats/src/proposals/upgrade-vats-generic-proposal.js',
|
|
@@ -12,7 +12,7 @@ export const upgradeVatsProposalBuilder = async (
|
|
|
12
12
|
'getManifestForUpgradingVats',
|
|
13
13
|
{
|
|
14
14
|
bundleRefs: Object.fromEntries(
|
|
15
|
-
Object.entries(
|
|
15
|
+
Object.entries(vatNameToEntrypoint).map(
|
|
16
16
|
([name, entrypoint]) =>
|
|
17
17
|
/** @type {const} */ ([name, publishRef(install(entrypoint))]),
|
|
18
18
|
),
|
|
@@ -21,3 +21,29 @@ export const upgradeVatsProposalBuilder = async (
|
|
|
21
21
|
],
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
+
|
|
25
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
26
|
+
export const upgradeZoeContractsProposalBuilder = async (
|
|
27
|
+
{ publishRef, install },
|
|
28
|
+
contractKitSpecs,
|
|
29
|
+
) => {
|
|
30
|
+
if (!contractKitSpecs) {
|
|
31
|
+
throw Error('Missing contractKitSpecs');
|
|
32
|
+
}
|
|
33
|
+
return harden({
|
|
34
|
+
sourceSpec: '@agoric/vats/src/proposals/upgrade-vats-generic-proposal.js',
|
|
35
|
+
getManifestCall: [
|
|
36
|
+
'getManifestForUpgradingZoeContractKits',
|
|
37
|
+
{
|
|
38
|
+
contractKitSpecs,
|
|
39
|
+
/** @type {{ [bundleName: string]: VatSourceRef }} */
|
|
40
|
+
installationBundleRefs: Object.fromEntries(
|
|
41
|
+
contractKitSpecs.map(({ bundleName, entrypoint }) => [
|
|
42
|
+
bundleName,
|
|
43
|
+
publishRef(install(entrypoint)),
|
|
44
|
+
]),
|
|
45
|
+
),
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
});
|
|
49
|
+
};
|