@agoric/inter-protocol 0.13.2-dev-2354e8d.0 → 0.13.2-dev-f243a2c.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.13.2-dev-2354e8d.0+2354e8d",
3
+ "version": "0.13.2-dev-f243a2c.0+f243a2c",
4
4
  "description": "Core cryptoeconomy contracts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -29,29 +29,29 @@
29
29
  },
30
30
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
31
31
  "dependencies": {
32
- "@agoric/assert": "0.5.2-dev-2354e8d.0+2354e8d",
33
- "@agoric/ertp": "0.15.4-dev-2354e8d.0+2354e8d",
34
- "@agoric/governance": "0.9.2-dev-2354e8d.0+2354e8d",
35
- "@agoric/internal": "0.2.2-dev-2354e8d.0+2354e8d",
36
- "@agoric/notifier": "0.5.2-dev-2354e8d.0+2354e8d",
37
- "@agoric/store": "0.8.4-dev-2354e8d.0+2354e8d",
38
- "@agoric/time": "0.2.2-dev-2354e8d.0+2354e8d",
39
- "@agoric/vat-data": "0.4.4-dev-2354e8d.0+2354e8d",
40
- "@agoric/vats": "0.13.1-dev-2354e8d.0+2354e8d",
41
- "@agoric/zoe": "0.25.4-dev-2354e8d.0+2354e8d",
32
+ "@agoric/assert": "0.5.2-dev-f243a2c.0+f243a2c",
33
+ "@agoric/ertp": "0.15.4-dev-f243a2c.0+f243a2c",
34
+ "@agoric/governance": "0.9.2-dev-f243a2c.0+f243a2c",
35
+ "@agoric/internal": "0.2.2-dev-f243a2c.0+f243a2c",
36
+ "@agoric/notifier": "0.5.2-dev-f243a2c.0+f243a2c",
37
+ "@agoric/store": "0.8.4-dev-f243a2c.0+f243a2c",
38
+ "@agoric/time": "0.2.2-dev-f243a2c.0+f243a2c",
39
+ "@agoric/vat-data": "0.4.4-dev-f243a2c.0+f243a2c",
40
+ "@agoric/vats": "0.13.1-dev-f243a2c.0+f243a2c",
41
+ "@agoric/zoe": "0.25.4-dev-f243a2c.0+f243a2c",
42
42
  "@endo/captp": "^3.1.1",
43
43
  "@endo/eventual-send": "^0.17.2",
44
44
  "@endo/far": "^0.2.18",
45
45
  "@endo/marshal": "^0.8.5",
46
46
  "@endo/nat": "^4.1.27",
47
- "agoric": "0.18.3-dev-2354e8d.0+2354e8d",
47
+ "agoric": "0.18.3-dev-f243a2c.0+f243a2c",
48
48
  "jessie.js": "^0.3.2"
49
49
  },
50
50
  "devDependencies": {
51
- "@agoric/deploy-script-support": "0.9.5-dev-2354e8d.0+2354e8d",
52
- "@agoric/smart-wallet": "0.4.3-dev-2354e8d.0+2354e8d",
53
- "@agoric/swingset-liveslots": "0.9.1-dev-2354e8d.0+2354e8d",
54
- "@agoric/swingset-vat": "0.30.3-dev-2354e8d.0+2354e8d",
51
+ "@agoric/deploy-script-support": "0.9.5-dev-f243a2c.0+f243a2c",
52
+ "@agoric/smart-wallet": "0.4.3-dev-f243a2c.0+f243a2c",
53
+ "@agoric/swingset-liveslots": "0.9.1-dev-f243a2c.0+f243a2c",
54
+ "@agoric/swingset-vat": "0.30.3-dev-f243a2c.0+f243a2c",
55
55
  "@endo/bundle-source": "^2.5.1",
56
56
  "@endo/init": "^0.5.56",
57
57
  "@endo/promise-kit": "^0.2.56",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "2354e8d4e23b6a9cc4be67a41d3c5a5119ef7d51"
80
+ "gitHead": "f243a2cb67bff4416069d1e558544a781d0d6a81"
81
81
  }
@@ -64,7 +64,7 @@ const BASIS_POINTS = 10_000n;
64
64
  * econCharterKit: EconCharterStartResult,
65
65
  * reserveKit: GovernanceFacetKit<import('../reserve/assetReserve.js')['start']>,
