@agoric/builders 0.1.1-dev-33eb3c9.0 → 0.1.1-dev-c962ba0.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/package.json +17 -17
- package/scripts/orchestration/helpers.js +46 -0
- package/scripts/orchestration/init-basic-flows.js +2 -33
- package/scripts/orchestration/init-stakeAtom.js +11 -2
- package/scripts/orchestration/init-stakeOsmo.js +11 -2
- package/scripts/testing/init-auto-stake-it.js +2 -33
- package/scripts/testing/init-send-anywhere.js +2 -33
- package/scripts/testing/start-query-flows.js +43 -23
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-c962ba0.0+c962ba0",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"author": "Agoric",
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
27
|
-
"@agoric/internal": "0.3.3-dev-
|
|
28
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
29
|
-
"@agoric/smart-wallet": "0.5.4-dev-
|
|
30
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
31
|
-
"@agoric/vats": "0.15.2-dev-
|
|
32
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
26
|
+
"@agoric/ertp": "0.16.3-dev-c962ba0.0+c962ba0",
|
|
27
|
+
"@agoric/internal": "0.3.3-dev-c962ba0.0+c962ba0",
|
|
28
|
+
"@agoric/notifier": "0.6.3-dev-c962ba0.0+c962ba0",
|
|
29
|
+
"@agoric/smart-wallet": "0.5.4-dev-c962ba0.0+c962ba0",
|
|
30
|
+
"@agoric/vat-data": "0.5.3-dev-c962ba0.0+c962ba0",
|
|
31
|
+
"@agoric/vats": "0.15.2-dev-c962ba0.0+c962ba0",
|
|
32
|
+
"@agoric/zoe": "0.26.3-dev-c962ba0.0+c962ba0",
|
|
33
33
|
"@endo/bundle-source": "^4.0.0",
|
|
34
34
|
"@endo/captp": "^4.4.5",
|
|
35
35
|
"@endo/eventual-send": "^1.3.1",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"import-meta-resolve": "^4.1.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@agoric/deploy-script-support": "0.10.4-dev-
|
|
46
|
-
"@agoric/governance": "0.10.4-dev-
|
|
47
|
-
"@agoric/inter-protocol": "0.16.2-dev-
|
|
48
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
49
|
-
"@agoric/store": "0.9.3-dev-
|
|
50
|
-
"@agoric/swing-store": "0.9.2-dev-
|
|
51
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
52
|
-
"@agoric/time": "0.3.3-dev-
|
|
45
|
+
"@agoric/deploy-script-support": "0.10.4-dev-c962ba0.0+c962ba0",
|
|
46
|
+
"@agoric/governance": "0.10.4-dev-c962ba0.0+c962ba0",
|
|
47
|
+
"@agoric/inter-protocol": "0.16.2-dev-c962ba0.0+c962ba0",
|
|
48
|
+
"@agoric/orchestration": "0.1.1-dev-c962ba0.0+c962ba0",
|
|
49
|
+
"@agoric/store": "0.9.3-dev-c962ba0.0+c962ba0",
|
|
50
|
+
"@agoric/swing-store": "0.9.2-dev-c962ba0.0+c962ba0",
|
|
51
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-c962ba0.0+c962ba0",
|
|
52
|
+
"@agoric/time": "0.3.3-dev-c962ba0.0+c962ba0",
|
|
53
53
|
"@endo/errors": "^1.2.10",
|
|
54
54
|
"ava": "^5.3.0",
|
|
55
55
|
"c8": "^10.1.3"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"typeCoverage": {
|
|
83
83
|
"atLeast": 90.62
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "c962ba0771022947027b9bd76339a3ab21406b20"
|
|
86
86
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import {DeployScriptEndownments} from '@agoric/deploy-script-support/src/externalTypes.js';
|
|
3
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
4
|
+
* @import {ParseArgsConfig} from 'node:util'
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Parse `chainInfo` and `assetInfo` into builder opts
|
|
9
|
+
*
|
|
10
|
+
* NOTE: Ambient authority via `node:util`
|
|
11
|
+
*
|
|
12
|
+
* @param {DeployScriptEndownments['scriptArgs']} scriptArgs
|
|
13
|
+
* @returns {Promise<{
|
|
14
|
+
* chainInfo: Record<string, CosmosChainInfo>;
|
|
15
|
+
* assetInfo: [Denom, DenomDetail & { brandKey?: string }][];
|
|
16
|
+
* }>}
|
|
17
|
+
*/
|
|
18
|
+
export const parseChainHubOpts = async scriptArgs => {
|
|
19
|
+
// import dynamically so the modules can work in CoreEval environment
|
|
20
|
+
const { parseArgs } = await import('node:util');
|
|
21
|
+
|
|
22
|
+
/** @type {ParseArgsConfig['options']} */
|
|
23
|
+
const parserOpts = {
|
|
24
|
+
chainInfo: { type: 'string' },
|
|
25
|
+
assetInfo: { type: 'string' },
|
|
26
|
+
};
|
|
27
|
+
const {
|
|
28
|
+
values: { chainInfo, assetInfo },
|
|
29
|
+
} = parseArgs({
|
|
30
|
+
args: scriptArgs,
|
|
31
|
+
options: parserOpts,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const parseChainInfo = () => {
|
|
35
|
+
if (typeof chainInfo !== 'string') return undefined;
|
|
36
|
+
return JSON.parse(chainInfo);
|
|
37
|
+
};
|
|
38
|
+
const parseAssetInfo = () => {
|
|
39
|
+
if (typeof assetInfo !== 'string') return undefined;
|
|
40
|
+
return JSON.parse(assetInfo);
|
|
41
|
+
};
|
|
42
|
+
return harden({
|
|
43
|
+
chainInfo: parseChainInfo(),
|
|
44
|
+
assetInfo: parseAssetInfo(),
|
|
45
|
+
});
|
|
46
|
+
};
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
2
|
import { startBasicFlows } from '@agoric/orchestration/src/proposals/start-basic-flows.js';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @import {ParseArgsConfig} from 'node:util'
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/** @type {ParseArgsConfig['options']} */
|
|
10
|
-
const parserOpts = {
|
|
11
|
-
chainInfo: { type: 'string' },
|
|
12
|
-
assetInfo: { type: 'string' },
|
|
13
|
-
};
|
|
3
|
+
import { parseChainHubOpts } from './helpers.js';
|
|
14
4
|
|
|
15
5
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
16
6
|
export const defaultProposalBuilder = async (
|
|
@@ -38,29 +28,8 @@ export const defaultProposalBuilder = async (
|
|
|
38
28
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
39
29
|
export default async (homeP, endowments) => {
|
|
40
30
|
const { scriptArgs } = endowments;
|
|
41
|
-
|
|
42
|
-
const {
|
|
43
|
-
values: { chainInfo, assetInfo },
|
|
44
|
-
} = parseArgs({
|
|
45
|
-
args: scriptArgs,
|
|
46
|
-
options: parserOpts,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const parseChainInfo = () => {
|
|
50
|
-
if (typeof chainInfo !== 'string') return undefined;
|
|
51
|
-
return JSON.parse(chainInfo);
|
|
52
|
-
};
|
|
53
|
-
const parseAssetInfo = () => {
|
|
54
|
-
if (typeof assetInfo !== 'string') return undefined;
|
|
55
|
-
return JSON.parse(assetInfo);
|
|
56
|
-
};
|
|
57
|
-
const opts = harden({
|
|
58
|
-
chainInfo: parseChainInfo(),
|
|
59
|
-
assetInfo: parseAssetInfo(),
|
|
60
|
-
});
|
|
61
|
-
|
|
31
|
+
const opts = parseChainHubOpts(scriptArgs);
|
|
62
32
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
63
|
-
|
|
64
33
|
await writeCoreEval(startBasicFlows.name, utils =>
|
|
65
34
|
defaultProposalBuilder(utils, opts),
|
|
66
35
|
);
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { parseChainHubOpts } from './helpers.js';
|
|
2
3
|
|
|
3
4
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
4
|
-
export const defaultProposalBuilder = async (
|
|
5
|
+
export const defaultProposalBuilder = async (
|
|
6
|
+
{ publishRef, install },
|
|
7
|
+
options,
|
|
8
|
+
) => {
|
|
5
9
|
return harden({
|
|
6
10
|
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeAtom.js',
|
|
7
11
|
getManifestCall: [
|
|
@@ -12,6 +16,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
12
16
|
install('@agoric/orchestration/src/examples/stake-ica.contract.js'),
|
|
13
17
|
),
|
|
14
18
|
},
|
|
19
|
+
options,
|
|
15
20
|
},
|
|
16
21
|
],
|
|
17
22
|
});
|
|
@@ -19,6 +24,10 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
19
24
|
|
|
20
25
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
21
26
|
export default async (homeP, endowments) => {
|
|
27
|
+
const { scriptArgs } = endowments;
|
|
28
|
+
const opts = parseChainHubOpts(scriptArgs);
|
|
22
29
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
23
|
-
await writeCoreEval('start-stakeAtom',
|
|
30
|
+
await writeCoreEval('start-stakeAtom', utils =>
|
|
31
|
+
defaultProposalBuilder(utils, opts),
|
|
32
|
+
);
|
|
24
33
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { parseChainHubOpts } from './helpers.js';
|
|
2
3
|
|
|
3
4
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
4
|
-
export const defaultProposalBuilder = async (
|
|
5
|
+
export const defaultProposalBuilder = async (
|
|
6
|
+
{ publishRef, install },
|
|
7
|
+
options,
|
|
8
|
+
) => {
|
|
5
9
|
return harden({
|
|
6
10
|
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeOsmo.js',
|
|
7
11
|
getManifestCall: [
|
|
@@ -12,6 +16,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
12
16
|
install('@agoric/orchestration/src/examples/stake-ica.contract.js'),
|
|
13
17
|
),
|
|
14
18
|
},
|
|
19
|
+
options,
|
|
15
20
|
},
|
|
16
21
|
],
|
|
17
22
|
});
|
|
@@ -19,6 +24,10 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
19
24
|
|
|
20
25
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
21
26
|
export default async (homeP, endowments) => {
|
|
27
|
+
const { scriptArgs } = endowments;
|
|
28
|
+
const opts = parseChainHubOpts(scriptArgs);
|
|
22
29
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
23
|
-
await writeCoreEval('start-stakeOsmo',
|
|
30
|
+
await writeCoreEval('start-stakeOsmo', utils =>
|
|
31
|
+
defaultProposalBuilder(utils, opts),
|
|
32
|
+
);
|
|
24
33
|
};
|
|
@@ -6,17 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
8
8
|
import { startAutoStakeIt } from '@agoric/orchestration/src/proposals/start-auto-stake-it.js';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @import {ParseArgsConfig} from 'node:util'
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/** @type {ParseArgsConfig['options']} */
|
|
16
|
-
const parserOpts = {
|
|
17
|
-
chainInfo: { type: 'string' },
|
|
18
|
-
assetInfo: { type: 'string' },
|
|
19
|
-
};
|
|
9
|
+
import { parseChainHubOpts } from '../orchestration/helpers.js';
|
|
20
10
|
|
|
21
11
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
22
12
|
export const defaultProposalBuilder = async (
|
|
@@ -44,29 +34,8 @@ export const defaultProposalBuilder = async (
|
|
|
44
34
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
45
35
|
export default async (homeP, endowments) => {
|
|
46
36
|
const { scriptArgs } = endowments;
|
|
47
|
-
|
|
48
|
-
const {
|
|
49
|
-
values: { chainInfo, assetInfo },
|
|
50
|
-
} = parseArgs({
|
|
51
|
-
args: scriptArgs,
|
|
52
|
-
options: parserOpts,
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const parseChainInfo = () => {
|
|
56
|
-
if (typeof chainInfo !== 'string') return undefined;
|
|
57
|
-
return JSON.parse(chainInfo);
|
|
58
|
-
};
|
|
59
|
-
const parseAssetInfo = () => {
|
|
60
|
-
if (typeof assetInfo !== 'string') return undefined;
|
|
61
|
-
return JSON.parse(assetInfo);
|
|
62
|
-
};
|
|
63
|
-
const opts = harden({
|
|
64
|
-
chainInfo: parseChainInfo(),
|
|
65
|
-
assetInfo: parseAssetInfo(),
|
|
66
|
-
});
|
|
67
|
-
|
|
37
|
+
const opts = parseChainHubOpts(scriptArgs);
|
|
68
38
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
69
|
-
|
|
70
39
|
await writeCoreEval(startAutoStakeIt.name, utils =>
|
|
71
40
|
defaultProposalBuilder(utils, opts),
|
|
72
41
|
);
|
|
@@ -3,17 +3,7 @@ import {
|
|
|
3
3
|
getManifest,
|
|
4
4
|
startSendAnywhere,
|
|
5
5
|
} from '@agoric/orchestration/src/proposals/start-send-anywhere.js';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @import {ParseArgsConfig} from 'node:util'
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/** @type {ParseArgsConfig['options']} */
|
|
13
|
-
const parserOpts = {
|
|
14
|
-
chainInfo: { type: 'string' },
|
|
15
|
-
assetInfo: { type: 'string' },
|
|
16
|
-
};
|
|
6
|
+
import { parseChainHubOpts } from '../orchestration/helpers.js';
|
|
17
7
|
|
|
18
8
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
19
9
|
export const defaultProposalBuilder = async (
|
|
@@ -38,29 +28,8 @@ export const defaultProposalBuilder = async (
|
|
|
38
28
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
39
29
|
export default async (homeP, endowments) => {
|
|
40
30
|
const { scriptArgs } = endowments;
|
|
41
|
-
|
|
42
|
-
const {
|
|
43
|
-
values: { chainInfo, assetInfo },
|
|
44
|
-
} = parseArgs({
|
|
45
|
-
args: scriptArgs,
|
|
46
|
-
options: parserOpts,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const parseChainInfo = () => {
|
|
50
|
-
if (typeof chainInfo !== 'string') return undefined;
|
|
51
|
-
return JSON.parse(chainInfo);
|
|
52
|
-
};
|
|
53
|
-
const parseAssetInfo = () => {
|
|
54
|
-
if (typeof assetInfo !== 'string') return undefined;
|
|
55
|
-
return JSON.parse(assetInfo);
|
|
56
|
-
};
|
|
57
|
-
const opts = harden({
|
|
58
|
-
chainInfo: parseChainInfo(),
|
|
59
|
-
assetInfo: parseAssetInfo(),
|
|
60
|
-
});
|
|
61
|
-
|
|
31
|
+
const opts = parseChainHubOpts(scriptArgs);
|
|
62
32
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
63
|
-
|
|
64
33
|
await writeCoreEval(startSendAnywhere.name, utils =>
|
|
65
34
|
defaultProposalBuilder(utils, opts),
|
|
66
35
|
);
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
import { deeplyFulfilledObject, makeTracer } from '@agoric/internal';
|
|
8
8
|
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js';
|
|
9
9
|
import { E } from '@endo/far';
|
|
10
|
+
import { parseChainHubOpts } from '../orchestration/helpers.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
13
|
+
* @import {CosmosChainInfo, Denom, DenomDetail} from '@agoric/orchestration';
|
|
12
14
|
* @import {QueryFlowsSF as StartFn} from '@agoric/orchestration/src/fixtures/query-flows.contract.js';
|
|
13
15
|
*/
|
|
14
16
|
|
|
@@ -28,25 +30,34 @@ const trace = makeTracer(contractName, true);
|
|
|
28
30
|
* };
|
|
29
31
|
* };
|
|
30
32
|
* }} powers
|
|
33
|
+
* @param {{
|
|
34
|
+
* options: {
|
|
35
|
+
* chainInfo: Record<string, CosmosChainInfo>;
|
|
36
|
+
* assetInfo: [Denom, DenomDetail & { brandKey?: string }][];
|
|
37
|
+
* };
|
|
38
|
+
* }} config
|
|
31
39
|
*/
|
|
32
|
-
export const startQueryFlows = async (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
export const startQueryFlows = async (
|
|
41
|
+
{
|
|
42
|
+
consume: {
|
|
43
|
+
agoricNames,
|
|
44
|
+
board,
|
|
45
|
+
chainStorage,
|
|
46
|
+
chainTimerService,
|
|
47
|
+
cosmosInterchainService,
|
|
48
|
+
localchain,
|
|
49
|
+
startUpgradable,
|
|
50
|
+
},
|
|
51
|
+
installation: {
|
|
52
|
+
consume: { [contractName]: installation },
|
|
53
|
+
},
|
|
54
|
+
instance: {
|
|
55
|
+
// @ts-expect-error unknown instance
|
|
56
|
+
produce: { [contractName]: produceInstance },
|
|
57
|
+
},
|
|
48
58
|
},
|
|
49
|
-
|
|
59
|
+
{ options: { chainInfo, assetInfo } },
|
|
60
|
+
) => {
|
|
50
61
|
trace(`start ${contractName}`);
|
|
51
62
|
|
|
52
63
|
const storageNode = await makeStorageNodeChild(chainStorage, contractName);
|
|
@@ -60,6 +71,8 @@ export const startQueryFlows = async ({
|
|
|
60
71
|
privateArgs: await deeplyFulfilledObject(
|
|
61
72
|
harden({
|
|
62
73
|
agoricNames,
|
|
74
|
+
assetInfo,
|
|
75
|
+
chainInfo,
|
|
63
76
|
orchestrationService: cosmosInterchainService,
|
|
64
77
|
localchain,
|
|
65
78
|
storageNode,
|
|
@@ -76,7 +89,7 @@ harden(startQueryFlows);
|
|
|
76
89
|
|
|
77
90
|
export const getManifestForContract = (
|
|
78
91
|
{ restoreRef },
|
|
79
|
-
{ installKeys,
|
|
92
|
+
{ installKeys, options },
|
|
80
93
|
) => {
|
|
81
94
|
return {
|
|
82
95
|
manifest: {
|
|
@@ -106,7 +119,10 @@ export const getManifestForContract = (
|
|
|
106
119
|
};
|
|
107
120
|
|
|
108
121
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
109
|
-
export const defaultProposalBuilder = async (
|
|
122
|
+
export const defaultProposalBuilder = async (
|
|
123
|
+
{ publishRef, install },
|
|
124
|
+
options,
|
|
125
|
+
) => {
|
|
110
126
|
return harden({
|
|
111
127
|
// Somewhat unorthodox, source the exports from this builder module
|
|
112
128
|
sourceSpec: '@agoric/builders/scripts/testing/start-query-flows.js',
|
|
@@ -120,6 +136,7 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
120
136
|
),
|
|
121
137
|
),
|
|
122
138
|
},
|
|
139
|
+
options,
|
|
123
140
|
},
|
|
124
141
|
],
|
|
125
142
|
});
|
|
@@ -127,9 +144,12 @@ export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
|
127
144
|
|
|
128
145
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
129
146
|
export default async (homeP, endowments) => {
|
|
130
|
-
// import dynamically so the
|
|
131
|
-
const
|
|
132
|
-
const {
|
|
147
|
+
// import dynamically so the modules can work in CoreEval environment
|
|
148
|
+
const { makeHelpers } = await import('@agoric/deploy-script-support');
|
|
149
|
+
const { scriptArgs } = endowments;
|
|
150
|
+
const opts = parseChainHubOpts(scriptArgs);
|
|
133
151
|
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
134
|
-
await writeCoreEval(startQueryFlows.name,
|
|
152
|
+
await writeCoreEval(startQueryFlows.name, utils =>
|
|
153
|
+
defaultProposalBuilder(utils, opts),
|
|
154
|
+
);
|
|
135
155
|
};
|