@agoric/builders 0.1.1-dev-a07a77d.0.a07a77d → 0.1.1-dev-831b42e.0.831b42e
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-831b42e.0.831b42e",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
"author": "Agoric",
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agoric/
|
|
27
|
-
"@agoric/
|
|
28
|
-
"@agoric/
|
|
29
|
-
"@agoric/
|
|
30
|
-
"@agoric/
|
|
31
|
-
"@agoric/
|
|
32
|
-
"@agoric/
|
|
26
|
+
"@agoric/client-utils": "0.1.1-dev-831b42e.0.831b42e",
|
|
27
|
+
"@agoric/ertp": "0.16.3-dev-831b42e.0.831b42e",
|
|
28
|
+
"@agoric/internal": "0.3.3-dev-831b42e.0.831b42e",
|
|
29
|
+
"@agoric/notifier": "0.6.3-dev-831b42e.0.831b42e",
|
|
30
|
+
"@agoric/smart-wallet": "0.5.4-dev-831b42e.0.831b42e",
|
|
31
|
+
"@agoric/vat-data": "0.5.3-dev-831b42e.0.831b42e",
|
|
32
|
+
"@agoric/vats": "0.15.2-dev-831b42e.0.831b42e",
|
|
33
|
+
"@agoric/zoe": "0.26.3-dev-831b42e.0.831b42e",
|
|
33
34
|
"@endo/bundle-source": "^4.1.2",
|
|
34
35
|
"@endo/captp": "^4.4.8",
|
|
35
36
|
"@endo/eventual-send": "^1.3.4",
|
|
@@ -43,14 +44,14 @@
|
|
|
43
44
|
"import-meta-resolve": "^4.1.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
47
|
-
"@agoric/governance": "0.10.4-dev-
|
|
48
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
49
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
50
|
-
"@agoric/store": "0.9.3-dev-
|
|
51
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
52
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
53
|
-
"@agoric/time": "0.3.3-dev-
|
|
47
|
+
"@agoric/deploy-script-support": "0.10.4-dev-831b42e.0.831b42e",
|
|
48
|
+
"@agoric/governance": "0.10.4-dev-831b42e.0.831b42e",
|
|
49
|
+
"@agoric/inter-protocol": "0.16.2-dev-831b42e.0.831b42e",
|
|
50
|
+
"@agoric/orchestration": "0.1.1-dev-831b42e.0.831b42e",
|
|
51
|
+
"@agoric/store": "0.9.3-dev-831b42e.0.831b42e",
|
|
52
|
+
"@agoric/swing-store": "0.9.2-dev-831b42e.0.831b42e",
|
|
53
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-831b42e.0.831b42e",
|
|
54
|
+
"@agoric/time": "0.3.3-dev-831b42e.0.831b42e",
|
|
54
55
|
"@endo/errors": "^1.2.13",
|
|
55
56
|
"ava": "^5.3.0",
|
|
56
57
|
"c8": "^10.1.3"
|
|
@@ -83,5 +84,5 @@
|
|
|
83
84
|
"typeCoverage": {
|
|
84
85
|
"atLeast": 89.94
|
|
85
86
|
},
|
|
86
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "831b42eb5de004688a4d667ee1f9a6149e946189"
|
|
87
88
|
}
|
|
@@ -55,8 +55,15 @@ export default async (homeP, endowments) => {
|
|
|
55
55
|
if (!flags.net) throw Error('--net required');
|
|
56
56
|
if (!flags.peer) throw Error('--peer required');
|
|
57
57
|
|
|
58
|
+
const validNets = ['bootstrap', 'devnet', 'emerynet', 'local'];
|
|
59
|
+
if (!validNets.includes(flags.net)) {
|
|
60
|
+
throw Error(`--net must be one of: ${validNets.join(', ')}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
58
63
|
const chainDetails = await getChainConfig({
|
|
59
|
-
net:
|
|
64
|
+
net: /** @type {'bootstrap' | 'devnet' | 'emerynet' | 'local'} */ (
|
|
65
|
+
flags.net
|
|
66
|
+
),
|
|
60
67
|
peers: flags.peer,
|
|
61
68
|
execFileSync,
|
|
62
69
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IBCConnectionInfoShape } from '@agoric/orchestration/src/typeGuards.js';
|
|
2
2
|
import { mustMatch } from '@endo/patterns';
|
|
3
3
|
import { makeAgd } from '@agoric/orchestration/src/utils/agd-lib.js';
|
|
4
|
-
import { networkConfigs } from '@agoric/orchestration/src/utils/gmp.js';
|
|
5
4
|
import * as childProcess from 'node:child_process';
|
|
6
5
|
import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js';
|
|
6
|
+
import { fetchNetworkConfig } from '@agoric/client-utils';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @import {IBCChannelID, IBCConnectionID} from '@agoric/vats';
|
|
@@ -24,11 +24,12 @@ const parsePeers = strs => {
|
|
|
24
24
|
return peerParts;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
// TODO: Can these be sourced from chain-registry?
|
|
27
28
|
/**
|
|
28
29
|
* Get the IBC chain configuration based on the provided network and peer inputs.
|
|
29
30
|
*
|
|
30
31
|
* @param {object} args - The arguments object.
|
|
31
|
-
* @param {
|
|
32
|
+
* @param {'bootstrap' | 'devnet' |'emerynet' | 'local' } args.net - Agoric network shorthand (e.g., 'emerynet').
|
|
32
33
|
* @param {string[]} args.peers - The peers to connect .
|
|
33
34
|
* @param {childProcess.execFileSync} [args.execFileSync] - Optional execFileSync function.
|
|
34
35
|
* @returns {Promise<Record<string, CosmosChainInfo>>} A promise that resolves to the chain configuration details keyed by chain name.
|
|
@@ -55,8 +56,11 @@ export const getChainConfig = async ({
|
|
|
55
56
|
const connections = {};
|
|
56
57
|
const portId = 'transfer';
|
|
57
58
|
|
|
58
|
-
const { chainId,
|
|
59
|
-
|
|
59
|
+
const { chainName: chainId, rpcAddrs } = await fetchNetworkConfig(net, {
|
|
60
|
+
fetch,
|
|
61
|
+
});
|
|
62
|
+
// XXX execFileSync bad POLA; these queries can be made with `fetch`
|
|
63
|
+
const agd = makeAgd({ execFileSync }).withOpts({ rpcAddrs });
|
|
60
64
|
|
|
61
65
|
for (const [peerName, myConn, myChan, denom] of parsePeers(peers)) {
|
|
62
66
|
console.debug(peerName, { denom });
|