@agoric/vats 0.15.2-dev-419df4e.0 → 0.15.2-dev-45d0417.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-419df4e.0+419df4e",
3
+ "version": "0.15.2-dev-45d0417.0+45d0417",
4
4
  "description": "Agoric's Vat library",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -22,19 +22,19 @@
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/cosmic-proto": "0.4.1-dev-419df4e.0+419df4e",
26
- "@agoric/ertp": "0.16.3-dev-419df4e.0+419df4e",
27
- "@agoric/governance": "0.10.4-dev-419df4e.0+419df4e",
28
- "@agoric/internal": "0.3.3-dev-419df4e.0+419df4e",
29
- "@agoric/network": "0.1.1-dev-419df4e.0+419df4e",
30
- "@agoric/notifier": "0.6.3-dev-419df4e.0+419df4e",
31
- "@agoric/store": "0.9.3-dev-419df4e.0+419df4e",
32
- "@agoric/swingset-vat": "0.32.3-dev-419df4e.0+419df4e",
33
- "@agoric/time": "0.3.3-dev-419df4e.0+419df4e",
34
- "@agoric/vat-data": "0.5.3-dev-419df4e.0+419df4e",
35
- "@agoric/vow": "0.1.1-dev-419df4e.0+419df4e",
36
- "@agoric/zoe": "0.26.3-dev-419df4e.0+419df4e",
37
- "@agoric/zone": "0.2.3-dev-419df4e.0+419df4e",
25
+ "@agoric/cosmic-proto": "0.4.1-dev-45d0417.0+45d0417",
26
+ "@agoric/ertp": "0.16.3-dev-45d0417.0+45d0417",
27
+ "@agoric/governance": "0.10.4-dev-45d0417.0+45d0417",
28
+ "@agoric/internal": "0.3.3-dev-45d0417.0+45d0417",
29
+ "@agoric/network": "0.1.1-dev-45d0417.0+45d0417",
30
+ "@agoric/notifier": "0.6.3-dev-45d0417.0+45d0417",
31
+ "@agoric/store": "0.9.3-dev-45d0417.0+45d0417",
32
+ "@agoric/swingset-vat": "0.32.3-dev-45d0417.0+45d0417",
33
+ "@agoric/time": "0.3.3-dev-45d0417.0+45d0417",
34
+ "@agoric/vat-data": "0.5.3-dev-45d0417.0+45d0417",
35
+ "@agoric/vow": "0.1.1-dev-45d0417.0+45d0417",
36
+ "@agoric/zoe": "0.26.3-dev-45d0417.0+45d0417",
37
+ "@agoric/zone": "0.2.3-dev-45d0417.0+45d0417",
38
38
  "@endo/errors": "^1.2.8",
39
39
  "@endo/far": "^1.1.9",
40
40
  "@endo/import-bundle": "^1.3.2",
@@ -47,7 +47,7 @@
47
47
  "jessie.js": "^0.3.4"
48
48
  },
49
49
  "devDependencies": {
50
- "@agoric/swingset-liveslots": "0.10.3-dev-419df4e.0+419df4e",
50
+ "@agoric/swingset-liveslots": "0.10.3-dev-45d0417.0+45d0417",
51
51
  "@endo/bundle-source": "^3.5.0",
52
52
  "@endo/init": "^1.1.7",
53
53
  "ava": "^5.3.0",
@@ -79,5 +79,5 @@
79
79
  "typeCoverage": {
80
80
  "atLeast": 91.39
81
81
  },
82
- "gitHead": "419df4ee7ce03499f30e7327c74e95a338201023"
82
+ "gitHead": "45d0417bfadafc1af14d8244d7648e08c6a6cf6c"
83
83
  }
@@ -0,0 +1,29 @@
1
+ export function upgradePriceAuthorityRegistry({ consume: { vatAdminSvc, vatStore, priceAuthority, agoricNames }, brand: { consume: { [Stable.symbol]: stableBrandP }, }, }: BootstrapPowers, options: {
2
+ options: {
3
+ registryRef: VatSourceRef;
4
+ };
5
+ }): Promise<void>;
6
+ export function getManifestForUpgradingRegistry(_powers: any, { registryRef }: {
7
+ registryRef: any;
8
+ }): {
9
+ manifest: {
10
+ [x: string]: {
11
+ consume: {
12
+ agoricNames: string;
13
+ vatAdminSvc: string;
14
+ vatStore: string;
15
+ priceAuthority: string;
16
+ };
17
+ brand: {
18
+ consume: {
19
+ IST: string;
20
+ };
21
+ };
22
+ };
23
+ };
24
+ options: {
25
+ registryRef: any;
26
+ };
27
+ };
28
+ import { Stable } from '@agoric/internal/src/tokens.js';
29
+ //# sourceMappingURL=upgrade-paRegistry-proposal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-paRegistry-proposal.d.ts","sourceRoot":"","sources":["upgrade-paRegistry-proposal.js"],"names":[],"mappings":"AAUO,4KAJI,eAAe,WAEvB;IAA+C,OAAO,EAA9C;QAAE,WAAW,EAAE,YAAY,CAAA;KAAE;CACvC,iBA6BA;AAGM;;;;;;;;;;;;;;;;;;;;;EAeL;uBArDqB,gCAAgC"}
@@ -0,0 +1,57 @@
1
+ // @ts-check
2
+ import { E } from '@endo/far';
3
+ import { AmountMath } from '@agoric/ertp';
4
+ import { Stable } from '@agoric/internal/src/tokens.js';
5
+
6
+ /**
7
+ * @param {BootstrapPowers} powers
8
+ * @param {object} options
9
+ * @param {{ registryRef: VatSourceRef }} options.options
10
+ */
11
+ export const upgradePriceAuthorityRegistry = async (
12
+ {
13
+ consume: { vatAdminSvc, vatStore, priceAuthority, agoricNames },
14
+ brand: {
15
+ consume: { [Stable.symbol]: stableBrandP },
16
+ },
17
+ },
18
+ options,
19
+ ) => {
20
+ const { registryRef } = options.options;
21
+
22
+ assert(registryRef.bundleID);
23
+ console.log(`PriceAuthorityRegistry BUNDLE ID: `, registryRef.bundleID);
24
+
25
+ const [{ adminNode }, stableBrand, atomBrand, bundleCap] = await Promise.all([
26
+ E(vatStore).get('priceAuthority'),
27
+ stableBrandP,
28
+ E(agoricNames).lookup('brand', 'ATOM'),
29
+ E(vatAdminSvc).getBundleCap(registryRef.bundleID),
30
+ ]);
31
+
32
+ await E(adminNode).upgrade(bundleCap, {});
33
+
34
+ const oneATOM = AmountMath.make(atomBrand, 1_000_000n);
35
+ const quoteAtom = await E(priceAuthority).quoteGiven(oneATOM, stableBrand);
36
+ console.log('paRegistry quote', quoteAtom);
37
+
38
+ assert(quoteAtom.quoteAmount.value, 'insist on getting a quote');
39
+ };
40
+
41
+ const par = 'paRegistry';
42
+ export const getManifestForUpgradingRegistry = (_powers, { registryRef }) => ({
43
+ manifest: {
44
+ [upgradePriceAuthorityRegistry.name]: {
45
+ consume: {
46
+ agoricNames: par,
47
+ vatAdminSvc: par,
48
+ vatStore: par,
49
+ priceAuthority: par,
50
+ },
51
+ brand: { consume: { [Stable.symbol]: par } },
52
+ },
53
+ },
54
+ options: {
55
+ registryRef,
56
+ },
57
+ });