@agoric/inter-protocol 0.16.2-dev-60cffcf.0 → 0.16.2-dev-0270908.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/inter-protocol",
3
- "version": "0.16.2-dev-60cffcf.0+60cffcf",
3
+ "version": "0.16.2-dev-0270908.0+0270908",
4
4
  "description": "Core cryptoeconomy contracts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -31,16 +31,16 @@
31
31
  },
32
32
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
33
33
  "dependencies": {
34
- "@agoric/assert": "0.6.1-dev-60cffcf.0+60cffcf",
35
- "@agoric/ertp": "0.16.3-dev-60cffcf.0+60cffcf",
36
- "@agoric/governance": "0.10.4-dev-60cffcf.0+60cffcf",
37
- "@agoric/internal": "0.3.3-dev-60cffcf.0+60cffcf",
38
- "@agoric/notifier": "0.6.3-dev-60cffcf.0+60cffcf",
39
- "@agoric/store": "0.9.3-dev-60cffcf.0+60cffcf",
40
- "@agoric/time": "0.3.3-dev-60cffcf.0+60cffcf",
41
- "@agoric/vat-data": "0.5.3-dev-60cffcf.0+60cffcf",
42
- "@agoric/vats": "0.15.2-dev-60cffcf.0+60cffcf",
43
- "@agoric/zoe": "0.26.3-dev-60cffcf.0+60cffcf",
34
+ "@agoric/assert": "0.6.1-dev-0270908.0+0270908",
35
+ "@agoric/ertp": "0.16.3-dev-0270908.0+0270908",
36
+ "@agoric/governance": "0.10.4-dev-0270908.0+0270908",
37
+ "@agoric/internal": "0.3.3-dev-0270908.0+0270908",
38
+ "@agoric/notifier": "0.6.3-dev-0270908.0+0270908",
39
+ "@agoric/store": "0.9.3-dev-0270908.0+0270908",
40
+ "@agoric/time": "0.3.3-dev-0270908.0+0270908",
41
+ "@agoric/vat-data": "0.5.3-dev-0270908.0+0270908",
42
+ "@agoric/vats": "0.15.2-dev-0270908.0+0270908",
43
+ "@agoric/zoe": "0.26.3-dev-0270908.0+0270908",
44
44
  "@endo/captp": "^4.2.0",
45
45
  "@endo/eventual-send": "^1.2.2",
46
46
  "@endo/far": "^1.1.2",
@@ -50,10 +50,10 @@
50
50
  "jessie.js": "^0.3.4"
51
51
  },
52
52
  "devDependencies": {
53
- "@agoric/smart-wallet": "0.5.4-dev-60cffcf.0+60cffcf",
54
- "@agoric/swingset-liveslots": "0.10.3-dev-60cffcf.0+60cffcf",
55
- "@agoric/swingset-vat": "0.32.3-dev-60cffcf.0+60cffcf",
56
- "@agoric/zone": "0.2.3-dev-60cffcf.0+60cffcf",
53
+ "@agoric/smart-wallet": "0.5.4-dev-0270908.0+0270908",
54
+ "@agoric/swingset-liveslots": "0.10.3-dev-0270908.0+0270908",
55
+ "@agoric/swingset-vat": "0.32.3-dev-0270908.0+0270908",
56
+ "@agoric/zone": "0.2.3-dev-0270908.0+0270908",
57
57
  "@endo/bundle-source": "^3.2.3",
58
58
  "@endo/init": "^1.1.2",
59
59
  "@endo/promise-kit": "^1.1.2",
@@ -85,5 +85,5 @@
85
85
  "typeCoverage": {
86
86
  "atLeast": 95.87
87
87
  },
88
- "gitHead": "60cffcf3b14bfd0f4902c00764904aa5de0b81ad"
88
+ "gitHead": "0270908690b17f67dc4a390c650353841df9f1e0"
89
89
  }
@@ -1,7 +1,6 @@
1
1
  # Proposals
2
2
 
3
- These are code snippets that go into propoals to the BLDer DAO to start the Inter Protocol.
3
+ These scripts are referenced by proposals to the BLDer DAO to run on the chain.
4
4
 
5
- One of the latest is `startPSM.js` so best to model after that. The style in `econ-behaviors.js` will be refactored to be like startPSM.
5
+ See the documentation in .../deploy-script-support/README.md
6
6
 
