@agoric/inter-protocol 0.16.2-dev-6415ef6.0 → 0.16.2-dev-da89a20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +15 -15
- package/src/econCommitteeCharter.d.ts +4 -3
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +1 -1
- package/src/price/fluxAggregatorContract.d.ts +1 -0
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +2 -0
- package/src/proposals/add-auction.d.ts +14 -15
- package/src/proposals/add-auction.d.ts.map +1 -1
- package/src/proposals/add-auction.js +58 -59
- package/src/proposals/addAssetToVault.d.ts +14 -1
- package/src/proposals/addAssetToVault.d.ts.map +1 -1
- package/src/proposals/addAssetToVault.js +20 -2
- package/src/proposals/deploy-price-feeds.d.ts +76 -0
- package/src/proposals/deploy-price-feeds.d.ts.map +1 -0
- package/src/proposals/deploy-price-feeds.js +312 -0
- package/src/proposals/price-feed-proposal.d.ts.map +1 -1
- package/src/proposals/price-feed-proposal.js +2 -1
- package/src/proposals/replace-scaledPriceAuthorities.d.ts +30 -0
- package/src/proposals/replace-scaledPriceAuthorities.d.ts.map +1 -0
- package/src/proposals/replace-scaledPriceAuthorities.js +124 -0
- package/src/proposals/upgrade-vaults.d.ts +19 -10
- package/src/proposals/upgrade-vaults.d.ts.map +1 -1
- package/src/proposals/upgrade-vaults.js +66 -80
- package/src/proposals/utils.d.ts +2 -0
- package/src/proposals/utils.d.ts.map +1 -1
- package/src/proposals/utils.js +8 -0
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +1 -0
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-da89a20.0+da89a20",
|
|
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-da89a20.0+da89a20",
|
|
35
|
+
"@agoric/governance": "0.10.4-dev-da89a20.0+da89a20",
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-da89a20.0+da89a20",
|
|
37
|
+
"@agoric/notifier": "0.6.3-dev-da89a20.0+da89a20",
|
|
38
|
+
"@agoric/store": "0.9.3-dev-da89a20.0+da89a20",
|
|
39
|
+
"@agoric/time": "0.3.3-dev-da89a20.0+da89a20",
|
|
40
|
+
"@agoric/vat-data": "0.5.3-dev-da89a20.0+da89a20",
|
|
41
|
+
"@agoric/vats": "0.15.2-dev-da89a20.0+da89a20",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-da89a20.0+da89a20",
|
|
43
43
|
"@endo/captp": "^4.3.0",
|
|
44
44
|
"@endo/errors": "^1.2.5",
|
|
45
45
|
"@endo/eventual-send": "^1.2.5",
|
|
@@ -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-da89a20.0+da89a20",
|
|
54
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-da89a20.0+da89a20",
|
|
55
|
+
"@agoric/swingset-vat": "0.32.3-dev-da89a20.0+da89a20",
|
|
56
|
+
"@agoric/zone": "0.2.3-dev-da89a20.0+da89a20",
|
|
57
57
|
"@endo/bundle-source": "^3.4.0",
|
|
58
58
|
"@endo/init": "^1.1.4",
|
|
59
59
|
"@endo/promise-kit": "^1.1.5",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"typeCoverage": {
|
|
85
85
|
"atLeast": 95.8
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "da89a207e62599dab3984d298e35c40d958edb4d"
|
|
88
88
|
}
|
|
@@ -30,10 +30,11 @@ export type ParamChangesOfferArgs = {
|
|
|
30
30
|
deadline: bigint;
|
|
31
31
|
instance: Instance;
|
|
32
32
|
params: Record<string, unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* paramPath is determined by contract
|
|
35
|
+
*/
|
|
33
36
|
path?: {
|
|
34
|
-
paramPath:
|
|
35
|
-
key: string;
|
|
36
|
-
};
|
|
37
|
+
paramPath: unknown;
|
|
37
38
|
} | undefined;
|
|
38
39
|
};
|
|
39
40
|
//# sourceMappingURL=econCommitteeCharter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"econCommitteeCharter.d.ts","sourceRoot":"","sources":["econCommitteeCharter.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AAEH,iEAAkE;AAoBlE,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAMnC;AAQK,2BAJI,GAAG,CAAC;IAAE,6BAA6B,EAAE,YAAY,CAAA;CAAE,CAAC,eACpD,SAAS,WACT,OAAO,kBAAkB,EAAE,OAAO;;QAsHvC;;;;WAIG;wCAHQ,QAAQ,iBACR,oBAAoB,CAAC,GAAG,CAAC;;;;;0CAxE7B,QAAQ,cACR,MAAM,cACN,MAAM,EAAE,YACR,OAAO,cAAc,EAAE,cAAc;;;;GAkFjD;;cAjKa,MAAM;cACN,QAAQ;YACR,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"econCommitteeCharter.d.ts","sourceRoot":"","sources":["econCommitteeCharter.js"],"names":[],"mappings":"AAaA;;;;;GAKG;AAEH,iEAAkE;AAoBlE,yCAAyC;AACzC,mBADW,YAAY,CAAC,OAAO,KAAK,CAAC,CAMnC;AAQK,2BAJI,GAAG,CAAC;IAAE,6BAA6B,EAAE,YAAY,CAAA;CAAE,CAAC,eACpD,SAAS,WACT,OAAO,kBAAkB,EAAE,OAAO;;QAsHvC;;;;WAIG;wCAHQ,QAAQ,iBACR,oBAAoB,CAAC,GAAG,CAAC;;;;;0CAxE7B,QAAQ,cACR,MAAM,cACN,MAAM,EAAE,YACR,OAAO,cAAc,EAAE,cAAc;;;;GAkFjD;;cAjKa,MAAM;cACN,QAAQ;YACR,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;mBACV,OAAO"}
|
|
@@ -25,7 +25,7 @@ export const INVITATION_MAKERS_DESC = 'charter member invitation';
|
|
|
25
25
|
* @property {bigint} deadline
|
|
26
26
|
* @property {Instance} instance
|
|
27
27
|
* @property {Record<string, unknown>} params
|
|
28
|
-
* @property {{ paramPath:
|
|
28
|
+
* @property {{ paramPath: unknown }} [path] paramPath is determined by contract
|
|
29
29
|
*/
|
|
30
30
|
const ParamChangesOfferArgsShape = M.splitRecord(
|
|
31
31
|
{
|
|
@@ -65,6 +65,7 @@ export function start(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig
|
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
67
|
}>;
|
|
68
|
+
export type FluxStartFn = typeof start;
|
|
68
69
|
import type { TimerService } from '@agoric/time';
|
|
69
70
|
import type { Baggage } from '@agoric/vat-data';
|
|
70
71
|
//# sourceMappingURL=fluxAggregatorContract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAcA;;;GAGG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAmBrB;AA0BK,2BAlBI,GAAG,CACb,OAAW,wBAAwB,EAAE,eAAe,GAAG;IACjD,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,OAAO,0CAA0C,EAAE,sBAAsB,CAAC;IACvG,sBAAsB,EAAE,UAAU,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7B,mBAAmB,EAAE,IAAI,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC,CAAC;IAC5D,WAAW,EAAE,WAAW,CAAC;CAC1B,WACO,OAAO;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAcA;;;GAGG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAmBrB;AA0BK,2BAlBI,GAAG,CACb,OAAW,wBAAwB,EAAE,eAAe,GAAG;IACjD,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,OAAO,0CAA0C,EAAE,sBAAsB,CAAC;IACvG,sBAAsB,EAAE,UAAU,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7B,mBAAmB,EAAE,IAAI,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC,CAAC;IAC5D,WAAW,EAAE,WAAW,CAAC;CAC1B,WACO,OAAO;;;;;;;;;;;;;;;6CAyI8vF,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAJnyF;0BAGa,OAAO,KAAK;kCAtLK,cAAc;6BADnB,kBAAkB"}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
export function addAuction({ consume: { agoricNamesAdmin, auctioneerKit: legacyKitP, board, chainStorage, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, econCharterKit,
|
|
2
|
-
options: {
|
|
3
|
-
auctionsRef: {
|
|
4
|
-
bundleID: string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
}): Promise<void>;
|
|
1
|
+
export function addAuction({ consume: { agoricNamesAdmin, auctioneerKit: legacyKitP, board, chainStorage, chainTimerService, economicCommitteeCreatorFacet: electorateCreatorFacet, econCharterKit, priceAuthority8400, zoe, }, produce: { auctioneerKit: produceAuctioneerKit, auctionUpgradeNewInstance }, instance: { consume: { reserve: reserveInstance }, produce: { auctioneer: auctionInstance }, }, installation: { consume: { auctioneer: auctioneerInstallationP, contractGovernor: governorInstallationP, }, }, issuer: { consume: { [Stable.symbol]: stableIssuerP }, }, }: import("./econ-behaviors.js").EconomyBootstrapPowers & interlockPowers): Promise<void>;
|
|
8
2
|
export const ADD_AUCTION_MANIFEST: {
|
|
9
3
|
[x: string]: {
|
|
10
4
|
consume: {
|
|
@@ -15,7 +9,7 @@ export const ADD_AUCTION_MANIFEST: {
|
|
|
15
9
|
chainTimerService: boolean;
|
|
16
10
|
econCharterKit: boolean;
|
|
17
11
|
economicCommitteeCreatorFacet: boolean;
|
|
18
|
-
|
|
12
|
+
priceAuthority8400: boolean;
|
|
19
13
|
zoe: boolean;
|
|
20
14
|
};
|
|
21
15
|
produce: {
|
|
@@ -33,8 +27,6 @@ export const ADD_AUCTION_MANIFEST: {
|
|
|
33
27
|
installation: {
|
|
34
28
|
consume: {
|
|
35
29
|
contractGovernor: boolean;
|
|
36
|
-
};
|
|
37
|
-
produce: {
|
|
38
30
|
auctioneer: boolean;
|
|
39
31
|
};
|
|
40
32
|
};
|
|
@@ -45,7 +37,9 @@ export const ADD_AUCTION_MANIFEST: {
|
|
|
45
37
|
};
|
|
46
38
|
};
|
|
47
39
|
};
|
|
48
|
-
export function getManifestForAddAuction(
|
|
40
|
+
export function getManifestForAddAuction({ restoreRef }: {
|
|
41
|
+
restoreRef: any;
|
|
42
|
+
}, { auctioneerRef, contractGovernorRef }: any): Promise<{
|
|
49
43
|
manifest: {
|
|
50
44
|
[x: string]: {
|
|
51
45
|
consume: {
|
|
@@ -56,7 +50,7 @@ export function getManifestForAddAuction(_ign: object, addAuctionOptions: any):
|
|
|
56
50
|
chainTimerService: boolean;
|
|
57
51
|
econCharterKit: boolean;
|
|
58
52
|
economicCommitteeCreatorFacet: boolean;
|
|
59
|
-
|
|
53
|
+
priceAuthority8400: boolean;
|
|
60
54
|
zoe: boolean;
|
|
61
55
|
};
|
|
62
56
|
produce: {
|
|
@@ -74,8 +68,6 @@ export function getManifestForAddAuction(_ign: object, addAuctionOptions: any):
|
|
|
74
68
|
installation: {
|
|
75
69
|
consume: {
|
|
76
70
|
contractGovernor: boolean;
|
|
77
|
-
};
|
|
78
|
-
produce: {
|
|
79
71
|
auctioneer: boolean;
|
|
80
72
|
};
|
|
81
73
|
};
|
|
@@ -86,7 +78,14 @@ export function getManifestForAddAuction(_ign: object, addAuctionOptions: any):
|
|
|
86
78
|
};
|
|
87
79
|
};
|
|
88
80
|
};
|
|
89
|
-
options:
|
|
81
|
+
options: {
|
|
82
|
+
auctioneerRef: any;
|
|
83
|
+
contractGovernorRef: any;
|
|
84
|
+
};
|
|
85
|
+
installations: {
|
|
86
|
+
auctioneer: any;
|
|
87
|
+
contractGovernor: any;
|
|
88
|
+
};
|
|
90
89
|
}>;
|
|
91
90
|
export type interlockPowers = PromiseSpaceOf<{
|
|
92
91
|
auctionUpgradeNewInstance: Instance;
|
|
@@ -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":"AAkBO,yjBAHI,OAAO,qBAAqB,EAAE,sBAAsB,GAC1D,eAAe,iBAqKnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BG;AASI,yDAHJ;IAAmB,UAAU,EAArB,GAAG;CACX,0CAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAcb;8BA/NY,cAAc,CAAC;IACvB,yBAAyB,EAAE,QAAQ,CAAC;CACrC,CAAC;uBARkB,gCAAgC"}
|
|
@@ -15,61 +15,52 @@ const trace = makeTracer('NewAuction', true);
|
|
|
15
15
|
/**
|
|
16
16
|
* @param {import('./econ-behaviors.js').EconomyBootstrapPowers &
|
|
17
17
|
* interlockPowers} powers
|
|
18
|
-
* @param {{ options: { auctionsRef: { bundleID: string } } }} options
|
|
19
18
|
*/
|
|
20
|
-
export const addAuction = async (
|
|
21
|
-
{
|
|
19
|
+
export const addAuction = async ({
|
|
20
|
+
consume: {
|
|
21
|
+
agoricNamesAdmin,
|
|
22
|
+
auctioneerKit: legacyKitP,
|
|
23
|
+
board,
|
|
24
|
+
chainStorage,
|
|
25
|
+
chainTimerService,
|
|
26
|
+
economicCommitteeCreatorFacet: electorateCreatorFacet,
|
|
27
|
+
econCharterKit,
|
|
28
|
+
priceAuthority8400,
|
|
29
|
+
zoe,
|
|
30
|
+
},
|
|
31
|
+
produce: { auctioneerKit: produceAuctioneerKit, auctionUpgradeNewInstance },
|
|
32
|
+
instance: {
|
|
33
|
+
consume: { reserve: reserveInstance },
|
|
34
|
+
produce: { auctioneer: auctionInstance },
|
|
35
|
+
},
|
|
36
|
+
installation: {
|
|
22
37
|
consume: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
board,
|
|
26
|
-
chainStorage,
|
|
27
|
-
chainTimerService,
|
|
28
|
-
economicCommitteeCreatorFacet: electorateCreatorFacet,
|
|
29
|
-
econCharterKit,
|
|
30
|
-
priceAuthority,
|
|
31
|
-
zoe,
|
|
32
|
-
},
|
|
33
|
-
produce: { auctioneerKit: produceAuctioneerKit, auctionUpgradeNewInstance },
|
|
34
|
-
instance: {
|
|
35
|
-
consume: { reserve: reserveInstance },
|
|
36
|
-
produce: { auctioneer: auctionInstance },
|
|
37
|
-
},
|
|
38
|
-
installation: {
|
|
39
|
-
consume: { contractGovernor: contractGovernorInstallation },
|
|
40
|
-
produce: { auctioneer: produceInstallation },
|
|
41
|
-
},
|
|
42
|
-
issuer: {
|
|
43
|
-
consume: { [Stable.symbol]: stableIssuerP },
|
|
38
|
+
auctioneer: auctioneerInstallationP,
|
|
39
|
+
contractGovernor: governorInstallationP,
|
|
44
40
|
},
|
|
45
41
|
},
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
issuer: {
|
|
43
|
+
consume: { [Stable.symbol]: stableIssuerP },
|
|
44
|
+
},
|
|
45
|
+
}) => {
|
|
46
|
+
trace('addAuction start');
|
|
49
47
|
const STORAGE_PATH = 'auction';
|
|
50
|
-
const { auctionsRef } = options;
|
|
51
48
|
|
|
52
49
|
const poserInvitationP = E(electorateCreatorFacet).getPoserInvitation();
|
|
53
|
-
const bundleID = auctionsRef.bundleID;
|
|
54
|
-
/**
|
|
55
|
-
* @type {Promise<
|
|
56
|
-
* Installation<import('../../src/auction/auctioneer.js')['start']>
|
|
57
|
-
* >}
|
|
58
|
-
*/
|
|
59
|
-
const installationP = E(zoe).installBundleID(bundleID);
|
|
60
|
-
produceInstallation.reset();
|
|
61
|
-
produceInstallation.resolve(installationP);
|
|
62
|
-
|
|
63
50
|
const [
|
|
64
51
|
initialPoserInvitation,
|
|
65
52
|
electorateInvitationAmount,
|
|
66
53
|
stableIssuer,
|
|
67
54
|
legacyKit,
|
|
55
|
+
auctioneerInstallation,
|
|
56
|
+
governorInstallation,
|
|
68
57
|
] = await Promise.all([
|
|
69
58
|
poserInvitationP,
|
|
70
59
|
E(E(zoe).getInvitationIssuer()).getAmountOf(poserInvitationP),
|
|
71
60
|
stableIssuerP,
|
|
72
61
|
legacyKitP,
|
|
62
|
+
auctioneerInstallationP,
|
|
63
|
+
governorInstallationP,
|
|
73
64
|
]);
|
|
74
65
|
|
|
75
66
|
// Each field has an extra layer of type + value:
|
|
@@ -95,7 +86,7 @@ export const addAuction = async (
|
|
|
95
86
|
const auctionTerms = makeGovernedATerms(
|
|
96
87
|
{ storageNode, marshaller },
|
|
97
88
|
chainTimerService,
|
|
98
|
-
|
|
89
|
+
priceAuthority8400,
|
|
99
90
|
reservePublicFacet,
|
|
100
91
|
{
|
|
101
92
|
...params,
|
|
@@ -104,12 +95,10 @@ export const addAuction = async (
|
|
|
104
95
|
},
|
|
105
96
|
);
|
|
106
97
|
|
|
107
|
-
const installation = await installationP;
|
|
108
|
-
|
|
109
98
|
const governorTerms = await deeplyFulfilledObject(
|
|
110
99
|
harden({
|
|
111
100
|
timer: chainTimerService,
|
|
112
|
-
governedContractInstallation:
|
|
101
|
+
governedContractInstallation: auctioneerInstallation,
|
|
113
102
|
governed: {
|
|
114
103
|
terms: auctionTerms,
|
|
115
104
|
issuerKeywordRecord: { Bid: stableIssuer },
|
|
@@ -120,9 +109,9 @@ export const addAuction = async (
|
|
|
120
109
|
}),
|
|
121
110
|
);
|
|
122
111
|
|
|
123
|
-
/** @type {GovernorStartedInstallationKit<typeof
|
|
112
|
+
/** @type {GovernorStartedInstallationKit<typeof auctioneerInstallationP>} */
|
|
124
113
|
const governorStartResult = await E(zoe).startInstance(
|
|
125
|
-
|
|
114
|
+
governorInstallation,
|
|
126
115
|
undefined,
|
|
127
116
|
governorTerms,
|
|
128
117
|
harden({
|
|
@@ -136,12 +125,17 @@ export const addAuction = async (
|
|
|
136
125
|
'auctioneer.governor',
|
|
137
126
|
);
|
|
138
127
|
|
|
139
|
-
const [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
128
|
+
const [
|
|
129
|
+
governedInstance,
|
|
130
|
+
governedCreatorFacet,
|
|
131
|
+
governedPublicFacet,
|
|
132
|
+
governedAdminFacet,
|
|
133
|
+
] = await Promise.all([
|
|
134
|
+
E(governorStartResult.creatorFacet).getInstance(),
|
|
135
|
+
E(governorStartResult.creatorFacet).getCreatorFacet(),
|
|
136
|
+
E(governorStartResult.creatorFacet).getPublicFacet(),
|
|
137
|
+
E(governorStartResult.creatorFacet).getAdminFacet(),
|
|
138
|
+
]);
|
|
145
139
|
|
|
146
140
|
const allIssuers = await E(zoe).getIssuers(legacyKit.instance);
|
|
147
141
|
const { Bid: _istIssuer, ...auctionIssuers } = allIssuers;
|
|
@@ -157,7 +151,7 @@ export const addAuction = async (
|
|
|
157
151
|
const kit = harden({
|
|
158
152
|
label: 'auctioneer',
|
|
159
153
|
creatorFacet: governedCreatorFacet,
|
|
160
|
-
adminFacet:
|
|
154
|
+
adminFacet: governedAdminFacet,
|
|
161
155
|
publicFacet: governedPublicFacet,
|
|
162
156
|
instance: governedInstance,
|
|
163
157
|
|
|
@@ -197,7 +191,7 @@ export const ADD_AUCTION_MANIFEST = harden({
|
|
|
197
191
|
chainTimerService: true,
|
|
198
192
|
econCharterKit: true,
|
|
199
193
|
economicCommitteeCreatorFacet: true,
|
|
200
|
-
|
|
194
|
+
priceAuthority8400: true,
|
|
201
195
|
zoe: true,
|
|
202
196
|
},
|
|
203
197
|
produce: {
|
|
@@ -209,10 +203,7 @@ export const ADD_AUCTION_MANIFEST = harden({
|
|
|
209
203
|
produce: { auctioneer: true },
|
|
210
204
|
},
|
|
211
205
|
installation: {
|
|
212
|
-
consume: {
|
|
213
|
-
contractGovernor: true,
|
|
214
|
-
},
|
|
215
|
-
produce: { auctioneer: true },
|
|
206
|
+
consume: { contractGovernor: true, auctioneer: true },
|
|
216
207
|
},
|
|
217
208
|
issuer: {
|
|
218
209
|
consume: { [Stable.symbol]: true },
|
|
@@ -223,12 +214,20 @@ export const ADD_AUCTION_MANIFEST = harden({
|
|
|
223
214
|
/**
|
|
224
215
|
* Add a new auction to a chain that already has one.
|
|
225
216
|
*
|
|
226
|
-
* @param {object}
|
|
217
|
+
* @param {object} utils
|
|
218
|
+
* @param {any} utils.restoreRef
|
|
227
219
|
* @param {any} addAuctionOptions
|
|
228
220
|
*/
|
|
229
|
-
export const getManifestForAddAuction = async (
|
|
221
|
+
export const getManifestForAddAuction = async (
|
|
222
|
+
{ restoreRef },
|
|
223
|
+
{ auctioneerRef, contractGovernorRef },
|
|
224
|
+
) => {
|
|
230
225
|
return {
|
|
231
226
|
manifest: ADD_AUCTION_MANIFEST,
|
|
232
|
-
options:
|
|
227
|
+
options: { auctioneerRef, contractGovernorRef },
|
|
228
|
+
installations: {
|
|
229
|
+
auctioneer: restoreRef(auctioneerRef),
|
|
230
|
+
contractGovernor: restoreRef(contractGovernorRef),
|
|
231
|
+
},
|
|
233
232
|
};
|
|
234
233
|
};
|
|
@@ -9,10 +9,23 @@ export function publishInterchainAssetFromBank({ consume: { bankManager, agoricN
|
|
|
9
9
|
interchainAssetOptions: InterchainAssetOptions;
|
|
10
10
|
};
|
|
11
11
|
}): Promise<void>;
|
|
12
|
-
export function
|
|
12
|
+
export function startScaledPriceAuthority({ consume: { agoricNamesAdmin, startUpgradable, priceAuthorityAdmin, priceAuthority, }, }: BootstrapPowers, { options: { interchainAssetOptions } }: {
|
|
13
13
|
options: {
|
|
14
14
|
interchainAssetOptions: InterchainAssetOptions;
|
|
15
15
|
};
|
|
16
|
+
}): Promise<{
|
|
17
|
+
instance: import("@agoric/zoe/src/zoeService/utils.js").Instance<import("@agoric/zoe/src/zoeService/utils.js").ContractStartFunction>;
|
|
18
|
+
adminFacet: import("@agoric/zoe/src/zoeService/utils.js").AdminFacet<import("@agoric/zoe/src/zoeService/utils.js").ContractStartFunction>;
|
|
19
|
+
creatorFacet: {};
|
|
20
|
+
publicFacet: {};
|
|
21
|
+
} & {
|
|
22
|
+
creatorFacet?: {};
|
|
23
|
+
publicFacet?: {};
|
|
24
|
+
} & {
|
|
25
|
+
label: string;
|
|
26
|
+
}>;
|
|
27
|
+
export function registerScaledPriceAuthority(powers: BootstrapPowers, { options }: {
|
|
28
|
+
options: object;
|
|
16
29
|
}): Promise<void>;
|
|
17
30
|
export function addAssetToVault({ consume: { vaultFactoryKit, agoricNamesAdmin, auctioneerKit, chainTimerService, }, brand: { consume: { [Stable.symbol]: stableP }, }, instance: { consume: consumeInstance }, }: EconomyBootstrapPowers, { options: { debtLimitValue, interestRateValue, interchainAssetOptions, }, }: {
|
|
18
31
|
options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAssetToVault.d.ts","sourceRoot":"","sources":["addAssetToVault.js"],"names":[],"mappings":";AA4CO,4FALI,eAAe,2CAEvB;IAAuB,OAAO,EAC9B;QAA+C,sBAAsB,EAA7D,sBAAsB;KAChC;CAAA,yBAsBA;AAQM,yKALI,sBAAsB,2CAE9B;IAAuB,OAAO,EAC9B;QAA+C,sBAAsB,EAA7D,sBAAsB;KAChC;CAAA,iBAmDA;AAQM,
|
|
1
|
+
{"version":3,"file":"addAssetToVault.d.ts","sourceRoot":"","sources":["addAssetToVault.js"],"names":[],"mappings":";AA4CO,4FALI,eAAe,2CAEvB;IAAuB,OAAO,EAC9B;QAA+C,sBAAsB,EAA7D,sBAAsB;KAChC;CAAA,yBAsBA;AAQM,yKALI,sBAAsB,2CAE9B;IAAuB,OAAO,EAC9B;QAA+C,sBAAsB,EAA7D,sBAAsB;KAChC;CAAA,iBAmDA;AAQM,qIALI,eAAe,2CAEvB;IAAuB,OAAO,EAC9B;QAA+C,sBAAsB,EAA7D,sBAAsB;KAChC;CAAA;;;;;;;;;;GAuGA;AAOM,qDAJI,eAAe,eAEvB;IAAuB,OAAO,EAAtB,MAAM;CAChB,iBAgBA;AA+EM,mNAPI,sBAAsB,gFAE9B;IAAuB,OAAO,EAC9B;QAA+C,sBAAsB,EAA7D,sBAAsB;QACmB,cAAc,EAAvD,MAAM,GAAG,MAAM,GAAG,MAAM;QACD,iBAAiB,EAAxC,MAAM;KAChB;CAAA,iBAyEA;AAEM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8EN;;;;;;;;aA1ca,MAAM;;;;;;;;;;;;;;;;4CAQsB,qBAAqB;uBAzBxC,gCAAgC"}
|
|
@@ -129,7 +129,7 @@ export const publishInterchainAssetFromBank = async (
|
|
|
129
129
|
* @param {object} config.options
|
|
130
130
|
* @param {InterchainAssetOptions} config.options.interchainAssetOptions
|
|
131
131
|
*/
|
|
132
|
-
export const
|
|
132
|
+
export const startScaledPriceAuthority = async (
|
|
133
133
|
{
|
|
134
134
|
consume: {
|
|
135
135
|
agoricNamesAdmin,
|
|
@@ -137,7 +137,6 @@ export const registerScaledPriceAuthority = async (
|
|
|
137
137
|
priceAuthorityAdmin,
|
|
138
138
|
priceAuthority,
|
|
139
139
|
},
|
|
140
|
-
instance: { produce: produceInstance },
|
|
141
140
|
},
|
|
142
141
|
{ options: { interchainAssetOptions } },
|
|
143
142
|
) => {
|
|
@@ -231,6 +230,25 @@ export const registerScaledPriceAuthority = async (
|
|
|
231
230
|
true, // force
|
|
232
231
|
);
|
|
233
232
|
|
|
233
|
+
return spaKit;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @param {BootstrapPowers} powers
|
|
238
|
+
* @param {object} config
|
|
239
|
+
* @param {object} config.options
|
|
240
|
+
*/
|
|
241
|
+
export const registerScaledPriceAuthority = async (powers, { options }) => {
|
|
242
|
+
const {
|
|
243
|
+
instance: { produce: produceInstance },
|
|
244
|
+
} = powers;
|
|
245
|
+
|
|
246
|
+
const { keyword, issuerName = keyword } = options.interchainAssetOptions;
|
|
247
|
+
|
|
248
|
+
const spaKit = await startScaledPriceAuthority(powers, { options });
|
|
249
|
+
|
|
250
|
+
const label = scaledPriceFeedName(issuerName);
|
|
251
|
+
|
|
234
252
|
// publish into agoricNames so that others can await its presence.
|
|
235
253
|
// This must stay after registerPriceAuthority above so it's evidence of registration.
|
|
236
254
|
// eslint-disable-next-line no-restricted-syntax -- computed property
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** @type {ChainlinkConfig} */
|
|
2
|
+
export const DEFAULT_CONTRACT_TERMS: ChainlinkConfig;
|
|
3
|
+
export function ensureOracleBrand({ namedVat: { consume: { agoricNames }, }, oracleBrand: { produce: oracleBrandProduce }, }: EconomyBootstrapPowers & NamedVatPowers, { name, decimalPlaces }: {
|
|
4
|
+
name: string;
|
|
5
|
+
decimalPlaces: number;
|
|
6
|
+
}): Promise<Brand<"nat">>;
|
|
7
|
+
export function deployPriceFeeds(powers: EconomyBootstrapPowers & NamedVatPowers, config: {
|
|
8
|
+
options: PriceFeedConfig & {
|
|
9
|
+
priceAggregatorRef: {
|
|
10
|
+
bundleID: string;
|
|
11
|
+
};
|
|
12
|
+
scaledPARef: {
|
|
13
|
+
bundleID: string;
|
|
14
|
+
};
|
|
15
|
+
inBrandsDecimals?: number;
|
|
16
|
+
contractTerms?: ChainlinkConfig;
|
|
17
|
+
outBrandName?: string;
|
|
18
|
+
outBrandDecimals?: number;
|
|
19
|
+
};
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
export function getManifestForPriceFeeds({ restoreRef: _restoreRef }: {
|
|
22
|
+
restoreRef: any;
|
|
23
|
+
}, priceFeedOptions: PriceFeedConfig & {
|
|
24
|
+
priceAggregatorRef: any;
|
|
25
|
+
}): Promise<{
|
|
26
|
+
manifest: {
|
|
27
|
+
[x: string]: {
|
|
28
|
+
namedVat: string;
|
|
29
|
+
consume: {
|
|
30
|
+
agoricNamesAdmin: string;
|
|
31
|
+
agoricNames: string;
|
|
32
|
+
board: string;
|
|
33
|
+
chainStorage: string;
|
|
34
|
+
chainTimerService: string;
|
|
35
|
+
contractKits: string;
|
|
36
|
+
econCharterKit: string;
|
|
37
|
+
highPrioritySendersManager: string;
|
|
38
|
+
instancePrivateArgs: string;
|
|
39
|
+
namesByAddressAdmin: string;
|
|
40
|
+
priceAuthority: string;
|
|
41
|
+
priceAuthorityAdmin: string;
|
|
42
|
+
startGovernedUpgradable: string;
|
|
43
|
+
startUpgradable: string;
|
|
44
|
+
zoe: string;
|
|
45
|
+
};
|
|
46
|
+
installation: {
|
|
47
|
+
produce: {
|
|
48
|
+
priceAggregator: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
instance: {
|
|
52
|
+
produce: string;
|
|
53
|
+
};
|
|
54
|
+
oracleBrand: {
|
|
55
|
+
produce: string;
|
|
56
|
+
};
|
|
57
|
+
produce: {
|
|
58
|
+
priceAuthority8400: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
options: {
|
|
63
|
+
oracleAddresses: string[];
|
|
64
|
+
inBrandNames: string[];
|
|
65
|
+
contractTerms?: Partial<ChainlinkConfig>;
|
|
66
|
+
priceAggregatorRef: any;
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
69
|
+
export type PriceFeedConfig = {
|
|
70
|
+
oracleAddresses: string[];
|
|
71
|
+
inBrandNames: string[];
|
|
72
|
+
contractTerms?: Partial<ChainlinkConfig>;
|
|
73
|
+
};
|
|
74
|
+
import type { ChainlinkConfig } from '@agoric/inter-protocol/src/price/fluxAggregatorKit.js';
|
|
75
|
+
import type { EconomyBootstrapPowers } from './econ-behaviors.js';
|
|
76
|
+
//# sourceMappingURL=deploy-price-feeds.d.ts.map
|
|
@@ -0,0 +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,iBAgEH;AAWM,sEAHJ;IAAmB,UAAU,EAArB,GAAG;CACX,oBAAQ,eAAe,GAAG;IAAE,kBAAkB,EAAE,GAAG,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBApPlC,MAAM,EAAE;sBACX,MAAM,EAAE;wBACN,OAAO,CAAC,eAAe,CAAC;4BAkPM,GAAG;;GAmCpD;8BAxRW;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"}
|