@agoric/inter-protocol 0.16.2-dev-d6fae11.0.d6fae11 → 0.16.2-dev-64cee5a.0.64cee5a
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 +16 -16
- package/src/auction/auctionBook.d.ts +2 -1
- package/src/auction/auctionBook.d.ts.map +1 -1
- package/src/auction/auctionBook.js +2 -1
- package/src/auction/auctioneer.d.ts +12 -8
- package/src/auction/auctioneer.d.ts.map +1 -1
- package/src/auction/auctioneer.js +10 -5
- package/src/auction/params.d.ts +10 -4
- package/src/auction/params.d.ts.map +1 -1
- package/src/auction/params.js +6 -3
- package/src/auction/scheduleMath.d.ts +5 -3
- package/src/auction/scheduleMath.d.ts.map +1 -1
- package/src/auction/scheduleMath.js +11 -7
- package/src/auction/scheduler.d.ts +8 -3
- package/src/auction/scheduler.d.ts.map +1 -1
- package/src/auction/scheduler.js +14 -6
- package/src/clientSupport.d.ts +2 -2
- package/src/clientSupport.d.ts.map +1 -1
- package/src/clientSupport.js +1 -1
- package/src/econCommitteeCharter.d.ts +9 -5
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +8 -6
- package/src/feeDistributor.d.ts +10 -16
- package/src/feeDistributor.d.ts.map +1 -1
- package/src/feeDistributor.js +3 -3
- package/src/price/fluxAggregatorContract.d.ts +10 -3
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +8 -4
- package/src/price/fluxAggregatorKit.d.ts +10 -6
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.js +10 -5
- package/src/price/priceOracleKit.d.ts +2 -1
- package/src/price/priceOracleKit.d.ts.map +1 -1
- package/src/price/priceOracleKit.js +2 -1
- package/src/price/roundsManager.d.ts +6 -4
- package/src/price/roundsManager.d.ts.map +1 -1
- package/src/price/roundsManager.js +4 -2
- package/src/proposals/add-auction.js +2 -2
- package/src/proposals/addAssetToVault.js +7 -3
- package/src/proposals/committee-proposal.js +10 -5
- package/src/proposals/core-proposal.js +9 -3
- package/src/proposals/deploy-price-feeds.js +7 -4
- package/src/proposals/econ-behaviors.js +14 -8
- package/src/proposals/price-feed-proposal.js +10 -3
- package/src/proposals/replace-fee-distributor.js +7 -4
- package/src/proposals/startEconCommittee.js +5 -1
- package/src/proposals/startPSM.js +6 -3
- package/src/proposals/upgrade-vaults.js +9 -4
- package/src/proposals/utils.d.ts +6 -4
- package/src/proposals/utils.d.ts.map +1 -1
- package/src/proposals/utils.js +8 -8
- package/src/proposals/withdraw-reserve-proposal.js +1 -1
- package/src/provisionPool.d.ts +12 -4
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +7 -5
- package/src/provisionPoolKit.d.ts +17 -74
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +22 -20
- package/src/reserve/assetReserveKit.d.ts +4 -2
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/reserve/assetReserveKit.js +4 -2
- package/src/vaultFactory/liquidation.d.ts +5 -3
- package/src/vaultFactory/liquidation.d.ts.map +1 -1
- package/src/vaultFactory/liquidation.js +9 -7
- package/src/vaultFactory/params.d.ts +13 -5
- package/src/vaultFactory/params.d.ts.map +1 -1
- package/src/vaultFactory/params.js +10 -6
- package/src/vaultFactory/prioritizedVaults.d.ts +6 -6
- package/src/vaultFactory/types-ambient.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.js +1 -0
- package/src/vaultFactory/vault.d.ts +18 -16
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +13 -11
- package/src/vaultFactory/vaultDirector.d.ts +24 -14
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.js +21 -17
- package/src/vaultFactory/vaultFactory.d.ts +14 -50
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.js +10 -8
- package/src/vaultFactory/vaultHolder.d.ts +5 -2
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultHolder.js +6 -3
- package/src/vaultFactory/vaultKit.d.ts +3 -1
- package/src/vaultFactory/vaultKit.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.js +4 -2
- package/src/vaultFactory/vaultManager.d.ts +28 -19
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +20 -11
package/src/feeDistributor.d.ts
CHANGED
|
@@ -33,11 +33,9 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
33
33
|
*/
|
|
34
34
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
35
35
|
/**
|
|
36
|
-
* @param {
|
|
37
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
38
|
-
* >} depositFacet
|
|
36
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
39
37
|
*/
|
|
40
|
-
makeDepositFacetDestination: (depositFacet:
|
|
38
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
41
39
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
42
40
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
43
41
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
@@ -74,11 +72,9 @@ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
|
|
|
74
72
|
*/
|
|
75
73
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
76
74
|
/**
|
|
77
|
-
* @param {
|
|
78
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
79
|
-
* >} depositFacet
|
|
75
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
80
76
|
*/
|
|
81
|
-
makeDepositFacetDestination: (depositFacet:
|
|
77
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
82
78
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
83
79
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
84
80
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
@@ -125,11 +121,9 @@ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promi
|
|
|
125
121
|
*/
|
|
126
122
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
127
123
|
/**
|
|
128
|
-
* @param {
|
|
129
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
130
|
-
* >} depositFacet
|
|
124
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
131
125
|
*/
|
|
132
|
-
makeDepositFacetDestination: (depositFacet:
|
|
126
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
133
127
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
134
128
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
135
129
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
@@ -166,11 +160,9 @@ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promi
|
|
|
166
160
|
*/
|
|
167
161
|
startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
|
|
168
162
|
/**
|
|
169
|
-
* @param {
|
|
170
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
171
|
-
* >} depositFacet
|
|
163
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
172
164
|
*/
|
|
173
|
-
makeDepositFacetDestination: (depositFacet:
|
|
165
|
+
makeDepositFacetDestination: (depositFacet: EOnly<DepositFacet>) => {
|
|
174
166
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
175
167
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
176
168
|
pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
|
|
@@ -221,4 +213,6 @@ export type FeeDistributorCreatorFacet = ReturnType<typeof makeFeeDistributor>["
|
|
|
221
213
|
export type FeeDistributorPublicFacet = ReturnType<typeof makeFeeDistributor>["publicFacet"];
|
|
222
214
|
import type { TimerService } from '@agoric/time';
|
|
223
215
|
import type { RelativeTime } from '@agoric/time';
|
|
216
|
+
import type { DepositFacet } from '@agoric/ertp/src/types.js';
|
|
217
|
+
import type { EOnly } from '@endo/far';
|
|
224
218
|
//# sourceMappingURL=feeDistributor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeDistributor.d.ts","sourceRoot":"","sources":["feeDistributor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feeDistributor.d.ts","sourceRoot":"","sources":["feeDistributor.js"],"names":[],"mappings":"AAiBA,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAOnC;AAgCK,8CAHI,IAAI,CAAC,UAAU,CAAC,gBAChB,IAAI,CAAC,wBAAwB,CAAC;;;;GAWxC;AAeM,oDAPI,MAAM,OAAO,CAAC,OAAO,CAAC,gBAEtB,IAAI,CAAC,YAAY,CAAC,uBAElB,YAAY,QA6BtB;AASM,+CAHI,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,kBACrC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC;;;;;;EAenC;AAWM,sCAJI,OAAO,CAAC,KAAK,CAAC,UACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,2BACnB,WAAW,iBA8DrB;AAUM,8CAPI,IAAI,CAAC,MAAM,CAAC,KAAK,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0BAmBU,UAAU,CAAC,OAAO,eAAe,CAAC;yCA+NlC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,cAAc,CAAC;wCACrD,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,aAAa,CAAC;kCArUnC,cAAc;kCADd,cAAc;kCAhBd,2BAA2B;2BADlC,WAAW"}
|
package/src/feeDistributor.js
CHANGED
|
@@ -9,6 +9,8 @@ import { KeywordShape } from '@agoric/zoe/src/typeGuards.js';
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @import {MapStore, SetStore} from '@agoric/store';
|
|
12
|
+
* @import {EOnly} from '@endo/far';
|
|
13
|
+
* @import {DepositFacet} from '@agoric/ertp/src/types.js';
|
|
12
14
|
*/
|
|
13
15
|
|
|
14
16
|
const KeywordSharesShape = M.recordOf(KeywordShape, M.nat());
|
|
@@ -272,9 +274,7 @@ export const makeFeeDistributor = (feeIssuer, terms) => {
|
|
|
272
274
|
},
|
|
273
275
|
|
|
274
276
|
/**
|
|
275
|
-
* @param {
|
|
276
|
-
* import('@agoric/ertp/src/types.js').DepositFacet
|
|
277
|
-
* >} depositFacet
|
|
277
|
+
* @param {EOnly<DepositFacet>} depositFacet
|
|
278
278
|
*/
|
|
279
279
|
makeDepositFacetDestination: depositFacet => {
|
|
280
280
|
return Far(`DepositFacetDestination`, {
|
|
@@ -2,20 +2,24 @@
|
|
|
2
2
|
* @import {Baggage} from '@agoric/vat-data'
|
|
3
3
|
* @import {TimerService} from '@agoric/time'
|
|
4
4
|
* @import {Remote} from '@agoric/internal';
|
|
5
|
+
* @import {ChainlinkConfig} from './fluxAggregatorKit.js';
|
|
6
|
+
* @import {PrioritySendersManager} from '@agoric/internal/src/priority-senders.js';
|
|
7
|
+
* @import {NameAdmin} from '@agoric/vats';
|
|
8
|
+
* @import {QuoteKit} from './roundsManager.js';
|
|
5
9
|
*/
|
|
6
10
|
/** @type {ContractMeta} */
|
|
7
11
|
export const meta: ContractMeta;
|
|
8
|
-
export function start(zcf: ZCF<
|
|
12
|
+
export function start(zcf: ZCF<ChainlinkConfig & {
|
|
9
13
|
timer: TimerService;
|
|
10
14
|
brandIn: Brand<"nat">;
|
|
11
15
|
brandOut: Brand<"nat">;
|
|
12
16
|
description: string;
|
|
13
17
|
unitAmountIn?: Amount<"nat">;
|
|
14
18
|
}>, privateArgs: {
|
|
15
|
-
highPrioritySendersManager?:
|
|
19
|
+
highPrioritySendersManager?: PrioritySendersManager;
|
|
16
20
|
initialPoserInvitation: Invitation;
|
|
17
21
|
marshaller: Remote<Marshaller>;
|
|
18
|
-
namesByAddressAdmin: ERef<
|
|
22
|
+
namesByAddressAdmin: ERef<NameAdmin>;
|
|
19
23
|
storageNode: Remote<StorageNode>;
|
|
20
24
|
}, baggage: Baggage): Promise<{
|
|
21
25
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
@@ -67,7 +71,10 @@ export function start(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig
|
|
|
67
71
|
}>;
|
|
68
72
|
}>;
|
|
69
73
|
export type FluxStartFn = typeof start;
|
|
74
|
+
import type { ChainlinkConfig } from './fluxAggregatorKit.js';
|
|
70
75
|
import type { TimerService } from '@agoric/time';
|
|
76
|
+
import type { PrioritySendersManager } from '@agoric/internal/src/priority-senders.js';
|
|
71
77
|
import type { Remote } from '@agoric/internal';
|
|
78
|
+
import type { NameAdmin } from '@agoric/vats';
|
|
72
79
|
import type { Baggage } from '@agoric/vat-data';
|
|
73
80
|
//# sourceMappingURL=fluxAggregatorContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAeA;;;;;;;;GAQG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAmBrB;AA0BK,2BAlBI,GAAG,CACb,eAAmB,GAAG;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC9B,CACF,eACO;IACN,0BAA0B,CAAC,EAAE,sBAAsB,CAAC;IACpD,sBAAsB,EAAE,UAAU,CAAC;IACnC,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;IAC/B,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACrC,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAClC,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuIjB;0BAGa,OAAO,KAAK;qCA3LQ,wBAAwB;kCAF3B,cAAc;4CAGJ,0CAA0C;4BAF1D,kBAAkB;+BAGf,cAAc;6BALhB,kBAAkB"}
|
|
@@ -17,6 +17,10 @@ const trace = makeTracer('FluxAgg', false);
|
|
|
17
17
|
* @import {Baggage} from '@agoric/vat-data'
|
|
18
18
|
* @import {TimerService} from '@agoric/time'
|
|
19
19
|
* @import {Remote} from '@agoric/internal';
|
|
20
|
+
* @import {ChainlinkConfig} from './fluxAggregatorKit.js';
|
|
21
|
+
* @import {PrioritySendersManager} from '@agoric/internal/src/priority-senders.js';
|
|
22
|
+
* @import {NameAdmin} from '@agoric/vats';
|
|
23
|
+
* @import {QuoteKit} from './roundsManager.js';
|
|
20
24
|
*/
|
|
21
25
|
|
|
22
26
|
/** @type {ContractMeta} */
|
|
@@ -47,7 +51,7 @@ harden(meta);
|
|
|
47
51
|
* feeds](https://blog.chain.link/levels-of-data-aggregation-in-chainlink-price-feeds/).
|
|
48
52
|
*
|
|
49
53
|
* @param {ZCF<
|
|
50
|
-
*
|
|
54
|
+
* ChainlinkConfig & {
|
|
51
55
|
* timer: TimerService;
|
|
52
56
|
* brandIn: Brand<'nat'>;
|
|
53
57
|
* brandOut: Brand<'nat'>;
|
|
@@ -56,10 +60,10 @@ harden(meta);
|
|
|
56
60
|
* }
|
|
57
61
|
* >} zcf
|
|
58
62
|
* @param {{
|
|
59
|
-
* highPrioritySendersManager?:
|
|
63
|
+
* highPrioritySendersManager?: PrioritySendersManager;
|
|
60
64
|
* initialPoserInvitation: Invitation;
|
|
61
65
|
* marshaller: Remote<Marshaller>;
|
|
62
|
-
* namesByAddressAdmin: ERef<
|
|
66
|
+
* namesByAddressAdmin: ERef<NameAdmin>;
|
|
63
67
|
* storageNode: Remote<StorageNode>;
|
|
64
68
|
* }} privateArgs
|
|
65
69
|
* @param {Baggage} baggage
|
|
@@ -68,7 +72,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
68
72
|
trace('prepare with baggage keys', [...baggage.keys()]);
|
|
69
73
|
|
|
70
74
|
// xxx uses contract baggage as issuerBagage, assumes one issuer in this contract
|
|
71
|
-
/** @type {
|
|
75
|
+
/** @type {QuoteKit} */
|
|
72
76
|
// @ts-expect-error cast
|
|
73
77
|
const quoteIssuerKit = prepareIssuerKit(
|
|
74
78
|
baggage,
|
|
@@ -4,7 +4,7 @@ export function prepareFluxAggregatorKit(baggage: Baggage, zcf: ZCF<ChainlinkCon
|
|
|
4
4
|
brandIn: Brand<"nat">;
|
|
5
5
|
brandOut: Brand<"nat">;
|
|
6
6
|
unitAmountIn?: Amount<"nat">;
|
|
7
|
-
}>, timerPresence: TimerService, quoteKit:
|
|
7
|
+
}>, timerPresence: TimerService, quoteKit: QuoteKit, storageNode: Remote<StorageNode>, makeDurablePublishKit: () => PublishKit<any>, makeRecorder: MakeRecorder): Promise<() => import("@endo/exo").GuardedKit<{
|
|
8
8
|
creator: {
|
|
9
9
|
/**
|
|
10
10
|
* An "oracle invitation" is an invitation to be able to submit data to
|
|
@@ -18,11 +18,11 @@ export function prepareFluxAggregatorKit(baggage: Baggage, zcf: ZCF<ChainlinkCon
|
|
|
18
18
|
*/
|
|
19
19
|
makeOracleInvitation(oracleId: string): Promise<globalThis.Invitation<{
|
|
20
20
|
invitationMakers: {
|
|
21
|
-
/** @param {
|
|
22
|
-
PushPrice(result:
|
|
21
|
+
/** @param {PriceRound} result */
|
|
22
|
+
PushPrice(result: PriceRound): Promise<globalThis.Invitation<void, undefined>>;
|
|
23
23
|
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
24
|
-
/** @param {
|
|
25
|
-
PushPrice(result:
|
|
24
|
+
/** @param {PriceRound} result */
|
|
25
|
+
PushPrice(result: PriceRound): Promise<globalThis.Invitation<void, undefined>>;
|
|
26
26
|
}>;
|
|
27
27
|
oracle: import("@endo/exo").Guarded<{
|
|
28
28
|
pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: PriceDatum): Promise<void>;
|
|
@@ -57,7 +57,7 @@ export function prepareFluxAggregatorKit(baggage: Baggage, zcf: ZCF<ChainlinkCon
|
|
|
57
57
|
getPriceAuthority(): PriceAuthority;
|
|
58
58
|
getPublicTopics(): {
|
|
59
59
|
quotes: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<PriceDescription>;
|
|
60
|
-
latestRound: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<
|
|
60
|
+
latestRound: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<LatestRound>;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
}>>;
|
|
@@ -97,9 +97,13 @@ export type ChainlinkConfig = {
|
|
|
97
97
|
export type FluxAggregatorKit = EReturn<EReturn<typeof prepareFluxAggregatorKit>>;
|
|
98
98
|
import type { Baggage } from '@agoric/vat-data';
|
|
99
99
|
import type { TimerService } from '@agoric/time';
|
|
100
|
+
import type { QuoteKit } from './roundsManager.js';
|
|
100
101
|
import type { Remote } from '@agoric/internal';
|
|
102
|
+
import type { MakeRecorder } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
103
|
+
import type { PriceRound } from './roundsManager.js';
|
|
101
104
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
102
105
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
106
|
+
import type { LatestRound } from './roundsManager.js';
|
|
103
107
|
import type { Timestamp } from '@agoric/time';
|
|
104
108
|
import type { EReturn } from '@endo/far';
|
|
105
109
|
//# sourceMappingURL=fluxAggregatorKit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluxAggregatorKit.d.ts","sourceRoot":"","sources":["fluxAggregatorKit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fluxAggregatorKit.d.ts","sourceRoot":"","sources":["fluxAggregatorKit.js"],"names":[],"mappings":"AAkCA,qCAAsC,mBAAmB,CAAC;AAgEnD,kDAfI,OAAO,OACP,GAAG,CACT,eAAe,GAAG;IAChB,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC9B,CACF,iBACO,YAAY,YACZ,QAAQ,eACR,OAAO,WAAW,CAAC,yBACnB,MAAM,UAAU,CAAC,GAAG,CAAC,gBACrB,YAAY;;QA8If;;;;;;;;;WASG;uCADQ,MAAM;;gBAiBX,iCAAiC;kCAArB,UAAU;;gBAAtB,iCAAiC;kCAArB,UAAU;;;;;;;QAqB5B,+BAA+B;+BAAnB,MAAM;;QAalB,+BAA+B;6BAAnB,MAAM;;;;;;;;;QAoBlB;;;;;;;;WAQG;mCAHQ,MAAM,kBACN,MAAM,GACJ,OAAO,CAAC,UAAU,CAAC;;;;;;;;;IAqDvC;;8BAvUa,OAAO;oBACP,MAAM;sBACN,MAAM;eACN,SAAS;kBACT,MAAM;iBACN,MAAM;;;wBAMN,MAAM;wBACN,MAAM;;;;;kBACN,MAAM;;;;;wBAEN,MAAM;;;;;wBAEN,MAAM;;;;;;aAEN,MAAM;;gCAsTN,QAAQ,QAAQ,OAAO,wBAAwB,CAAC,CAAC;6BAtVrC,kBAAkB;kCAKb,cAAc;8BAjBlB,oBAAoB;4BAHR,kBAAkB;kCAI1B,6CAA6C;gCAG/C,oBAAoB;oCAN4C,4BAA4B;sCAA5B,4BAA4B;iCAI3F,oBAAoB;+BAWtB,cAAc;6BAjBhB,WAAW"}
|
|
@@ -23,6 +23,11 @@ import { prepareRoundsManagerKit } from './roundsManager.js';
|
|
|
23
23
|
* @import {TypedPattern, Remote} from '@agoric/internal';
|
|
24
24
|
* @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
|
|
25
25
|
* @import {MapStore, SetStore} from '@agoric/store';
|
|
26
|
+
* @import {QuoteKit} from './roundsManager.js';
|
|
27
|
+
* @import {MakeRecorder} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
28
|
+
* @import {LatestRound} from './roundsManager.js';
|
|
29
|
+
* @import {OracleKit} from './priceOracleKit.js';
|
|
30
|
+
* @import {PriceRound} from './roundsManager.js';
|
|
26
31
|
*/
|
|
27
32
|
|
|
28
33
|
const trace = makeTracer('FlxAgg', true);
|
|
@@ -86,10 +91,10 @@ const priceDescriptionFromQuote = quote => quote.quoteAmount.value[0];
|
|
|
86
91
|
* }
|
|
87
92
|
* >} zcf
|
|
88
93
|
* @param {TimerService} timerPresence
|
|
89
|
-
* @param {
|
|
94
|
+
* @param {QuoteKit} quoteKit
|
|
90
95
|
* @param {Remote<StorageNode>} storageNode
|
|
91
96
|
* @param {() => PublishKit<any>} makeDurablePublishKit
|
|
92
|
-
* @param {
|
|
97
|
+
* @param {MakeRecorder} makeRecorder
|
|
93
98
|
*/
|
|
94
99
|
export const prepareFluxAggregatorKit = async (
|
|
95
100
|
baggage,
|
|
@@ -155,7 +160,7 @@ export const prepareFluxAggregatorKit = async (
|
|
|
155
160
|
makeRecorderKit(
|
|
156
161
|
node,
|
|
157
162
|
/**
|
|
158
|
-
* @type {TypedPattern<
|
|
163
|
+
* @type {TypedPattern<LatestRound>}
|
|
159
164
|
*/ (M.any()),
|
|
160
165
|
),
|
|
161
166
|
),
|
|
@@ -223,7 +228,7 @@ export const prepareFluxAggregatorKit = async (
|
|
|
223
228
|
}),
|
|
224
229
|
},
|
|
225
230
|
() => {
|
|
226
|
-
/** @type {MapStore<string,
|
|
231
|
+
/** @type {MapStore<string, OracleKit>} */
|
|
227
232
|
const oracles = makeScalarBigMapStore('oracles', {
|
|
228
233
|
durable: true,
|
|
229
234
|
});
|
|
@@ -256,7 +261,7 @@ export const prepareFluxAggregatorKit = async (
|
|
|
256
261
|
seat.exit();
|
|
257
262
|
const { oracle } = await facets.creator.initOracle(oracleId);
|
|
258
263
|
const invitationMakers = Far('invitation makers', {
|
|
259
|
-
/** @param {
|
|
264
|
+
/** @param {PriceRound} result */
|
|
260
265
|
PushPrice(result) {
|
|
261
266
|
return zcf.makeInvitation(
|
|
262
267
|
/** @param {ZCFSeat} cSeat */
|
|
@@ -17,7 +17,7 @@ export function prepareOracleAdminKit(baggage: any): (args_0: HeldParams) => imp
|
|
|
17
17
|
export type HeldParams = {
|
|
18
18
|
oracleId: string;
|
|
19
19
|
roundPowers: {
|
|
20
|
-
handlePush: (status: OracleStatus, result:
|
|
20
|
+
handlePush: (status: OracleStatus, result: PriceRound) => Promise<OracleStatus>;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export type PriceDatum = {
|
|
@@ -35,5 +35,6 @@ export type ImmutableState = Readonly<HeldParams & {}>;
|
|
|
35
35
|
export type MutableState = OracleStatus & {};
|
|
36
36
|
export type State = ImmutableState & MutableState;
|
|
37
37
|
export type OracleKit = EReturn<EReturn<typeof prepareOracleAdminKit>>;
|
|
38
|
+
import type { PriceRound } from './roundsManager.js';
|
|
38
39
|
import type { EReturn } from '@endo/far';
|
|
39
40
|
//# sourceMappingURL=priceOracleKit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priceOracleKit.d.ts","sourceRoot":"","sources":["priceOracleKit.js"],"names":[],"mappings":"AAMA,qCAAsC,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"priceOracleKit.d.ts","sourceRoot":"","sources":["priceOracleKit.js"],"names":[],"mappings":"AAMA,qCAAsC,mBAAmB,CAAC;AAiEnD;;;;;QAcC;;;;WAIG;iEADQ,UAAU;QA0BrB,8BAA8B;qBAAhB,YAAY;;GAa/B;yBAjHU;IACR,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE;QACX,UAAU,EAAE,CACV,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,UAAU,KACf,OAAO,CAAC,YAAY,CAAC,CAAC;KAC5B,CAAC;CACH;yBAGU;IAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,SAAS,EAAE,QAAQ,CAAA;CAAE;;;uBAKpD,MAAM;sBACN,MAAM;sBACN,MAAM;cACN,MAAM;;6BAGP,QAAQ,CAAC,UAAU,GAAG,EAAE,CAAC;2BAEzB,YAAY,GAAG,EAAE;oBAEhB,cAAc,GAAG,YAAY;wBAyF7B,QAAQ,QAAQ,OAAO,qBAAqB,CAAC,CAAC;gCAvH/B,oBAAoB;6BADvB,WAAW"}
|
|
@@ -8,6 +8,7 @@ export const INVITATION_MAKERS_DESC = 'oracle invitation';
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @import {EReturn} from '@endo/far';
|
|
11
|
+
* @import {PriceRound} from './roundsManager.js';
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -16,7 +17,7 @@ export const INVITATION_MAKERS_DESC = 'oracle invitation';
|
|
|
16
17
|
* roundPowers: {
|
|
17
18
|
* handlePush: (
|
|
18
19
|
* status: OracleStatus,
|
|
19
|
-
* result:
|
|
20
|
+
* result: PriceRound,
|
|
20
21
|
* ) => Promise<OracleStatus>;
|
|
21
22
|
* };
|
|
22
23
|
* }} HeldParams
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @type {bigint} */
|
|
2
2
|
export const ROUND_MAX: bigint;
|
|
3
|
-
export function prepareRoundsManagerKit(baggage: any): (args_0: Readonly<
|
|
3
|
+
export function prepareRoundsManagerKit(baggage: any): (args_0: Readonly<ChainlinkConfig & {
|
|
4
4
|
quoteKit: QuoteKit;
|
|
5
5
|
answerPublisher: Publisher<void>;
|
|
6
6
|
brandIn: Brand<"nat">;
|
|
7
7
|
brandOut: Brand<"nat">;
|
|
8
|
-
latestRoundPublisher:
|
|
8
|
+
latestRoundPublisher: Recorder<LatestRound>;
|
|
9
9
|
timerPresence: TimerService;
|
|
10
10
|
}> & {
|
|
11
11
|
unitAmountIn: Amount<"nat">;
|
|
@@ -177,12 +177,12 @@ export type RoundDetails = {
|
|
|
177
177
|
roundTimeout: number;
|
|
178
178
|
};
|
|
179
179
|
export type QuoteKit = IssuerKit<"set", PriceDescription>;
|
|
180
|
-
export type HeldParams = Readonly<
|
|
180
|
+
export type HeldParams = Readonly<ChainlinkConfig & {
|
|
181
181
|
quoteKit: QuoteKit;
|
|
182
182
|
answerPublisher: Publisher<void>;
|
|
183
183
|
brandIn: Brand<"nat">;
|
|
184
184
|
brandOut: Brand<"nat">;
|
|
185
|
-
latestRoundPublisher:
|
|
185
|
+
latestRoundPublisher: Recorder<LatestRound>;
|
|
186
186
|
timerPresence: TimerService;
|
|
187
187
|
}>;
|
|
188
188
|
export type ImmutableState = Readonly<HeldParams & {
|
|
@@ -195,6 +195,8 @@ export type MutableState = {
|
|
|
195
195
|
reportingRoundId: bigint;
|
|
196
196
|
};
|
|
197
197
|
export type State = ImmutableState & MutableState;
|
|
198
|
+
import type { ChainlinkConfig } from './fluxAggregatorKit.js';
|
|
199
|
+
import type { Recorder } from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
198
200
|
import type { TimerService } from '@agoric/time';
|
|
199
201
|
import type { OracleStatus } from './priceOracleKit.js';
|
|
200
202
|
import type { Timestamp } from '@agoric/time';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roundsManager.d.ts","sourceRoot":"","sources":["roundsManager.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"roundsManager.d.ts","sourceRoot":"","sources":["roundsManager.js"],"names":[],"mappings":"AA4BA,qBAAqB;AACrB,wBADW,MAAM,CAC4B;AAqEtC;cA1BU,QAAQ;qBACD,SAAS,CAAC,IAAI,CAAC;aACvB,KAAK,CAAC,KAAK,CAAC;cACX,KAAK,CAAC,KAAK,CAAC;0BACA,SAAS,WAAW,CAAC;mBAC5B,YAAY;;kBAoDU,MAAM,CAAC,KAAK,CAAC;;;QA2DjD,8BAA8B;sCAAlB,MAAM;QAQlB;;;WAGG;wBAFQ,YAAY,WACZ,MAAM;QAQjB,8BAA8B;oCAAlB,MAAM;QASlB,8BAA8B;6BAAlB,MAAM;QAMlB;;;;WAIG;oCAHQ,MAAM,kBACN,SAAS,YACT,MAAM;QA4CjB;;;WAGG;8CAFQ,MAAM,QACN,MAAM;QAOjB;;;;;WAKG;iCAJQ,MAAM,UACN,YAAY,kBACZ,SAAS,GACP,YAAY,GAAG,SAAS;QAiBrC;;;;;WAKG;qCAJQ,MAAM,WACN,MAAM,UACN,YAAY,GACV,YAAY;QAwBzB;;;WAGG;8BAFQ,MAAM,kBACN,SAAS;QAWpB;;;WAGG;0BAFQ,MAAM,kBACN,SAAS;QAyBpB;;;WAGG;mCAFQ,MAAM,kBACN,SAAS;QAgCpB;;;WAGG;yCAFQ,MAAM,kBACN,SAAS;QA2BpB;;;;;WAKG;oCAJQ,YAAY,WACZ,MAAM,kBACN,SAAS,GACP,MAAM,GAAG,IAAI;;;QA8B1B,qCAAqC;iCAAzB,eAAe;;;;QAQ3B;;;;WAIG;0DAFA;YAAwB,gBAAgB;YACb,SAAS;SAAC;;;;;;;QAwEx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AAC,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;oBAEU,cAAc,GAAG,YAAY;qCA3ET,wBAAwB;8BAC/B,6CAA6C;kCAJ9B,cAAc;kCAEzB,qBAAqB;+BAFV,cAAc;qCADqC,4BAA4B;sCAA5B,4BAA4B;8BAEpF,eAAe"}
|
|
@@ -19,6 +19,8 @@ const { add, subtract, multiply, floorDivide, ceilDivide, isGTE } = natSafeMath;
|
|
|
19
19
|
* @import {Timestamp, TimerService} from '@agoric/time'
|
|
20
20
|
* @import {MapStore, SetStore} from '@agoric/store';
|
|
21
21
|
* @import {OracleStatus} from './priceOracleKit.js'
|
|
22
|
+
* @import {ChainlinkConfig} from './fluxAggregatorKit.js';
|
|
23
|
+
* @import {Recorder} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
22
24
|
*/
|
|
23
25
|
|
|
24
26
|
/** @type {string} */
|
|
@@ -67,12 +69,12 @@ const validRoundId = roundId => {
|
|
|
67
69
|
|
|
68
70
|
/**
|
|
69
71
|
* @typedef {Readonly<
|
|
70
|
-
*
|
|
72
|
+
* ChainlinkConfig & {
|
|
71
73
|
* quoteKit: QuoteKit;
|
|
72
74
|
* answerPublisher: Publisher<void>;
|
|
73
75
|
* brandIn: Brand<'nat'>;
|
|
74
76
|
* brandOut: Brand<'nat'>;
|
|
75
|
-
* latestRoundPublisher:
|
|
77
|
+
* latestRoundPublisher: Recorder<LatestRound>;
|
|
76
78
|
* timerPresence: TimerService;
|
|
77
79
|
* }
|
|
78
80
|
* >} HeldParams
|
|
@@ -9,6 +9,7 @@ const trace = makeTracer('NewAuction', true);
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @import {Remote} from '@agoric/internal';
|
|
12
|
+
* @import {EconomyBootstrapPowers} from './econ-behaviors.js';
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -21,8 +22,7 @@ const trace = makeTracer('NewAuction', true);
|
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
|
-
* @param {
|
|
25
|
-
* interlockPowers} powers
|
|
25
|
+
* @param {EconomyBootstrapPowers & interlockPowers} powers
|
|
26
26
|
* @param {{
|
|
27
27
|
* options: {
|
|
28
28
|
* contractGovernorRef: { bundleID: string };
|
|
@@ -34,7 +34,11 @@ export * from './startPSM.js';
|
|
|
34
34
|
* @property {number} [initialPrice]
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* @import {EconomyBootstrapPowers} from './econ-behaviors.js'
|
|
39
|
+
* @import {FullSchedule} from '../auction/scheduler.js';
|
|
40
|
+
* @import {TimerService} from '@agoric/time';
|
|
41
|
+
*/
|
|
38
42
|
|
|
39
43
|
/**
|
|
40
44
|
* @param {BootstrapPowers} powers
|
|
@@ -269,8 +273,8 @@ const COMPLETION = 20n * 60n;
|
|
|
269
273
|
* defined, 3) run now. If there is only a nextSchedule, 4) run now if startTime
|
|
270
274
|
* is far enough away, else 5) run after endTime
|
|
271
275
|
*
|
|
272
|
-
* @param {
|
|
273
|
-
* @param {ERef<
|
|
276
|
+
* @param {FullSchedule} schedules
|
|
277
|
+
* @param {ERef<TimerService>} timer
|
|
274
278
|
* @param {() => void} thunk
|
|
275
279
|
*/
|
|
276
280
|
const whenQuiescent = async (schedules, timer, thunk) => {
|
|
@@ -2,6 +2,11 @@ import { deeplyFulfilledObject } from '@agoric/internal';
|
|
|
2
2
|
import { E } from '@endo/far';
|
|
3
3
|
import { reserveThenDeposit } from './utils.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @import {EconomyBootstrapPowers} from './econ-behaviors.js';
|
|
7
|
+
* @import {EconCharterStartResult} from './econ-behaviors.js';
|
|
8
|
+
*/
|
|
9
|
+
|
|
5
10
|
const { values } = Object;
|
|
6
11
|
|
|
7
12
|
/** @type {<X, Y>(xs: X[], ys: Y[]) => [X, Y][]} */
|
|
@@ -10,7 +15,7 @@ const zip = (xs, ys) => xs.map((x, i) => [x, ys[i]]);
|
|
|
10
15
|
const EC_HIGH_PRIORITY_SENDERS_NAMESPACE = 'economicCommittee';
|
|
11
16
|
|
|
12
17
|
/**
|
|
13
|
-
* @param {
|
|
18
|
+
* @param {EconomyBootstrapPowers} powers
|
|
14
19
|
* @param {{ options: { voterAddresses: Record<string, string> } }} param1
|
|
15
20
|
*/
|
|
16
21
|
export const inviteCommitteeMembers = async (
|
|
@@ -51,7 +56,7 @@ export const inviteCommitteeMembers = async (
|
|
|
51
56
|
|
|
52
57
|
harden(inviteCommitteeMembers);
|
|
53
58
|
|
|
54
|
-
/** @param {
|
|
59
|
+
/** @param {EconomyBootstrapPowers} powers */
|
|
55
60
|
export const startEconCharter = async ({
|
|
56
61
|
consume: { zoe },
|
|
57
62
|
produce: { econCharterKit },
|
|
@@ -72,7 +77,7 @@ export const startEconCharter = async ({
|
|
|
72
77
|
}),
|
|
73
78
|
);
|
|
74
79
|
|
|
75
|
-
/** @type {Promise<
|
|
80
|
+
/** @type {Promise<EconCharterStartResult>} */
|
|
76
81
|
const startResult = E(zoe).startInstance(
|
|
77
82
|
charterInstall,
|
|
78
83
|
undefined,
|
|
@@ -88,7 +93,7 @@ harden(startEconCharter);
|
|
|
88
93
|
/**
|
|
89
94
|
* Introduce charter to governed creator facets.
|
|
90
95
|
*
|
|
91
|
-
* @param {
|
|
96
|
+
* @param {EconomyBootstrapPowers} powers
|
|
92
97
|
*/
|
|
93
98
|
export const addGovernorsToEconCharter = async ({
|
|
94
99
|
consume: { reserveKit, vaultFactoryKit, econCharterKit, auctioneerKit },
|
|
@@ -126,7 +131,7 @@ export const addGovernorsToEconCharter = async ({
|
|
|
126
131
|
harden(addGovernorsToEconCharter);
|
|
127
132
|
|
|
128
133
|
/**
|
|
129
|
-
* @param {
|
|
134
|
+
* @param {EconomyBootstrapPowers} powers
|
|
130
135
|
* @param {{ options: { voterAddresses: Record<string, string> } }} param1
|
|
131
136
|
*/
|
|
132
137
|
export const inviteToEconCharter = async (
|
|
@@ -4,6 +4,12 @@ import { Stable } from '@agoric/internal/src/tokens.js';
|
|
|
4
4
|
import * as econBehaviors from './econ-behaviors.js';
|
|
5
5
|
import { ECON_COMMITTEE_MANIFEST } from './startEconCommittee.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @import {EconomyBootstrapPowers} from './econ-behaviors.js';
|
|
9
|
+
* @import {BootstrapManifest} from '@agoric/vats/src/core/lib-boot.js';
|
|
10
|
+
* @import {BootstrapManifestPermit} from '@agoric/vats/src/core/lib-boot.js';
|
|
11
|
+
*/
|
|
12
|
+
|
|
7
13
|
export * from './econ-behaviors.js';
|
|
8
14
|
export * from './startPSM.js';
|
|
9
15
|
export * from './startEconCommittee.js';
|
|
@@ -13,7 +19,7 @@ export * from './startEconCommittee.js';
|
|
|
13
19
|
// require updating a lot of tests. So for now, we just
|
|
14
20
|
// grab the kits afterward and store them.
|
|
15
21
|
|
|
16
|
-
/** @param {
|
|
22
|
+
/** @param {EconomyBootstrapPowers} powers */
|
|
17
23
|
export const storeInterContractStartKits = async ({
|
|
18
24
|
consume: {
|
|
19
25
|
contractKits,
|
|
@@ -50,9 +56,9 @@ export const storeInterContractStartKits = async ({
|
|
|
50
56
|
]);
|
|
51
57
|
};
|
|
52
58
|
|
|
53
|
-
/** @type {
|
|
59
|
+
/** @type {BootstrapManifest} */
|
|
54
60
|
const SHARED_MAIN_MANIFEST = harden({
|
|
55
|
-
/** @type {
|
|
61
|
+
/** @type {BootstrapManifestPermit} */
|
|
56
62
|
[econBehaviors.startVaultFactory.name]: {
|
|
57
63
|
consume: {
|
|
58
64
|
board: 'board',
|
|
@@ -23,8 +23,11 @@ export const DEFAULT_CONTRACT_TERMS = {
|
|
|
23
23
|
maxSubmissionValue: 2 ** 256,
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
/**
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @import {EconomyBootstrapPowers} from './econ-behaviors.js';
|
|
28
|
+
* @import {ChainlinkConfig} from '@agoric/inter-protocol/src/price/fluxAggregatorKit.js';
|
|
29
|
+
* @import {StartedInstanceKit} from '@agoric/zoe/src/zoeService/utils.js';
|
|
30
|
+
*/
|
|
28
31
|
/** @import {FluxStartFn} from '@agoric/inter-protocol/src/price/fluxAggregatorContract.js'; */
|
|
29
32
|
|
|
30
33
|
const trace = makeTracer('DeployPriceFeed', true);
|
|
@@ -89,7 +92,7 @@ export const ensureOracleBrand = async (
|
|
|
89
92
|
* PromiseSpaceOf<{ retiredContractInstances: MapStore<string, Instance> }>} powers
|
|
90
93
|
* @param {{
|
|
91
94
|
* AGORIC_INSTANCE_NAME: string;
|
|
92
|
-
* contractTerms:
|
|
95
|
+
* contractTerms: ChainlinkConfig;
|
|
93
96
|
* brandIn: Brand<'nat'>;
|
|
94
97
|
* brandOut: Brand<'nat'>;
|
|
95
98
|
* }} config
|
|
@@ -176,7 +179,7 @@ const startPriceAggregatorInstance = async (
|
|
|
176
179
|
);
|
|
177
180
|
trace('added', label, 'instance to econCharter');
|
|
178
181
|
|
|
179
|
-
/** @type {
|
|
182
|
+
/** @type {StartedInstanceKit<FluxStartFn>} */
|
|
180
183
|
// @ts-expect-error
|
|
181
184
|
const { instance, publicFacet, creatorFacet } = governedKit;
|
|
182
185
|
|
|
@@ -38,22 +38,28 @@ export const SECONDS_PER_WEEK = 7n * SECONDS_PER_DAY;
|
|
|
38
38
|
/**
|
|
39
39
|
* @typedef {object} PSMKit
|
|
40
40
|
* @property {string} label
|
|
41
|
-
* @property {Instance<import('../psm/psm.js').start>} psm
|
|
41
|
+
* @property {Instance<typeof import('../psm/psm.js').start>} psm
|
|
42
42
|
* @property {Instance<
|
|
43
|
-
* import('../../../governance/src/contractGovernor.js').start
|
|
43
|
+
* typeof import('../../../governance/src/contractGovernor.js').start
|
|
44
44
|
* >} psmGovernor
|
|
45
45
|
* @property {Awaited<
|
|
46
46
|
* ReturnType<
|
|
47
47
|
* Awaited<
|
|
48
|
-
* ReturnType<import('../psm/psm.js')
|
|
48
|
+
* ReturnType<typeof import('../psm/psm.js').start>
|
|
49
49
|
* >['creatorFacet']['getLimitedCreatorFacet']
|
|
50
50
|
* >
|
|
51
51
|
* >} psmCreatorFacet
|
|
52
|
-
* @property {GovernorCreatorFacet<
|
|
52
|
+
* @property {GovernorCreatorFacet<
|
|
53
|
+
* typeof import('../../src/psm/psm.js').start
|
|
54
|
+
* >} psmGovernorCreatorFacet
|
|
53
55
|
* @property {AdminFacet} psmAdminFacet
|
|
54
56
|
*/
|
|
55
57
|
|
|
56
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* @typedef {GovernanceFacetKit<
|
|
60
|
+
* typeof import('../auction/auctioneer.js').start
|
|
61
|
+
* >} AuctioneerKit
|
|
62
|
+
*/
|
|
57
63
|
|
|
58
64
|
/**
|
|
59
65
|
* @typedef {WellKnownSpaces & ChainBootstrapSpace & EconomyBootstrapSpace} EconomyBootstrapPowers
|
|
@@ -73,7 +79,7 @@ export const SECONDS_PER_WEEK = 7n * SECONDS_PER_DAY;
|
|
|
73
79
|
* anchorBalancePayments: MapStore<Brand, Payment<'nat'>>;
|
|
74
80
|
* econCharterKit: EconCharterStartResult;
|
|
75
81
|
* reserveKit: GovernanceFacetKit<
|
|
76
|
-
* import('../reserve/assetReserve.js')
|
|
82
|
+
* typeof import('../reserve/assetReserve.js').start
|
|
77
83
|
* >;
|
|
78
84
|
* vaultFactoryKit: GovernanceFacetKit<VFStart>;
|
|
79
85
|
* auctioneerKit: AuctioneerKit;
|
|
@@ -84,12 +90,12 @@ export const SECONDS_PER_WEEK = 7n * SECONDS_PER_DAY;
|
|
|
84
90
|
|
|
85
91
|
/**
|
|
86
92
|
* @typedef {StartedInstanceKit<
|
|
87
|
-
* import('../econCommitteeCharter.js')
|
|
93
|
+
* typeof import('../econCommitteeCharter.js').start
|
|
88
94
|
* >} EconCharterStartResult
|
|
89
95
|
*/
|
|
90
96
|
/**
|
|
91
97
|
* @typedef {StartedInstanceKit<
|
|
92
|
-
* import('@agoric/governance/src/committee.js')
|
|
98
|
+
* typeof import('@agoric/governance/src/committee.js').start
|
|
93
99
|
* >} CommitteeStartResult
|
|
94
100
|
*/
|
|
95
101
|
|