@agoric/inter-protocol 0.16.2-dev-6415ef6.0 → 0.16.2-dev-da89a20.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.
@@ -0,0 +1,312 @@
1
+ import { makeTracer } from '@agoric/internal';
2
+ import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
3
+ import { E } from '@endo/far';
4
+
5
+ import { unitAmount } from '@agoric/zoe/src/contractSupport/priceQuote.js';
6
+ import {
7
+ oracleBrandFeedName,
8
+ reserveThenDeposit,
9
+ sanitizePathSegment,
10
+ } from './utils.js';
11
+ import { replaceScaledPriceAuthorities } from './replace-scaledPriceAuthorities.js';
12
+
13
+ const STORAGE_PATH = 'priceFeed';
14
+
15
+ /** @type {ChainlinkConfig} */
16
+ export const DEFAULT_CONTRACT_TERMS = {
17
+ maxSubmissionCount: 1000,
18
+ minSubmissionCount: 2,
19
+ restartDelay: 1n, // the number of rounds an Oracle has to wait before they can initiate another round
20
+ timeout: 10, // in seconds according to chainTimerService
21
+ minSubmissionValue: 1,
22
+ maxSubmissionValue: 2 ** 256,
23
+ };
24
+
25
+ /** @import {EconomyBootstrapPowers} from './econ-behaviors.js'; */
26
+ /** @import {ChainlinkConfig} from '@agoric/inter-protocol/src/price/fluxAggregatorKit.js'; */
27
+ /** @import {FluxStartFn} from '@agoric/inter-protocol/src/price/fluxAggregatorContract.js'; */
28
+
29
+ const trace = makeTracer('DeployPriceFeed', true);
30
+
31
+ /**
32
+ * @typedef {{
33
+ * oracleAddresses: string[];
34
+ * inBrandNames: string[];
35
+ * contractTerms?: Partial<ChainlinkConfig>;
36
+ * }} PriceFeedConfig
37
+ */
38
+
39
+ /**
40
+ * @param {EconomyBootstrapPowers} powers
41
+ * @param {string} bundleID
42
+ */
43
+ const installPriceAggregator = async (
44
+ {
45
+ consume: { zoe },
46
+ installation: {
47
+ produce: { priceAggregator },
48
+ },
49
+ },
50
+ bundleID,
51
+ ) => {
52
+ /** @type {Installation<FluxStartFn>} */
53
+ const installation = await E(zoe).installBundleID(bundleID);
54
+ priceAggregator.reset();
55
+ priceAggregator.resolve(installation);
56
+ trace('installed priceAggregator', bundleID.slice(0, 'b1-1234567'.length));
57
+ return installation;
58
+ };
59
+
60
+ /**
61
+ * Provide (find/create) inert brands (no mint or issuer) referred to by oracles
62
+ *
63
+ * @param {EconomyBootstrapPowers & NamedVatPowers} space
64
+ * @param {{ name: string; decimalPlaces: number }} opt
65
+ * @returns {Promise<Brand<'nat'>>}
66
+ */
67
+ export const ensureOracleBrand = async (
68
+ {
69
+ namedVat: {
70
+ consume: { agoricNames },
71
+ },
72
+ oracleBrand: { produce: oracleBrandProduce },
73
+ },
74
+ { name, decimalPlaces },
75
+ ) => {
76
+ const brand = E(agoricNames).provideInertBrand(name, {
77
+ assetKind: 'nat',
78
+ decimalPlaces,
79
+ });
80
+
81
+ oracleBrandProduce[name].reset();
82
+ oracleBrandProduce[name].resolve(brand);
83
+ return brand;
84
+ };
85
+
86
+ /**
87
+ * @param {EconomyBootstrapPowers} powers
88
+ * @param {{
89
+ * AGORIC_INSTANCE_NAME: string;
90
+ * contractTerms: import('@agoric/inter-protocol/src/price/fluxAggregatorKit.js').ChainlinkConfig;
91
+ * brandIn: Brand<'nat'>;
92
+ * brandOut: Brand<'nat'>;
93
+ * }} config
94
+ * @param {Installation<FluxStartFn>} installation
95
+ */
96
+ const startPriceAggregatorInstance = async (
97
+ {
98
+ consume: {
99
+ board,
100
+ chainStorage,
101
+ chainTimerService,
102
+ econCharterKit,
103
+ highPrioritySendersManager,
104
+ namesByAddressAdmin,
105
+ startGovernedUpgradable,
106
+ },
107
+ instance: { produce: produceInstance },
108
+ },
109
+ { AGORIC_INSTANCE_NAME, contractTerms, brandIn, brandOut },
110
+ installation,
111
+ ) => {
112
+ trace('startPriceAggregatorInstance', AGORIC_INSTANCE_NAME);
113
+ const label = sanitizePathSegment(AGORIC_INSTANCE_NAME);
114
+
115
+ const feedsStorage = await makeStorageNodeChild(chainStorage, STORAGE_PATH);
116
+ const storageNode = await E(feedsStorage).makeChildNode(label);
117
+ const marshaller = await E(board).getReadonlyMarshaller();
118
+
119
+ const terms = harden({
120
+ ...contractTerms,
121
+ description: AGORIC_INSTANCE_NAME,
122
+ brandIn,
123
+ brandOut,
124
+ // XXX powerful TimerService, see #6003
125
+ timer: await chainTimerService,
126
+ unitAmountIn: await unitAmount(brandIn),
127
+ });
128
+ const privateArgs = {
129
+ highPrioritySendersManager: await highPrioritySendersManager,
130
+ marshaller,
131
+ namesByAddressAdmin,
132
+ storageNode,
133
+ };
134
+ const governedKit = await E(startGovernedUpgradable)({
135
+ governedParams: {},
136
+ privateArgs,
137
+ terms,
138
+ label,
139
+ // @ts-expect-error GovernableStartFn vs. fluxAggregatorContract.js start
140
+ installation,
141
+ });
142
+ produceInstance[AGORIC_INSTANCE_NAME].reset();
143
+ produceInstance[AGORIC_INSTANCE_NAME].resolve(governedKit.instance);
144
+ trace(
145
+ 'new instance',
146
+ label,
147
+ { terms, privateArgs, installation },
148
+ governedKit,
149
+ );
150
+
151
+ await E(E.get(econCharterKit).creatorFacet).addInstance(
152
+ governedKit.instance,
153
+ governedKit.governorCreatorFacet,
154
+ AGORIC_INSTANCE_NAME,
155
+ );
156
+ trace('added', label, 'instance to econCharter');
157
+
158
+ /** @type {import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<FluxStartFn>} */
159
+ // @ts-expect-error
160
+ const { instance, publicFacet, creatorFacet } = governedKit;
161
+
162
+ return harden({ instance, publicFacet, creatorFacet });
163
+ };
164
+
165
+ /**
166
+ * Send invitations to oracle operators for a price feed.
167
+ *
168
+ * @param {EconomyBootstrapPowers} powers
169
+ * @param {{ oracleAddresses: string[]; AGORIC_INSTANCE_NAME: string }} config
170
+ * @param {any} creatorFacet
171
+ */
172
+ const distributeInvitations = async (
173
+ { consume: { namesByAddressAdmin } },
174
+ { oracleAddresses, AGORIC_INSTANCE_NAME },
175
+ creatorFacet,
176
+ ) => {
177
+ /** @param {string} addr */
178
+ const addOracle = async addr => {
179
+ const invitation = await E(creatorFacet).makeOracleInvitation(addr);
180
+ const debugName = `${AGORIC_INSTANCE_NAME} member ${addr}`;
181
+ await reserveThenDeposit(debugName, namesByAddressAdmin, addr, [
182
+ invitation,
183
+ ]).catch(err => console.error(`failed deposit to ${debugName}`, err));
184
+ };
185
+
186
+ trace('distributing invitations', oracleAddresses);
187
+ // This doesn't resolve until oracle operators create their smart wallets.
188
+ // Don't block completion on it.
189
+ void Promise.all(oracleAddresses.map(addOracle));
190
+ trace('createPriceFeed complete');
191
+ };
192
+
193
+ /**
194
+ * @param {EconomyBootstrapPowers & NamedVatPowers} powers
195
+ * @param {{
196
+ * options: PriceFeedConfig & {
197
+ * priceAggregatorRef: { bundleID: string };
198
+ * scaledPARef: { bundleID: string };
199
+ * inBrandsDecimals?: number;
200
+ * contractTerms?: ChainlinkConfig;
201
+ * outBrandName?: string;
202
+ * outBrandDecimals?: number;
203
+ * };
204
+ * }} config
205
+ */
206
+ export const deployPriceFeeds = async (powers, config) => {
207
+ const {
208
+ inBrandNames,
209
+ oracleAddresses,
210
+ contractTerms,
211
+ priceAggregatorRef,
212
+ scaledPARef,
213
+ inBrandsDecimals = 6,
214
+ outBrandName = 'USD',
215
+ outBrandDecimals = 6,
216
+ } = config.options;
217
+ await null;
218
+
219
+ const installation = await installPriceAggregator(
220
+ powers,
221
+ priceAggregatorRef.bundleID,
222
+ );
223
+
224
+ const { priceAuthorityAdmin, priceAuthority } = powers.consume;
225
+ for (const inBrandName of inBrandNames) {
226
+ const AGORIC_INSTANCE_NAME = oracleBrandFeedName(inBrandName, outBrandName);
227
+ const brandIn = await ensureOracleBrand(powers, {
228
+ name: inBrandName,
229
+ decimalPlaces: inBrandsDecimals,
230
+ });
231
+ const brandOut = await ensureOracleBrand(powers, {
232
+ name: outBrandName,
233
+ decimalPlaces: outBrandDecimals,
234
+ });
235
+ const kit = await startPriceAggregatorInstance(
236
+ powers,
237
+ {
238
+ AGORIC_INSTANCE_NAME,
239
+ brandIn,
240
+ brandOut,
241
+ contractTerms: { ...DEFAULT_CONTRACT_TERMS, ...contractTerms },
242
+ },
243
+ installation,
244
+ );
245
+
246
+ const forceReplace = true;
247
+ await E(priceAuthorityAdmin).registerPriceAuthority(
248
+ E(kit.publicFacet).getPriceAuthority(),
249
+ brandIn,
250
+ brandOut,
251
+ forceReplace,
252
+ );
253
+
254
+ await distributeInvitations(
255
+ powers,
256
+ { oracleAddresses, AGORIC_INSTANCE_NAME },
257
+ kit.creatorFacet,
258
+ );
259
+ }
260
+
261
+ // @ts-expect-error replaceScaledPriceAuthorities uses a subset of the powers.
262
+ await replaceScaledPriceAuthorities(powers, {
263
+ options: { scaledPARef },
264
+ });
265
+
266
+ // cf. #8400 QuotePayments storage leak
267
+ powers.produce.priceAuthority8400.resolve(priceAuthority);
268
+ };
269
+
270
+ const t = 'priceFeed';
271
+
272
+ /**
273
+ * Thread price feed upgrade options through from builder to core-eval.
274
+ *
275
+ * @param {object} utils
276
+ * @param {any} utils.restoreRef
277
+ * @param {PriceFeedConfig & { priceAggregatorRef: any }} priceFeedOptions
278
+ */
279
+ export const getManifestForPriceFeeds = async (
280
+ { restoreRef: _restoreRef },
281
+ priceFeedOptions,
282
+ ) => ({
283
+ manifest: {
284
+ [deployPriceFeeds.name]: {
285
+ namedVat: t,
286
+ consume: {
287
+ agoricNamesAdmin: t,
288
+ agoricNames: t,
289
+ board: t,
290
+ chainStorage: t,
291
+ chainTimerService: t,
292
+ contractKits: t,
293
+ econCharterKit: t,
294
+ highPrioritySendersManager: t,
295
+ instancePrivateArgs: t,
296
+ namesByAddressAdmin: t,
297
+ priceAuthority: t,
298
+ priceAuthorityAdmin: t,
299
+ startGovernedUpgradable: t,
300
+ startUpgradable: t,
301
+ zoe: t,
302
+ },
303
+ installation: { produce: { priceAggregator: t } },
304
+ instance: {
305
+ produce: t,
306
+ },
307
+ oracleBrand: { produce: t },
308
+ produce: { priceAuthority8400: t },
309
+ },
310
+ },
311
+ options: { ...priceFeedOptions },
312
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"price-feed-proposal.d.ts","sourceRoot":"","sources":["price-feed-proposal.js"],"names":[],"mappings":";AA6CO,+HAJI,mBAAmB,GAAG,cAAc,8JACpC;IAAE,OAAO,EAAE;QAAE,gBAAgB,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAAE,GACjD,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAsCjD;AAiBM,iSAdI,mBAAmB,qJACnB;IACN,OAAO,EAAE;QACP,gBAAgB,EAAE;YAChB,oBAAoB,EAAE,MAAM,CAAC;YAC7B,eAAe,EAAE,MAAM,EAAE,CAAC;YAC1B,aAAa,EAAE,OAAO,uDAAuD,EAAE,eAAe,CAAC;YAC/F,aAAa,EAAE,MAAM,CAAC;YACtB,cAAc,EAAE,MAAM,CAAC;YACvB,kBAAkB,EAAE,YAAY,CAAC;SAClC,CAAC;KACH,CAAC;CACH,iBAgKH;AAWM,wDAHJ;IAAmD,UAAU,UAA/C,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC;CAC1C,oBAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA1OP,MAAM;+BACF,MAAM;4BACT,MAAM;gCACF,MAAM;;;GAwR7B;AAQK,wGALI,OAAO,qBAAqB,EAAE,sBAAsB;;;;8BA8D9D;+BA/VY;IACR,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;oCAtBG,YAAY"}
1
+ {"version":3,"file":"price-feed-proposal.d.ts","sourceRoot":"","sources":["price-feed-proposal.js"],"names":[],"mappings":";AA6CO,+HAJI,mBAAmB,GAAG,cAAc,8JACpC;IAAE,OAAO,EAAE;QAAE,gBAAgB,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAAE,GACjD,OAAO,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAsCjD;AAiBM,iSAdI,mBAAmB,qJACnB;IACN,OAAO,EAAE;QACP,gBAAgB,EAAE;YAChB,oBAAoB,EAAE,MAAM,CAAC;YAC7B,eAAe,EAAE,MAAM,EAAE,CAAC;YAC1B,aAAa,EAAE,OAAO,uDAAuD,EAAE,eAAe,CAAC;YAC/F,aAAa,EAAE,MAAM,CAAC;YACtB,cAAc,EAAE,MAAM,CAAC;YACvB,kBAAkB,EAAE,YAAY,CAAC;SAClC,CAAC;KACH,CAAC;CACH,iBAiKH;AAWM,wDAHJ;IAAmD,UAAU,UAA/C,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC;CAC1C,oBAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA3OP,MAAM;+BACF,MAAM;4BACT,MAAM;gCACF,MAAM;;;GAyR7B;AAQK,wGALI,OAAO,qBAAqB,EAAE,sBAAsB;;;;8BA8D9D;+BAhWY;IACR,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;oCAtBG,YAAY"}
@@ -227,7 +227,8 @@ export const createPriceFeed = async (
227
227
 
228
228
  // being after the above awaits means that when this resolves, the consumer
229
229
  // gets notified that the authority is in the registry and its instance is in
230
- // agoricNames.
230
+ // agoricNames. reset() in case we're replacing an existing feed.
231
+ produceInstance[AGORIC_INSTANCE_NAME].reset();
231
232
  produceInstance[AGORIC_INSTANCE_NAME].resolve(faKit.instance);
232
233
 
233
234
  E(E.get(econCharterKit).creatorFacet).addInstance(
@@ -0,0 +1,30 @@
1
+ export function replaceScaledPriceAuthority(powers: BootstrapPowers, { options }: {
2
+ options: object;
3
+ }): Promise<void>;
4
+ export function replaceScaledPriceAuthorities(powers: ChainBootstrapSpace & BootstrapPowers, { options }: {
5
+ options: {
6
+ scaledPARef: {
7
+ bundleID: string;
8
+ };
9
+ };
10
+ }): Promise<void>;
11
+ export function getManifestForReplaceScaledPriceAuthorities(_ign: any, upgradeSPAOptions: any): Promise<{
12
+ manifest: {
13
+ [x: string]: {
14
+ consume: {
15
+ agoricNames: string;
16
+ priceAuthority: string;
17
+ startUpgradable: string;
18
+ zoe: string;
19
+ agoricNamesAdmin: string;
20
+ contractKits: string;
21
+ priceAuthorityAdmin: string;
22
+ };
23
+ instance: {
24
+ produce: string;
25
+ };
26
+ };
27
+ };
28
+ options: any;
29
+ }>;
30
+ //# sourceMappingURL=replace-scaledPriceAuthorities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-scaledPriceAuthorities.d.ts","sourceRoot":"","sources":["replace-scaledPriceAuthorities.js"],"names":[],"mappings":"AAaO,oDAJI,eAAe,eAEvB;IAAuB,OAAO,EAAtB,MAAM;CAChB,iBAeA;AAUM,sDAHI,mBAAmB,GAAG,eAAe,eACrC;IAAE,OAAO,EAAE;QAAE,WAAW,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,iBA2D5D;AAGM;;;;;;;;;;;;;;;;;;GA0BL"}
@@ -0,0 +1,124 @@
1
+ import { makeTracer } from '@agoric/internal';
2
+ import { E } from '@endo/far';
3
+
4
+ import { startScaledPriceAuthority } from './addAssetToVault.js';
5
+ import { scaledPriceFeedName } from './utils.js';
6
+
7
+ const trace = makeTracer('replaceScaledPA', true);
8
+
9
+ /**
10
+ * @param {BootstrapPowers} powers
11
+ * @param {object} config
12
+ * @param {object} config.options
13
+ */
14
+ export const replaceScaledPriceAuthority = async (powers, { options }) => {
15
+ const {
16
+ instance: { produce: produceInstance },
17
+ } = powers;
18
+ const { issuerName } = options.interchainAssetOptions;
19
+
20
+ const spaKit = await startScaledPriceAuthority(powers, { options });
21
+
22
+ const label = scaledPriceFeedName(issuerName);
23
+ produceInstance[label].reset();
24
+
25
+ // publish into agoricNames. This must stay after registerPriceAuthority,
26
+ // which is called by startScaledPriceAuthority()
27
+ produceInstance[label].resolve(spaKit.instance);
28
+ };
29
+
30
+ /**
31
+ * Look up the existing assets known to auctions, and replace the corresponding
32
+ * scaledPriceAuthorities. The existing contracts will be left behind to be
33
+ * cleaned up later.
34
+ *
35
+ * @param {ChainBootstrapSpace & BootstrapPowers} powers
36
+ * @param {{ options: { scaledPARef: { bundleID: string } } }} options
37
+ */
38
+ export const replaceScaledPriceAuthorities = async (powers, { options }) => {
39
+ trace('start');
40
+ const {
41
+ consume: {
42
+ agoricNamesAdmin,
43
+ agoricNames,
44
+ contractKits: contractKitsP,
45
+ zoe,
46
+ },
47
+ } = powers;
48
+
49
+ const { scaledPARef } = options;
50
+
51
+ const installationsAdmin = E(agoricNamesAdmin).lookupAdmin('installation');
52
+ const [spaInstallation, contractKits] = await Promise.all([
53
+ E(E(installationsAdmin).readonly()).lookup('scaledPriceAuthority'),
54
+ contractKitsP,
55
+ ]);
56
+
57
+ const bundleID = scaledPARef.bundleID;
58
+ if (scaledPARef && bundleID) {
59
+ await E.when(
60
+ E(zoe).installBundleID(bundleID),
61
+ installation =>
62
+ E(installationsAdmin).update('scaledPriceAuthority', installation),
63
+ err =>
64
+ console.error(
65
+ `🚨 failed to update scaledPriceAuthority installation`,
66
+ err,
67
+ ),
68
+ );
69
+ trace('installed scaledPriceAuthority bundle', bundleID);
70
+ }
71
+
72
+ // Ask Zoe for the installation for each kit's instance, and return all the
73
+ // kits where that matches the given installation.
74
+ async function maybeSPAKit(kit) {
75
+ const installation = await E(zoe).getInstallationForInstance(kit.instance);
76
+ return spaInstallation === installation ? [kit] : [];
77
+ }
78
+ const scaledPAKits = (
79
+ await Promise.all([...contractKits.values()].map(maybeSPAKit))
80
+ ).flat();
81
+
82
+ const namedBrands = await E(E(agoricNames).lookup('brand')).entries();
83
+
84
+ for (const kitEntry of scaledPAKits) {
85
+ const { instance } = kitEntry;
86
+ const terms = await E(powers.consume.zoe).getTerms(instance);
87
+ const { brand } = terms.scaleIn.denominator;
88
+ const entry = namedBrands.find(([_k, v]) => v === brand);
89
+ assert(entry, 'unable to find issuerName for ', brand);
90
+ const issuerName = entry[0];
91
+ await replaceScaledPriceAuthority(powers, {
92
+ options: { interchainAssetOptions: { issuerName } },
93
+ });
94
+ }
95
+ };
96
+
97
+ const t = 'replaceScaledPriceAuthority';
98
+ export const getManifestForReplaceScaledPriceAuthorities = async (
99
+ _ign,
100
+ upgradeSPAOptions,
101
+ ) => ({
102
+ manifest: {
103
+ [replaceScaledPriceAuthorities.name]: {
104
+ consume: {
105
+ // //// Widely known ////
106
+ agoricNames: t,
107
+ priceAuthority: t,
108
+ startUpgradable: t,
109
+ zoe: t,
110
+
111
+ // //// closely held, powerful ////
112
+ agoricNamesAdmin: t,
113
+ contractKits: t,
114
+ priceAuthorityAdmin: t,
115
+ },
116
+ instance: {
117
+ // This is a right to add/replace any instance. That we update only the
118
+ // relevant ones must be verified by inspection.
119
+ produce: t,
120
+ },
121
+ },
122
+ },
123
+ options: { ...upgradeSPAOptions },
124
+ });
@@ -1,14 +1,20 @@
1
- export function upgradeVaults({ consume: { auctionUpgradeNewInstance, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, reserveKit, vaultFactoryKit, zoe, }, produce: { auctionUpgradeNewInstance: auctionUpgradeNewInstanceProducer }, installation: { produce: { VaultFactory: produceVaultInstallation }, }, instance: { consume: { auctioneer: auctioneerInstanceP }, }, }: import("../../src/proposals/econ-behaviors").EconomyBootstrapPowers & interlockPowers, { options }: {
1
+ export function upgradeVaults({ consume: { auctionUpgradeNewInstance, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, reserveKit, vaultFactoryKit, zoe, priceAuthority8400, }, produce: { auctionUpgradeNewInstance: auctionUpgradeNewInstanceProducer }, instance: { consume: { auctioneer: auctioneerInstanceP }, }, }: import("../../src/proposals/econ-behaviors").EconomyBootstrapPowers & interlockPowers, { options: { VaultFactoryBundle: vaultBundleRef, contractGovernorBundle } }: {
2
2
  options: {
3
- vaultsRef: {
3
+ VaultFactoryBundle: {
4
+ bundleID: string;
5
+ };
6
+ contractGovernorBundle: {
4
7
  bundleID: string;
5
8
  };
6
9
  };
7
10
  }): Promise<void>;
8
- export function getManifestForUpgradeVaults(_ign: object, vaultUpgradeOptions: any): Promise<{
11
+ export function getManifestForUpgradeVaults({ restoreRef }: {
12
+ restoreRef: any;
13
+ }, { VaultFactoryRef, contractGovernorRef }: any): Promise<{
9
14
  manifest: {
10
15
  [x: string]: {
11
16
  consume: {
17
+ priceAuthority8400: string;
12
18
  auctionUpgradeNewInstance: string;
13
19
  chainTimerService: string;
14
20
  economicCommitteeCreatorFacet: string;
@@ -19,21 +25,24 @@ export function getManifestForUpgradeVaults(_ign: object, vaultUpgradeOptions: a
19
25
  produce: {
20
26
  auctionUpgradeNewInstance: string;
21
27
  };
22
- installation: {
23
- produce: {
24
- VaultFactory: boolean;
25
- };
26
- };
27
28
  instance: {
28
29
  consume: {
29
- auctioneer: boolean;
30
+ auctioneer: string;
30
31
  };
31
32
  };
32
33
  };
33
34
  };
34
- options: any;
35
+ installations: {
36
+ VaultFactory: any;
37
+ contractGovernor: any;
38
+ };
39
+ options: {
40
+ VaultFactoryBundle: any;
41
+ contractGovernorBundle: any;
42
+ };
35
43
  }>;
36
44
  export type interlockPowers = PromiseSpaceOf<{
45
+ priceAuthority8400: Instance;
37
46
  auctionUpgradeNewInstance: Instance;
38
47
  }>;
39
48
  //# sourceMappingURL=upgrade-vaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-vaults.d.ts","sourceRoot":"","sources":["upgrade-vaults.js"],"names":[],"mappings":"AAoBO,wYAJI,OAAO,oCAAoC,EAAE,sBAAsB,GACvE,eAAe,eACX;IAAE,OAAO,EAAE;QAAE,SAAS,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,iBAwK1D;AASM,kDAHI,MAAM,uBACN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwBZ;8BA/MW,cAAc,CAAC;IACvB,yBAAyB,EAAE,QAAQ,CAAC;CACrC,CAAC"}
1
+ {"version":3,"file":"upgrade-vaults.d.ts","sourceRoot":"","sources":["upgrade-vaults.js"],"names":[],"mappings":"AAyBO,oVATI,OAAO,oCAAoC,EAAE,sBAAsB,GACvE,eAAe,+EACX;IACN,OAAO,EAAE;QACP,kBAAkB,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QACzC,sBAAsB,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9C,CAAC;CACH,iBA6IH;AAUM,4DAHJ;IAAmB,UAAU,EAArB,GAAG;CACX,4CAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+Bb;8BAlMY,cAAc,CAAC;IACvB,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,yBAAyB,EAAE,QAAQ,CAAC;CACrC,CAAC"}