@agoric/inter-protocol 0.16.2-dev-3007c00.0 → 0.16.2-dev-5c932ce.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 +15 -15
- package/src/proposals/add-auction.d.ts +6 -1
- package/src/proposals/add-auction.d.ts.map +1 -1
- package/src/proposals/add-auction.js +8 -0
- package/src/proposals/deploy-price-feeds.d.ts.map +1 -1
- package/src/proposals/deploy-price-feeds.js +4 -0
- package/src/proposals/replaceElectorate.d.ts +8 -2
- package/src/proposals/replaceElectorate.d.ts.map +1 -1
- package/src/proposals/replaceElectorate.js +46 -18
- package/src/proposals/upgrade-vaults.d.ts +1 -6
- package/src/proposals/upgrade-vaults.d.ts.map +1 -1
- package/src/proposals/upgrade-vaults.js +1 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/inter-protocol",
|
|
3
|
-
"version": "0.16.2-dev-
|
|
3
|
+
"version": "0.16.2-dev-5c932ce.0+5c932ce",
|
|
4
4
|
"description": "Core cryptoeconomy contracts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
35
|
-
"@agoric/governance": "0.10.4-dev-
|
|
36
|
-
"@agoric/internal": "0.3.3-dev-
|
|
37
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
38
|
-
"@agoric/store": "0.9.3-dev-
|
|
39
|
-
"@agoric/time": "0.3.3-dev-
|
|
40
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
41
|
-
"@agoric/vats": "0.15.2-dev-
|
|
42
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
34
|
+
"@agoric/ertp": "0.16.3-dev-5c932ce.0+5c932ce",
|
|
35
|
+
"@agoric/governance": "0.10.4-dev-5c932ce.0+5c932ce",
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-5c932ce.0+5c932ce",
|
|
37
|
+
"@agoric/notifier": "0.6.3-dev-5c932ce.0+5c932ce",
|
|
38
|
+
"@agoric/store": "0.9.3-dev-5c932ce.0+5c932ce",
|
|
39
|
+
"@agoric/time": "0.3.3-dev-5c932ce.0+5c932ce",
|
|
40
|
+
"@agoric/vat-data": "0.5.3-dev-5c932ce.0+5c932ce",
|
|
41
|
+
"@agoric/vats": "0.15.2-dev-5c932ce.0+5c932ce",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-5c932ce.0+5c932ce",
|
|
43
43
|
"@endo/captp": "^4.4.2",
|
|
44
44
|
"@endo/errors": "^1.2.7",
|
|
45
45
|
"@endo/eventual-send": "^1.2.7",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"jessie.js": "^0.3.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
54
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
55
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
56
|
-
"@agoric/zone": "0.2.3-dev-
|
|
53
|
+
"@agoric/smart-wallet": "0.5.4-dev-5c932ce.0+5c932ce",
|
|
54
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-5c932ce.0+5c932ce",
|
|
55
|
+
"@agoric/swingset-vat": "0.32.3-dev-5c932ce.0+5c932ce",
|
|
56
|
+
"@agoric/zone": "0.2.3-dev-5c932ce.0+5c932ce",
|
|
57
57
|
"@endo/bundle-source": "^3.4.2",
|
|
58
58
|
"@endo/init": "^1.1.6",
|
|
59
59
|
"@endo/promise-kit": "^1.1.7",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"typeCoverage": {
|
|
85
85
|
"atLeast": 95.8
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "5c932ce0135a574d0fd8cac810ba677c92769525"
|
|
88
88
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function addAuction({ consume: { agoricNamesAdmin, auctioneerKit: legacyKitP, board, chainStorage, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, econCharterKit, priceAuthority8400, zoe, }, produce: { auctioneerKit: produceAuctioneerKit, auctionUpgradeNewInstance, newContractGovBundleId, }, instance: { consume: { reserve: reserveInstance }, produce: { auctioneer: auctionInstance }, }, installation: { consume: { auctioneer: auctioneerInstallationP }, }, issuer: { consume: { [Stable.symbol]: stableIssuerP }, }, }: import("./econ-behaviors.js").EconomyBootstrapPowers & interlockPowers, { options: { contractGovernorRef: contractGovernorBundle, contractGovernorInstallation, }, }: {
|
|
1
|
+
export function addAuction({ consume: { agoricNamesAdmin, auctioneerKit: legacyKitP, board, chainStorage, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, econCharterKit, governedContractKits: governedContractKitsP, priceAuthority8400, zoe, }, produce: { auctioneerKit: produceAuctioneerKit, auctionUpgradeNewInstance, auctionUpgradeNewGovCreator, newContractGovBundleId, }, instance: { consume: { reserve: reserveInstance }, produce: { auctioneer: auctionInstance }, }, installation: { consume: { auctioneer: auctioneerInstallationP }, }, issuer: { consume: { [Stable.symbol]: stableIssuerP }, }, }: import("./econ-behaviors.js").EconomyBootstrapPowers & interlockPowers, { options: { contractGovernorRef: contractGovernorBundle, contractGovernorInstallation, }, }: {
|
|
2
2
|
options: {
|
|
3
3
|
contractGovernorRef: {
|
|
4
4
|
bundleID: string;
|
|
@@ -16,12 +16,14 @@ export const ADD_AUCTION_MANIFEST: {
|
|
|
16
16
|
chainTimerService: boolean;
|
|
17
17
|
econCharterKit: boolean;
|
|
18
18
|
economicCommitteeCreatorFacet: boolean;
|
|
19
|
+
governedContractKits: boolean;
|
|
19
20
|
priceAuthority8400: boolean;
|
|
20
21
|
zoe: boolean;
|
|
21
22
|
};
|
|
22
23
|
produce: {
|
|
23
24
|
auctioneerKit: boolean;
|
|
24
25
|
auctionUpgradeNewInstance: boolean;
|
|
26
|
+
auctionUpgradeNewGovCreator: boolean;
|
|
25
27
|
newContractGovBundleId: boolean;
|
|
26
28
|
};
|
|
27
29
|
instance: {
|
|
@@ -58,12 +60,14 @@ export function getManifestForAddAuction({ restoreRef }: {
|
|
|
58
60
|
chainTimerService: boolean;
|
|
59
61
|
econCharterKit: boolean;
|
|
60
62
|
economicCommitteeCreatorFacet: boolean;
|
|
63
|
+
governedContractKits: boolean;
|
|
61
64
|
priceAuthority8400: boolean;
|
|
62
65
|
zoe: boolean;
|
|
63
66
|
};
|
|
64
67
|
produce: {
|
|
65
68
|
auctioneerKit: boolean;
|
|
66
69
|
auctionUpgradeNewInstance: boolean;
|
|
70
|
+
auctionUpgradeNewGovCreator: boolean;
|
|
67
71
|
newContractGovBundleId: boolean;
|
|
68
72
|
};
|
|
69
73
|
instance: {
|
|
@@ -98,6 +102,7 @@ export function getManifestForAddAuction({ restoreRef }: {
|
|
|
98
102
|
}>;
|
|
99
103
|
export type interlockPowers = PromiseSpaceOf<{
|
|
100
104
|
auctionUpgradeNewInstance: Instance;
|
|
105
|
+
auctionUpgradeNewGovCreator: any;
|
|
101
106
|
newContractGovBundleId: string;
|
|
102
107
|
}>;
|
|
103
108
|
import { Stable } from '@agoric/internal/src/tokens.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-auction.d.ts","sourceRoot":"","sources":["add-auction.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-auction.d.ts","sourceRoot":"","sources":["add-auction.js"],"names":[],"mappings":"AA0BO,knBATI,OAAO,qBAAqB,EAAE,sBAAsB,GAC1D,eAAe,gGACT;IACN,OAAO,EAAE;QACP,mBAAmB,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QAC1C,4BAA4B,EAAE,YAAY,CAAC;KAC5C,CAAC;CACH,iBAuLH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BG;AASI,yDAHJ;IAAmB,UAAU,EAArB,GAAG;CACX,0CAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBb;8BA/PY,cAAc,CAAC;IACvB,yBAAyB,EAAE,QAAQ,CAAC;IACpC,2BAA2B,EAAE,GAAG,CAAC;IACjC,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;uBAVkB,gCAAgC"}
|
|
@@ -9,6 +9,7 @@ const trace = makeTracer('NewAuction', true);
|
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {PromiseSpaceOf<{
|
|
11
11
|
* auctionUpgradeNewInstance: Instance;
|
|
12
|
+
* auctionUpgradeNewGovCreator: any;
|
|
12
13
|
* newContractGovBundleId: string;
|
|
13
14
|
* }>} interlockPowers
|
|
14
15
|
*/
|
|
@@ -33,12 +34,14 @@ export const addAuction = async (
|
|
|
33
34
|
chainTimerService,
|
|
34
35
|
economicCommitteeCreatorFacet: electorateCreatorFacet,
|
|
35
36
|
econCharterKit,
|
|
37
|
+
governedContractKits: governedContractKitsP,
|
|
36
38
|
priceAuthority8400,
|
|
37
39
|
zoe,
|
|
38
40
|
},
|
|
39
41
|
produce: {
|
|
40
42
|
auctioneerKit: produceAuctioneerKit,
|
|
41
43
|
auctionUpgradeNewInstance,
|
|
44
|
+
auctionUpgradeNewGovCreator,
|
|
42
45
|
newContractGovBundleId,
|
|
43
46
|
},
|
|
44
47
|
instance: {
|
|
@@ -197,7 +200,10 @@ export const addAuction = async (
|
|
|
197
200
|
governedInstance,
|
|
198
201
|
);
|
|
199
202
|
|
|
203
|
+
const governedContractKits = await governedContractKitsP;
|
|
204
|
+
governedContractKits.init(kit.instance, kit);
|
|
200
205
|
auctionUpgradeNewInstance.resolve(governedInstance);
|
|
206
|
+
auctionUpgradeNewGovCreator.resolve(kit.governorCreatorFacet);
|
|
201
207
|
newContractGovBundleId.resolve(contractGovernorBundle.bundleID);
|
|
202
208
|
};
|
|
203
209
|
|
|
@@ -211,12 +217,14 @@ export const ADD_AUCTION_MANIFEST = harden({
|
|
|
211
217
|
chainTimerService: true,
|
|
212
218
|
econCharterKit: true,
|
|
213
219
|
economicCommitteeCreatorFacet: true,
|
|
220
|
+
governedContractKits: true,
|
|
214
221
|
priceAuthority8400: true,
|
|
215
222
|
zoe: true,
|
|
216
223
|
},
|
|
217
224
|
produce: {
|
|
218
225
|
auctioneerKit: true,
|
|
219
226
|
auctionUpgradeNewInstance: true,
|
|
227
|
+
auctionUpgradeNewGovCreator: true,
|
|
220
228
|
newContractGovBundleId: true,
|
|
221
229
|
},
|
|
222
230
|
instance: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-price-feeds.d.ts","sourceRoot":"","sources":["deploy-price-feeds.js"],"names":[],"mappings":"AAcA,8BAA8B;AAC9B,qCADW,eAAe,CAQxB;AA4CK,8HAJI,sBAAsB,GAAG,cAAc,2BACvC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACrC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAmBjC;AA0HM,yCAZI,sBAAsB,GAAG,cAAc,UACvC;IACN,OAAO,EAAE,eAAe,GAAG;QACzB,kBAAkB,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QACzC,WAAW,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,aAAa,CAAC,EAAE,eAAe,CAAC;QAChC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH,
|
|
1
|
+
{"version":3,"file":"deploy-price-feeds.d.ts","sourceRoot":"","sources":["deploy-price-feeds.js"],"names":[],"mappings":"AAcA,8BAA8B;AAC9B,qCADW,eAAe,CAQxB;AA4CK,8HAJI,sBAAsB,GAAG,cAAc,2BACvC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACrC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAmBjC;AA0HM,yCAZI,sBAAsB,GAAG,cAAc,UACvC;IACN,OAAO,EAAE,eAAe,GAAG;QACzB,kBAAkB,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QACzC,WAAW,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;QAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,aAAa,CAAC,EAAE,eAAe,CAAC;QAChC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH,iBAoEH;AAWM,sEAHJ;IAAmB,UAAU,EAArB,GAAG;CACX,oBAAQ,eAAe,GAAG;IAAE,kBAAkB,EAAE,GAAG,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAxPlC,MAAM,EAAE;sBACX,MAAM,EAAE;wBACN,OAAO,CAAC,eAAe,CAAC;4BAsPM,GAAG;;GAmCpD;8BA5RW;IACR,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAC1C;qCAV+B,uDAAuD;4CADhD,qBAAqB"}
|
|
@@ -222,6 +222,9 @@ export const deployPriceFeeds = async (powers, config) => {
|
|
|
222
222
|
);
|
|
223
223
|
|
|
224
224
|
const { priceAuthorityAdmin, priceAuthority } = powers.consume;
|
|
225
|
+
|
|
226
|
+
trace({ oracleAddresses });
|
|
227
|
+
trace({ inBrandNames });
|
|
225
228
|
for (const inBrandName of inBrandNames) {
|
|
226
229
|
const AGORIC_INSTANCE_NAME = oracleBrandFeedName(inBrandName, outBrandName);
|
|
227
230
|
const brandIn = await ensureOracleBrand(powers, {
|
|
@@ -263,6 +266,7 @@ export const deployPriceFeeds = async (powers, config) => {
|
|
|
263
266
|
options: { scaledPARef },
|
|
264
267
|
});
|
|
265
268
|
|
|
269
|
+
trace('resolving priceAuthority8400');
|
|
266
270
|
// cf. #8400 QuotePayments storage leak
|
|
267
271
|
powers.produce.priceAuthority8400.resolve(priceAuthority);
|
|
268
272
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function replaceAllElectorates(permittedPowers: EconomyBootstrapPowers, config: {
|
|
1
|
+
export function replaceAllElectorates(permittedPowers: EconomyBootstrapPowers & interlockPowers, config: {
|
|
2
2
|
options: {
|
|
3
3
|
committeeName: string;
|
|
4
4
|
voterAddresses: Record<string, string>;
|
|
@@ -14,10 +14,11 @@ export function getManifestForReplaceAllElectorates({ economicCommitteeRef: _eco
|
|
|
14
14
|
manifest: {
|
|
15
15
|
[x: string]: {
|
|
16
16
|
consume: {
|
|
17
|
+
auctionUpgradeNewGovCreator: boolean;
|
|
18
|
+
auctionUpgradeNewInstance: boolean;
|
|
17
19
|
psmKit: boolean;
|
|
18
20
|
governedContractKits: boolean;
|
|
19
21
|
chainStorage: boolean;
|
|
20
|
-
auctioneerKit: boolean;
|
|
21
22
|
highPrioritySendersManager: boolean;
|
|
22
23
|
namesByAddressAdmin: boolean;
|
|
23
24
|
board: boolean;
|
|
@@ -27,6 +28,7 @@ export function getManifestForReplaceAllElectorates({ economicCommitteeRef: _eco
|
|
|
27
28
|
econCharterKit: boolean;
|
|
28
29
|
economicCommitteeKit: boolean;
|
|
29
30
|
economicCommitteeCreatorFacet: boolean;
|
|
31
|
+
auctionUpgradeNewGovCreator: boolean;
|
|
30
32
|
};
|
|
31
33
|
installation: {
|
|
32
34
|
consume: {
|
|
@@ -45,5 +47,9 @@ export function getManifestForReplaceAllElectorates({ economicCommitteeRef: _eco
|
|
|
45
47
|
};
|
|
46
48
|
options: any;
|
|
47
49
|
}>;
|
|
50
|
+
export type interlockPowers = PromiseSpaceOf<{
|
|
51
|
+
auctionUpgradeNewInstance: Instance;
|
|
52
|
+
auctionUpgradeNewGovCreator: any;
|
|
53
|
+
}>;
|
|
48
54
|
import type { EconomyBootstrapPowers } from './econ-behaviors.js';
|
|
49
55
|
//# sourceMappingURL=replaceElectorate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replaceElectorate.d.ts","sourceRoot":"","sources":["replaceElectorate.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"replaceElectorate.d.ts","sourceRoot":"","sources":["replaceElectorate.js"],"names":[],"mappings":"AAwZO,uDAlBI,sBAAsB,GAAG,eAAe,UAGxC;IACN,OAAO,EAAE;QACP,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,yBAAyB,EAAE;YACzB,cAAc,EAAE,MAAM,EAAE,CAAC;YACzB,iBAAiB,EAAE,MAAM,EAAE,CAAC;SAC7B,CAAC;KACH,CAAC;CACH,GAGS,OAAO,CAAC,IAAI,CAAC,CAuEzB;AAIM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCL;8BApNW,cAAc,CAAC;IACvB,yBAAyB,EAAE,QAAQ,CAAC;IACpC,2BAA2B,EAAE,GAAG,CAAC;CAClC,CAAC;4CApSqC,qBAAqB"}
|
|
@@ -305,24 +305,42 @@ const startNewEconCharter = async ({
|
|
|
305
305
|
return startResult;
|
|
306
306
|
};
|
|
307
307
|
|
|
308
|
+
/**
|
|
309
|
+
* @typedef {PromiseSpaceOf<{
|
|
310
|
+
* auctionUpgradeNewInstance: Instance;
|
|
311
|
+
* auctionUpgradeNewGovCreator: any;
|
|
312
|
+
* }>} interlockPowers
|
|
313
|
+
*/
|
|
314
|
+
|
|
308
315
|
/**
|
|
309
316
|
* Adds governors to an existing Economic Committee Charter
|
|
310
317
|
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
318
|
+
* @param {EconomyBootstrapPowers & interlockPowers} powers
|
|
319
|
+
*
|
|
320
|
+
* - The resources and capabilities required to start the committee.
|
|
313
321
|
*
|
|
314
322
|
* @param {{
|
|
315
323
|
* options: {
|
|
316
324
|
* econCharterKit: EconCharterStartResult;
|
|
317
325
|
* };
|
|
318
|
-
* }}
|
|
326
|
+
* }} options
|
|
319
327
|
* - Configuration object containing the name and size of the committee.
|
|
320
328
|
*
|
|
321
329
|
* @returns {Promise<void>} A promise that resolves once all the governors have
|
|
322
330
|
* been successfully added to the economic charter
|
|
323
331
|
*/
|
|
324
332
|
const addGovernorsToEconCharter = async (
|
|
325
|
-
{
|
|
333
|
+
{
|
|
334
|
+
consume: {
|
|
335
|
+
auctionUpgradeNewInstance: auctionUpgradeNewInstanceP,
|
|
336
|
+
auctionUpgradeNewGovCreator: auctionUpgradeNewGovCreatorP,
|
|
337
|
+
psmKit,
|
|
338
|
+
governedContractKits,
|
|
339
|
+
},
|
|
340
|
+
produce: {
|
|
341
|
+
auctionUpgradeNewGovCreator: auctionUpgradeNewGovCreatorProduce,
|
|
342
|
+
},
|
|
343
|
+
},
|
|
326
344
|
{ options: { econCharterKit } },
|
|
327
345
|
) => {
|
|
328
346
|
const { creatorFacet: ecCreatorFacet } = E.get(econCharterKit);
|
|
@@ -334,21 +352,15 @@ const addGovernorsToEconCharter = async (
|
|
|
334
352
|
}
|
|
335
353
|
|
|
336
354
|
const governedContractKitMap = await governedContractKits;
|
|
337
|
-
const auctioneerKitObject = await auctioneerKit;
|
|
338
355
|
for (const {
|
|
339
356
|
instance,
|
|
340
357
|
governorCreatorFacet,
|
|
341
358
|
label,
|
|
342
359
|
} of governedContractKitMap.values()) {
|
|
343
|
-
//
|
|
344
|
-
//
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
auctioneerKitObject.instance,
|
|
348
|
-
auctioneerKitObject.governorCreatorFacet,
|
|
349
|
-
label,
|
|
350
|
-
);
|
|
351
|
-
} else {
|
|
360
|
+
// The auctioneer was updated in this same release, getting values directly
|
|
361
|
+
// (there might be more than one auctioneer instance, but the others don't
|
|
362
|
+
// need to be registered.)
|
|
363
|
+
if (label !== 'auctioneer') {
|
|
352
364
|
await E(ecCreatorFacet).addInstance(
|
|
353
365
|
instance,
|
|
354
366
|
governorCreatorFacet,
|
|
@@ -356,15 +368,29 @@ const addGovernorsToEconCharter = async (
|
|
|
356
368
|
);
|
|
357
369
|
}
|
|
358
370
|
}
|
|
371
|
+
|
|
372
|
+
const [auctionUpgradeNewInstance, auctionUpgradeNewGovCreator] =
|
|
373
|
+
await Promise.all([
|
|
374
|
+
auctionUpgradeNewInstanceP,
|
|
375
|
+
auctionUpgradeNewGovCreatorP,
|
|
376
|
+
]);
|
|
377
|
+
// reset after use. auctionUpgradeNewInstance is reset by upgrade-vault.js
|
|
378
|
+
auctionUpgradeNewGovCreatorProduce.reset();
|
|
379
|
+
|
|
380
|
+
await E(ecCreatorFacet).addInstance(
|
|
381
|
+
auctionUpgradeNewInstance,
|
|
382
|
+
auctionUpgradeNewGovCreator,
|
|
383
|
+
'auctioneer',
|
|
384
|
+
);
|
|
359
385
|
};
|
|
360
386
|
|
|
361
387
|
/**
|
|
362
388
|
* Replaces the electorate for governance contracts by creating a new Economic
|
|
363
389
|
* Committee and updating contracts with the new electorate's creator facet.
|
|
364
390
|
*
|
|
365
|
-
* @param {EconomyBootstrapPowers} permittedPowers - The
|
|
366
|
-
* capabilities needed for operations, including access to
|
|
367
|
-
* contracts and the PSM kit.
|
|
391
|
+
* @param {EconomyBootstrapPowers & interlockPowers} permittedPowers - The
|
|
392
|
+
* resources and capabilities needed for operations, including access to
|
|
393
|
+
* governance contracts and the PSM kit.
|
|
368
394
|
* @param {{
|
|
369
395
|
* options: {
|
|
370
396
|
* committeeName: string;
|
|
@@ -459,10 +485,11 @@ export const getManifestForReplaceAllElectorates = async (
|
|
|
459
485
|
manifest: {
|
|
460
486
|
[replaceAllElectorates.name]: {
|
|
461
487
|
consume: {
|
|
488
|
+
auctionUpgradeNewGovCreator: true,
|
|
489
|
+
auctionUpgradeNewInstance: true,
|
|
462
490
|
psmKit: true,
|
|
463
491
|
governedContractKits: true,
|
|
464
492
|
chainStorage: true,
|
|
465
|
-
auctioneerKit: true,
|
|
466
493
|
highPrioritySendersManager: true,
|
|
467
494
|
namesByAddressAdmin: true,
|
|
468
495
|
// Rest of these are designed to be widely shared
|
|
@@ -473,6 +500,7 @@ export const getManifestForReplaceAllElectorates = async (
|
|
|
473
500
|
econCharterKit: true,
|
|
474
501
|
economicCommitteeKit: true,
|
|
475
502
|
economicCommitteeCreatorFacet: true,
|
|
503
|
+
auctionUpgradeNewGovCreator: true,
|
|
476
504
|
},
|
|
477
505
|
installation: {
|
|
478
506
|
consume: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function upgradeVaults({ consume: { auctionUpgradeNewInstance, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, reserveKit, vaultFactoryKit, zoe, priceAuthority8400, newContractGovBundleId: newContractGovBundleIdP, }, produce: { auctionUpgradeNewInstance: auctionUpgradeNewInstanceProducer, newContractGovBundleId: newContractGovBundleIdErasor, },
|
|
1
|
+
export function upgradeVaults({ consume: { auctionUpgradeNewInstance, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, reserveKit, vaultFactoryKit, zoe, priceAuthority8400, newContractGovBundleId: newContractGovBundleIdP, }, produce: { auctionUpgradeNewInstance: auctionUpgradeNewInstanceProducer, newContractGovBundleId: newContractGovBundleIdErasor, }, }: import("../../src/proposals/econ-behaviors").EconomyBootstrapPowers & interlockPowers, { options: { VaultFactoryBundle: vaultBundleRef } }: {
|
|
2
2
|
options: {
|
|
3
3
|
VaultFactoryBundle: {
|
|
4
4
|
bundleID: string;
|
|
@@ -24,11 +24,6 @@ export function getManifestForUpgradeVaults({ restoreRef }: {
|
|
|
24
24
|
auctionUpgradeNewInstance: string;
|
|
25
25
|
newContractGovBundleId: string;
|
|
26
26
|
};
|
|
27
|
-
instance: {
|
|
28
|
-
consume: {
|
|
29
|
-
auctioneer: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
27
|
};
|
|
33
28
|
};
|
|
34
29
|
installations: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-vaults.d.ts","sourceRoot":"","sources":["upgrade-vaults.js"],"names":[],"mappings":"AAyBO,
|
|
1
|
+
{"version":3,"file":"upgrade-vaults.d.ts","sourceRoot":"","sources":["upgrade-vaults.js"],"names":[],"mappings":"AAyBO,+XARI,OAAO,oCAAoC,EAAE,sBAAsB,GACvE,eAAe,uDACX;IACN,OAAO,EAAE;QACP,kBAAkB,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KAC1C,CAAC;CACH,iBA8IH;AAUM,4DAHJ;IAAmB,UAAU,EAArB,GAAG;CACX,uBAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;GA4Bb;8BAhMY,cAAc,CAAC;IACvB,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,yBAAyB,EAAE,QAAQ,CAAC;IACpC,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC"}
|
|
@@ -39,9 +39,6 @@ export const upgradeVaults = async (
|
|
|
39
39
|
auctionUpgradeNewInstance: auctionUpgradeNewInstanceProducer,
|
|
40
40
|
newContractGovBundleId: newContractGovBundleIdErasor,
|
|
41
41
|
},
|
|
42
|
-
instance: {
|
|
43
|
-
consume: { auctioneer: auctioneerInstanceP },
|
|
44
|
-
},
|
|
45
42
|
},
|
|
46
43
|
{ options: { VaultFactoryBundle: vaultBundleRef } },
|
|
47
44
|
) => {
|
|
@@ -52,12 +49,7 @@ export const upgradeVaults = async (
|
|
|
52
49
|
|
|
53
50
|
await priceAuthority8400;
|
|
54
51
|
|
|
55
|
-
const
|
|
56
|
-
auctioneerInstanceP,
|
|
57
|
-
auctionUpgradeNewInstance,
|
|
58
|
-
]);
|
|
59
|
-
auctionOldInstance !== auctionNewInstance ||
|
|
60
|
-
Fail`Auction instance didn't change`;
|
|
52
|
+
const auctionNewInstance = await auctionUpgradeNewInstance;
|
|
61
53
|
auctionUpgradeNewInstanceProducer.reset();
|
|
62
54
|
const publicFacet = E(zoe).getPublicFacet(auctionNewInstance);
|
|
63
55
|
/** @type {import('@agoric/inter-protocol/src/auction/scheduler.js').FullSchedule} */
|
|
@@ -202,7 +194,6 @@ export const getManifestForUpgradeVaults = async (
|
|
|
202
194
|
auctionUpgradeNewInstance: uV,
|
|
203
195
|
newContractGovBundleId: uV,
|
|
204
196
|
},
|
|
205
|
-
instance: { consume: { auctioneer: uV } },
|
|
206
197
|
},
|
|
207
198
|
},
|
|
208
199
|
installations: { VaultFactory: restoreRef(VaultFactoryRef) },
|