@agoric/governance 0.10.4-dev-8baf0aa.0 → 0.10.4-dev-cc54325.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/governance",
3
- "version": "0.10.4-dev-8baf0aa.0+8baf0aa",
3
+ "version": "0.10.4-dev-cc54325.0+cc54325",
4
4
  "description": "Core governance support",
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/assert": "0.6.1-dev-8baf0aa.0+8baf0aa",
35
- "@agoric/ertp": "0.16.3-dev-8baf0aa.0+8baf0aa",
36
- "@agoric/internal": "0.3.3-dev-8baf0aa.0+8baf0aa",
37
- "@agoric/notifier": "0.6.3-dev-8baf0aa.0+8baf0aa",
38
- "@agoric/store": "0.9.3-dev-8baf0aa.0+8baf0aa",
39
- "@agoric/swingset-vat": "0.32.3-dev-8baf0aa.0+8baf0aa",
40
- "@agoric/time": "0.3.3-dev-8baf0aa.0+8baf0aa",
41
- "@agoric/vat-data": "0.5.3-dev-8baf0aa.0+8baf0aa",
42
- "@agoric/zoe": "0.26.3-dev-8baf0aa.0+8baf0aa",
34
+ "@agoric/assert": "0.6.1-dev-cc54325.0+cc54325",
35
+ "@agoric/ertp": "0.16.3-dev-cc54325.0+cc54325",
36
+ "@agoric/internal": "0.3.3-dev-cc54325.0+cc54325",
37
+ "@agoric/notifier": "0.6.3-dev-cc54325.0+cc54325",
38
+ "@agoric/store": "0.9.3-dev-cc54325.0+cc54325",
39
+ "@agoric/swingset-vat": "0.32.3-dev-cc54325.0+cc54325",
40
+ "@agoric/time": "0.3.3-dev-cc54325.0+cc54325",
41
+ "@agoric/vat-data": "0.5.3-dev-cc54325.0+cc54325",
42
+ "@agoric/zoe": "0.26.3-dev-cc54325.0+cc54325",
43
43
  "@endo/bundle-source": "^2.5.2",
44
44
  "@endo/captp": "^3.1.2",
45
45
  "@endo/eventual-send": "^0.17.3",
@@ -50,8 +50,8 @@
50
50
  "import-meta-resolve": "^2.2.1"
51
51
  },
52
52
  "devDependencies": {
53
- "@agoric/deploy-script-support": "0.10.4-dev-8baf0aa.0+8baf0aa",
54
- "@agoric/vats": "0.15.2-dev-8baf0aa.0+8baf0aa",
53
+ "@agoric/deploy-script-support": "0.10.4-dev-cc54325.0+cc54325",
54
+ "@agoric/vats": "0.15.2-dev-cc54325.0+cc54325",
55
55
  "@endo/bundle-source": "^2.5.2",
56
56
  "@endo/init": "^0.5.57",
57
57
  "ava": "^5.3.0",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "8baf0aabe3cadeb1cd07fd30641d11baf3e68eaf"
76
+ "gitHead": "cc543255026eb4aa3c8e0ad97ef7b572871063cd"
77
77
  }
