@agoric/vats 0.15.2-dev-e6e23eb.0 → 0.15.2-dev-c4a07a4.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/vats",
|
|
3
|
-
"version": "0.15.2-dev-
|
|
3
|
+
"version": "0.15.2-dev-c4a07a4.0+c4a07a4",
|
|
4
4
|
"description": "Agoric's Vat library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"build:boot-viz-sim-gov": "node src/authorityViz.js --sim-chain --gov >docs/boot-sim-gov.dot && dot -Tsvg docs/boot-sim-gov.dot >docs/boot-sim-gov.dot.svg",
|
|
16
16
|
"build:restart-vats-proposal": "agoric run scripts/restart-vats.js",
|
|
17
17
|
"build:add-STARS-proposal": "agoric run scripts/add-STARS.js",
|
|
18
|
+
"build:zcf-proposal": "agoric run scripts/replace-zoe.js",
|
|
18
19
|
"prepack": "tsc --build jsconfig.build.json",
|
|
19
20
|
"postpack": "git clean -f '*.d.ts*'",
|
|
20
21
|
"test": "ava",
|
|
@@ -30,19 +31,19 @@
|
|
|
30
31
|
"author": "Agoric",
|
|
31
32
|
"license": "Apache-2.0",
|
|
32
33
|
"dependencies": {
|
|
33
|
-
"@agoric/assert": "0.6.1-dev-
|
|
34
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
35
|
-
"@agoric/governance": "0.10.4-dev-
|
|
36
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
37
|
-
"@agoric/internal": "0.3.3-dev-
|
|
38
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
39
|
-
"@agoric/sharing-service": "0.2.12-dev-
|
|
40
|
-
"@agoric/store": "0.9.3-dev-
|
|
41
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
42
|
-
"@agoric/time": "0.3.3-dev-
|
|
43
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
44
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
45
|
-
"@agoric/zone": "0.2.3-dev-
|
|
34
|
+
"@agoric/assert": "0.6.1-dev-c4a07a4.0+c4a07a4",
|
|
35
|
+
"@agoric/ertp": "0.16.3-dev-c4a07a4.0+c4a07a4",
|
|
36
|
+
"@agoric/governance": "0.10.4-dev-c4a07a4.0+c4a07a4",
|
|
37
|
+
"@agoric/inter-protocol": "0.16.2-dev-c4a07a4.0+c4a07a4",
|
|
38
|
+
"@agoric/internal": "0.3.3-dev-c4a07a4.0+c4a07a4",
|
|
39
|
+
"@agoric/notifier": "0.6.3-dev-c4a07a4.0+c4a07a4",
|
|
40
|
+
"@agoric/sharing-service": "0.2.12-dev-c4a07a4.0+c4a07a4",
|
|
41
|
+
"@agoric/store": "0.9.3-dev-c4a07a4.0+c4a07a4",
|
|
42
|
+
"@agoric/swingset-vat": "0.32.3-dev-c4a07a4.0+c4a07a4",
|
|
43
|
+
"@agoric/time": "0.3.3-dev-c4a07a4.0+c4a07a4",
|
|
44
|
+
"@agoric/vat-data": "0.5.3-dev-c4a07a4.0+c4a07a4",
|
|
45
|
+
"@agoric/zoe": "0.26.3-dev-c4a07a4.0+c4a07a4",
|
|
46
|
+
"@agoric/zone": "0.2.3-dev-c4a07a4.0+c4a07a4",
|
|
46
47
|
"@endo/far": "^0.2.19",
|
|
47
48
|
"@endo/import-bundle": "^0.3.5",
|
|
48
49
|
"@endo/init": "^0.5.57",
|
|
@@ -53,11 +54,11 @@
|
|
|
53
54
|
"jessie.js": "^0.3.2"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
57
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
58
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
59
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
60
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
57
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-c4a07a4.0+c4a07a4",
|
|
58
|
+
"@agoric/deploy-script-support": "0.10.4-dev-c4a07a4.0+c4a07a4",
|
|
59
|
+
"@agoric/smart-wallet": "0.5.4-dev-c4a07a4.0+c4a07a4",
|
|
60
|
+
"@agoric/swing-store": "0.9.2-dev-c4a07a4.0+c4a07a4",
|
|
61
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-c4a07a4.0+c4a07a4",
|
|
61
62
|
"@endo/bundle-source": "^2.5.2",
|
|
62
63
|
"@endo/captp": "^3.1.2",
|
|
63
64
|
"@endo/eventual-send": "^0.17.3",
|
|
@@ -87,5 +88,5 @@
|
|
|
87
88
|
"timeout": "20m",
|
|
88
89
|
"workerThreads": false
|
|
89
90
|
},
|
|
90
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "c4a07a45a406c04cee1c555703bbff02d79bb2a2"
|
|
91
92
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
|
|
3
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').ProposalBuilder} */
|
|
4
|
+
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
5
|
+
harden({
|
|
6
|
+
sourceSpec: '../src/proposals/zcf-proposal.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForZoe',
|
|
9
|
+
{
|
|
10
|
+
zoeRef: publishRef(install('../src/vat-zoe.js')),
|
|
11
|
+
zcfRef: publishRef(install('../../zoe/src/contractFacet/vatRoot.js')),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export default async (homeP, endowments) => {
|
|
17
|
+
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
18
|
+
await writeCoreProposal('replace-zcf', defaultProposalBuilder);
|
|
19
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export function upgradeZcf({ consume: { vatAdminSvc, vatStore } }: BootstrapPowers & {
|
|
2
|
+
consume: {
|
|
3
|
+
vatAdminSvc: VatAdminSve;
|
|
4
|
+
vatStore: MapStore<string, CreateVatResults>;
|
|
5
|
+
};
|
|
6
|
+
}, options: {
|
|
7
|
+
options: {
|
|
8
|
+
zoeRef: VatSourceRef;
|
|
9
|
+
zcfRef: VatSourceRef;
|
|
10
|
+
};
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
export function getManifestForZoe(_powers: any, { zoeRef, zcfRef }: {
|
|
13
|
+
zoeRef: any;
|
|
14
|
+
zcfRef: any;
|
|
15
|
+
}): {
|
|
16
|
+
manifest: {
|
|
17
|
+
[x: string]: {
|
|
18
|
+
consume: {
|
|
19
|
+
vatAdminSvc: string;
|
|
20
|
+
vatStore: string;
|
|
21
|
+
};
|
|
22
|
+
produce: {};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
options: {
|
|
26
|
+
zoeRef: any;
|
|
27
|
+
zcfRef: any;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=zcf-proposal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zcf-proposal.d.ts","sourceRoot":"","sources":["zcf-proposal.js"],"names":[],"mappings":"AAYO,mEATI,eAAe,GAAG;IAC5B,OAAW,EAAE;QACb,WAAiB,cAAc;QAC/B,QAAc,EAAE,SAAS,MAAM,mBAAmB,CAAC;KAC9C,CAAC;CACH;;gBAEiB,YAAY;gBAAU,YAAY;;kBAkBtD;AAEM;;;;;;;;;;;;;;;;;EAcL"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { E } from '@endo/far';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @param {BootstrapPowers & {
|
|
5
|
+
* consume: {
|
|
6
|
+
* vatAdminSvc: VatAdminSve;
|
|
7
|
+
* vatStore: MapStore<string, CreateVatResults>;
|
|
8
|
+
* };
|
|
9
|
+
* }} powers
|
|
10
|
+
* @param {object} options
|
|
11
|
+
* @param {{ zoeRef: VatSourceRef; zcfRef: VatSourceRef }} options.options
|
|
12
|
+
*/
|
|
13
|
+
export const upgradeZcf = async (
|
|
14
|
+
{ consume: { vatAdminSvc, vatStore } },
|
|
15
|
+
options,
|
|
16
|
+
) => {
|
|
17
|
+
const { zoeRef, zcfRef } = options.options;
|
|
18
|
+
|
|
19
|
+
const zoeBundleCap = await E(vatAdminSvc).getBundleCap(zoeRef.bundleID);
|
|
20
|
+
console.log(`ZOE BUNDLE ID: `, zoeRef.bundleID);
|
|
21
|
+
|
|
22
|
+
const { adminNode, root: zoeRoot } = await E(vatStore).get('zoe');
|
|
23
|
+
|
|
24
|
+
await E(adminNode).upgrade(zoeBundleCap, {});
|
|
25
|
+
|
|
26
|
+
const zoeConfigFacet = await E(zoeRoot).getZoeConfigFacet();
|
|
27
|
+
await E(zoeConfigFacet).updateZcfBundleId(zcfRef.bundleID);
|
|
28
|
+
console.log(`ZCF BUNDLE ID: `, zcfRef.bundleID);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const getManifestForZoe = (_powers, { zoeRef, zcfRef }) => ({
|
|
32
|
+
manifest: {
|
|
33
|
+
[upgradeZcf.name]: {
|
|
34
|
+
consume: {
|
|
35
|
+
vatAdminSvc: 'vatAdminSvc',
|
|
36
|
+
vatStore: 'vatStore',
|
|
37
|
+
},
|
|
38
|
+
produce: {},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
options: {
|
|
42
|
+
zoeRef,
|
|
43
|
+
zcfRef,
|
|
44
|
+
},
|
|
45
|
+
});
|