66
66
  * stakeFactoryKit: GovernanceFacetKit<import('../stakeFactory/stakeFactory.js')['start']>,
67
- * vaultFactoryKit: GovernanceFacetKit<import('../vaultFactory/vaultFactory.js')['start']>,
67
+ * vaultFactoryKit: GovernanceFacetKit<import('../vaultFactory/vaultFactory.js')['prepare']>,
68
68
  * auctioneerKit: AuctioneerKit,
69
69
  * minInitialDebt: NatValue,
70
70
  * }>} EconomyBootstrapSpace
@@ -331,6 +331,8 @@ export const startVaultFactory = async (
331
331
  governorCreatorFacet,
332
332
  adminFacet,
333
333
  publicFacet,
334
+ // XXX safe? if this sticks add it to the type
335
+ privateArgs: vaultFactoryPrivateArgs,
334
336
  }),
335
337
  );
336
338
 
@@ -7,8 +7,10 @@ import {
7
7
  makeParamManagerSync,
8
8
  ParamTypes,
9
9
  } from '@agoric/governance';
10
- import { M } from '@agoric/store';
10
+ import { makeStoredPublisherKit } from '@agoric/notifier';
11
+ import { M, makeScalarMapStore } from '@agoric/store';
11
12
  import { TimeMath } from '@agoric/time';
13
+ import { provideDurableMapStore } from '@agoric/vat-data';
12
14
  import { subtractRatios } from '@agoric/zoe/src/contractSupport/ratio.js';
13
15
  import { amountPattern, ratioPattern } from '../contractSupport.js';
14
16
 
@@ -160,3 +162,56 @@ export const makeGovernedTerms = ({
160
162
  });
161
163
  };
162
164
  harden(makeGovernedTerms);
165
+ /**
166
+ * Stop-gap which restores initial param values
167
+ * UNTIL https://github.com/Agoric/agoric-sdk/issues/5200
168
+ *
169
+ * NB: changes from initial values will be lost upon restart
170
+ *
171
+ * @param {import('@agoric/vat-data').Baggage} baggage
172
+ * @param {ERef<Marshaller>} marshaller
173
+ */
174
+ export const provideVaultParamManagers = (baggage, marshaller) => {
175
+ /** @type {MapStore<Brand, VaultParamManager>} */
176
+ const managers = makeScalarMapStore();
177
+
178
+ // the managers aren't durable but their arguments are
179
+ /** @type {MapStore<Brand, {storageNode: StorageNode, initialParamValues: VaultManagerParamValues}>} */
180
+ const managerArgs = provideDurableMapStore(
181
+ baggage,
182
+ 'vault param manager parts',
183
+ );
184
+
185
+ const makeManager = (brand, { storageNode, initialParamValues }) => {
186
+ const manager = makeVaultParamManager(
187
+ makeStoredPublisherKit(storageNode, marshaller, 'governance'),
188
+ initialParamValues,
189
+ );
190
+ managers.init(brand, manager);
191
+ return manager;
192
+ };
193
+
194
+ // restore from baggage
195
+ [...managerArgs.entries()].map(([brand, args]) => makeManager(brand, args));
196
+
197
+ return {
198
+ /**
199
+ *
200
+ * @param {Brand} brand
201
+ * @param {StorageNode} storageNode
202
+ * @param {VaultManagerParamValues} initialParamValues
203
+ */
204
+ addParamManager(brand, storageNode, initialParamValues) {
205
+ const args = harden({ storageNode, initialParamValues });
206
+ managerArgs.init(brand, args);
207
+ return makeManager(brand, args);
208
+ },
209
+ /**
210
+ * @param {Brand} brand
211
+ */
212
+ get(brand) {
213
+ return managers.get(brand);
214
+ },
215
+ };
216
+ };
217
+ harden(provideVaultParamManagers);
@@ -54,7 +54,6 @@
54
54
  * @property {AddVaultType} addVaultType
55
55
  * @property {() => Allocation} getRewardAllocation
56
56
  * @property {() => Promise<Invitation<string, never>>} makeCollectFeesInvitation
57
- * @property {() => void} updateMetrics
58
57
  * @property {() => import('@agoric/time/src/types').TimerWaker} makeLiquidationWaker
59
58
  * @property {() => import('@agoric/time/src/types').TimerWaker} makePriceLockWaker
60
59
  */