agoric 0.21.2-dev-b4286a6.0.b4286a6 → 0.21.2-dev-b95c1c8.0.b95c1c8
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 +20 -20
- package/src/bin-agops.js +0 -2
- package/src/commands/inter.js +0 -96
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agoric",
|
|
3
|
-
"version": "0.21.2-dev-
|
|
3
|
+
"version": "0.21.2-dev-b95c1c8.0.b95c1c8",
|
|
4
4
|
"description": "Manage the Agoric Javascript smart contract platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.js",
|
|
@@ -30,28 +30,28 @@
|
|
|
30
30
|
"lint:eslint": "yarn run -T eslint ."
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@agoric/cosmic-swingset": "0.41.4-dev-
|
|
34
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
33
|
+
"@agoric/cosmic-swingset": "0.41.4-dev-b95c1c8.0.b95c1c8",
|
|
34
|
+
"@agoric/deploy-script-support": "0.10.4-dev-b95c1c8.0.b95c1c8",
|
|
35
35
|
"ava": "^5.3.0",
|
|
36
36
|
"c8": "^10.1.2"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@agoric/access-token": "0.4.22-dev-
|
|
40
|
-
"@agoric/cache": "0.3.3-dev-
|
|
41
|
-
"@agoric/casting": "0.4.3-dev-
|
|
42
|
-
"@agoric/client-utils": "0.1.1-dev-
|
|
43
|
-
"@agoric/cosmic-proto": "0.4.1-dev-
|
|
44
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
45
|
-
"@agoric/governance": "0.10.4-dev-
|
|
46
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
47
|
-
"@agoric/internal": "0.3.3-dev-
|
|
48
|
-
"@agoric/network": "0.1.1-dev-
|
|
49
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-dev-
|
|
51
|
-
"@agoric/swingset-vat": "0.32.3-dev-
|
|
52
|
-
"@agoric/vats": "0.15.2-dev-
|
|
53
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
54
|
-
"@agoric/zone": "0.2.3-dev-
|
|
39
|
+
"@agoric/access-token": "0.4.22-dev-b95c1c8.0.b95c1c8",
|
|
40
|
+
"@agoric/cache": "0.3.3-dev-b95c1c8.0.b95c1c8",
|
|
41
|
+
"@agoric/casting": "0.4.3-dev-b95c1c8.0.b95c1c8",
|
|
42
|
+
"@agoric/client-utils": "0.1.1-dev-b95c1c8.0.b95c1c8",
|
|
43
|
+
"@agoric/cosmic-proto": "0.4.1-dev-b95c1c8.0.b95c1c8",
|
|
44
|
+
"@agoric/ertp": "0.16.3-dev-b95c1c8.0.b95c1c8",
|
|
45
|
+
"@agoric/governance": "0.10.4-dev-b95c1c8.0.b95c1c8",
|
|
46
|
+
"@agoric/inter-protocol": "0.16.2-dev-b95c1c8.0.b95c1c8",
|
|
47
|
+
"@agoric/internal": "0.3.3-dev-b95c1c8.0.b95c1c8",
|
|
48
|
+
"@agoric/network": "0.1.1-dev-b95c1c8.0.b95c1c8",
|
|
49
|
+
"@agoric/smart-wallet": "0.5.4-dev-b95c1c8.0.b95c1c8",
|
|
50
|
+
"@agoric/store": "0.9.3-dev-b95c1c8.0.b95c1c8",
|
|
51
|
+
"@agoric/swingset-vat": "0.32.3-dev-b95c1c8.0.b95c1c8",
|
|
52
|
+
"@agoric/vats": "0.15.2-dev-b95c1c8.0.b95c1c8",
|
|
53
|
+
"@agoric/zoe": "0.26.3-dev-b95c1c8.0.b95c1c8",
|
|
54
|
+
"@agoric/zone": "0.2.3-dev-b95c1c8.0.b95c1c8",
|
|
55
55
|
"@cosmjs/crypto": "^0.36.0",
|
|
56
56
|
"@cosmjs/encoding": "^0.36.0",
|
|
57
57
|
"@cosmjs/math": "^0.36.0",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"engines": {
|
|
105
105
|
"node": "^20.9 || ^22.11"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "b95c1c8ea955b25f16fa2582bd9878d99f73fed1"
|
|
108
108
|
}
|
package/src/bin-agops.js
CHANGED
|
@@ -18,7 +18,6 @@ import { makePsmCommand } from './commands/psm.js';
|
|
|
18
18
|
import { makeReserveCommand } from './commands/reserve.js';
|
|
19
19
|
import { makeVaultsCommand } from './commands/vaults.js';
|
|
20
20
|
import { makePerfCommand } from './commands/perf.js';
|
|
21
|
-
import { makeInterCommand } from './commands/inter.js';
|
|
22
21
|
import { makeTestCommand } from './commands/test-upgrade.js';
|
|
23
22
|
|
|
24
23
|
const logger = anylogger('agops');
|
|
@@ -67,7 +66,6 @@ const procIO = {
|
|
|
67
66
|
|
|
68
67
|
program.addCommand(makeOracleCommand(procIO, logger));
|
|
69
68
|
program.addCommand(makeReserveCommand(logger, procIO));
|
|
70
|
-
program.addCommand(makeInterCommand(procIO, { fetch }));
|
|
71
69
|
program.addCommand(makeTestCommand(procIO, { fetch }));
|
|
72
70
|
|
|
73
71
|
void E.when(program.parseAsync(process.argv), undefined, err => {
|
package/src/commands/inter.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Inter Protocol Liquidation Bidding CLI
|
|
3
|
-
* @see {makeInterCommand} for main function
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// @ts-check
|
|
7
|
-
import { fetchEnvNetworkConfig, makeWalletUtils } from '@agoric/client-utils';
|
|
8
|
-
import { CommanderError } from 'commander';
|
|
9
|
-
import { bigintReplacer } from '../lib/format.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @import {VBankAssetDetail} from '@agoric/vats/tools/board-utils.js';
|
|
13
|
-
* @import {Timestamp} from '@agoric/time';
|
|
14
|
-
* @import {RelativeTimeRecord} from '@agoric/time';
|
|
15
|
-
* @import {OfferStatus} from '@agoric/smart-wallet/src/offers.js';
|
|
16
|
-
* @import {Writable} from 'stream';
|
|
17
|
-
* @import {createCommand} from 'commander';
|
|
18
|
-
* @import {execFileSync} from 'child_process';
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Make Inter Protocol commands.
|
|
23
|
-
*
|
|
24
|
-
* @param {{
|
|
25
|
-
* env: Partial<Record<string, string>>,
|
|
26
|
-
* stdout: Pick<Writable,'write'>,
|
|
27
|
-
* stderr: Pick<Writable,'write'>,
|
|
28
|
-
* now: () => number,
|
|
29
|
-
* createCommand: // Note: includes access to process.stdout, .stderr, .exit
|
|
30
|
-
* typeof createCommand,
|
|
31
|
-
* execFileSync: typeof execFileSync,
|
|
32
|
-
* setTimeout: typeof setTimeout,
|
|
33
|
-
* }} process
|
|
34
|
-
* @param {{ fetch: typeof window.fetch }} net
|
|
35
|
-
*/
|
|
36
|
-
export const makeInterCommand = (
|
|
37
|
-
{ env, stdout, setTimeout, createCommand },
|
|
38
|
-
{ fetch },
|
|
39
|
-
) => {
|
|
40
|
-
const interCmd = createCommand('inter')
|
|
41
|
-
.description('Inter Protocol commands for liquidation bidding etc.')
|
|
42
|
-
.option('--home <dir>', 'agd CosmosSDK application home directory')
|
|
43
|
-
.option(
|
|
44
|
-
'--fees <amount>',
|
|
45
|
-
'set fees for transaction broadcast (e.g. 5000ubld)',
|
|
46
|
-
)
|
|
47
|
-
.option(
|
|
48
|
-
'--keyring-backend <os|file|test>',
|
|
49
|
-
`keyring's backend (os|file|test) (default "${
|
|
50
|
-
env.AGORIC_KEYRING_BACKEND || 'os'
|
|
51
|
-
}")`,
|
|
52
|
-
env.AGORIC_KEYRING_BACKEND,
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
/** @param {number} ms */
|
|
56
|
-
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
57
|
-
const show = (info, indent = false) =>
|
|
58
|
-
stdout.write(
|
|
59
|
-
`${JSON.stringify(info, bigintReplacer, indent ? 2 : undefined)}\n`,
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
const tryMakeUtils = async () => {
|
|
63
|
-
await null;
|
|
64
|
-
try {
|
|
65
|
-
// XXX pass fetch to getNetworkConfig() explicitly
|
|
66
|
-
// await null above makes this await safe
|
|
67
|
-
const networkConfig = await fetchEnvNetworkConfig({ env, fetch });
|
|
68
|
-
return makeWalletUtils({ fetch, delay }, networkConfig);
|
|
69
|
-
} catch (err) {
|
|
70
|
-
// CommanderError is a class constructor, and so
|
|
71
|
-
// must be invoked with `new`.
|
|
72
|
-
throw new CommanderError(1, 'RPC_FAIL', err.message);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const assetCmd = interCmd
|
|
77
|
-
.command('vbank')
|
|
78
|
-
.description('vbank asset commands');
|
|
79
|
-
assetCmd
|
|
80
|
-
.command('list')
|
|
81
|
-
.description('list registered assets with decimalPlaces, boardId, etc.')
|
|
82
|
-
.action(async () => {
|
|
83
|
-
const { agoricNames } = await tryMakeUtils();
|
|
84
|
-
const assets = Object.values(agoricNames.vbankAsset).map(a => {
|
|
85
|
-
return {
|
|
86
|
-
issuerName: a.issuerName,
|
|
87
|
-
denom: a.denom,
|
|
88
|
-
brand: { boardId: a.brand.getBoardId() },
|
|
89
|
-
displayInfo: { decimalPlaces: a.displayInfo.decimalPlaces },
|
|
90
|
-
};
|
|
91
|
-
});
|
|
92
|
-
show(assets, true);
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
return interCmd;
|
|
96
|
-
};
|