@agoric/inter-protocol 0.16.2-other-dev-fbe72e7.0.fbe72e7 → 0.16.2-other-dev-d15096d.0.d15096d
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 +17 -17
- package/src/auction/auctionBook.d.ts +3 -1
- package/src/auction/auctionBook.d.ts.map +1 -1
- package/src/auction/auctionBook.js +7 -6
- package/src/auction/auctioneer.d.ts +15 -10
- package/src/auction/auctioneer.d.ts.map +1 -1
- package/src/auction/auctioneer.js +23 -12
- package/src/auction/params.d.ts +14 -6
- package/src/auction/params.d.ts.map +1 -1
- package/src/auction/params.js +11 -4
- 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 +28 -73
- package/src/clientSupport.d.ts.map +1 -1
- package/src/clientSupport.js +24 -128
- package/src/econCommitteeCharter.d.ts +9 -5
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +10 -8
- package/src/feeDistributor.d.ts +10 -16
- package/src/feeDistributor.d.ts.map +1 -1
- package/src/feeDistributor.js +3 -3
- package/src/index.js +1 -1
- package/src/price/fluxAggregatorContract.d.ts +14 -5
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +17 -9
- package/src/price/fluxAggregatorKit.d.ts +11 -6
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.js +12 -7
- 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 +7 -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 -9
- 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 +7 -4
- 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 +16 -8
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +15 -9
- package/src/provisionPoolKit.d.ts +19 -74
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +26 -22
- package/src/psm/psm.d.ts +5 -6
- package/src/psm/psm.d.ts.map +1 -1
- package/src/psm/psm.js +12 -11
- package/src/reserve/assetReserve.d.ts +3 -2
- package/src/reserve/assetReserve.d.ts.map +1 -1
- package/src/reserve/assetReserve.js +10 -6
- package/src/reserve/assetReserveKit.d.ts +6 -3
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/reserve/assetReserveKit.js +7 -5
- package/src/vaultFactory/burn.js +1 -1
- 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/orderedVaultStore.d.ts +2 -2
- package/src/vaultFactory/params.d.ts +20 -7
- package/src/vaultFactory/params.d.ts.map +1 -1
- package/src/vaultFactory/params.js +24 -9
- package/src/vaultFactory/prioritizedVaults.d.ts +12 -12
- package/src/vaultFactory/types-ambient.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.js +1 -0
- package/src/vaultFactory/vault.d.ts +23 -20
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +17 -14
- package/src/vaultFactory/vaultDirector.d.ts +28 -16
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.js +28 -22
- package/src/vaultFactory/vaultFactory.d.ts +17 -52
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.js +22 -16
- package/src/vaultFactory/vaultHolder.d.ts +9 -5
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultHolder.js +8 -4
- package/src/vaultFactory/vaultKit.d.ts +4 -1
- package/src/vaultFactory/vaultKit.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.js +7 -4
- package/src/vaultFactory/vaultManager.d.ts +37 -25
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +28 -15
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`, {
|
package/src/index.js
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @import {Baggage} from '@agoric/vat-data'
|
|
3
3
|
* @import {TimerService} from '@agoric/time'
|
|
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';
|
|
4
9
|
*/
|
|
5
10
|
/** @type {ContractMeta} */
|
|
6
11
|
export const meta: ContractMeta;
|
|
7
|
-
export function start(zcf: ZCF<
|
|
12
|
+
export function start(zcf: ZCF<ChainlinkConfig & {
|
|
8
13
|
timer: TimerService;
|
|
9
14
|
brandIn: Brand<"nat">;
|
|
10
15
|
brandOut: Brand<"nat">;
|
|
11
16
|
description: string;
|
|
12
17
|
unitAmountIn?: Amount<"nat">;
|
|
13
18
|
}>, privateArgs: {
|
|
14
|
-
highPrioritySendersManager?:
|
|
19
|
+
highPrioritySendersManager?: PrioritySendersManager;
|
|
15
20
|
initialPoserInvitation: Invitation;
|
|
16
|
-
marshaller:
|
|
17
|
-
namesByAddressAdmin: ERef<
|
|
18
|
-
storageNode: StorageNode
|
|
21
|
+
marshaller: Remote<Marshaller>;
|
|
22
|
+
namesByAddressAdmin: ERef<NameAdmin>;
|
|
23
|
+
storageNode: Remote<StorageNode>;
|
|
19
24
|
}, baggage: Baggage): Promise<{
|
|
20
25
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
21
26
|
getParamMgrRetriever: () => {
|
|
@@ -66,6 +71,10 @@ export function start(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig
|
|
|
66
71
|
}>;
|
|
67
72
|
}>;
|
|
68
73
|
export type FluxStartFn = typeof start;
|
|
74
|
+
import type { ChainlinkConfig } from './fluxAggregatorKit.js';
|
|
69
75
|
import type { TimerService } from '@agoric/time';
|
|
76
|
+
import type { PrioritySendersManager } from '@agoric/internal/src/priority-senders.js';
|
|
77
|
+
import type { Remote } from '@agoric/internal';
|
|
78
|
+
import type { NameAdmin } from '@agoric/vats';
|
|
70
79
|
import type { Baggage } from '@agoric/vat-data';
|
|
71
80
|
//# sourceMappingURL=fluxAggregatorContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { prepareIssuerKit } from '@agoric/ertp';
|
|
4
4
|
import { handleParamGovernance } from '@agoric/governance';
|
|
5
5
|
import { makeTracer, StorageNodeShape } from '@agoric/internal';
|
|
6
|
+
import { wrapRemoteMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
6
7
|
import { prepareDurablePublishKit } from '@agoric/notifier';
|
|
7
8
|
import { M } from '@agoric/store';
|
|
8
9
|
import { provideAll } from '@agoric/zoe/src/contractSupport/durability.js';
|
|
@@ -15,6 +16,11 @@ const trace = makeTracer('FluxAgg', false);
|
|
|
15
16
|
/**
|
|
16
17
|
* @import {Baggage} from '@agoric/vat-data'
|
|
17
18
|
* @import {TimerService} from '@agoric/time'
|
|
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';
|
|
18
24
|
*/
|
|
19
25
|
|
|
20
26
|
/** @type {ContractMeta} */
|
|
@@ -45,7 +51,7 @@ harden(meta);
|
|
|
45
51
|
* feeds](https://blog.chain.link/levels-of-data-aggregation-in-chainlink-price-feeds/).
|
|
46
52
|
*
|
|
47
53
|
* @param {ZCF<
|
|
48
|
-
*
|
|
54
|
+
* ChainlinkConfig & {
|
|
49
55
|
* timer: TimerService;
|
|
50
56
|
* brandIn: Brand<'nat'>;
|
|
51
57
|
* brandOut: Brand<'nat'>;
|
|
@@ -54,11 +60,11 @@ harden(meta);
|
|
|
54
60
|
* }
|
|
55
61
|
* >} zcf
|
|
56
62
|
* @param {{
|
|
57
|
-
* highPrioritySendersManager?:
|
|
63
|
+
* highPrioritySendersManager?: PrioritySendersManager;
|
|
58
64
|
* initialPoserInvitation: Invitation;
|
|
59
|
-
* marshaller:
|
|
60
|
-
* namesByAddressAdmin: ERef<
|
|
61
|
-
* storageNode: StorageNode
|
|
65
|
+
* marshaller: Remote<Marshaller>;
|
|
66
|
+
* namesByAddressAdmin: ERef<NameAdmin>;
|
|
67
|
+
* storageNode: Remote<StorageNode>;
|
|
62
68
|
* }} privateArgs
|
|
63
69
|
* @param {Baggage} baggage
|
|
64
70
|
*/
|
|
@@ -66,7 +72,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
66
72
|
trace('prepare with baggage keys', [...baggage.keys()]);
|
|
67
73
|
|
|
68
74
|
// xxx uses contract baggage as issuerBagage, assumes one issuer in this contract
|
|
69
|
-
/** @type {
|
|
75
|
+
/** @type {QuoteKit} */
|
|
70
76
|
// @ts-expect-error cast
|
|
71
77
|
const quoteIssuerKit = prepareIssuerKit(
|
|
72
78
|
baggage,
|
|
@@ -80,7 +86,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
80
86
|
const {
|
|
81
87
|
highPrioritySendersManager,
|
|
82
88
|
initialPoserInvitation,
|
|
83
|
-
marshaller,
|
|
89
|
+
marshaller: remoteMarshaller,
|
|
84
90
|
namesByAddressAdmin,
|
|
85
91
|
storageNode,
|
|
86
92
|
} = privateArgs;
|
|
@@ -89,11 +95,13 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
89
95
|
|
|
90
96
|
trace('awaited args');
|
|
91
97
|
|
|
98
|
+
const cachingMarshaller = wrapRemoteMarshaller(remoteMarshaller);
|
|
99
|
+
|
|
92
100
|
const makeDurablePublishKit = prepareDurablePublishKit(
|
|
93
101
|
baggage,
|
|
94
102
|
'Price Aggregator publish kit',
|
|
95
103
|
);
|
|
96
|
-
const makeRecorder = prepareRecorder(baggage,
|
|
104
|
+
const makeRecorder = prepareRecorder(baggage, cachingMarshaller);
|
|
97
105
|
|
|
98
106
|
const makeFluxAggregatorKit = await prepareFluxAggregatorKit(
|
|
99
107
|
baggage,
|
|
@@ -120,7 +128,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
120
128
|
// No governed parameters. Governance just for API methods.
|
|
121
129
|
},
|
|
122
130
|
storageNode,
|
|
123
|
-
|
|
131
|
+
cachingMarshaller,
|
|
124
132
|
);
|
|
125
133
|
|
|
126
134
|
trace('got makeDurableGovernorFacet', makeDurableGovernorFacet);
|
|
@@ -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,8 +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';
|
|
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';
|
|
100
104
|
import type { PriceAuthority } from '@agoric/zoe/tools/types.js';
|
|
101
105
|
import type { PriceDescription } from '@agoric/zoe/tools/types.js';
|
|
106
|
+
import type { LatestRound } from './roundsManager.js';
|
|
102
107
|
import type { Timestamp } from '@agoric/time';
|
|
103
108
|
import type { EReturn } from '@endo/far';
|
|
104
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"}
|
|
@@ -20,9 +20,14 @@ import { prepareRoundsManagerKit } from './roundsManager.js';
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @import {EReturn} from '@endo/far';
|
|
23
|
-
* @import {TypedPattern} from '@agoric/internal';
|
|
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 {
|
|
90
|
-
* @param {StorageNode} storageNode
|
|
94
|
+
* @param {QuoteKit} quoteKit
|
|
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":"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"}
|
|
@@ -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
|
|
@@ -7,6 +7,11 @@ import { provideRetiredInstances } from './utils.js';
|
|
|
7
7
|
|
|
8
8
|
const trace = makeTracer('NewAuction', true);
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @import {Remote} from '@agoric/internal';
|
|
12
|
+
* @import {EconomyBootstrapPowers} from './econ-behaviors.js';
|
|
13
|
+
*/
|
|
14
|
+
|
|
10
15
|
/**
|
|
11
16
|
* @typedef {PromiseSpaceOf<{
|
|
12
17
|
* auctionUpgradeNewInstance: Instance;
|
|
@@ -17,8 +22,7 @@ const trace = makeTracer('NewAuction', true);
|
|
|
17
22
|
*/
|
|
18
23
|
|
|
19
24
|
/**
|
|
20
|
-
* @param {
|
|
21
|
-
* interlockPowers} powers
|
|
25
|
+
* @param {EconomyBootstrapPowers & interlockPowers} powers
|
|
22
26
|
* @param {{
|
|
23
27
|
* options: {
|
|
24
28
|
* contractGovernorRef: { bundleID: string };
|
|
@@ -123,6 +127,7 @@ export const addAuction = async (
|
|
|
123
127
|
const timerBrand = await E(chainTimerService).getTimerBrand();
|
|
124
128
|
|
|
125
129
|
const storageNode = await makeStorageNodeChild(chainStorage, STORAGE_PATH);
|
|
130
|
+
/** @type {Remote<Marshaller>} */
|
|
126
131
|
const marshaller = await E(board).getReadonlyMarshaller();
|
|
127
132
|
|
|
128
133
|
const reservePublicFacet = await E(zoe).getPublicFacet(reserveInstance);
|
|
@@ -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
|
|
|
@@ -479,7 +485,6 @@ export const startRewardDistributor = async ({
|
|
|
479
485
|
const instanceKit = await E(zoe).startInstance(
|
|
480
486
|
feeDistributor,
|
|
481
487
|
{ Fee: centralIssuer },
|
|
482
|
-
// @ts-expect-error XXX
|
|
483
488
|
feeDistributorTerms,
|
|
484
489
|
undefined,
|
|
485
490
|
'feeDistributor',
|