@agoric/governance 0.10.4-dev-354c092.0 → 0.10.4-dev-55d228c.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 +12 -12
- package/src/contractGovernorKit.js +44 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/governance",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-55d228c.0+55d228c",
|
|
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-
|
|
35
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
36
|
-
"@agoric/internal": "0.3.3-dev-
|
|
37
|
-
"@agoric/network": "0.1.1-dev-
|
|
38
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
39
|
-
"@agoric/store": "0.9.3-dev-
|
|
40
|
-
"@agoric/time": "0.3.3-dev-
|
|
41
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
42
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
34
|
+
"@agoric/assert": "0.6.1-dev-55d228c.0+55d228c",
|
|
35
|
+
"@agoric/ertp": "0.16.3-dev-55d228c.0+55d228c",
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-55d228c.0+55d228c",
|
|
37
|
+
"@agoric/network": "0.1.1-dev-55d228c.0+55d228c",
|
|
38
|
+
"@agoric/notifier": "0.6.3-dev-55d228c.0+55d228c",
|
|
39
|
+
"@agoric/store": "0.9.3-dev-55d228c.0+55d228c",
|
|
40
|
+
"@agoric/time": "0.3.3-dev-55d228c.0+55d228c",
|
|
41
|
+
"@agoric/vat-data": "0.5.3-dev-55d228c.0+55d228c",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-55d228c.0+55d228c",
|
|
43
43
|
"@endo/bundle-source": "^2.7.0",
|
|
44
44
|
"@endo/captp": "^3.1.4",
|
|
45
45
|
"@endo/eventual-send": "^0.17.5",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"import-meta-resolve": "^2.2.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
53
|
+
"@agoric/swingset-vat": "0.32.3-dev-55d228c.0+55d228c",
|
|
54
54
|
"@endo/bundle-source": "^2.7.0",
|
|
55
55
|
"@endo/init": "^0.5.59",
|
|
56
56
|
"ava": "^5.3.0",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"typeCoverage": {
|
|
79
79
|
"atLeast": 83.56
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "55d228cfc1cebc47bb7b9649875b9e1fb6984f5e"
|
|
82
82
|
}
|
|
@@ -1,16 +1,57 @@
|
|
|
1
1
|
import { Fail } from '@agoric/assert';
|
|
2
|
-
import { makeTracer } from '@agoric/internal';
|
|
3
|
-
import { prepareExoClassKit } from '@agoric/vat-data';
|
|
2
|
+
import { UnguardedHelperI, makeTracer } from '@agoric/internal';
|
|
3
|
+
import { M, prepareExoClassKit } from '@agoric/vat-data';
|
|
4
4
|
import { E } from '@endo/eventual-send';
|
|
5
|
+
import {
|
|
6
|
+
InvitationShape,
|
|
7
|
+
InstanceHandleShape,
|
|
8
|
+
InstallationShape,
|
|
9
|
+
} from '@agoric/zoe/src/typeGuards.js';
|
|
10
|
+
import { TimestampShape } from '@agoric/time';
|
|
5
11
|
import { setupApiGovernance } from './contractGovernance/governApi.js';
|
|
6
12
|
import { setupFilterGovernance } from './contractGovernance/governFilter.js';
|
|
7
13
|
import {
|
|
8
14
|
CONTRACT_ELECTORATE,
|
|
9
15
|
setupParamGovernance,
|
|
10
16
|
} from './contractGovernance/governParam.js';
|
|
17
|
+
import { ClosingRuleShape, ParamChangesSpecShape } from './typeGuards.js';
|
|
11
18
|
|
|
12
19
|
const trace = makeTracer('CGK', false);
|
|
13
20
|
|
|
21
|
+
const ContractGovernorKitI = {
|
|
22
|
+
helper: UnguardedHelperI,
|
|
23
|
+
creator: M.interface('Contract Governor Kit creator', {
|
|
24
|
+
replaceElectorate: M.call(InvitationShape).returns(M.promise()),
|
|
25
|
+
voteOnParamChanges: M.call(
|
|
26
|
+
InstallationShape,
|
|
27
|
+
TimestampShape,
|
|
28
|
+
ParamChangesSpecShape,
|
|
29
|
+
).returns(M.promise()),
|
|
30
|
+
voteOnApiInvocation: M.call(
|
|
31
|
+
M.string(),
|
|
32
|
+
M.arrayOf(M.any()),
|
|
33
|
+
InstallationShape,
|
|
34
|
+
TimestampShape,
|
|
35
|
+
).returns(M.promise()),
|
|
36
|
+
voteOnOfferFilter: M.call(
|
|
37
|
+
InstallationShape,
|
|
38
|
+
TimestampShape,
|
|
39
|
+
M.arrayOf(M.string()),
|
|
40
|
+
).returns(M.promise()),
|
|
41
|
+
getCreatorFacet: M.call().returns(M.remotable('ElectorateCreator')),
|
|
42
|
+
getAdminFacet: M.call().returns(M.remotable('ElectorateAdmin')),
|
|
43
|
+
getInstance: M.call().returns(InstanceHandleShape),
|
|
44
|
+
getPublicFacet: M.call().returns(M.remotable('ElectoratePublic')),
|
|
45
|
+
}),
|
|
46
|
+
public: M.interface('Contract Governor Kit public', {
|
|
47
|
+
getElectorate: M.call().returns(M.promise(/* Instance */)),
|
|
48
|
+
getGovernedContract: M.call().returns(InstanceHandleShape),
|
|
49
|
+
validateVoteCounter: M.call(InstanceHandleShape).returns(M.promise()),
|
|
50
|
+
validateElectorate: M.call(InstanceHandleShape).returns(M.promise()),
|
|
51
|
+
validateTimer: M.call(ClosingRuleShape).returns(),
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
|
|
14
55
|
/**
|
|
15
56
|
*
|
|
16
57
|
* @param {import('@agoric/vat-data').Baggage} baggage
|
|
@@ -36,7 +77,7 @@ export const prepareContractGovernorKit = (baggage, powers) => {
|
|
|
36
77
|
const makeContractGovernorKit = prepareExoClassKit(
|
|
37
78
|
baggage,
|
|
38
79
|
'ContractGovernorKit',
|
|
39
|
-
|
|
80
|
+
ContractGovernorKitI,
|
|
40
81
|
/**
|
|
41
82
|
* @param {import('@agoric/zoe/src/zoeService/utils.js').StartedInstanceKit<GovernableStartFn>} startedInstanceKit
|
|
42
83
|
* @param {LimitedCF<unknown>} limitedCreatorFacet
|