@agoric/inter-protocol 0.16.2-dev-8358d20.0 → 0.16.2-dev-5eb596e.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.
Files changed (39) hide show
  1. package/bundles/bundle-auctioneer-js-meta.json +130 -118
  2. package/bundles/bundle-auctioneer.js +1 -1
  3. package/bundles/bundle-econCommitteeCharter-js-meta.json +84 -72
  4. package/bundles/bundle-econCommitteeCharter.js +1 -1
  5. package/bundles/bundle-feeDistributor-js-meta.json +70 -58
  6. package/bundles/bundle-feeDistributor.js +1 -1
  7. package/bundles/bundle-fluxAggregatorKit-js-meta.json +124 -112
  8. package/bundles/bundle-fluxAggregatorKit.js +1 -1
  9. package/bundles/bundle-psm-js-meta.json +122 -110
  10. package/bundles/bundle-psm.js +1 -1
  11. package/bundles/bundle-reserve-js-meta.json +121 -109
  12. package/bundles/bundle-reserve.js +1 -1
  13. package/bundles/bundle-scaledPriceAuthority-js-meta.json +91 -79
  14. package/bundles/bundle-scaledPriceAuthority.js +1 -1
  15. package/bundles/bundle-vaultFactory-js-meta.json +150 -138
  16. package/bundles/bundle-vaultFactory.js +1 -1
  17. package/package.json +17 -17
  18. package/src/econCommitteeCharter.d.ts +3 -5
  19. package/src/econCommitteeCharter.d.ts.map +1 -1
  20. package/src/econCommitteeCharter.js +10 -5
  21. package/src/feeDistributor.d.ts +2 -8
  22. package/src/feeDistributor.d.ts.map +1 -1
  23. package/src/feeDistributor.js +9 -6
  24. package/src/price/fluxAggregatorContract.d.ts +3 -2
  25. package/src/price/fluxAggregatorContract.d.ts.map +1 -1
  26. package/src/price/fluxAggregatorContract.js +23 -18
  27. package/src/proposals/econ-behaviors.d.ts +6 -6
  28. package/src/proposals/econ-behaviors.d.ts.map +1 -1
  29. package/src/proposals/econ-behaviors.js +6 -6
  30. package/src/proposals/price-feed-proposal.js +1 -1
  31. package/src/psm/psm.d.ts +26 -33
  32. package/src/psm/psm.d.ts.map +1 -1
  33. package/src/psm/psm.js +35 -32
  34. package/src/reserve/assetReserve.d.ts +5 -3
  35. package/src/reserve/assetReserve.d.ts.map +1 -1
  36. package/src/reserve/assetReserve.js +10 -4
  37. package/src/vaultFactory/vaultFactory.d.ts +4 -3
  38. package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
  39. package/src/vaultFactory/vaultFactory.js +20 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/inter-protocol",
3
- "version": "0.16.2-dev-8358d20.0+8358d20",
3
+ "version": "0.16.2-dev-5eb596e.0+5eb596e",
4
4
  "description": "Core cryptoeconomy contracts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -32,15 +32,15 @@
32
32
  },
33
33
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
34
34
  "dependencies": {
35
- "@agoric/assert": "0.6.1-dev-8358d20.0+8358d20",
36
- "@agoric/ertp": "0.16.3-dev-8358d20.0+8358d20",
37
- "@agoric/governance": "0.10.4-dev-8358d20.0+8358d20",
38
- "@agoric/internal": "0.3.3-dev-8358d20.0+8358d20",
39
- "@agoric/notifier": "0.6.3-dev-8358d20.0+8358d20",
40
- "@agoric/store": "0.9.3-dev-8358d20.0+8358d20",
41
- "@agoric/time": "0.3.3-dev-8358d20.0+8358d20",
42
- "@agoric/vat-data": "0.5.3-dev-8358d20.0+8358d20",
43
- "@agoric/zoe": "0.26.3-dev-8358d20.0+8358d20",
35
+ "@agoric/assert": "0.6.1-dev-5eb596e.0+5eb596e",
36
+ "@agoric/ertp": "0.16.3-dev-5eb596e.0+5eb596e",
37
+ "@agoric/governance": "0.10.4-dev-5eb596e.0+5eb596e",
38
+ "@agoric/internal": "0.3.3-dev-5eb596e.0+5eb596e",
39
+ "@agoric/notifier": "0.6.3-dev-5eb596e.0+5eb596e",
40
+ "@agoric/store": "0.9.3-dev-5eb596e.0+5eb596e",
41
+ "@agoric/time": "0.3.3-dev-5eb596e.0+5eb596e",
42
+ "@agoric/vat-data": "0.5.3-dev-5eb596e.0+5eb596e",
43
+ "@agoric/zoe": "0.26.3-dev-5eb596e.0+5eb596e",
44
44
  "@endo/captp": "^3.1.2",
45
45
  "@endo/eventual-send": "^0.17.3",
46
46
  "@endo/far": "^0.2.19",
@@ -49,12 +49,12 @@
49
49
  "jessie.js": "^0.3.2"
50
50
  },
