@agoric/deploy-script-support 0.10.4-dev-9b34be9.0 → 0.10.4-dev-45bab17.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/README.md +39 -22
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -19,7 +19,10 @@ the proposal.
|
|
|
19
19
|
|
|
20
20
|
Here's a simple example:
|
|
21
21
|
|
|
22
|
-
```
|
|
22
|
+
```js
|
|
23
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
24
|
+
import { getManifestForGame1 } from '@agoric/smart-wallet/test/start-game1-proposal.js';
|
|
25
|
+
|
|
23
26
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
24
27
|
const game1ProposalBuilder = async ({ publishRef, install }) => {
|
|
25
28
|
return harden({
|
|
@@ -45,28 +48,42 @@ export default async (homeP, endowments) => {
|
|
|
45
48
|
};
|
|
46
49
|
```
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
from
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
This CoreEvalBuilder returns an object whose "sourceSpec" indicates that the
|
|
52
|
+
proposal to run is "@agoric/smart-wallet/test/start-game1-proposal.js" and whose
|
|
53
|
+
"getManifestCall" is a [functionName, ...args] array describing an invocation of
|
|
54
|
+
`getManifestForGame1` exported from that file which is expected to return an
|
|
55
|
+
object including a "manifest" as described below (but the actual invocation will
|
|
56
|
+
insert as the first argument a "powers" object that includes functions such as
|
|
57
|
+
`restoreRef`). A common thing to want to pass in `args` is a reference to code
|
|
58
|
+
to be installed on-chain, and the example above shows how.
|
|
59
|
+
`publishRef(install(...))` is built from sources in agoric-sdk, and passed as a
|
|
60
|
+
`bundleRef`, which contains a `bundleID` suitable for passing to Zoe (for
|
|
61
|
+
contracts) or `vatAdminService` (for non-contract vat code).
|
|
62
|
+
|
|
63
|
+
The manifest from such an invocation is a JSON-serializable object in which each
|
|
64
|
+
key is the name of a function to itself be invoked and the corresponding value
|
|
65
|
+
is a "permit" describing an attenuation of the core-eval promise space to be
|
|
66
|
+
provided as its first argument. A permit is either `true` or a string (_both
|
|
67
|
+
meaning no attenuation of the respective subtree of the promise space, with a
|
|
68
|
+
string serving as a grouping label for convenience and/or diagram generation_),
|
|
69
|
+
or an object whose keys identify child properties and whose corresponding values
|
|
70
|
+
are theirselves (recursive) permits. See `BootstrapManifiest` in
|
|
71
|
+
[lib-boot.js](../vats/src/core/lib-boot.js).
|
|
72
|
+
|
|
73
|
+
The object returned from a "getManifestCall" invocation may also include
|
|
74
|
+
"installations" to register in `agoricNames`, as is done here with name "game1"
|
|
75
|
+
using the reference passed in via the invocation argument:
|
|
76
|
+
```js
|
|
77
|
+
/** @type {import('@agoric/vats/src/core/lib-boot').BootstrapManifest} */
|
|
78
|
+
const gameManifest = harden({
|
|
79
|
+
[startGameContract.name]: {
|
|
80
|
+
consume: {...},
|
|
81
|
+
brand: {...},
|
|
82
|
+
issuer: {...},
|
|
83
|
+
...
|
|
84
|
+
},
|
|
85
|
+
});
|
|
68
86
|
|
|
69
|
-
```
|
|
70
87
|
export const getManifestForGame1 = ({ restoreRef }, { game1Ref }) => {
|
|
71
88
|
return harden({
|
|
72
89
|
manifest: gameManifest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/deploy-script-support",
|
|
3
|
-
"version": "0.10.4-dev-
|
|
3
|
+
"version": "0.10.4-dev-45bab17.0+45bab17",
|
|
4
4
|
"description": "Helpers and other support for writing deploy scripts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/helpers.js",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
38
|
-
"@agoric/import-manager": "0.3.12-dev-
|
|
39
|
-
"@agoric/internal": "0.3.3-dev-
|
|
40
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
41
|
-
"@agoric/store": "0.9.3-dev-
|
|
42
|
-
"@agoric/time": "0.3.3-dev-
|
|
43
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
37
|
+
"@agoric/ertp": "0.16.3-dev-45bab17.0+45bab17",
|
|
38
|
+
"@agoric/import-manager": "0.3.12-dev-45bab17.0+45bab17",
|
|
39
|
+
"@agoric/internal": "0.3.3-dev-45bab17.0+45bab17",
|
|
40
|
+
"@agoric/notifier": "0.6.3-dev-45bab17.0+45bab17",
|
|
41
|
+
"@agoric/store": "0.9.3-dev-45bab17.0+45bab17",
|
|
42
|
+
"@agoric/time": "0.3.3-dev-45bab17.0+45bab17",
|
|
43
|
+
"@agoric/zoe": "0.26.3-dev-45bab17.0+45bab17",
|
|
44
44
|
"@endo/base64": "^1.0.8",
|
|
45
45
|
"@endo/bundle-source": "^3.4.2",
|
|
46
46
|
"@endo/errors": "^1.2.7",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@endo/zip": "^1.0.8"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@agoric/vats": "0.15.2-dev-
|
|
54
|
+
"@agoric/vats": "0.15.2-dev-45bab17.0+45bab17",
|
|
55
55
|
"@endo/init": "^1.1.6",
|
|
56
56
|
"ava": "^5.3.0",
|
|
57
57
|
"import-meta-resolve": "^2.2.1"
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"typeCoverage": {
|
|
75
75
|
"atLeast": 83.71
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "45bab1715b07dee25fe34d24971b47f1acf79036"
|
|
78
78
|
}
|