@agoric/inter-protocol 0.16.2-dev-6d97bc4.0 → 0.16.2-dev-b84a426.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 +12 -12
- package/src/proposals/add-auction.d.ts.map +1 -1
- package/src/proposals/add-auction.js +12 -14
- package/src/proposals/upgrade-vaults.d.ts +6 -5
- package/src/proposals/upgrade-vaults.d.ts.map +1 -1
- package/src/proposals/upgrade-vaults.js +30 -15
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-b84a426.0+b84a426",
|
|
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-b84a426.0+b84a426",
|
|
35
|
+
"@agoric/governance": "0.10.4-dev-b84a426.0+b84a426",
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-b84a426.0+b84a426",
|
|
37
|
+
"@agoric/notifier": "0.6.3-dev-b84a426.0+b84a426",
|
|
38
|
+
"@agoric/store": "0.9.3-dev-b84a426.0+b84a426",
|
|
39
|
+
"@agoric/time": "0.3.3-dev-b84a426.0+b84a426",
|
|
40
|
+
"@agoric/vat-data": "0.5.3-dev-b84a426.0+b84a426",
|
|
41
|
+
"@agoric/vats": "0.15.2-dev-b84a426.0+b84a426",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-b84a426.0+b84a426",
|
|
43
43
|
"@endo/captp": "^4.2.2",
|
|
44
44
|
"@endo/errors": "^1.2.4",
|
|
45
45
|
"@endo/eventual-send": "^1.2.4",
|
|
@@ -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-b84a426.0+b84a426",
|
|
54
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-b84a426.0+b84a426",
|
|
55
|
+
"@agoric/swingset-vat": "0.32.3-dev-b84a426.0+b84a426",
|
|
56
|
+
"@agoric/zone": "0.2.3-dev-b84a426.0+b84a426",
|
|
57
57
|
"@endo/bundle-source": "^3.3.0",
|
|
58
58
|
"@endo/init": "^1.1.3",
|
|
59
59
|
"@endo/promise-kit": "^1.1.4",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"typeCoverage": {
|
|
85
85
|
"atLeast": 95.81
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "b84a42624937988b1bbfb587d4c6cb2f79c5ae9f"
|
|
88
88
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function addAuction({ consume: {
|
|
1
|
+
export function addAuction({ consume: { auctioneerKit: legacyKitP, board, chainStorage, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, priceAuthority, zoe, }, produce: { auctioneerKit: produceAuctioneerKit, auctionUpgradeNewInstance }, instance: { consume: { reserve: reserveInstance }, }, installation: { consume: { contractGovernor: contractGovernorInstallation }, produce: { auctioneer: produceInstallation }, }, issuer: { consume: { [Stable.symbol]: stableIssuerP }, }, }: import("./econ-behaviors.js").EconomyBootstrapPowers & interlockPowers, { options }: {
|
|
2
2
|
options: {
|
|
3
3
|
auctionsRef: {
|
|
4
4
|
bundleID: string;
|
|
@@ -8,17 +8,17 @@ export function addAuction({ consume: { zoe, board, chainTimerService, priceAuth
|
|
|
8
8
|
export const ADD_AUCTION_MANIFEST: {
|
|
9
9
|
[x: string]: {
|
|
10
10
|
consume: {
|
|
11
|
-
|
|
11
|
+
auctioneerKit: boolean;
|
|
12
12
|
board: boolean;
|
|
13
|
-
chainTimerService: boolean;
|
|
14
|
-
priceAuthority: boolean;
|
|
15
13
|
chainStorage: boolean;
|
|
14
|
+
chainTimerService: boolean;
|
|
16
15
|
economicCommitteeCreatorFacet: boolean;
|
|
17
|
-
|
|
16
|
+
priceAuthority: boolean;
|
|
17
|
+
zoe: boolean;
|
|
18
18
|
};
|
|
19
19
|
produce: {
|
|
20
20
|
auctioneerKit: boolean;
|
|
21
|
-
|
|
21
|
+
auctionUpgradeNewInstance: boolean;
|
|
22
22
|
};
|
|
23
23
|
instance: {
|
|
24
24
|
consume: {
|
|
@@ -44,17 +44,17 @@ export function getManifestForAddAuction(_ign: object, addAuctionOptions: any):
|
|
|
44
44
|
manifest: {
|
|
45
45
|
[x: string]: {
|
|
46
46
|
consume: {
|
|
47
|
-
|
|
47
|
+
auctioneerKit: boolean;
|
|
48
48
|
board: boolean;
|
|
49
|
-
chainTimerService: boolean;
|
|
50
|
-
priceAuthority: boolean;
|
|
51
49
|
chainStorage: boolean;
|
|
50
|
+
chainTimerService: boolean;
|
|
52
51
|
economicCommitteeCreatorFacet: boolean;
|
|
53
|
-
|
|
52
|
+
priceAuthority: boolean;
|
|
53
|
+
zoe: boolean;
|
|
54
54
|
};
|
|
55
55
|
produce: {
|
|
56
56
|
auctioneerKit: boolean;
|
|
57
|
-
|
|
57
|
+
auctionUpgradeNewInstance: boolean;
|
|
58
58
|
};
|
|
59
59
|
instance: {
|
|
60
60
|
consume: {
|
|
@@ -79,7 +79,7 @@ export function getManifestForAddAuction(_ign: object, addAuctionOptions: any):
|
|
|
79
79
|
options: any;
|
|
80
80
|
}>;
|
|
81
81
|
export type interlockPowers = PromiseSpaceOf<{
|
|
82
|
-
|
|
82
|
+
auctionUpgradeNewInstance: Instance;
|
|
83
83
|
}>;
|
|
84
84
|
import { Stable } from '@agoric/internal/src/tokens.js';
|
|
85
85
|
//# sourceMappingURL=add-auction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-auction.d.ts","sourceRoot":"","sources":["add-auction.js"],"names":[],"mappings":"AAmBO,
|
|
1
|
+
{"version":3,"file":"add-auction.d.ts","sourceRoot":"","sources":["add-auction.js"],"names":[],"mappings":"AAmBO,wfAJI,OAAO,qBAAqB,EAAE,sBAAsB,GAC9D,eAAmB,eACT;IAAE,OAAO,EAAE;QAAE,WAAW,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,iBAwJ5D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BG;AAQI,+CAHI,MAAM,qBACN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOb;8BA3MY,cAAc,CAAC;IAC3B,yBAA6B,EAAE,QAAQ,CAAC;CACrC,CAAC;uBARkB,gCAAgC"}
|
|
@@ -8,7 +8,7 @@ const trace = makeTracer('NewAuction', true);
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {PromiseSpaceOf<{
|
|
11
|
-
*
|
|
11
|
+
* auctionUpgradeNewInstance: Instance;
|
|
12
12
|
* }>} interlockPowers
|
|
13
13
|
*/
|
|
14
14
|
|
|
@@ -20,15 +20,15 @@ const trace = makeTracer('NewAuction', true);
|
|
|
20
20
|
export const addAuction = async (
|
|
21
21
|
{
|
|
22
22
|
consume: {
|
|
23
|
-
|
|
23
|
+
auctioneerKit: legacyKitP,
|
|
24
24
|
board,
|
|
25
|
-
chainTimerService,
|
|
26
|
-
priceAuthority,
|
|
27
25
|
chainStorage,
|
|
26
|
+
chainTimerService,
|
|
28
27
|
economicCommitteeCreatorFacet: electorateCreatorFacet,
|
|
29
|
-
|
|
28
|
+
priceAuthority,
|
|
29
|
+
zoe,
|
|
30
30
|
},
|
|
31
|
-
produce: { auctioneerKit: produceAuctioneerKit,
|
|
31
|
+
produce: { auctioneerKit: produceAuctioneerKit, auctionUpgradeNewInstance },
|
|
32
32
|
instance: {
|
|
33
33
|
consume: { reserve: reserveInstance },
|
|
34
34
|
},
|
|
@@ -165,26 +165,24 @@ export const addAuction = async (
|
|
|
165
165
|
governorAdminFacet: governorStartResult.adminFacet,
|
|
166
166
|
}),
|
|
167
167
|
);
|
|
168
|
-
// don't overwrite auctioneerKit or auction instance yet. Wait until
|
|
169
|
-
// upgrade-vault.js
|
|
170
168
|
|
|
171
|
-
|
|
169
|
+
auctionUpgradeNewInstance.resolve(governedInstance);
|
|
172
170
|
};
|
|
173
171
|
|
|
174
172
|
export const ADD_AUCTION_MANIFEST = harden({
|
|
175
173
|
[addAuction.name]: {
|
|
176
174
|
consume: {
|
|
177
|
-
|
|
175
|
+
auctioneerKit: true,
|
|
178
176
|
board: true,
|
|
179
|
-
chainTimerService: true,
|
|
180
|
-
priceAuthority: true,
|
|
181
177
|
chainStorage: true,
|
|
178
|
+
chainTimerService: true,
|
|
182
179
|
economicCommitteeCreatorFacet: true,
|
|
183
|
-
|
|
180
|
+
priceAuthority: true,
|
|
181
|
+
zoe: true,
|
|
184
182
|
},
|
|
185
183
|
produce: {
|
|
186
184
|
auctioneerKit: true,
|
|
187
|
-
|
|
185
|
+
auctionUpgradeNewInstance: true,
|
|
188
186
|
},
|
|
189
187
|
instance: {
|
|
190
188
|
consume: { reserve: true },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function upgradeVaults({ consume: {
|
|
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 }: {
|
|
2
2
|
options: {
|
|
3
3
|
vaultsRef: {
|
|
4
4
|
bundleID: string;
|
|
@@ -9,14 +9,15 @@ export function getManifestForUpgradeVaults(_ign: object, vaultUpgradeOptions: a
|
|
|
9
9
|
manifest: {
|
|
10
10
|
[x: string]: {
|
|
11
11
|
consume: {
|
|
12
|
+
auctionUpgradeNewInstance: string;
|
|
13
|
+
chainTimerService: string;
|
|
12
14
|
economicCommitteeCreatorFacet: string;
|
|
13
15
|
reserveKit: string;
|
|
14
16
|
vaultFactoryKit: string;
|
|
15
17
|
zoe: string;
|
|
16
|
-
auctionsUpgradeComplete: string;
|
|
17
18
|
};
|
|
18
19
|
produce: {
|
|
19
|
-
|
|
20
|
+
auctionUpgradeNewInstance: string;
|
|
20
21
|
};
|
|
21
22
|
installation: {
|
|
22
23
|
produce: {
|
|
@@ -25,7 +26,7 @@ export function getManifestForUpgradeVaults(_ign: object, vaultUpgradeOptions: a
|
|
|
25
26
|
};
|
|
26
27
|
instance: {
|
|
27
28
|
consume: {
|
|
28
|
-
auctioneer:
|
|
29
|
+
auctioneer: boolean;
|
|
29
30
|
};
|
|
30
31
|
};
|
|
31
32
|
};
|
|
@@ -33,6 +34,6 @@ export function getManifestForUpgradeVaults(_ign: object, vaultUpgradeOptions: a
|
|
|
33
34
|
options: any;
|
|
34
35
|
}>;
|
|
35
36
|
export type interlockPowers = PromiseSpaceOf<{
|
|
36
|
-
|
|
37
|
+
auctionUpgradeNewInstance: Instance;
|
|
37
38
|
}>;
|
|
38
39
|
//# sourceMappingURL=upgrade-vaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-vaults.d.ts","sourceRoot":"","sources":["upgrade-vaults.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"upgrade-vaults.d.ts","sourceRoot":"","sources":["upgrade-vaults.js"],"names":[],"mappings":"AAoBO,wYAJI,OAAO,oCAAoC,EAAE,sBAAsB,GAC7E,eAAqB,eACX;IAAE,OAAO,EAAE;QAAE,SAAS,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,iBAyJ1D;AASM,kDAHI,MAAM,uBACN,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwBZ;8BAhMW,cAAc,CAAC;IAC3B,yBAA6B,EAAE,QAAQ,CAAC;CACrC,CAAC"}
|
|
@@ -2,12 +2,14 @@ import { E } from '@endo/far';
|
|
|
2
2
|
import { makeNotifierFromAsyncIterable } from '@agoric/notifier';
|
|
3
3
|
import { AmountMath } from '@agoric/ertp/src/index.js';
|
|
4
4
|
import { makeTracer } from '@agoric/internal/src/index.js';
|
|
5
|
+
import { Fail } from '@endo/errors';
|
|
6
|
+
import { TimeMath } from '@agoric/time';
|
|
5
7
|
|
|
6
8
|
const trace = makeTracer('upgrade Vaults proposal');
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* @typedef {PromiseSpaceOf<{
|
|
10
|
-
*
|
|
12
|
+
* auctionUpgradeNewInstance: Instance;
|
|
11
13
|
* }>} interlockPowers
|
|
12
14
|
*/
|
|
13
15
|
|
|
@@ -19,13 +21,14 @@ const trace = makeTracer('upgrade Vaults proposal');
|
|
|
19
21
|
export const upgradeVaults = async (
|
|
20
22
|
{
|
|
21
23
|
consume: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
auctionUpgradeNewInstance,
|
|
25
|
+
chainTimerService,
|
|
24
26
|
economicCommitteeCreatorFacet: electorateCreatorFacet,
|
|
25
27
|
reserveKit,
|
|
26
|
-
|
|
28
|
+
vaultFactoryKit,
|
|
29
|
+
zoe,
|
|
27
30
|
},
|
|
28
|
-
produce: {
|
|
31
|
+
produce: { auctionUpgradeNewInstance: auctionUpgradeNewInstanceProducer },
|
|
29
32
|
installation: {
|
|
30
33
|
produce: { VaultFactory: produceVaultInstallation },
|
|
31
34
|
},
|
|
@@ -52,8 +55,20 @@ export const upgradeVaults = async (
|
|
|
52
55
|
produceVaultInstallation.reset();
|
|
53
56
|
produceVaultInstallation.resolve(installationP);
|
|
54
57
|
|
|
55
|
-
await
|
|
56
|
-
|
|
58
|
+
const [auctionOldInstance, auctionNewInstance] = await Promise.all([
|
|
59
|
+
auctioneerInstanceP,
|
|
60
|
+
auctionUpgradeNewInstance,
|
|
61
|
+
]);
|
|
62
|
+
auctionOldInstance !== auctionNewInstance ||
|
|
63
|
+
Fail`Auction instance didn't change`;
|
|
64
|
+
auctionUpgradeNewInstanceProducer.reset();
|
|
65
|
+
const publicFacet = E(zoe).getPublicFacet(auctionNewInstance);
|
|
66
|
+
/** @type {import('@agoric/inter-protocol/src/auction/scheduler.js').FullSchedule} */
|
|
67
|
+
const schedules = await E(publicFacet).getSchedules();
|
|
68
|
+
const now = await E(chainTimerService).getCurrentTimestamp();
|
|
69
|
+
(schedules.nextAuctionSchedule &&
|
|
70
|
+
TimeMath.compareAbs(schedules.nextAuctionSchedule.startTime, now) > 0) ||
|
|
71
|
+
Fail`Expected next start time in the future ${schedules.nextAuctionSchedule?.startTime}`;
|
|
57
72
|
|
|
58
73
|
const readCurrentDirectorParams = async () => {
|
|
59
74
|
const { publicFacet: directorPF } = kit;
|
|
@@ -131,15 +146,14 @@ export const upgradeVaults = async (
|
|
|
131
146
|
E.get(reserveKit).creatorFacet,
|
|
132
147
|
).makeShortfallReportingInvitation();
|
|
133
148
|
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
]);
|
|
149
|
+
const poserInvitation = await E(
|
|
150
|
+
electorateCreatorFacet,
|
|
151
|
+
).getPoserInvitation();
|
|
138
152
|
|
|
139
153
|
/** @type {import('../../src/vaultFactory/vaultFactory').VaultFactoryContract['privateArgs']} */
|
|
140
154
|
const newPrivateArgs = harden({
|
|
141
155
|
...privateArgs,
|
|
142
|
-
auctioneerInstance,
|
|
156
|
+
auctioneerInstance: auctionNewInstance,
|
|
143
157
|
initialPoserInvitation: poserInvitation,
|
|
144
158
|
initialShortfallInvitation: shortfallInvitation,
|
|
145
159
|
managerParams: managerParamValues,
|
|
@@ -171,17 +185,18 @@ export const getManifestForUpgradeVaults = async (
|
|
|
171
185
|
manifest: {
|
|
172
186
|
[upgradeVaults.name]: {
|
|
173
187
|
consume: {
|
|
188
|
+
auctionUpgradeNewInstance: uV,
|
|
189
|
+
chainTimerService: uV,
|
|
174
190
|
economicCommitteeCreatorFacet: uV,
|
|
175
191
|
reserveKit: uV,
|
|
176
192
|
vaultFactoryKit: uV,
|
|
177
193
|
zoe: uV,
|
|
178
|
-
auctionsUpgradeComplete: uV,
|
|
179
194
|
},
|
|
180
|
-
produce: {
|
|
195
|
+
produce: { auctionUpgradeNewInstance: uV },
|
|
181
196
|
installation: {
|
|
182
197
|
produce: { VaultFactory: true },
|
|
183
198
|
},
|
|
184
|
-
instance: { consume: { auctioneer:
|
|
199
|
+
instance: { consume: { auctioneer: true } },
|
|
185
200
|
},
|
|
186
201
|
},
|
|
187
202
|
options: { ...vaultUpgradeOptions },
|