agoric 0.22.0-u19.2 → 0.22.0-u20.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 +0 -73
- package/package.json +37 -37
- package/src/install.js +1 -1
- package/src/lib/chain.js +1 -1
- package/src/lib/packageManager.js +3 -1
- package/src/main.js +4 -36
- package/src/sdk-package-names.js +6 -4
package/README.md
CHANGED
|
@@ -2,79 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
If you just want to use the Agoric CLI for your own smart contract, please see the [Getting Started website](https://agoric.com/documentation/getting-started/) for information.
|
|
4
4
|
|
|
5
|
-
## Relaying via IBC
|
|
6
|
-
|
|
7
|
-
The CLI integrates support for the [Confio
|
|
8
|
-
ts-relayer](https://github.com/confio/ts-relayer#quick-start) via the
|
|
9
|
-
`agoric ibc-setup` and `agoric ibc-relayer` commands.
|
|
10
|
-
|
|
11
|
-
Run `agoric start --reset -v local-chain` in a project directory. In the
|
|
12
|
-
meantime, you can configure the relayer (note that `--registry-from .` means to use `./registry.yaml`):
|
|
13
|
-
|
|
14
|
-
```console
|
|
15
|
-
$ agoric ibc-setup init --registry-from . --src local --dest ollinet
|
|
16
|
-
...
|
|
17
|
-
$ agoric ibc-setup keys list
|
|
18
|
-
ollinet: agoric1fwk40de0xu7gtlk8z858q2f5lfcqv33ml8qdg4
|
|
19
|
-
local: agoric1rvyry6jqmcrrm4ay9tu23rer7que8kdj4206zk
|
|
20
|
-
$
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Once your chain has booted, send some `uist` tokens to your `local` relayer
|
|
24
|
-
account printed above:
|
|
25
|
-
|
|
26
|
-
```console
|
|
27
|
-
$ agd --home=_agstate/keys tx --keyring-backend=test bank send provision agoric1rvyry6jqmcrrm4ay9tu23rer7que8kdj4206zk 20000000uist --from=provision --chain-id=agoriclocal --yes
|
|
28
|
-
...
|
|
29
|
-
$
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Go to https://ollinet.faucet.agoric.net and fund your `ollinet` relayer account
|
|
33
|
-
printed above with BLD/IBC toy tokens.
|
|
34
|
-
|
|
35
|
-
Check your relayer balances. Both `local` and `ollinet` relayer accounts should
|
|
36
|
-
show `ubld` and `uist`:
|
|
37
|
-
|
|
38
|
-
```console
|
|
39
|
-
$ agoric ibc-setup balances
|
|
40
|
-
CHAIN AMOUNT
|
|
41
|
-
ollinet 74972124ubld
|
|
42
|
-
local 20000000uist
|
|
43
|
-
$
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Create an ICS-20 fungible token transfer channel:
|
|
47
|
-
|
|
48
|
-
```console
|
|
49
|
-
$ agoric ibc-setup ics20 -v
|
|
50
|
-
...
|
|
51
|
-
Created channel:
|
|
52
|
-
agoriclocal: transfer/channel-0 (connection-0)
|
|
53
|
-
agoricollinet-55: transfer/channel-33 (connection-12)
|
|
54
|
-
$
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Now that the channel exists, you can relay packets along it just by using:
|
|
58
|
-
|
|
59
|
-
```console
|
|
60
|
-
$ agoric ibc-relayer start -v --poll 15
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Leave this running in the background, and use the above `transfer/channel-0` or
|
|
64
|
-
`transfer/channel-33` to send tokens back and forth. The following
|
|
65
|
-
example uses the `tx ibc-transfer transfer` command, and then
|
|
66
|
-
`transfer channel-0` to indicate the `transfer/channel-0` portID/channelID. It really wants you to know this is about token *transfer*.
|
|
67
|
-
|
|
68
|
-
```console
|
|
69
|
-
$ agd --home=_agstate/keys tx ibc-transfer transfer --keyring-backend=test \
|
|
70
|
-
transfer channel-0 \
|
|
71
|
-
agoric1fwk40de0xu7gtlk8z858q2f5lfcqv33ml8qdg4 200uist \
|
|
72
|
-
--from=provision --chain-id=agoriclocal --yes
|
|
73
|
-
...
|
|
74
|
-
# Watch the ibc-relayer send a packet and its acknowledgement, then...
|
|
75
|
-
$ agd query bank balances agoric1rvyry6jqmcrrm4ay9tu23rer7que8kdj4206zk
|
|
76
|
-
```
|
|
77
|
-
|
|
78
5
|
## Developing Agoric CLI
|
|
79
6
|
|
|
80
7
|
**NOTE: these steps are only for modifying the Agoric CLI. See the above for using it to create your own smart contracts.**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agoric",
|
|
3
|
-
"version": "0.22.0-
|
|
3
|
+
"version": "0.22.0-u20.0",
|
|
4
4
|
"description": "Manage the Agoric Javascript smart contract platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.js",
|
|
@@ -30,45 +30,45 @@
|
|
|
30
30
|
"lint:eslint": "eslint ."
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@agoric/cosmic-swingset": "^0.42.0-
|
|
34
|
-
"@agoric/deploy-script-support": "^0.10.4-
|
|
33
|
+
"@agoric/cosmic-swingset": "^0.42.0-u20.0",
|
|
34
|
+
"@agoric/deploy-script-support": "^0.10.4-u20.0",
|
|
35
35
|
"ava": "^5.3.0",
|
|
36
36
|
"c8": "^10.1.2"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@agoric/access-token": "^0.4.22-
|
|
40
|
-
"@agoric/cache": "^0.3.3-
|
|
41
|
-
"@agoric/casting": "^0.
|
|
42
|
-
"@agoric/client-utils": "^0.2.0-
|
|
43
|
-
"@agoric/cosmic-proto": "^0.5.0-
|
|
44
|
-
"@agoric/ertp": "^0.16.3-
|
|
45
|
-
"@agoric/governance": "^0.10.4-
|
|
46
|
-
"@agoric/inter-protocol": "^0.17.0-
|
|
47
|
-
"@agoric/internal": "^0.4.0-
|
|
48
|
-
"@agoric/network": "^0.2.0-
|
|
49
|
-
"@agoric/smart-wallet": "^0.5.4-
|
|
50
|
-
"@agoric/store": "^0.9.3-
|
|
51
|
-
"@agoric/swingset-vat": "^0.33.0-
|
|
52
|
-
"@agoric/vats": "^0.16.0-
|
|
53
|
-
"@agoric/zoe": "^0.27.0-
|
|
54
|
-
"@agoric/zone": "^0.3.0-
|
|
55
|
-
"@
|
|
56
|
-
"@cosmjs/
|
|
57
|
-
"@cosmjs/
|
|
58
|
-
"@cosmjs/
|
|
59
|
-
"@cosmjs/
|
|
60
|
-
"@
|
|
61
|
-
"@endo/bundle-source": "^
|
|
62
|
-
"@endo/captp": "^4.4.
|
|
63
|
-
"@endo/compartment-mapper": "^1.
|
|
39
|
+
"@agoric/access-token": "^0.4.22-u20.0",
|
|
40
|
+
"@agoric/cache": "^0.3.3-u20.0",
|
|
41
|
+
"@agoric/casting": "^0.5.0-u20.0",
|
|
42
|
+
"@agoric/client-utils": "^0.2.0-u20.0",
|
|
43
|
+
"@agoric/cosmic-proto": "^0.5.0-u20.0",
|
|
44
|
+
"@agoric/ertp": "^0.16.3-u20.0",
|
|
45
|
+
"@agoric/governance": "^0.10.4-u20.0",
|
|
46
|
+
"@agoric/inter-protocol": "^0.17.0-u20.0",
|
|
47
|
+
"@agoric/internal": "^0.4.0-u20.0",
|
|
48
|
+
"@agoric/network": "^0.2.0-u20.0",
|
|
49
|
+
"@agoric/smart-wallet": "^0.5.4-u20.0",
|
|
50
|
+
"@agoric/store": "^0.9.3-u20.0",
|
|
51
|
+
"@agoric/swingset-vat": "^0.33.0-u20.0",
|
|
52
|
+
"@agoric/vats": "^0.16.0-u20.0",
|
|
53
|
+
"@agoric/zoe": "^0.27.0-u20.0",
|
|
54
|
+
"@agoric/zone": "^0.3.0-u20.0",
|
|
55
|
+
"@cosmjs/crypto": "^0.33.0",
|
|
56
|
+
"@cosmjs/encoding": "^0.33.0",
|
|
57
|
+
"@cosmjs/math": "^0.33.0",
|
|
58
|
+
"@cosmjs/proto-signing": "^0.33.0",
|
|
59
|
+
"@cosmjs/stargate": "^0.33.0",
|
|
60
|
+
"@endo/base64": "^1.0.9",
|
|
61
|
+
"@endo/bundle-source": "^4.0.0",
|
|
62
|
+
"@endo/captp": "^4.4.5",
|
|
63
|
+
"@endo/compartment-mapper": "^1.6.0",
|
|
64
64
|
"@endo/env-options": "^1.1.8",
|
|
65
|
-
"@endo/errors": "^1.2.
|
|
66
|
-
"@endo/far": "^1.1.
|
|
67
|
-
"@endo/init": "^1.1.
|
|
68
|
-
"@endo/marshal": "^1.6.
|
|
69
|
-
"@endo/nat": "^5.0
|
|
70
|
-
"@endo/patterns": "^1.
|
|
71
|
-
"@endo/promise-kit": "^1.1.
|
|
65
|
+
"@endo/errors": "^1.2.10",
|
|
66
|
+
"@endo/far": "^1.1.11",
|
|
67
|
+
"@endo/init": "^1.1.9",
|
|
68
|
+
"@endo/marshal": "^1.6.4",
|
|
69
|
+
"@endo/nat": "^5.1.0",
|
|
70
|
+
"@endo/patterns": "^1.5.0",
|
|
71
|
+
"@endo/promise-kit": "^1.1.10",
|
|
72
72
|
"@endo/zip": "^1.0.9",
|
|
73
73
|
"@iarna/toml": "^2.2.3",
|
|
74
74
|
"anylogger": "^0.21.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"workerThreads": false
|
|
101
101
|
},
|
|
102
102
|
"typeCoverage": {
|
|
103
|
-
"atLeast": 78.
|
|
103
|
+
"atLeast": 78.96
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "8e4207fa19dabf76c1f91f8779b5b5b93570ecea"
|
|
106
106
|
}
|
package/src/install.js
CHANGED
|
@@ -32,7 +32,7 @@ export default async function installMain(progname, rawArgs, powers, opts) {
|
|
|
32
32
|
const rimraf = file => pspawn('rm', ['-rf', file]);
|
|
33
33
|
|
|
34
34
|
async function getWorktreePackagePaths(cwd = '.', map = new Map()) {
|
|
35
|
-
for (const { name, location } of listWorkspaces({ execFileSync })) {
|
|
35
|
+
for (const { name, location } of listWorkspaces({ execFileSync }, cwd)) {
|
|
36
36
|
map.set(name, path.resolve(cwd, location));
|
|
37
37
|
}
|
|
38
38
|
return map;
|
package/src/lib/chain.js
CHANGED
|
@@ -216,7 +216,7 @@ export const pollTx = async (txhash, opts) => {
|
|
|
216
216
|
...nodeArgs,
|
|
217
217
|
...outJson,
|
|
218
218
|
],
|
|
219
|
-
{ stdio: ['ignore', 'pipe', '
|
|
219
|
+
{ stdio: ['ignore', 'pipe', 'pipe'] },
|
|
220
220
|
);
|
|
221
221
|
// XXX this type is defined in a .proto file somewhere
|
|
222
222
|
/** @type {{ height: string, txhash: string, code: number, timestamp: string }} */
|
|
@@ -8,13 +8,15 @@
|
|
|
8
8
|
* Omits the root
|
|
9
9
|
*
|
|
10
10
|
* @param {{ execFileSync: execFileSync }} io
|
|
11
|
+
* @param {string} [root]
|
|
11
12
|
* @returns {Array<{ location: string, name: string }>}
|
|
12
13
|
*/
|
|
13
|
-
export const listWorkspaces = ({ execFileSync }) => {
|
|
14
|
+
export const listWorkspaces = ({ execFileSync }, root) => {
|
|
14
15
|
const out = execFileSync('npm', ['query', '.workspace'], {
|
|
15
16
|
stdio: ['ignore', 'pipe', 'inherit'],
|
|
16
17
|
shell: true,
|
|
17
18
|
encoding: 'utf-8',
|
|
19
|
+
cwd: root,
|
|
18
20
|
});
|
|
19
21
|
/** @type {Array<{ location: string, name: string, description: string }>} */
|
|
20
22
|
const result = JSON.parse(out);
|
package/src/main.js
CHANGED
|
@@ -87,19 +87,6 @@ const main = async (progname, rawArgs, powers) => {
|
|
|
87
87
|
return subMain(cosmosMain, ['cosmos', ...command], opts);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
const ibcSetup = path.join(
|
|
91
|
-
dirname,
|
|
92
|
-
'..',
|
|
93
|
-
'node_modules',
|
|
94
|
-
'.bin',
|
|
95
|
-
'ibc-setup',
|
|
96
|
-
);
|
|
97
|
-
program.command(
|
|
98
|
-
'ibc-setup <command...>',
|
|
99
|
-
'set up Inter Blockchain Communication',
|
|
100
|
-
{ executableFile: ibcSetup },
|
|
101
|
-
);
|
|
102
|
-
|
|
103
90
|
baseCmd('open')
|
|
104
91
|
.description('launch the Agoric UI')
|
|
105
92
|
.option(
|
|
@@ -184,21 +171,6 @@ const main = async (progname, rawArgs, powers) => {
|
|
|
184
171
|
return subMain(setDefaultsMain, ['set-defaults', prog, configDir], opts);
|
|
185
172
|
});
|
|
186
173
|
|
|
187
|
-
const ibcRelayer = path.join(
|
|
188
|
-
dirname,
|
|
189
|
-
'..',
|
|
190
|
-
'node_modules',
|
|
191
|
-
'.bin',
|
|
192
|
-
'ibc-relayer',
|
|
193
|
-
);
|
|
194
|
-
program.command(
|
|
195
|
-
'ibc-relayer',
|
|
196
|
-
'run an Inter Blockchain Communications relayer',
|
|
197
|
-
{
|
|
198
|
-
executableFile: ibcRelayer,
|
|
199
|
-
},
|
|
200
|
-
);
|
|
201
|
-
|
|
202
174
|
baseCmd('install [force-sdk-version]')
|
|
203
175
|
.description('install Dapp dependencies')
|
|
204
176
|
.action(async (forceSdkVersion, _options, cmd) => {
|
|
@@ -210,17 +182,13 @@ const main = async (progname, rawArgs, powers) => {
|
|
|
210
182
|
baseCmd('follow <path-spec...>')
|
|
211
183
|
.description('follow an Agoric Casting leader')
|
|
212
184
|
.option(
|
|
213
|
-
'--proof <
|
|
214
|
-
|
|
185
|
+
'--proof <none>',
|
|
186
|
+
`set proof mode (currently only 'none' is supported)`,
|
|
215
187
|
value => {
|
|
216
|
-
assert(
|
|
217
|
-
['strict', 'optimistic', 'none'].includes(value),
|
|
218
|
-
X`--proof must be one of 'strict', 'optimistic', or 'none'`,
|
|
219
|
-
TypeError,
|
|
220
|
-
);
|
|
188
|
+
assert.equal(value, 'none', X`--proof can only be 'none'`, TypeError);
|
|
221
189
|
return value;
|
|
222
190
|
},
|
|
223
|
-
'
|
|
191
|
+
'none',
|
|
224
192
|
)
|
|
225
193
|
.option(
|
|
226
194
|
'--sleep <seconds>',
|
package/src/sdk-package-names.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// DO NOT EDIT - automatically generated by get-sdk-package-names.js
|
|
2
2
|
// prettier-ignore
|
|
3
3
|
export default [
|
|
4
|
+
"@aglocal/benchmark",
|
|
5
|
+
"@aglocal/boot",
|
|
6
|
+
"@aglocal/deployment",
|
|
7
|
+
"@aglocal/fast-usdc-contract",
|
|
8
|
+
"@aglocal/fast-usdc-deploy",
|
|
9
|
+
"@aglocal/swingset-runner",
|
|
4
10
|
"@agoric/access-token",
|
|
5
11
|
"@agoric/async-flow",
|
|
6
12
|
"@agoric/base-zone",
|
|
7
|
-
"@agoric/benchmark",
|
|
8
|
-
"@agoric/boot",
|
|
9
13
|
"@agoric/builders",
|
|
10
14
|
"@agoric/cache",
|
|
11
15
|
"@agoric/casting",
|
|
@@ -15,7 +19,6 @@ export default [
|
|
|
15
19
|
"@agoric/cosmos",
|
|
16
20
|
"@agoric/create-dapp",
|
|
17
21
|
"@agoric/deploy-script-support",
|
|
18
|
-
"@agoric/deployment",
|
|
19
22
|
"@agoric/ertp",
|
|
20
23
|
"@agoric/eslint-config",
|
|
21
24
|
"@agoric/fast-usdc",
|
|
@@ -36,7 +39,6 @@ export default [
|
|
|
36
39
|
"@agoric/store",
|
|
37
40
|
"@agoric/swing-store",
|
|
38
41
|
"@agoric/swingset-liveslots",
|
|
39
|
-
"@agoric/swingset-runner",
|
|
40
42
|
"@agoric/swingset-vat",
|
|
41
43
|
"@agoric/swingset-xsnap-supervisor",
|
|
42
44
|
"@agoric/telemetry",
|