51
51
  "devDependencies": {
52
- "@agoric/deploy-script-support": "0.10.4-dev-8358d20.0+8358d20",
53
- "@agoric/smart-wallet": "0.5.4-dev-8358d20.0+8358d20",
54
- "@agoric/swingset-liveslots": "0.10.3-dev-8358d20.0+8358d20",
55
- "@agoric/swingset-vat": "0.32.3-dev-8358d20.0+8358d20",
56
- "@agoric/vats": "0.15.2-dev-8358d20.0+8358d20",
57
- "@agoric/zone": "0.2.3-dev-8358d20.0+8358d20",
52
+ "@agoric/deploy-script-support": "0.10.4-dev-5eb596e.0+5eb596e",
53
+ "@agoric/smart-wallet": "0.5.4-dev-5eb596e.0+5eb596e",
54
+ "@agoric/swingset-liveslots": "0.10.3-dev-5eb596e.0+5eb596e",
55
+ "@agoric/swingset-vat": "0.32.3-dev-5eb596e.0+5eb596e",
56
+ "@agoric/vats": "0.15.2-dev-5eb596e.0+5eb596e",
57
+ "@agoric/zone": "0.2.3-dev-5eb596e.0+5eb596e",
58
58
  "@endo/bundle-source": "^2.5.2",
59
59
  "@endo/init": "^0.5.57",
60
60
  "@endo/promise-kit": "^0.2.57",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "8358d208a105af24bc267ba4ef928ca7ecf6a4e3"
84
+ "gitHead": "5eb596e63bf4d5b416d4eff187e87af366b34928"
85
85
  }
@@ -5,10 +5,9 @@
5
5
  * votes into separate capabilities for finer grain encapsulation.
6
6
  */
7
7
  export const INVITATION_MAKERS_DESC: "charter member invitation";