7
- [syntax of the manifests](../../packages/vats/src/core/manifest.js)
@@ -0,0 +1,24 @@
1
+ export function upgradeScaledPriceAuthorities({ consume: { agoricNamesAdmin, contractKits: contractKitsP, instancePrivateArgs: instancePrivateArgsP, zoe, }, }: ChainBootstrapSpace, { options }: {
2
+ options: {
3
+ scaledPARef: {
4
+ bundleID: string;
5
+ };
6
+ };
7
+ }): Promise<void>;
8
+ export function getManifestForUpgradeScaledPriceAuthorities(_ign: any, upgradeSPAOptions: any): Promise<{
9
+ manifest: {
10
+ [x: string]: {
11
+ consume: {
12
+ agoricNamesAdmin: string;
13
+ contractKits: string;
14
+ instancePrivateArgs: string;
15
+ zoe: string;
16
+ };
17
+ instance: {
18
+ produce: string;
19
+ };
20
+ };
21
+ };
22
+ options: any;
23
+ }>;
24
+ //# sourceMappingURL=upgrade-scaledPriceAuthorities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upgrade-scaledPriceAuthorities.d.ts","sourceRoot":"","sources":["upgrade-scaledPriceAuthorities.js"],"names":[],"mappings":"AASO,gKAHI,mBAAmB,eACnB;IAAE,OAAO,EAAE;QAAE,WAAW,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,iBAiD5D;AAGM;;;;;;;;;;;;;;;GAkBL"}
@@ -0,0 +1,78 @@
1
+ import { makeTracer } from '@agoric/internal';
2
+ import { E } from '@endo/far';
3
+
4
+ const trace = makeTracer('upgradeScaledPA', true);
5
+
6
+ /**
7
+ * @param {ChainBootstrapSpace} powers
8
+ * @param {{ options: { scaledPARef: { bundleID: string } } }} options
9
+ */
10
+ export const upgradeScaledPriceAuthorities = async (
11
+ {
12
+ consume: {
13
+ agoricNamesAdmin,
14
+ contractKits: contractKitsP,
15
+ instancePrivateArgs: instancePrivateArgsP,
16
+ zoe,
17
+ },
18
+ },
19
+ { options },
20
+ ) => {
21
+ trace('start');
22
+ const { scaledPARef } = options;
23
+ await null;
24
+
25
+ const bundleID = scaledPARef.bundleID;
26
+ if (scaledPARef && bundleID) {
27
+ await E.when(
28
+ E(zoe).installBundleID(bundleID),
29
+ installation =>
30
+ E(E(agoricNamesAdmin).lookupAdmin('installation')).update(
31
+ 'scaledPriceAuthority',
32
+ installation,
33
+ ),
34
+ err =>
35
+ console.error(
36
+ `🚨 failed to update scaledPriceAuthority installation`,
37
+ err,
38
+ ),
39
+ );
40
+ }
41
+
42
+ const [contractKits, instancePrivateArgs] = await Promise.all([
43
+ contractKitsP,
44
+ instancePrivateArgsP,
45
+ ]);
46
+ /** @type {StartedInstanceKit<any>[]} */
47
+ const scaledPAKitEntries = Array.from(contractKits.values()).filter(
48
+ kit => kit.label && kit.label.match(/scaledPriceAuthority/),
49
+ );
50
+
51
+ for (const kitEntry of scaledPAKitEntries) {
52
+ const { instance } = kitEntry;
53
+ const privateArgs = instancePrivateArgs.get(instance);
54
+ trace('upgrade scaledPriceAuthority', kitEntry.label);
55
+ await E(kitEntry.adminFacet).upgradeContract(bundleID, privateArgs);
56
+ }
57
+ };
58
+
59
+ const t = 'upgradeScaledPriceAuthority';
60
+ export const getManifestForUpgradeScaledPriceAuthorities = async (
61
+ _ign,
62
+ upgradeSPAOptions,
63
+ ) => ({
64
+ manifest: {
65
+ [upgradeScaledPriceAuthorities.name]: {
66
+ consume: {
67
+ agoricNamesAdmin: t,
68
+ contractKits: t,
69
+ instancePrivateArgs: t,
70
+ zoe: t,
71
+ },
72
+ instance: {
73
+ produce: t,
74
+ },
75
+ },
76
+ },
77
+ options: { ...upgradeSPAOptions },
78
+ });