@@ -1,8 +1,11 @@
1
- export namespace privateArgsShape {
2
- export { StorageNodeShape as storageNode };
3
- export let marshaller: import("@endo/patterns").Matcher;
4
- }
5
- export function prepare(zcf: ZCF<{
1
+ /**
2
+ * @typedef { ElectorateCreatorFacet & {
3
+ * getVoterInvitations: () => Promise<Invitation<{ voter: { castBallotFor(handle: any, choice?: any, ): void}}>>[]
4
+ * }} CommitteeElectorateCreatorFacet
5
+ */
6
+ /** @type {ContractMeta} */
7
+ export const meta: ContractMeta;
8
+ export function start(zcf: ZCF<{
6
9
  committeeName: string;
7
10
  committeeSize: number;
8
11
  }>, privateArgs: {
@@ -15,5 +18,4 @@ export function prepare(zcf: ZCF<{
15
18
  export type CommitteeElectorateCreatorFacet = ElectorateCreatorFacet & {
16
19
  getVoterInvitations: () => Promise<Invitation<R, A>>[];
17
20
  };
18
- import { StorageNodeShape } from '@agoric/internal';
19
21
  //# sourceMappingURL=committee.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"committee.d.ts","sourceRoot":"","sources":["committee.js"],"names":[],"mappings":";;;;AAgDO;mBAPa,MAAM;mBACN,MAAM;iBAEf;IAAE,WAAW,EAAE,KAAK,WAAW,CAAC,CAAC;IAAC,UAAU,EAAE,KAAK,UAAU,CAAC,CAAA;CAAC;kBAE9C,+BAA+B;iBAAe,yBAAyB;EA6HlG;;;;iCAtKgC,kBAAkB"}
1
+ {"version":3,"file":"committee.d.ts","sourceRoot":"","sources":["committee.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAOrB;AAoBK;mBAPa,MAAM;mBACN,MAAM;iBAEf;IAAE,WAAW,EAAE,KAAK,WAAW,CAAC,CAAC;IAAC,UAAU,EAAE,KAAK,UAAU,CAAC,CAAA;CAAC;kBAE9C,+BAA+B;iBAAe,yBAAyB;EA6HlG"}
package/src/committee.js CHANGED
@@ -23,11 +23,15 @@ const { ceilDivide } = natSafeMath;
23
23
  * }} CommitteeElectorateCreatorFacet
24
24
  */
25
25
 
26
- export const privateArgsShape = {
27
- storageNode: StorageNodeShape,
28
- marshaller: M.remotable('Marshaller'),
26
+ /** @type {ContractMeta} */
27
+ export const meta = {
28
+ privateArgsShape: {
29
+ storageNode: StorageNodeShape,
30
+ marshaller: M.remotable('Marshaller'),
31
+ },
32
+ upgradability: 'canUpgrade',
29
33
  };
30
- harden(privateArgsShape);
34
+ harden(meta);
31
35
 
32
36
  /**
33
37
  * Each Committee (an Electorate) represents a particular set of voters. The
@@ -46,7 +50,7 @@ harden(privateArgsShape);
46
50
  * @param {import('@agoric/vat-data').Baggage} baggage
47
51
  * @returns {{creatorFacet: CommitteeElectorateCreatorFacet, publicFacet: CommitteeElectoratePublic}}
48
52
  */
49
- export const prepare = (zcf, privateArgs, baggage) => {
53
+ export const start = (zcf, privateArgs, baggage) => {
50
54
  /** @type {MapStore<Handle<'Question'>, import('./electorateTools.js').QuestionRecord>} */
51
55
  const allQuestions = provideDurableMapStore(baggage, 'Question');
52
56
 
@@ -170,5 +174,4 @@ export const prepare = (zcf, privateArgs, baggage) => {
170
174
 
171
175
  return { publicFacet, creatorFacet };
172
176
  };
173
-
174
- harden(prepare);
177
+ harden(start);
@@ -1,6 +1,8 @@
1
+ /** @type {ContractMeta} */
2
+ export const meta: ContractMeta;
1
3
  export function validateQuestionDetails(zoe: ERef<ZoeService>, electorate: Instance, details: ParamChangeIssueDetails): Promise<[void, void, void]>;
2
4
  export function validateQuestionFromCounter(zoe: ERef<ZoeService>, electorate: Instance, voteCounter: Instance): Promise<[void, void, void]>;
3
- export function prepare<SF extends GovernableStartFn>(zcf: ZCF<{
5
+ export function start<SF extends GovernableStartFn>(zcf: ZCF<{
4
6
  timer: import('@agoric/time/src/types').TimerService;
5
7
  governedContractInstallation: Installation<SF>;
6
8
  governed: {
@@ -1 +1 @@
1
- {"version":3,"file":"contractGovernor.d.ts","sourceRoot":"","sources":["contractGovernor.js"],"names":[],"mappings":"AAsBO,6CAJI,KAAK,UAAU,CAAC,cAChB,QAAQ,WACR,uBAAuB,+BAkBjC;AAYM,iDAJI,KAAK,UAAU,CAAC,cAChB,QAAQ,eACR,QAAQ,+BAWlB;AA0FM;WAjBK,OAAO,wBAAwB,EAAE,YAAY;;cAE1C;QACd,mBAAyB,EAAE,mBAAmB,CAAC;QAC/C,KAAW,EAAE;YAAC,cAAc,EAAE;gBAAC,qBAAqB,EAAE,OAAO,2CAA2C,EAAE,eAAe,CAAA;aAAC,CAAA;SAAC,CAAC;QAC5H,KAAW,CAAC,EAAE,MAAM,CAAC;KAChB;iBAEK;IACV,QAAY,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;;iBAGc,cAAc;GA+D/B;oCAjJY,aAAa;oCA1DU,qCAAqC"}
1
+ {"version":3,"file":"contractGovernor.d.ts","sourceRoot":"","sources":["contractGovernor.js"],"names":[],"mappings":"AAaA,2BAA2B;AAC3B,mBADW,YAAY,CAGrB;AAYK,6CAJI,KAAK,UAAU,CAAC,cAChB,QAAQ,WACR,uBAAuB,+BAkBjC;AAYM,iDAJI,KAAK,UAAU,CAAC,cAChB,QAAQ,eACR,QAAQ,+BAWlB;AA0FM;WAjBK,OAAO,wBAAwB,EAAE,YAAY;;cAE1C;QACd,mBAAyB,EAAE,mBAAmB,CAAC;QAC/C,KAAW,EAAE;YAAC,cAAc,EAAE;gBAAC,qBAAqB,EAAE,OAAO,2CAA2C,EAAE,eAAe,CAAA;aAAC,CAAA;SAAC,CAAC;QAC5H,KAAW,CAAC,EAAE,MAAM,CAAC;KAChB;iBAEK;IACV,QAAY,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;;iBAGc,cAAc;GA+D/B;oCAjJY,aAAa;oCAhEU,qCAAqC"}
@@ -11,6 +11,12 @@ const { Fail } = assert;
11
11
 
12
12
  const trace = makeTracer('CGov', false);
13
13
 
14
+ /** @type {ContractMeta} */
15
+ export const meta = {
16
+ upgradability: 'canUpgrade',
17
+ };
18
+ harden(meta);
19
+
14
20
  /**
15
21
  * Validate that the question details correspond to a parameter change question
16
22
  * that the electorate hosts, and that the voteCounter and other details are
@@ -147,8 +153,8 @@ harden(validateQuestionFromCounter);
147
153
  * }>}
148
154
  * @param {import('@agoric/vat-data').Baggage} baggage
149
155
  */
150
- export const prepare = async (zcf, privateArgs, baggage) => {
151
- trace('prepare');
156
+ export const start = async (zcf, privateArgs, baggage) => {
157
+ trace('start');
152
158
  const zoe = zcf.getZoeService();
153
159
  trace('getTerms', zcf.getTerms());
154
160
  const {
@@ -202,9 +208,9 @@ export const prepare = async (zcf, privateArgs, baggage) => {
202
208
  // Specifically, to the vat of the governed contract for its API names. The exo
203
209
  // defers that until API governance is requested to be invoked or validated.
204
210
 
205
- trace('prepare complete');
211
+ trace('start complete');
206
212
 
207
213
  // CRUCIAL: only contractGovernor should get the ability to update params
208
214
  return { creatorFacet: governorKit.creator, publicFacet: governorKit.public };
209
215
  };
210
- harden(prepare);
216
+ harden(start);