8
- export namespace customTermsShape {
9
- export { InstallationShape as binaryVoteCounterInstallation };
10
- }
11
- export function prepare(zcf: ZCF<{
8
+ /** @type {ContractMeta} */
9
+ export const meta: ContractMeta;
10
+ export function start(zcf: ZCF<{
12
11
  binaryVoteCounterInstallation: Installation;
13
12
  }>, privateArgs: undefined, baggage: MapStore<string, unknown>): Promise<{
14
13
  creatorFacet: {
@@ -39,5 +38,4 @@ export type ParamChangesOfferArgs = {
39
38
  };
40
39
  } | undefined;
41
40
  };
42
- import { InstallationShape } from '@agoric/zoe/src/typeGuards.js';
43
41
  //# sourceMappingURL=econCommitteeCharter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"econCommitteeCharter.d.ts","sourceRoot":"","sources":["econCommitteeCharter.js"],"names":[],"mappings":"AAcA;;;;;GAKG;AAEH,iEAAkE;;;;AA8B3D,6BAJI,IAAI;IAAE,6BAA6B,EAAE,YAAY,CAAA;CAAE,CAAC,eACpD,SAAS;;QAsHd;;;;WAIG;wCAHQ,QAAQ,iBACR,qBAAqB,GAAG,CAAC;;;QAFpC;;;;WAIG;wCAHQ,QAAQ,iBACR,qBAAqB,GAAG,CAAC;;;GAazC;;cA5Ja,MAAM;cACN,QAAQ;YACR,OAAO,MAAM,EAAE,OAAO,CAAC;;mBACV;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE;;;kCAjBnC,+BAA+B"}
1
+ {"version":3,"file":"econCommitteeCharter.d.ts","sourceRoot":"","sources":["econCommitteeCharter.js"],"names":[],"mappings":"AAcA;;;;;GAKG;AAEH,iEAAkE;AAoBlE,2BAA2B;AAC3B,mBADW,YAAY,CAMrB;AAQK,2BAJI,IAAI;IAAE,6BAA6B,EAAE,YAAY,CAAA;CAAE,CAAC,eACpD,SAAS;;QAsHd;;;;WAIG;wCAHQ,QAAQ,iBACR,qBAAqB,GAAG,CAAC;;;QAFpC;;;;WAIG;wCAHQ,QAAQ,iBACR,qBAAqB,GAAG,CAAC;;;GAazC;;cAhKa,MAAM;cACN,QAAQ;YACR,OAAO,MAAM,EAAE,OAAO,CAAC;;mBACV;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE"}
@@ -39,17 +39,21 @@ const ParamChangesOfferArgsShape = M.splitRecord(
39
39
  },
40
40
  );
41
41
 
42
- /** A pattern for Zoe to check custom terms before `start()`ing the contract. */
43
- export const customTermsShape = harden({
44
- binaryVoteCounterInstallation: InstallationShape,
45
- });
42
+ /** @type {ContractMeta} */
43
+ export const meta = {
44
+ customTermsShape: {
45
+ binaryVoteCounterInstallation: InstallationShape,
46
+ },
47
+ upgradability: 'canUpgrade',
48
+ };
49
+ harden(meta);
46
50
 
47
51
  /**
48
52
  * @param {ZCF<{ binaryVoteCounterInstallation: Installation }>} zcf
49
53
  * @param {undefined} privateArgs
50
54
  * @param {import('@agoric/vat-data').Baggage} baggage
51
55
  */
52
- export const prepare = async (zcf, privateArgs, baggage) => {
56
+ export const start = async (zcf, privateArgs, baggage) => {
53
57
  const { binaryVoteCounterInstallation: counter } = zcf.getTerms();
54
58
  /** @type {MapStore<Instance, GovernorCreatorFacet<any>>} */
55
59
  const instanceToGovernor = provideDurableMapStore(
@@ -180,3 +184,4 @@ export const prepare = async (zcf, privateArgs, baggage) => {
180
184
 
181
185
  return harden({ creatorFacet });
182
186
  };
187
+ harden(start);
@@ -1,8 +1,5 @@
1
- export namespace customTermsShape {
2
- export { KeywordSharesShape as keywordShares };
3
- export let timerService: any;
4
- export { RelativeTimeShape as collectionInterval };
5
- }
1
+ /** @type {ContractMeta} */
2
+ export const meta: ContractMeta;
6
3
  export function makeContractFeeCollector(zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>): {
7
4
  collectFees: () => Promise<Payment<any>>;
8
5
  } & import("@endo/eventual-send").RemotableBrand<{}, {
@@ -212,7 +209,4 @@ export type FeeDestination = {
212
209
  export type ShareConfig = ReturnType<typeof makeShareConfig>;
213
210
  export type FeeDistributorCreatorFacet = ReturnType<typeof makeFeeDistributor>['creatorFacet'];
214
211
  export type FeeDistributorPublicFacet = ReturnType<typeof makeFeeDistributor>['publicFacet'];
215
- declare const KeywordSharesShape: import("@endo/patterns").Matcher;
216
- import { RelativeTimeShape } from '@agoric/time';
217
- export {};
218
212
  //# sourceMappingURL=feeDistributor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feeDistributor.d.ts","sourceRoot":"","sources":["feeDistributor.js"],"names":[],"mappings":";;;;;AAgDO,8CAHI,KAAK,UAAU,CAAC,gBAChB,KAAK,wBAAwB,CAAC;;;;GAWxC;AAeM,oDAPI,MAAM,QAAQ,OAAO,CAAC,gBAEtB,KAAK,YAAY,CAAC,wFA+B5B;AASM;;;;;;EAaN;AAWM,sCAJI,QAAQ,KAAK,CAAC,UACd,KAAK,OAAO,KAAK,CAAC,CAAC,2BACnB,WAAW,iBA8DrB;AAUM,8CAPI,KAAK,OAAO,KAAK,CAAC,CAAC;mBAEV,OAAO,OAAO,EAAE,QAAQ,CAAC;kBAC1B,KAAK,YAAY,CAAC;wBACZ,YAAY;;;wCAzJ1B,KAAK,UAAU,CAAC,gBAChB,KAAK,wBAAwB,CAAC;;;;;QA4LrC;;;;;WAKG;6CAFQ,MAAM,cACN,KAAK,YAAY,CAAC;QA6B7B,oEAAoE;oDAAxD,OAAO,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC;;;;;QAQnD;;;;;;;;WAQG;oCALQ,KAAK,UAAU,CAAC,WAChB,MAAM,UACN,OAAO,wBACP,WAAW;;;;;QAsCtB,qEAAqE;2CAAzD,OAAO,OAAO,EAAE,KAAK,cAAc,CAAC,CAAC;QAQjD,iDAAiD;sCAArC,OAAO,OAAO,EAAE,MAAM,CAAC;;wCA1R5B,KAAK,UAAU,CAAC,gBAChB,KAAK,wBAAwB,CAAC;;;;;QA4LrC;;;;;WAKG;6CAFQ,MAAM,cACN,KAAK,YAAY,CAAC;QA6B7B,oEAAoE;oDAAxD,OAAO,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC;;;;;QAQnD;;;;;;;;WAQG;oCALQ,KAAK,UAAU,CAAC,WAChB,MAAM,UACN,OAAO,wBACP,WAAW;;;;;QA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CAAC,YAAY,CAAC;;;;;QAQnD;;;;;;;;WAQG;oCALQ,KAAK,UAAU,CAAC,WAChB,MAAM,UACN,OAAO,wBACP,WAAW;;;;;QAsCtB,qEAAqE;2CAAzD,OAAO,OAAO,EAAE,KAAK,cAAc,CAAC,CAAC;QAQjD,iDAAiD;sCAArC,OAAO,OAAO,EAAE,MAAM,CAAC;;;kCAnHzB,QAAQ,KAAK,CAAC;;;kCAAd,QAAQ,KAAK,CAAC;;;GA0I3B;2BA3UY,OAAO,wBAAwB,EAAE,YAAY;2BAE7C,OAAO,wBAAwB,EAAE,YAAY;;iBAK5C,MAAM,KAAK,QAAQ,KAAK,CAAC,CAAC;;;kBAK1B,MAAM,YAAY;6BAClB,MAAM,QAAQ,IAAI,CAAC;UACnB,MAAM,IAAI;;;+BAKV,MAAM,QAAQ,WAAW,MAAM,EAAE,KAAK,CAAC,CAAC;;;2BAgE1B,OAAO,UAAU,KAAK,MAAM,CAAC,KAAK,QAAQ,MAAM,CAAC;;0BAoB/D,WAAW,sBAAsB,CAAC;yCA6NlC,WAAW,yBAAyB,CAAC,CAAC,cAAc,CAAC;wCACrD,WAAW,yBAAyB,CAAC,CAAC,aAAa,CAAC"}
@@ -9,12 +9,15 @@ import { KeywordShape } from '@agoric/zoe/src/typeGuards.js';
9
9
 
10
10
  const KeywordSharesShape = M.recordOf(KeywordShape, M.nat());
11
11
 
12
- /** A pattern for Zoe to check custom terms before `start()`ing the contract. */
13
- export const customTermsShape = harden({
14
- keywordShares: KeywordSharesShape,
15
- timerService: M.eref(M.remotable('TimerService')),
16
- collectionInterval: RelativeTimeShape,
17
- });
12
+ /** @type {ContractMeta} */
13
+ export const meta = {
14
+ customTermsShape: {
15
+ keywordShares: KeywordSharesShape,
16
+ timerService: M.eref(M.remotable('TimerService')),
17
+ collectionInterval: RelativeTimeShape,
18
+ },
19
+ };
20
+ harden(meta);
18
21
 
19
22
  /**
20
23
  * @typedef {import('@agoric/time/src/types').RelativeTime} RelativeTime
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * @typedef {import('@agoric/time/src/types').TimerService} TimerService
5
5
  */
6
- export const privateArgsShape: import("@endo/patterns").Matcher;
7
- export function prepare(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig & {
6
+ /** @type {ContractMeta} */
7
+ export const meta: ContractMeta;
8
+ export function start(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig & {
8
9
  timer: TimerService;
9
10
  brandIn: Brand<'nat'>;
10
11
  brandOut: Brand<'nat'>;
@@ -1 +1 @@
1
- {"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AAEH,gEAeE;AAyBK;WAhBO,YAAY;aACV,MAAM,KAAK,CAAC;cACX,MAAM,KAAK,CAAC;iBACT,MAAM;;;;;;;;;;4BAMG,UAAU;gBACtB,KAAK,UAAU,CAAC;yBACP,KAAK,OAAO,cAAc,EAAE,SAAS,CAAC;iBAC9C,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiI5B;sBA1KY,OAAO,kBAAkB,EAAE,OAAO;2BAElC,OAAO,wBAAwB,EAAE,YAAY"}
1
+ {"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAmBrB;AA0BK;WAhBO,YAAY;aACV,MAAM,KAAK,CAAC;cACX,MAAM,KAAK,CAAC;iBACT,MAAM;;;;;;;;;;4BAMG,UAAU;gBACtB,KAAK,UAAU,CAAC;yBACP,KAAK,OAAO,cAAc,EAAE,SAAS,CAAC;iBAC9C,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiI5B;sBA/KY,OAAO,kBAAkB,EAAE,OAAO;2BAElC,OAAO,wBAAwB,EAAE,YAAY"}
@@ -22,22 +22,27 @@ const trace = makeTracer('FluxAgg', false);
22
22
  * @typedef {import('@agoric/time/src/types').TimerService} TimerService
23
23
  */
24
24
 
25
- export const privateArgsShape = M.splitRecord(
26
- harden({
27
- storageNode: StorageNodeShape,
28
- marshaller: M.eref(M.remotable('marshaller')),
29
- namesByAddressAdmin: M.any(),
30
- }),
31
- harden({
32
- // always optional. XXX some code is including the key, set to null
33
- highPrioritySendersManager: M.or(
34
- M.remotable('prioritySenders manager'),
35
- M.null(),
36
- ),
37
- // only necessary on first invocation, not subsequent
38
- initialPoserInvitation: M.remotable('Invitation'),
39
- }),
40
- );
25
+ /** @type {ContractMeta} */
26
+ export const meta = {
27
+ privateArgsShape: M.splitRecord(
28
+ {
29
+ storageNode: StorageNodeShape,
30
+ marshaller: M.eref(M.remotable('marshaller')),
31
+ namesByAddressAdmin: M.any(),
32
+ },
33
+ {
34
+ // always optional. XXX some code is including the key, set to null
35
+ highPrioritySendersManager: M.or(
36
+ M.remotable('prioritySenders manager'),
37
+ M.null(),
38
+ ),
39
+ // only necessary on first invocation, not subsequent
40
+ initialPoserInvitation: M.remotable('Invitation'),
41
+ },
42
+ ),
43
+ upgradability: 'canUpgrade',
44
+ };
45
+ harden(meta);
41
46
 
42
47
  /**
43
48
  * PriceAuthority for their median. Unlike the simpler `priceAggregator.js`,
@@ -62,7 +67,7 @@ export const privateArgsShape = M.splitRecord(
62
67
  * }} privateArgs
63
68
  * @param {Baggage} baggage
64
69
  */
65
- export const prepare = async (zcf, privateArgs, baggage) => {
70
+ export const start = async (zcf, privateArgs, baggage) => {
66
71
  trace('prepare with baggage keys', [...baggage.keys()]);
67
72
 
68
73
  // xxx uses contract baggage as issuerBagage, assumes one issuer in this contract
@@ -188,4 +193,4 @@ export const prepare = async (zcf, privateArgs, baggage) => {
188
193
  publicFacet: faKit.public,
189
194
  });
190
195
  };
191
- harden(prepare);
196
+ harden(start);
@@ -123,8 +123,8 @@ export type PSMKit = {
123
123
  label: string;
124
124
  psm: Instance;
125
125
  psmGovernor: Instance;
126
- psmCreatorFacet: Awaited<ReturnType<Awaited<ReturnType<typeof import("../psm/psm.js")['prepare']>>['creatorFacet']['getLimitedCreatorFacet']>>;
127
- psmGovernorCreatorFacet: GovernorCreatorFacet<typeof import("../psm/psm.js")['prepare']>;
126
+ psmCreatorFacet: Awaited<ReturnType<Awaited<ReturnType<typeof import("../psm/psm.js")['start']>>['creatorFacet']['getLimitedCreatorFacet']>>;
127
+ psmGovernorCreatorFacet: GovernorCreatorFacet<typeof import("../psm/psm.js")['start']>;
128
128
  psmAdminFacet: AdminFacet;
129
129
  };
130
130
  export type AuctioneerKit = GovernanceFacetKit<(zcf: ZCF<GovernanceTerms<{
@@ -190,12 +190,12 @@ export type EconomyBootstrapSpace = PromiseSpaceOf<{
190
190
  psmKit: MapStore<Brand, PSMKit>;
191
191
  anchorBalancePayments: MapStore<Brand, Payment<'nat'>>;
192
192
  econCharterKit: EconCharterStartResult;
193
- reserveKit: GovernanceFacetKit<typeof import("../reserve/assetReserve.js")['prepare']>;
194
- vaultFactoryKit: GovernanceFacetKit<typeof import("../vaultFactory/vaultFactory.js")['prepare']>;
193
+ reserveKit: GovernanceFacetKit<typeof import("../reserve/assetReserve.js")['start']>;
194
+ vaultFactoryKit: GovernanceFacetKit<typeof import("../vaultFactory/vaultFactory.js")['start']>;
195
195
  auctioneerKit: AuctioneerKit;
196
196
  minInitialDebt: NatValue;
197
197
  }>;
198
- export type EconCharterStartResult = import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<typeof import("../econCommitteeCharter")['prepare']>;
199
- export type CommitteeStartResult = import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<typeof import("@agoric/governance/src/committee.js")['prepare']>;
198
+ export type EconCharterStartResult = import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<typeof import("../econCommitteeCharter")['start']>;
199
+ export type CommitteeStartResult = import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<typeof import("@agoric/governance/src/committee.js")['start']>;
200
200
  import { Stable } from '../tokens.js';
201
201
  //# sourceMappingURL=econ-behaviors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"econ-behaviors.d.ts","sourceRoot":"","sources":["econ-behaviors.js"],"names":[],"mappings":"AAiBA,qCAAsC;AACtC,sCAA0C;AAC1C,qCAAsD;AACtD,sCAAqD;AA6E9C,mcADK,sBAAsB;;;;;;;;;;;;;;;;;;;KA+FjC;AAUM,oDAPI,sBAAsB,CAAC,SAAS,CAAC;;;;;+BAKjC,OAAO,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EvB;AAUM,wSAPI,sBAAsB;IAEE,cAAc;IACtB,OAAO;;;oBAEvB,MAAM,iBA6FhB;AAWM,wGALI,sBAAsB;;;;8BAuBhC;AAQM,mcAFI,sBAAsB,iBA0GhC;AAQM,+cAJI,sBAAsB;IAET,aAAa,GAA1B,GAAG;kBA0Hb;sCA7mBY,OAAO,iCAAiC,EAAE,oBAAoB,CAAC,aAAa,CAAC;oCAE7E,OAAO,0BAA0B,EAAE,qBAAqB;qCAExD,OAAO,0BAA0B,EAAE,sBAAsB;;WAKxD,MAAM;SACN,QAAQ;iBACR,QAAQ;qBACR,QACb,WACA,QACA,WAAmB,+BAAwB,SAAS,CAAC,CAAC,CAC/C,CAAC,cAAc,CAAC,CAAC,wBAAwB,CAAC,CAC5C,CACF;6BACU,qBAAqB,+BAA+B,SAAS,CAAC,CAAC;mBAC/D,UAAU;;4BAGV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA4D;qCAG7D,eAAe,GAAG,mBAAmB,GAAG,qBAAqB;oCAE7D,eAAe;IAC3B,oBAAwB,EAAE,oBAAoB,CAAC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ACvD;uBAzEmB,cAAc"}
@@ -36,11 +36,11 @@ export const SECONDS_PER_WEEK = 7n * SECONDS_PER_DAY;
36
36
  * @property {Awaited<
37
37
  * ReturnType<
38
38
  * Awaited<
39
- * ReturnType<import('../psm/psm.js')['prepare']>
39
+ * ReturnType<import('../psm/psm.js')['start']>
40
40
  * >['creatorFacet']['getLimitedCreatorFacet']
41
41
  * >
42
42
  * >} psmCreatorFacet
43
- * @property {GovernorCreatorFacet<import('../../src/psm/psm.js')['prepare']>} psmGovernorCreatorFacet
43
+ * @property {GovernorCreatorFacet<import('../../src/psm/psm.js')['start']>} psmGovernorCreatorFacet
44
44
  * @property {AdminFacet} psmAdminFacet
45
45
  */
46
46
 
@@ -63,10 +63,10 @@ export const SECONDS_PER_WEEK = 7n * SECONDS_PER_DAY;
63
63
  * anchorBalancePayments: MapStore<Brand, Payment<'nat'>>;
64
64
  * econCharterKit: EconCharterStartResult;
65
65
  * reserveKit: GovernanceFacetKit<
66
- * import('../reserve/assetReserve.js')['prepare']
66
+ * import('../reserve/assetReserve.js')['start']
67
67
  * >;
68
68
  * vaultFactoryKit: GovernanceFacetKit<
69
- * import('../vaultFactory/vaultFactory.js')['prepare']
69
+ * import('../vaultFactory/vaultFactory.js')['start']
70
70
  * >;
71
71
  * auctioneerKit: AuctioneerKit;
72
72
  * minInitialDebt: NatValue;
@@ -75,12 +75,12 @@ export const SECONDS_PER_WEEK = 7n * SECONDS_PER_DAY;
75
75
 
76
76
  /**
77
77
  * @typedef {import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<
78
- * import('../econCommitteeCharter')['prepare']
78
+ * import('../econCommitteeCharter')['start']
79
79
  * >} EconCharterStartResult
80
80
  */
81
81
  /**
82
82
  * @typedef {import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<
83
- * import('@agoric/governance/src/committee.js')['prepare']
83
+ * import('@agoric/governance/src/committee.js')['start']
84
84
  * >} CommitteeStartResult
85
85
  */
86
86
 
@@ -137,7 +137,7 @@ export const createPriceFeed = async (
137
137
  * [Brand<'nat'>, Brand<'nat'>],
138
138
  * [
139
139
  * Installation<
140
- * import('@agoric/inter-protocol/src/price/fluxAggregatorContract.js').prepare
140
+ * import('@agoric/inter-protocol/src/price/fluxAggregatorContract.js')['start]
141
141
  * >,
142
142
  * ],
143
143
  * ]}
package/src/psm/psm.d.ts CHANGED
@@ -1,31 +1,28 @@
1
- export namespace customTermsShape {
2
- export { BrandShape as anchorBrand };
3
- export { RatioShape as anchorPerMinted };
4
- export { InstanceHandleShape as electionManager };
5
- export namespace governedParams {
6
- namespace Electorate {
7
- export let type: "invitation";
8
- export { AmountShape as value };
9
- }
10
- namespace WantMintedFee {
11
- let type_1: "ratio";
12
- export { type_1 as type };
13
- export { RatioShape as value };
14
- }
15
- namespace GiveMintedFee {
16
- let type_2: "ratio";
17
- export { type_2 as type };
18
- export { RatioShape as value };
19
- }
20
- namespace MintLimit {
21
- let type_3: "amount";
22
- export { type_3 as type };
23
- export { AmountShape as value };
24
- }
25
- }
26
- }
27
- export const privateArgsShape: import("@endo/patterns").Matcher;
28
- export function prepare(zcf: ZCF<GovernanceTerms<{
1
+ /**
2
+ * @file The Parity Stability Module supports efficiently minting/burning a
3
+ * stable token at a specified fixed ratio to a reference stable token, which
4
+ * thereby acts as an anchor to provide additional stability. For flexible
5
+ * economic policies, the fee percentage for trading into and out of the
6
+ * stable token are specified separately.
7
+ */
8
+ /**
9
+ * @typedef {object} MetricsNotification Metrics naming scheme is that nouns are
10
+ * present values and past-participles are accumulative.
11
+ * @property {Amount<'nat'>} anchorPoolBalance amount of Anchor token available
12
+ * to be swapped
13
+ * @property {Amount<'nat'>} mintedPoolBalance amount of Minted token
14
+ * outstanding (the amount minted minus the amount burned).
15
+ * @property {Amount<'nat'>} feePoolBalance amount of Minted token fees
16
+ * available to be collected
17
+ * @property {Amount<'nat'>} totalAnchorProvided running sum of Anchor ever
18
+ * given by this contract
19
+ * @property {Amount<'nat'>} totalMintedProvided running sum of Minted ever
20
+ * given by this contract
21
+ */
22
+ /** @typedef {import('@agoric/vat-data').Baggage} Baggage */
23
+ /** @type {ContractMeta} */
24
+ export const meta: ContractMeta;
25
+ export function start(zcf: ZCF<GovernanceTerms<{
29
26
  GiveMintedFee: 'ratio';
30
27
  WantMintedFee: 'ratio';
31
28
  MintLimit: 'amount';
@@ -177,9 +174,5 @@ export type MetricsNotification = {
177
174
  totalMintedProvided: Amount<'nat'>;
178
175
  };
179
176
  export type Baggage = import('@agoric/vat-data').Baggage;
180
- export type PsmPublicFacet = Awaited<ReturnType<typeof prepare>>['publicFacet'];
181
- import { BrandShape } from '@agoric/ertp';
182
- import { RatioShape } from '@agoric/ertp';
183
- import { InstanceHandleShape } from '@agoric/zoe/src/typeGuards.js';
184
- import { AmountShape } from '@agoric/ertp';
177
+ export type PsmPublicFacet = Awaited<ReturnType<typeof start>>['publicFacet'];
185
178
  //# sourceMappingURL=psm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"psm.d.ts","sourceRoot":"","sources":["psm.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,gEAUE;AAsBK;mBAhBe,OAAO;mBACP,OAAO;eACX,QAAQ;;iBAEN,MAAM,KAAK,CAAC;qBACR,KAAK;iBAGlB;IACV,aAAiB,EAAE,aAAa,CAAC;IACjC,sBAA0B,EAAE,UAAU,CAAC;IACvC,WAAe,EAAE,WAAW,CAAC;IAC7B,UAAc,EAAE,UAAU,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuUH;;;;;;;;;;uBAxYa,OAAO,KAAK,CAAC;;;;;uBAEb,OAAO,KAAK,CAAC;;;;;oBAEb,OAAO,KAAK,CAAC;;;;;yBAEb,OAAO,KAAK,CAAC;;;;;yBAEb,OAAO,KAAK,CAAC;;sBAIb,OAAO,kBAAkB,EAAE,OAAO;6BA8XlC,QAAQ,WAAW,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC;2BAxbA,cAAc;2BAAd,cAAc;oCA0BvE,+BAA+B;4BA1B0B,cAAc"}
1
+ {"version":3,"file":"psm.d.ts","sourceRoot":"","sources":["psm.js"],"names":[],"mappings":"AAyCA;;;;;;GAMG;AAEH;;;;;;;;;;;;;GAaG;AAEH,4DAA4D;AAE5D,2BAA2B;AAC3B,mBADW,YAAY,CAkCrB;AAsBK;mBAhBe,OAAO;mBACP,OAAO;eACX,QAAQ;;iBAEN,MAAM,KAAK,CAAC;qBACR,KAAK;iBAGlB;IACV,aAAiB,EAAE,aAAa,CAAC;IACjC,sBAA0B,EAAE,UAAU,CAAC;IACvC,WAAe,EAAE,WAAW,CAAC;IAC7B,UAAc,EAAE,UAAU,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuUH;;;;;;;;;;uBA1Ya,OAAO,KAAK,CAAC;;;;;uBAEb,OAAO,KAAK,CAAC;;;;;oBAEb,OAAO,KAAK,CAAC;;;;;yBAEb,OAAO,KAAK,CAAC;;;;;yBAEb,OAAO,KAAK,CAAC;;sBAIb,OAAO,kBAAkB,EAAE,OAAO;6BAiYlC,QAAQ,WAAW,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC"}
package/src/psm/psm.js CHANGED
@@ -64,40 +64,42 @@ const { Fail } = assert;
64
64
 
65
65
  /** @typedef {import('@agoric/vat-data').Baggage} Baggage */
66
66
 
67
- export const customTermsShape = {
68
- anchorBrand: BrandShape,
69
- anchorPerMinted: RatioShape,
70
- electionManager: InstanceHandleShape,
71
- governedParams: {
72
- [CONTRACT_ELECTORATE]: {
73
- type: ParamTypes.INVITATION,
74
- value: AmountShape,
67
+ /** @type {ContractMeta} */
68
+ export const meta = {
69
+ upgradability: 'canUpgrade',
70
+ customTermsShape: {
71
+ anchorBrand: BrandShape,
72
+ anchorPerMinted: RatioShape,
73
+ electionManager: InstanceHandleShape,
74
+ governedParams: {
75
+ [CONTRACT_ELECTORATE]: {
76
+ type: ParamTypes.INVITATION,
77
+ value: AmountShape,
78
+ },
79
+ WantMintedFee: {
80
+ type: ParamTypes.RATIO,
81
+ value: RatioShape,
82
+ },
83
+ GiveMintedFee: {
84
+ type: ParamTypes.RATIO,
85
+ value: RatioShape,
86
+ },
87
+ MintLimit: { type: ParamTypes.AMOUNT, value: AmountShape },
75
88
  },
76
- WantMintedFee: {
77
- type: ParamTypes.RATIO,
78
- value: RatioShape,
89
+ },
90
+ privateArgsShape: M.splitRecord(
91
+ {
92
+ marshaller: M.remotable('Marshaller'),
93
+ storageNode: StorageNodeShape,
79
94
  },
80
- GiveMintedFee: {
81
- type: ParamTypes.RATIO,
82
- value: RatioShape,
95
+ {
96
+ // only necessary on first invocation, not subsequent
97
+ feeMintAccess: FeeMintAccessShape,
98
+ initialPoserInvitation: InvitationShape,
83
99
  },
84
- MintLimit: { type: ParamTypes.AMOUNT, value: AmountShape },
85
- },
100
+ ),
86
101
  };
87
- harden(customTermsShape);
88
-
89
- export const privateArgsShape = M.splitRecord(
90
- harden({
91
- marshaller: M.remotable('Marshaller'),
92
- storageNode: StorageNodeShape,
93
- }),
94
- harden({
95
- // only necessary on first invocation, not subsequent
96
- feeMintAccess: FeeMintAccessShape,
97
- initialPoserInvitation: InvitationShape,
98
- }),
99
- );
100
- harden(privateArgsShape);
102
+ harden(meta);
101
103
 
102
104
  /**
103
105
  * @param {ZCF<
@@ -118,7 +120,7 @@ harden(privateArgsShape);
118
120
  * }} privateArgs
119
121
  * @param {Baggage} baggage
120
122
  */
121
- export const prepare = async (zcf, privateArgs, baggage) => {
123
+ export const start = async (zcf, privateArgs, baggage) => {
122
124
  const { anchorBrand, anchorPerMinted } = zcf.getTerms();
123
125
  console.log('PSM Starting', anchorBrand, anchorPerMinted);
124
126
 
@@ -443,5 +445,6 @@ export const prepare = async (zcf, privateArgs, baggage) => {
443
445
  publicFacet,
444
446
  });
445
447
  };
448
+ harden(start);
446
449
 
447
- /** @typedef {Awaited<ReturnType<typeof prepare>>['publicFacet']} PsmPublicFacet */
450
+ /** @typedef {Awaited<ReturnType<typeof start>>['publicFacet']} PsmPublicFacet */
@@ -1,4 +1,6 @@
1
- export function prepare(zcf: ZCF<GovernanceTerms<{}> & {
1
+ /** @type {ContractMeta} */
2
+ export const meta: ContractMeta;
3
+ export function start(zcf: ZCF<GovernanceTerms<{}> & {
2
4
  governedApis: ['burnFeesToReduceShortfall'];
3
5
  }>, privateArgs: {
4
6
  feeMintAccess: FeeMintAccess;
@@ -34,9 +36,9 @@ export type AssetReserveLimitedCreatorFacet = {
34
36
  getAllocations: () => Allocation;
35
37
  makeShortfallReportingInvitation: () => Promise<Invitation<ShortfallReporter>>;
36
38
  };
37
- export type AssetReservePublicFacet = Awaited<ReturnType<typeof prepare>>['publicFacet'];
39
+ export type AssetReservePublicFacet = Awaited<ReturnType<typeof start>>['publicFacet'];
38
40
  /**
39
41
  * the creator facet for the governor
40
42
  */
41
- export type AssetReserveCreatorFacet = Awaited<ReturnType<typeof prepare>>['creatorFacet'];
43
+ export type AssetReserveCreatorFacet = Awaited<ReturnType<typeof start>>['creatorFacet'];
42
44
  //# sourceMappingURL=assetReserve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assetReserve.d.ts","sourceRoot":"","sources":["assetReserve.js"],"names":[],"mappings":"AAyCO,6BAbI,IACV,gBAAoB,EAAE,CAAC,GAAG;IAC1B,YAAkB,EAAE,CAAC,2BAA2B,CAAC,CAAC;CAC7C,CACF;mBAEgB,aAAa;4BACJ,UAAU;gBACtB,KAAK,UAAU,CAAC;iBACf,KAAK,WAAW,CAAC;;IA+D/B,mEAAmE;;;;;;IAEnE,iEAAiE;;;;;;;GAKpE;;6CA7F6C,MAAM,KAAK,IAAI;4CAChB,MAAM,KAAK,IAAI;;sBAI9C,OAAO,kBAAkB,EAAE,OAAO;;8CA6FtB,MAAM,KAAK,IAAI;4CACf,MAAM,KAAK,IAAI;;;wBAKlB,MAAM,OAAO,MAAM,KAAK,IAAI;oBACrC,MAAM,UAAU;sCAChB,MAAM,QAAQ,WAAW,iBAAiB,CAAC,CAAC;;sCAG5C,QAAQ,WAAW,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC;;;;uCAEnD,QAAQ,WAAW,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC"}
1
+ {"version":3,"file":"assetReserve.d.ts","sourceRoot":"","sources":["assetReserve.js"],"names":[],"mappings":"AAYA,2BAA2B;AAC3B,mBADW,YAAY,CAGrB;AAgCK,2BAbI,IACV,gBAAoB,EAAE,CAAC,GAAG;IAC1B,YAAkB,EAAE,CAAC,2BAA2B,CAAC,CAAC;CAC7C,CACF;mBAEgB,aAAa;4BACJ,UAAU;gBACtB,KAAK,UAAU,CAAC;iBACf,KAAK,WAAW,CAAC;;IA+D/B,mEAAmE;;;;;;IAEnE,iEAAiE;;;;;;;GAKpE;;6CA7F6C,MAAM,KAAK,IAAI;4CAChB,MAAM,KAAK,IAAI;;sBAI9C,OAAO,kBAAkB,EAAE,OAAO;;8CA6FtB,MAAM,KAAK,IAAI;4CACf,MAAM,KAAK,IAAI;;;wBAKlB,MAAM,OAAO,MAAM,KAAK,IAAI;oBACrC,MAAM,UAAU;sCAChB,MAAM,QAAQ,WAAW,iBAAiB,CAAC,CAAC;;sCAG5C,QAAQ,WAAW,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC;;;;uCAEjD,QAAQ,WAAW,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC"}
@@ -10,6 +10,12 @@ import { prepareAssetReserveKit } from './assetReserveKit.js';
10
10
 
11
11
  const trace = makeTracer('AR', true);
12
12
 
13
+ /** @type {ContractMeta} */
14
+ export const meta = {
15
+ upgradability: 'canUpgrade',
16
+ };
17
+ harden(meta);
18
+
13
19
  /**
14
20
  * @typedef {{
15
21
  * increaseLiquidationShortfall: (increase: Amount) => void;
@@ -39,7 +45,7 @@ const trace = makeTracer('AR', true);
39
45
  * }} privateArgs
40
46
  * @param {Baggage} baggage
41
47
  */
42
- export const prepare = async (zcf, privateArgs, baggage) => {
48
+ export const start = async (zcf, privateArgs, baggage) => {
43
49
  trace('prepare', Object.keys(privateArgs), [...baggage.keys()]);
44
50
  // This contract mixes two styles of access to durable state. durableStores
45
51
  // are declared at the top level and referenced lexically. local state is
@@ -106,7 +112,7 @@ export const prepare = async (zcf, privateArgs, baggage) => {
106
112
  publicFacet: /** @type {any} */ (assetReserveKit.public),
107
113
  };
108
114
  };
109
- harden(prepare);
115
+ harden(start);
110
116
 
111
117
  /**
112
118
  * @typedef {object} ShortfallReporter
@@ -121,8 +127,8 @@ harden(prepare);
121
127
  * @property {() => Promise<Invitation<ShortfallReporter>>} makeShortfallReportingInvitation
122
128
  */
123
129
 
124
- /** @typedef {Awaited<ReturnType<typeof prepare>>['publicFacet']} AssetReservePublicFacet */
130
+ /** @typedef {Awaited<ReturnType<typeof start>>['publicFacet']} AssetReservePublicFacet */
125
131
  /**
126
- * @typedef {Awaited<ReturnType<typeof prepare>>['creatorFacet']} AssetReserveCreatorFacet
132
+ * @typedef {Awaited<ReturnType<typeof start>>['creatorFacet']} AssetReserveCreatorFacet
127
133
  * the creator facet for the governor
128
134
  */
@@ -8,8 +8,9 @@
8
8
  * }
9
9
  * >} VaultFactoryZCF
10
10
  */
11
- export const privateArgsShape: import("@endo/patterns").Matcher;
12
- export function prepare(zcf: VaultFactoryZCF, privateArgs: {
11
+ /** @type {ContractMeta} */
12
+ export const meta: ContractMeta;
13
+ export function start(zcf: VaultFactoryZCF, privateArgs: {
13
14
  feeMintAccess: FeeMintAccess;
14
15
  initialPoserInvitation: Invitation;
15
16
  initialShortfallInvitation: Invitation;
@@ -157,5 +158,5 @@ export type VaultFactoryZCF = ZCF<GovernanceTerms<import('./params').VaultDirect
157
158
  reservePublicFacet: AssetReservePublicFacet;
158
159
  timerService: import('@agoric/time/src/types').TimerService;
159
160
  }>;
160
- export type VaultFactoryContract = ContractOf<typeof prepare>;
161
+ export type VaultFactoryContract = ContractOf<typeof start>;
161
162
  //# sourceMappingURL=vaultFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vaultFactory.d.ts","sourceRoot":"","sources":["vaultFactory.js"],"names":[],"mappings":"AAmCA;;;;;;;;;GASG;AAEH,gEAWE;AAcK,6BAVI,eAAe;mBAEN,aAAa;4BACJ,UAAU;gCACN,UAAU;iBACzB,KAAK,WAAW,CAAC;gBAClB,KAAK,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFhC;8BAhHY,IACZ,gBAAoB,OAAO,UAAU,EAAE,mBAAmB,CAAC,GAAG;IAC9D,qBAA2B,EAAE,OAAO,0BAA0B,EAAE,qBAAqB,CAAC;IACtF,cAAoB,EAAE,KAAK,cAAc,CAAC,CAAC;IAC3C,kBAAwB,EAAE,uBAAuB,CAAC;IAClD,YAAkB,EAAE,OAAO,wBAAwB,EAAE,YAAY,CAAC;CAC7D,CACF;mCA2GU,WAAW,cAAc,CAAC"}
1
+ {"version":3,"file":"vaultFactory.d.ts","sourceRoot":"","sources":["vaultFactory.js"],"names":[],"mappings":"AAmCA;;;;;;;;;GASG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAerB;AAcK,2BAVI,eAAe;mBAEN,aAAa;4BACJ,UAAU;gCACN,UAAU;iBACzB,KAAK,WAAW,CAAC;gBAClB,KAAK,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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