agoric 0.21.2-other-dev-3eb1a1d.0 → 0.21.2-other-dev-d15096d.0.d15096d
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 +51 -49
- package/src/bin-agops.js +1 -5
- package/src/chain-config.js +9 -2
- package/src/commands/gov.js +29 -18
- package/src/commands/inter.js +17 -530
- package/src/commands/oracle.js +71 -43
- package/src/commands/perf.js +21 -13
- package/src/commands/psm.js +24 -15
- package/src/commands/reserve.js +17 -7
- package/src/commands/test-upgrade.js +15 -9
- package/src/commands/vaults.js +17 -7
- package/src/commands/wallet.js +38 -31
- package/src/deploy.js +7 -1
- package/src/entrypoint.js +1 -2
- package/src/follow.js +13 -8
- package/src/helpers.js +2 -1
- package/src/install.js +3 -11
- package/src/lib/casting.js +5 -1
- package/src/lib/chain.js +17 -31
- package/src/lib/format.js +7 -4
- package/src/lib/index.js +7 -0
- package/src/lib/packageManager.js +24 -0
- package/src/lib/wallet.js +25 -19
- package/src/main-publish.js +5 -1
- package/src/main.js +4 -36
- package/src/publish.js +15 -5
- package/src/scripts.js +10 -31
- package/src/sdk-package-names.js +12 -4
- package/src/start.js +2 -3
- package/tools/getting-started.js +30 -7
- package/src/commands/auction.js +0 -169
- package/src/lib/network-config.js +0 -41
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,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agoric",
|
|
3
|
-
"version": "0.21.2-other-dev-
|
|
3
|
+
"version": "0.21.2-other-dev-d15096d.0.d15096d",
|
|
4
4
|
"description": "Manage the Agoric Javascript smart contract platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"agops": "src/bin-agops.js",
|
|
9
|
+
"agoric": "src/entrypoint.js"
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
12
|
"./src/entrypoint.js": "./src/entrypoint.js",
|
|
13
|
-
"./src/helpers.js": "./src/helpers.js"
|
|
13
|
+
"./src/helpers.js": "./src/helpers.js",
|
|
14
|
+
"./src/lib/index.js": "./src/lib/index.js"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"src",
|
|
@@ -20,62 +21,60 @@
|
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build": "node ./scripts/get-sdk-package-names.js > src/sdk-package-names.js",
|
|
22
23
|
"test": "ava",
|
|
23
|
-
"test:c8": "c8 --all $C8_OPTIONS ava",
|
|
24
|
+
"test:c8": "c8 --all ${C8_OPTIONS:-} ava",
|
|
24
25
|
"test:xs": "exit 0",
|
|
25
26
|
"integration-test": "ava --config .ava-integration-test.config.js",
|
|
26
27
|
"lint-fix": "yarn lint:eslint --fix",
|
|
27
|
-
"lint": "run-s --continue-on-error lint:*",
|
|
28
|
-
"lint:types": "tsc",
|
|
29
|
-
"lint:eslint": "eslint ."
|
|
28
|
+
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
|
|
29
|
+
"lint:types": "yarn run -T tsc",
|
|
30
|
+
"lint:eslint": "yarn run -T eslint ."
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@agoric/cosmic-swingset": "0.41.4-other-dev-
|
|
33
|
-
"@agoric/deploy-script-support": "0.10.4-other-dev-
|
|
33
|
+
"@agoric/cosmic-swingset": "0.41.4-other-dev-d15096d.0.d15096d",
|
|
34
|
+
"@agoric/deploy-script-support": "0.10.4-other-dev-d15096d.0.d15096d",
|
|
34
35
|
"ava": "^5.3.0",
|
|
35
|
-
"c8": "^10.1.2"
|
|
36
|
-
"dd-trace": "^4.11.1"
|
|
36
|
+
"c8": "^10.1.2"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@agoric/access-token": "0.4.22-other-dev-
|
|
40
|
-
"@agoric/cache": "0.3.3-other-dev-
|
|
41
|
-
"@agoric/casting": "0.4.3-other-dev-
|
|
42
|
-
"@agoric/client-utils": "0.1.1-other-dev-
|
|
43
|
-
"@agoric/cosmic-proto": "0.4.1-other-dev-
|
|
44
|
-
"@agoric/ertp": "0.16.3-other-dev-
|
|
45
|
-
"@agoric/governance": "0.10.4-other-dev-
|
|
46
|
-
"@agoric/inter-protocol": "0.16.2-other-dev-
|
|
47
|
-
"@agoric/internal": "0.3.3-other-dev-
|
|
48
|
-
"@agoric/network": "0.1.1-other-dev-
|
|
49
|
-
"@agoric/smart-wallet": "0.5.4-other-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-other-dev-
|
|
51
|
-
"@agoric/swingset-vat": "0.32.3-other-dev-
|
|
52
|
-
"@agoric/vats": "0.15.2-other-dev-
|
|
53
|
-
"@agoric/zoe": "0.26.3-other-dev-
|
|
54
|
-
"@agoric/zone": "0.2.3-other-dev-
|
|
55
|
-
"@
|
|
56
|
-
"@cosmjs/
|
|
57
|
-
"@cosmjs/
|
|
58
|
-
"@cosmjs/
|
|
59
|
-
"@cosmjs/
|
|
60
|
-
"@
|
|
61
|
-
"@endo/bundle-source": "^
|
|
62
|
-
"@endo/captp": "^4.4.
|
|
63
|
-
"@endo/compartment-mapper": "^1.
|
|
64
|
-
"@endo/env-options": "^1.1.
|
|
65
|
-
"@endo/errors": "^1.2.
|
|
66
|
-
"@endo/far": "^1.1.
|
|
67
|
-
"@endo/init": "^1.1.
|
|
68
|
-
"@endo/marshal": "^1.
|
|
69
|
-
"@endo/nat": "^5.
|
|
70
|
-
"@endo/patterns": "^1.
|
|
71
|
-
"@endo/promise-kit": "^1.1.
|
|
72
|
-
"@endo/zip": "^1.0.
|
|
39
|
+
"@agoric/access-token": "0.4.22-other-dev-d15096d.0.d15096d",
|
|
40
|
+
"@agoric/cache": "0.3.3-other-dev-d15096d.0.d15096d",
|
|
41
|
+
"@agoric/casting": "0.4.3-other-dev-d15096d.0.d15096d",
|
|
42
|
+
"@agoric/client-utils": "0.1.1-other-dev-d15096d.0.d15096d",
|
|
43
|
+
"@agoric/cosmic-proto": "0.4.1-other-dev-d15096d.0.d15096d",
|
|
44
|
+
"@agoric/ertp": "0.16.3-other-dev-d15096d.0.d15096d",
|
|
45
|
+
"@agoric/governance": "0.10.4-other-dev-d15096d.0.d15096d",
|
|
46
|
+
"@agoric/inter-protocol": "0.16.2-other-dev-d15096d.0.d15096d",
|
|
47
|
+
"@agoric/internal": "0.3.3-other-dev-d15096d.0.d15096d",
|
|
48
|
+
"@agoric/network": "0.1.1-other-dev-d15096d.0.d15096d",
|
|
49
|
+
"@agoric/smart-wallet": "0.5.4-other-dev-d15096d.0.d15096d",
|
|
50
|
+
"@agoric/store": "0.9.3-other-dev-d15096d.0.d15096d",
|
|
51
|
+
"@agoric/swingset-vat": "0.32.3-other-dev-d15096d.0.d15096d",
|
|
52
|
+
"@agoric/vats": "0.15.2-other-dev-d15096d.0.d15096d",
|
|
53
|
+
"@agoric/zoe": "0.26.3-other-dev-d15096d.0.d15096d",
|
|
54
|
+
"@agoric/zone": "0.2.3-other-dev-d15096d.0.d15096d",
|
|
55
|
+
"@cosmjs/crypto": "^0.36.0",
|
|
56
|
+
"@cosmjs/encoding": "^0.36.0",
|
|
57
|
+
"@cosmjs/math": "^0.36.0",
|
|
58
|
+
"@cosmjs/proto-signing": "^0.36.0",
|
|
59
|
+
"@cosmjs/stargate": "^0.36.0",
|
|
60
|
+
"@endo/base64": "^1.0.12",
|
|
61
|
+
"@endo/bundle-source": "^4.1.2",
|
|
62
|
+
"@endo/captp": "^4.4.8",
|
|
63
|
+
"@endo/compartment-mapper": "^1.6.3",
|
|
64
|
+
"@endo/env-options": "^1.1.11",
|
|
65
|
+
"@endo/errors": "^1.2.13",
|
|
66
|
+
"@endo/far": "^1.1.14",
|
|
67
|
+
"@endo/init": "^1.1.12",
|
|
68
|
+
"@endo/marshal": "^1.8.0",
|
|
69
|
+
"@endo/nat": "^5.1.3",
|
|
70
|
+
"@endo/patterns": "^1.7.0",
|
|
71
|
+
"@endo/promise-kit": "^1.1.13",
|
|
72
|
+
"@endo/zip": "^1.0.11",
|
|
73
73
|
"@iarna/toml": "^2.2.3",
|
|
74
74
|
"anylogger": "^0.21.0",
|
|
75
75
|
"chalk": "^5.2.0",
|
|
76
76
|
"commander": "^12.1.0",
|
|
77
77
|
"deterministic-json": "^1.0.5",
|
|
78
|
-
"esm": "agoric-labs/esm#Agoric-built",
|
|
79
78
|
"inquirer": "^8.2.2",
|
|
80
79
|
"opener": "^1.5.2",
|
|
81
80
|
"tmp": "^0.2.1",
|
|
@@ -100,7 +99,10 @@
|
|
|
100
99
|
"workerThreads": false
|
|
101
100
|
},
|
|
102
101
|
"typeCoverage": {
|
|
103
|
-
"atLeast":
|
|
102
|
+
"atLeast": 79.84
|
|
104
103
|
},
|
|
105
|
-
"
|
|
104
|
+
"engines": {
|
|
105
|
+
"node": "^20.9 || ^22.11"
|
|
106
|
+
},
|
|
107
|
+
"gitHead": "d15096dc4ff8b96e9b6cd11954c20d3a9efbb393"
|
|
106
108
|
}
|
package/src/bin-agops.js
CHANGED
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
// @ts-check
|
|
4
4
|
// @jessie-check
|
|
5
5
|
|
|
6
|
-
import '@endo/init/pre.js';
|
|
7
|
-
|
|
8
6
|
import '@endo/init';
|
|
9
7
|
|
|
10
8
|
import { E } from '@endo/far';
|
|
@@ -21,7 +19,6 @@ import { makeReserveCommand } from './commands/reserve.js';
|
|
|
21
19
|
import { makeVaultsCommand } from './commands/vaults.js';
|
|
22
20
|
import { makePerfCommand } from './commands/perf.js';
|
|
23
21
|
import { makeInterCommand } from './commands/inter.js';
|
|
24
|
-
import { makeAuctionCommand } from './commands/auction.js';
|
|
25
22
|
import { makeTestCommand } from './commands/test-upgrade.js';
|
|
26
23
|
|
|
27
24
|
const logger = anylogger('agops');
|
|
@@ -30,7 +27,6 @@ const progname = path.basename(process.argv[1]);
|
|
|
30
27
|
const program = new Command();
|
|
31
28
|
program.name(progname).version('unversioned');
|
|
32
29
|
|
|
33
|
-
program.addCommand(makeOracleCommand(logger));
|
|
34
30
|
program.addCommand(makeGovCommand(logger));
|
|
35
31
|
program.addCommand(makePerfCommand(logger));
|
|
36
32
|
program.addCommand(makePsmCommand(logger));
|
|
@@ -69,8 +65,8 @@ const procIO = {
|
|
|
69
65
|
setTimeout,
|
|
70
66
|
};
|
|
71
67
|
|
|
68
|
+
program.addCommand(makeOracleCommand(procIO, logger));
|
|
72
69
|
program.addCommand(makeReserveCommand(logger, procIO));
|
|
73
|
-
program.addCommand(makeAuctionCommand(logger, { ...procIO, fetch }));
|
|
74
70
|
program.addCommand(makeInterCommand(procIO, { fetch }));
|
|
75
71
|
program.addCommand(makeTestCommand(procIO, { fetch }));
|
|
76
72
|
|
package/src/chain-config.js
CHANGED
|
@@ -132,6 +132,7 @@ export function finishCosmosApp({
|
|
|
132
132
|
|
|
133
133
|
// Optionally enable the rosetta service
|
|
134
134
|
if (enableRosetta) {
|
|
135
|
+
app.rosetta ||= {};
|
|
135
136
|
app.rosetta.enable = enableRosetta;
|
|
136
137
|
app.rosetta.network = chainId;
|
|
137
138
|
app.rosetta.retries = 30;
|
|
@@ -255,8 +256,14 @@ export function finishCosmosGenesis({ genesisJson, exportedGenesisJson }) {
|
|
|
255
256
|
|
|
256
257
|
// Set the denomination for different modules.
|
|
257
258
|
genesis.app_state.mint.params.mint_denom = MINT_DENOM;
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
|
|
260
|
+
{
|
|
261
|
+
const gov = genesis.app_state.gov;
|
|
262
|
+
const depositParams = gov.params ?? gov.deposit_params;
|
|
263
|
+
const votingParams = gov.params ?? gov.voting_params;
|
|
264
|
+
depositParams.min_deposit = GOV_DEPOSIT_COINS;
|
|
265
|
+
votingParams.voting_period = GOV_VOTING_PERIOD;
|
|
266
|
+
}
|
|
260
267
|
|
|
261
268
|
// Reduce the cost of a transaction.
|
|
262
269
|
genesis.app_state.auth.params.tx_size_cost_per_byte = '1';
|
package/src/commands/gov.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
/* eslint-disable func-names */
|
|
3
3
|
/* eslint-env node */
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
fetchEnvNetworkConfig,
|
|
6
|
+
makeAgoricNames,
|
|
7
|
+
makeVstorageKit,
|
|
8
|
+
} from '@agoric/client-utils';
|
|
5
9
|
import { execFileSync as execFileSyncAmbient } from 'child_process';
|
|
6
10
|
import { Command, CommanderError } from 'commander';
|
|
7
11
|
import { normalizeAddressWithOptions, pollBlocks } from '../lib/chain.js';
|
|
8
|
-
import { getNetworkConfig } from '../lib/network-config.js';
|
|
9
12
|
import {
|
|
10
13
|
findContinuingIds,
|
|
11
14
|
getCurrent,
|
|
@@ -15,8 +18,12 @@ import {
|
|
|
15
18
|
} from '../lib/wallet.js';
|
|
16
19
|
|
|
17
20
|
/**
|
|
18
|
-
* @import {OfferSpec} from '@agoric/smart-wallet/src/offers.js'
|
|
19
|
-
* @import {
|
|
21
|
+
* @import {OfferSpec} from '@agoric/smart-wallet/src/offers.js';
|
|
22
|
+
* @import {AgoricNamesRemotes} from '@agoric/vats/tools/board-utils.js';
|
|
23
|
+
* @import {CurrentWalletRecord} from '@agoric/smart-wallet/src/smartWallet.js';
|
|
24
|
+
* @import {VstorageKit} from '@agoric/client-utils';
|
|
25
|
+
* @import {Logger} from 'anylogger';
|
|
26
|
+
* @import {Writable} from 'stream';
|
|
20
27
|
*/
|
|
21
28
|
|
|
22
29
|
const collectValues = (val, memo) => {
|
|
@@ -26,15 +33,15 @@ const collectValues = (val, memo) => {
|
|
|
26
33
|
|
|
27
34
|
const defaultKeyring = process.env.AGORIC_KEYRING_BACKEND || 'test';
|
|
28
35
|
|
|
29
|
-
const networkConfig = await
|
|
36
|
+
const networkConfig = await fetchEnvNetworkConfig({ env: process.env, fetch });
|
|
30
37
|
|
|
31
38
|
/**
|
|
32
|
-
* @param {
|
|
39
|
+
* @param {Logger} _logger
|
|
33
40
|
* @param {{
|
|
34
41
|
* env?: Record<string, string|undefined>,
|
|
35
42
|
* fetch?: typeof window.fetch,
|
|
36
|
-
* stdout?: Pick<
|
|
37
|
-
* stderr?: Pick<
|
|
43
|
+
* stdout?: Pick<Writable, 'write'>,
|
|
44
|
+
* stderr?: Pick<Writable, 'write'>,
|
|
38
45
|
* execFileSync?: typeof execFileSyncAmbient,
|
|
39
46
|
* delay?: (ms: number) => Promise<void>,
|
|
40
47
|
* }} [io]
|
|
@@ -86,19 +93,21 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
86
93
|
* given a sendFrom address; else print it.
|
|
87
94
|
*
|
|
88
95
|
* @param {{
|
|
89
|
-
* toOffer: (agoricNames:
|
|
96
|
+
* toOffer: (agoricNames: AgoricNamesRemotes, current: CurrentWalletRecord | undefined) => OfferSpec,
|
|
90
97
|
* sendFrom?: string | undefined,
|
|
91
98
|
* keyringBackend: string,
|
|
92
99
|
* instanceName?: string,
|
|
93
100
|
* }} detail
|
|
94
|
-
* @param {
|
|
101
|
+
* @param {VstorageKit} [vsk]
|
|
95
102
|
*/
|
|
96
103
|
const processOffer = async function (
|
|
97
104
|
{ toOffer, sendFrom, keyringBackend },
|
|
98
|
-
|
|
105
|
+
vsk,
|
|
99
106
|
) {
|
|
100
|
-
|
|
101
|
-
|
|
107
|
+
await null;
|
|
108
|
+
vsk ||= makeVstorageKit({ fetch }, networkConfig);
|
|
109
|
+
const { readPublished } = vsk;
|
|
110
|
+
const agoricNames = await makeAgoricNames(vsk.fromBoard, vsk.vstorage);
|
|
102
111
|
|
|
103
112
|
assert(keyringBackend, 'missing keyring-backend option');
|
|
104
113
|
|
|
@@ -265,10 +274,11 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
265
274
|
)
|
|
266
275
|
.requiredOption('--for <string>', 'description of the invitation')
|
|
267
276
|
.action(async opts => {
|
|
268
|
-
const {
|
|
277
|
+
const { readPublished, ...vsk } = makeVstorageKit(
|
|
269
278
|
{ fetch },
|
|
270
279
|
networkConfig,
|
|
271
280
|
);
|
|
281
|
+
const agoricNames = await makeAgoricNames(vsk.fromBoard, vsk.vstorage);
|
|
272
282
|
const current = await getCurrent(opts.from, { readPublished });
|
|
273
283
|
|
|
274
284
|
const known = findContinuingIds(current, agoricNames);
|
|
@@ -294,10 +304,11 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
294
304
|
normalizeAddress,
|
|
295
305
|
)
|
|
296
306
|
.action(async opts => {
|
|
297
|
-
const {
|
|
307
|
+
const { readPublished, ...vsk } = makeVstorageKit(
|
|
298
308
|
{ fetch },
|
|
299
309
|
networkConfig,
|
|
300
310
|
);
|
|
311
|
+
const agoricNames = await makeAgoricNames(vsk.fromBoard, vsk.vstorage);
|
|
301
312
|
const current = await getCurrent(opts.from, { readPublished });
|
|
302
313
|
|
|
303
314
|
const found = findContinuingIds(current, agoricNames);
|
|
@@ -333,8 +344,8 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
333
344
|
normalizeAddress,
|
|
334
345
|
)
|
|
335
346
|
.action(async function (opts, options) {
|
|
336
|
-
const
|
|
337
|
-
const { readPublished } =
|
|
347
|
+
const vsk = makeVstorageKit({ fetch }, networkConfig);
|
|
348
|
+
const { readPublished } = vsk;
|
|
338
349
|
|
|
339
350
|
const questionDesc = await readPublished(
|
|
340
351
|
`committees.${opts.pathname}.latestQuestion`,
|
|
@@ -384,7 +395,7 @@ export const makeGovCommand = (_logger, io = {}) => {
|
|
|
384
395
|
sendFrom: opts.sendFrom,
|
|
385
396
|
keyringBackend: options.optsWithGlobals().keyringBackend,
|
|
386
397
|
},
|
|
387
|
-
|
|
398
|
+
vsk,
|
|
388
399
|
);
|
|
389
400
|
});
|
|
390
401
|
|