@hyperlane-xyz/cli 3.2.0 → 3.4.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/dist/src/commands/config.js +4 -4
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/deploy.js +10 -7
- package/dist/src/commands/deploy.js.map +1 -1
- package/dist/src/commands/options.d.ts.map +1 -1
- package/dist/src/commands/options.js +1 -2
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/send.js +2 -5
- package/dist/src/commands/send.js.map +1 -1
- package/dist/src/commands/status.d.ts.map +1 -1
- package/dist/src/commands/status.js +0 -2
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/config/artifacts.d.ts +9 -1
- package/dist/src/config/artifacts.d.ts.map +1 -1
- package/dist/src/config/artifacts.js +26 -2
- package/dist/src/config/artifacts.js.map +1 -1
- package/dist/src/config/chain.d.ts +1 -1
- package/dist/src/config/chain.d.ts.map +1 -1
- package/dist/src/config/chain.js +4 -22
- package/dist/src/config/chain.js.map +1 -1
- package/dist/src/config/hooks.d.ts +89 -211
- package/dist/src/config/hooks.d.ts.map +1 -1
- package/dist/src/config/hooks.js +220 -84
- package/dist/src/config/hooks.js.map +1 -1
- package/dist/src/config/ism.d.ts +3 -3
- package/dist/src/config/ism.d.ts.map +1 -1
- package/dist/src/config/ism.js +26 -19
- package/dist/src/config/ism.js.map +1 -1
- package/dist/src/config/multisig.d.ts.map +1 -1
- package/dist/src/config/multisig.js +13 -3
- package/dist/src/config/multisig.js.map +1 -1
- package/dist/src/config/warp.d.ts.map +1 -1
- package/dist/src/config/warp.js +5 -5
- package/dist/src/config/warp.js.map +1 -1
- package/dist/src/context.d.ts +33 -400
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js +41 -11
- package/dist/src/context.js.map +1 -1
- package/dist/src/context.test.d.ts +2 -0
- package/dist/src/context.test.d.ts.map +1 -0
- package/dist/src/context.test.js +21 -0
- package/dist/src/context.test.js.map +1 -0
- package/dist/src/deploy/agent.d.ts +3 -2
- package/dist/src/deploy/agent.d.ts.map +1 -1
- package/dist/src/deploy/agent.js +10 -22
- package/dist/src/deploy/agent.js.map +1 -1
- package/dist/src/deploy/core.d.ts +5 -1
- package/dist/src/deploy/core.d.ts.map +1 -1
- package/dist/src/deploy/core.js +63 -102
- package/dist/src/deploy/core.js.map +1 -1
- package/dist/src/deploy/warp.d.ts.map +1 -1
- package/dist/src/deploy/warp.js +15 -9
- package/dist/src/deploy/warp.js.map +1 -1
- package/dist/src/send/message.d.ts +3 -3
- package/dist/src/send/message.d.ts.map +1 -1
- package/dist/src/send/message.js +13 -8
- package/dist/src/send/message.js.map +1 -1
- package/dist/src/send/transfer.d.ts +4 -4
- package/dist/src/send/transfer.d.ts.map +1 -1
- package/dist/src/send/transfer.js +22 -11
- package/dist/src/send/transfer.js.map +1 -1
- package/dist/src/status/message.d.ts +3 -3
- package/dist/src/status/message.d.ts.map +1 -1
- package/dist/src/status/message.js +14 -5
- package/dist/src/status/message.js.map +1 -1
- package/dist/src/tests/hooks.test.d.ts +2 -0
- package/dist/src/tests/hooks.test.d.ts.map +1 -0
- package/dist/src/tests/hooks.test.js +83 -0
- package/dist/src/tests/hooks.test.js.map +1 -0
- package/dist/src/tests/ism.test.js +1 -1
- package/dist/src/tests/ism.test.js.map +1 -1
- package/dist/src/tests/multisig.test.js +1 -1
- package/dist/src/tests/multisig.test.js.map +1 -1
- package/dist/src/utils/chains.d.ts +2 -2
- package/dist/src/utils/chains.d.ts.map +1 -1
- package/dist/src/utils/chains.js +8 -9
- package/dist/src/utils/chains.js.map +1 -1
- package/dist/src/utils/files.d.ts.map +1 -1
- package/dist/src/utils/files.js +5 -0
- package/dist/src/utils/files.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/examples/hooks.yaml +66 -0
- package/examples/ism-advanced.yaml +1 -1
- package/package.json +3 -3
- package/examples/hook-config.yaml +0 -18
package/dist/src/config/hooks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { confirm, input, select } from '@inquirer/prompts';
|
|
2
|
-
import { BigNumber } from 'bignumber.js';
|
|
2
|
+
import { BigNumber as BigNumberJs } from 'bignumber.js';
|
|
3
3
|
import { ethers } from 'ethers';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { GasOracleContractType, HookType, defaultMultisigConfigs, multisigIsmVerificationCost, } from '@hyperlane-xyz/sdk';
|
|
5
|
+
import { GasOracleContractType, HookType, chainMetadata, defaultMultisigConfigs, multisigIsmVerificationCost, } from '@hyperlane-xyz/sdk';
|
|
6
6
|
import { normalizeAddressEvm, objMap, toWei, } from '@hyperlane-xyz/utils';
|
|
7
7
|
import { errorRed, log, logBlue, logGreen, logRed } from '../../logger.js';
|
|
8
8
|
import { runMultiChainSelectionStep } from '../utils/chains.js';
|
|
@@ -18,16 +18,39 @@ const ProtocolFeeSchema = z.object({
|
|
|
18
18
|
const MerkleTreeSchema = z.object({
|
|
19
19
|
type: z.literal(HookType.MERKLE_TREE),
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const IGPSchema = z.object({
|
|
22
|
+
type: z.literal(HookType.INTERCHAIN_GAS_PAYMASTER),
|
|
23
|
+
owner: z.string(),
|
|
24
|
+
beneficiary: z.string(),
|
|
25
|
+
overhead: z.record(z.number()),
|
|
26
|
+
gasOracleType: z.record(z.literal(GasOracleContractType.StorageGasOracle)),
|
|
27
|
+
oracleKey: z.string(),
|
|
25
28
|
});
|
|
26
|
-
const
|
|
29
|
+
const RoutingConfigSchema = z.lazy(() => z.object({
|
|
30
|
+
type: z.literal(HookType.ROUTING),
|
|
31
|
+
owner: z.string(),
|
|
32
|
+
domains: z.record(HookConfigSchema),
|
|
33
|
+
}));
|
|
34
|
+
const AggregationConfigSchema = z.lazy(() => z.object({
|
|
35
|
+
type: z.literal(HookType.AGGREGATION),
|
|
36
|
+
hooks: z.array(HookConfigSchema),
|
|
37
|
+
}));
|
|
38
|
+
const HookConfigSchema = z.union([
|
|
39
|
+
ProtocolFeeSchema,
|
|
40
|
+
MerkleTreeSchema,
|
|
41
|
+
IGPSchema,
|
|
42
|
+
RoutingConfigSchema,
|
|
43
|
+
AggregationConfigSchema,
|
|
44
|
+
]);
|
|
45
|
+
const HooksConfigSchema = z.object({
|
|
46
|
+
required: HookConfigSchema,
|
|
47
|
+
default: HookConfigSchema,
|
|
48
|
+
});
|
|
49
|
+
const HooksConfigMapSchema = z.record(HooksConfigSchema);
|
|
27
50
|
export function isValidHookConfigMap(config) {
|
|
28
|
-
return
|
|
51
|
+
return HooksConfigMapSchema.safeParse(config).success;
|
|
29
52
|
}
|
|
30
|
-
export function presetHookConfigs(owner, local, destinationChains,
|
|
53
|
+
export function presetHookConfigs(owner, local, destinationChains, multisigConfig) {
|
|
31
54
|
const gasOracleType = destinationChains.reduce((acc, chain) => {
|
|
32
55
|
acc[chain] = GasOracleContractType.StorageGasOracle;
|
|
33
56
|
return acc;
|
|
@@ -35,16 +58,19 @@ export function presetHookConfigs(owner, local, destinationChains, ismConfig) {
|
|
|
35
58
|
const overhead = destinationChains.reduce((acc, chain) => {
|
|
36
59
|
let validatorThreshold;
|
|
37
60
|
let validatorCount;
|
|
38
|
-
if (
|
|
39
|
-
validatorThreshold =
|
|
40
|
-
validatorCount =
|
|
61
|
+
if (multisigConfig) {
|
|
62
|
+
validatorThreshold = multisigConfig.threshold;
|
|
63
|
+
validatorCount = multisigConfig.validators.length;
|
|
41
64
|
}
|
|
42
65
|
else if (local in defaultMultisigConfigs) {
|
|
43
66
|
validatorThreshold = defaultMultisigConfigs[local].threshold;
|
|
44
67
|
validatorCount = defaultMultisigConfigs[local].validators.length;
|
|
45
68
|
}
|
|
46
69
|
else {
|
|
47
|
-
|
|
70
|
+
// default values
|
|
71
|
+
// fix here: https://github.com/hyperlane-xyz/issues/issues/773
|
|
72
|
+
validatorThreshold = 2;
|
|
73
|
+
validatorCount = 3;
|
|
48
74
|
}
|
|
49
75
|
acc[chain] = multisigIsmVerificationCost(validatorThreshold, validatorCount);
|
|
50
76
|
return acc;
|
|
@@ -53,8 +79,8 @@ export function presetHookConfigs(owner, local, destinationChains, ismConfig) {
|
|
|
53
79
|
return {
|
|
54
80
|
required: {
|
|
55
81
|
type: HookType.PROTOCOL_FEE,
|
|
56
|
-
maxProtocolFee: ethers.utils.parseUnits('1', 'gwei'),
|
|
57
|
-
protocolFee: ethers.utils.parseUnits('0', 'wei'),
|
|
82
|
+
maxProtocolFee: ethers.utils.parseUnits('1', 'gwei').toString(),
|
|
83
|
+
protocolFee: ethers.utils.parseUnits('0', 'wei').toString(),
|
|
58
84
|
beneficiary: owner,
|
|
59
85
|
owner: owner,
|
|
60
86
|
},
|
|
@@ -76,27 +102,23 @@ export function presetHookConfigs(owner, local, destinationChains, ismConfig) {
|
|
|
76
102
|
},
|
|
77
103
|
};
|
|
78
104
|
}
|
|
79
|
-
export function
|
|
105
|
+
export function readHooksConfigMap(filePath) {
|
|
80
106
|
const config = readYamlOrJson(filePath);
|
|
81
107
|
if (!config) {
|
|
82
108
|
logRed(`No hook config found at ${filePath}`);
|
|
83
109
|
return;
|
|
84
110
|
}
|
|
85
|
-
const result =
|
|
111
|
+
const result = HooksConfigMapSchema.safeParse(config);
|
|
86
112
|
if (!result.success) {
|
|
87
113
|
const firstIssue = result.error.issues[0];
|
|
88
114
|
throw new Error(`Invalid hook config: ${firstIssue.path} => ${firstIssue.message}`);
|
|
89
115
|
}
|
|
90
116
|
const parsedConfig = result.data;
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
logGreen(`All hook configs in ${filePath} are valid`);
|
|
95
|
-
return defaultHook;
|
|
117
|
+
const hooks = objMap(parsedConfig, (_, config) => config);
|
|
118
|
+
logGreen(`All hook configs in ${filePath} are valid for ${hooks}`);
|
|
119
|
+
return hooks;
|
|
96
120
|
}
|
|
97
|
-
|
|
98
|
-
// export async function readProtocolFeeHookConfig(config: {type: HookType.PROTOCOL_FEE, ...}) {
|
|
99
|
-
export async function createHookConfig({ format, outPath, chainConfigPath, }) {
|
|
121
|
+
export async function createHooksConfigMap({ format, outPath, chainConfigPath, }) {
|
|
100
122
|
logBlue('Creating a new hook config');
|
|
101
123
|
const customChains = readChainConfigsIfExists(chainConfigPath);
|
|
102
124
|
const chains = await runMultiChainSelectionStep(customChains);
|
|
@@ -104,73 +126,187 @@ export async function createHookConfig({ format, outPath, chainConfigPath, }) {
|
|
|
104
126
|
for (const chain of chains) {
|
|
105
127
|
for (const hookRequirements of ['required', 'default']) {
|
|
106
128
|
log(`Setting ${hookRequirements} hook for chain ${chain}`);
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
],
|
|
113
|
-
pageSize: 5,
|
|
114
|
-
});
|
|
115
|
-
if (hookType === 'merkle_tree') {
|
|
116
|
-
result[chain] = {
|
|
117
|
-
...result[chain],
|
|
118
|
-
[hookRequirements]: { type: HookType.MERKLE_TREE },
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
else if (hookType === 'protocol_fee') {
|
|
122
|
-
const owner = await input({
|
|
123
|
-
message: 'Enter owner address',
|
|
124
|
-
});
|
|
125
|
-
const ownerAddress = normalizeAddressEvm(owner);
|
|
126
|
-
let beneficiary;
|
|
127
|
-
let sameAsOwner = false;
|
|
128
|
-
sameAsOwner = await confirm({
|
|
129
|
-
message: 'Use this same address for the beneficiary?',
|
|
130
|
-
});
|
|
131
|
-
if (sameAsOwner) {
|
|
132
|
-
beneficiary = ownerAddress;
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
beneficiary = await input({
|
|
136
|
-
message: 'Enter beneficiary address',
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
const beneficiaryAddress = normalizeAddressEvm(beneficiary);
|
|
140
|
-
// TODO: input in gwei, wei, etc
|
|
141
|
-
const maxProtocolFee = toWei(await input({
|
|
142
|
-
message: 'Enter max protocol fee in (e.g. 1.0)',
|
|
143
|
-
}));
|
|
144
|
-
const protocolFee = toWei(await input({
|
|
145
|
-
message: 'Enter protocol fee (e.g. 1.0)',
|
|
146
|
-
}));
|
|
147
|
-
if (BigNumber(protocolFee).gt(maxProtocolFee)) {
|
|
148
|
-
errorRed('Protocol fee cannot be greater than max protocol fee');
|
|
149
|
-
throw new Error('Invalid protocol fee');
|
|
150
|
-
}
|
|
151
|
-
result[chain] = {
|
|
152
|
-
...result[chain],
|
|
153
|
-
[hookRequirements]: {
|
|
154
|
-
type: HookType.PROTOCOL_FEE,
|
|
155
|
-
maxProtocolFee: maxProtocolFee.toString(),
|
|
156
|
-
protocolFee: protocolFee.toString(),
|
|
157
|
-
beneficiary: beneficiaryAddress,
|
|
158
|
-
owner: ownerAddress,
|
|
159
|
-
},
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
throw new Error(`Invalid hook type: ${hookType}}`);
|
|
164
|
-
}
|
|
129
|
+
const remotes = chains.filter((c) => c !== chain);
|
|
130
|
+
result[chain] = {
|
|
131
|
+
...result[chain],
|
|
132
|
+
[hookRequirements]: await createHookConfig(chain, remotes),
|
|
133
|
+
};
|
|
165
134
|
}
|
|
166
135
|
if (isValidHookConfigMap(result)) {
|
|
167
136
|
logGreen(`Hook config is valid, writing to file ${outPath}`);
|
|
168
137
|
mergeYamlOrJson(outPath, result, format);
|
|
169
138
|
}
|
|
170
139
|
else {
|
|
171
|
-
errorRed(`Hook config is invalid, please see https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cli/examples/
|
|
140
|
+
errorRed(`Hook config is invalid, please see https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cli/examples/hooks.yaml for an example`);
|
|
172
141
|
throw new Error('Invalid hook config');
|
|
173
142
|
}
|
|
174
143
|
}
|
|
175
144
|
}
|
|
145
|
+
export async function createHookConfig(chain, remotes) {
|
|
146
|
+
let lastConfig;
|
|
147
|
+
const hookType = await select({
|
|
148
|
+
message: 'Select hook type',
|
|
149
|
+
choices: [
|
|
150
|
+
{
|
|
151
|
+
value: HookType.MERKLE_TREE,
|
|
152
|
+
name: HookType.MERKLE_TREE,
|
|
153
|
+
description: 'Add messages to the incremental merkle tree on origin chain (needed for the merkleRootMultisigIsm on the remote chain)',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
value: HookType.PROTOCOL_FEE,
|
|
157
|
+
name: HookType.PROTOCOL_FEE,
|
|
158
|
+
description: 'Charge fees for each message dispatch from this chain',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
value: HookType.INTERCHAIN_GAS_PAYMASTER,
|
|
162
|
+
name: HookType.INTERCHAIN_GAS_PAYMASTER,
|
|
163
|
+
description: 'Allow for payments for expected gas to be paid by the relayer while delivering on remote chain',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
value: HookType.AGGREGATION,
|
|
167
|
+
name: HookType.AGGREGATION,
|
|
168
|
+
description: 'Aggregate multiple hooks into a single hook (e.g. merkle tree + IGP) which will be called in sequence',
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
value: HookType.ROUTING,
|
|
172
|
+
name: HookType.ROUTING,
|
|
173
|
+
description: 'Each destination domain can have its own hook configured via DomainRoutingHook',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
pageSize: 10,
|
|
177
|
+
});
|
|
178
|
+
if (hookType === HookType.MERKLE_TREE) {
|
|
179
|
+
lastConfig = { type: HookType.MERKLE_TREE };
|
|
180
|
+
}
|
|
181
|
+
else if (hookType === HookType.PROTOCOL_FEE) {
|
|
182
|
+
lastConfig = await createProtocolFeeConfig(chain);
|
|
183
|
+
}
|
|
184
|
+
else if (hookType === HookType.INTERCHAIN_GAS_PAYMASTER) {
|
|
185
|
+
lastConfig = await createIGPConfig(remotes);
|
|
186
|
+
}
|
|
187
|
+
else if (hookType === HookType.AGGREGATION) {
|
|
188
|
+
lastConfig = await createAggregationConfig(chain, remotes);
|
|
189
|
+
}
|
|
190
|
+
else if (hookType === HookType.ROUTING) {
|
|
191
|
+
lastConfig = await createRoutingConfig(chain, remotes);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
throw new Error(`Invalid hook type: ${hookType}`);
|
|
195
|
+
}
|
|
196
|
+
return lastConfig;
|
|
197
|
+
}
|
|
198
|
+
export async function createProtocolFeeConfig(chain) {
|
|
199
|
+
const owner = await input({
|
|
200
|
+
message: 'Enter owner address',
|
|
201
|
+
});
|
|
202
|
+
const ownerAddress = normalizeAddressEvm(owner);
|
|
203
|
+
let beneficiary;
|
|
204
|
+
let sameAsOwner = false;
|
|
205
|
+
sameAsOwner = await confirm({
|
|
206
|
+
message: 'Use this same address for the beneficiary?',
|
|
207
|
+
});
|
|
208
|
+
if (sameAsOwner) {
|
|
209
|
+
beneficiary = ownerAddress;
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
beneficiary = await input({
|
|
213
|
+
message: 'Enter beneficiary address',
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
const beneficiaryAddress = normalizeAddressEvm(beneficiary);
|
|
217
|
+
// TODO: input in gwei, wei, etc
|
|
218
|
+
const maxProtocolFee = toWei(await input({
|
|
219
|
+
message: `Enter max protocol fee ${nativeTokenAndDecimals(chain)} e.g. 1.0)`,
|
|
220
|
+
}));
|
|
221
|
+
const protocolFee = toWei(await input({
|
|
222
|
+
message: `Enter protocol fee in ${nativeTokenAndDecimals(chain)} e.g. 0.01)`,
|
|
223
|
+
}));
|
|
224
|
+
if (BigNumberJs(protocolFee).gt(maxProtocolFee)) {
|
|
225
|
+
errorRed('Protocol fee cannot be greater than max protocol fee');
|
|
226
|
+
throw new Error('Invalid protocol fee');
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
type: HookType.PROTOCOL_FEE,
|
|
230
|
+
maxProtocolFee: maxProtocolFee.toString(),
|
|
231
|
+
protocolFee: protocolFee.toString(),
|
|
232
|
+
beneficiary: beneficiaryAddress,
|
|
233
|
+
owner: ownerAddress,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
export async function createIGPConfig(remotes) {
|
|
237
|
+
const owner = await input({
|
|
238
|
+
message: 'Enter owner address',
|
|
239
|
+
});
|
|
240
|
+
const ownerAddress = normalizeAddressEvm(owner);
|
|
241
|
+
let beneficiary, oracleKey;
|
|
242
|
+
let sameAsOwner = false;
|
|
243
|
+
sameAsOwner = await confirm({
|
|
244
|
+
message: 'Use this same address for the beneficiary and gasOracleKey?',
|
|
245
|
+
});
|
|
246
|
+
if (sameAsOwner) {
|
|
247
|
+
beneficiary = ownerAddress;
|
|
248
|
+
oracleKey = ownerAddress;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
beneficiary = await input({
|
|
252
|
+
message: 'Enter beneficiary address',
|
|
253
|
+
});
|
|
254
|
+
oracleKey = await input({
|
|
255
|
+
message: 'Enter gasOracleKey address',
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
const beneficiaryAddress = normalizeAddressEvm(beneficiary);
|
|
259
|
+
const oracleKeyAddress = normalizeAddressEvm(oracleKey);
|
|
260
|
+
const overheads = {};
|
|
261
|
+
for (const chain of remotes) {
|
|
262
|
+
const overhead = parseInt(await input({
|
|
263
|
+
message: `Enter overhead for ${chain} (eg 75000)`,
|
|
264
|
+
}));
|
|
265
|
+
overheads[chain] = overhead;
|
|
266
|
+
}
|
|
267
|
+
return {
|
|
268
|
+
type: HookType.INTERCHAIN_GAS_PAYMASTER,
|
|
269
|
+
beneficiary: beneficiaryAddress,
|
|
270
|
+
owner: ownerAddress,
|
|
271
|
+
oracleKey: oracleKeyAddress,
|
|
272
|
+
overhead: overheads,
|
|
273
|
+
gasOracleType: objMap(overheads, () => GasOracleContractType.StorageGasOracle),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
export async function createAggregationConfig(chain, remotes) {
|
|
277
|
+
const hooksNum = parseInt(await input({
|
|
278
|
+
message: 'Enter the number of hooks to aggregate (number)',
|
|
279
|
+
}), 10);
|
|
280
|
+
const hooks = [];
|
|
281
|
+
for (let i = 0; i < hooksNum; i++) {
|
|
282
|
+
logBlue(`Creating hook ${i + 1} of ${hooksNum} ...`);
|
|
283
|
+
hooks.push(await createHookConfig(chain, remotes));
|
|
284
|
+
}
|
|
285
|
+
return {
|
|
286
|
+
type: HookType.AGGREGATION,
|
|
287
|
+
hooks,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
export async function createRoutingConfig(origin, remotes) {
|
|
291
|
+
const owner = await input({
|
|
292
|
+
message: 'Enter owner address',
|
|
293
|
+
});
|
|
294
|
+
const ownerAddress = owner;
|
|
295
|
+
const domainsMap = {};
|
|
296
|
+
for (const chain of remotes) {
|
|
297
|
+
await confirm({
|
|
298
|
+
message: `You are about to configure hook for remote chain ${chain}. Continue?`,
|
|
299
|
+
});
|
|
300
|
+
const config = await createHookConfig(origin, remotes);
|
|
301
|
+
domainsMap[chain] = config;
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
type: HookType.ROUTING,
|
|
305
|
+
owner: ownerAddress,
|
|
306
|
+
domains: domainsMap,
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function nativeTokenAndDecimals(chain) {
|
|
310
|
+
return `10^${chainMetadata[chain].nativeToken?.decimals ?? '18'} which you cannot exceed (in ${chainMetadata[chain].nativeToken?.symbol ?? 'eth'}`;
|
|
311
|
+
}
|
|
176
312
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/config/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot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,EAAE,oDAAoD,KAAK,aAAa;SAChF,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACvD,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;IAC7B,CAAC;IACD,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,OAAO;QACtB,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,UAAU;KACpB,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,KAAgB;IAC9C,OAAO,MACL,aAAa,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,QAAQ,IAAI,IAChD,gCACE,aAAa,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,MAAM,IAAI,KAC9C,EAAE,CAAC;AACL,CAAC"}
|
package/dist/src/config/ism.d.ts
CHANGED
|
@@ -49,9 +49,9 @@ export declare function createIsmConfigMap({ format, outPath, chainConfigPath, }
|
|
|
49
49
|
outPath: string;
|
|
50
50
|
chainConfigPath: string;
|
|
51
51
|
}): Promise<void>;
|
|
52
|
-
export declare function createIsmConfig(
|
|
52
|
+
export declare function createIsmConfig(remote: ChainName, origins: ChainName[]): Promise<ZodIsmConfig>;
|
|
53
53
|
export declare function createMultisigConfig(type: IsmType.MERKLE_ROOT_MULTISIG | IsmType.MESSAGE_ID_MULTISIG): Promise<ZodIsmConfig>;
|
|
54
|
-
export declare function createAggregationConfig(
|
|
55
|
-
export declare function createRoutingConfig(
|
|
54
|
+
export declare function createAggregationConfig(remote: ChainName, chains: ChainName[]): Promise<ZodIsmConfig>;
|
|
55
|
+
export declare function createRoutingConfig(type: IsmType.ROUTING | IsmType.FALLBACK_ROUTING, remote: ChainName, chains: ChainName[]): Promise<ZodIsmConfig>;
|
|
56
56
|
export {};
|
|
57
57
|
//# sourceMappingURL=ism.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ism.d.ts","sourceRoot":"","sources":["../../../src/config/ism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M,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,EAAE,GAClB,OAAO,CAAC,YAAY,CAAC,CAwBvB;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,gBAAgB,EAChD,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,SAAS,EAAE,GAClB,OAAO,CAAC,YAAY,CAAC,CAoBvB"}
|
package/dist/src/config/ism.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { confirm, input, select } from '@inquirer/prompts';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { IsmType } from '@hyperlane-xyz/sdk';
|
|
3
|
+
import { IsmType, ZHash } from '@hyperlane-xyz/sdk';
|
|
4
4
|
import { errorRed, log, logBlue, logGreen } from '../../logger.js';
|
|
5
5
|
import { runMultiChainSelectionStep } from '../utils/chains.js';
|
|
6
6
|
import { mergeYamlOrJson, readYamlOrJson } from '../utils/files.js';
|
|
@@ -11,11 +11,14 @@ const MultisigIsmConfigSchema = z.object({
|
|
|
11
11
|
z.literal(IsmType.MESSAGE_ID_MULTISIG),
|
|
12
12
|
]),
|
|
13
13
|
threshold: z.number(),
|
|
14
|
-
validators: z.array(
|
|
14
|
+
validators: z.array(ZHash),
|
|
15
15
|
});
|
|
16
16
|
const RoutingIsmConfigSchema = z.lazy(() => z.object({
|
|
17
|
-
type: z.
|
|
18
|
-
|
|
17
|
+
type: z.union([
|
|
18
|
+
z.literal(IsmType.ROUTING),
|
|
19
|
+
z.literal(IsmType.FALLBACK_ROUTING),
|
|
20
|
+
]),
|
|
21
|
+
owner: ZHash,
|
|
19
22
|
domains: z.record(IsmConfigSchema),
|
|
20
23
|
}));
|
|
21
24
|
const AggregationIsmConfigSchema = z
|
|
@@ -74,11 +77,11 @@ export function isValildIsmConfig(config) {
|
|
|
74
77
|
export async function createIsmConfigMap({ format, outPath, chainConfigPath, }) {
|
|
75
78
|
logBlue('Creating a new ISM config');
|
|
76
79
|
const customChains = readChainConfigsIfExists(chainConfigPath);
|
|
77
|
-
const chains = await runMultiChainSelectionStep(customChains);
|
|
80
|
+
const chains = await runMultiChainSelectionStep(customChains, 'Select chains to configure ISM for', true);
|
|
78
81
|
const result = {};
|
|
79
82
|
for (const chain of chains) {
|
|
80
83
|
log(`Setting values for chain ${chain}`);
|
|
81
|
-
result[chain] = await createIsmConfig(chain,
|
|
84
|
+
result[chain] = await createIsmConfig(chain, chains);
|
|
82
85
|
// TODO consider re-enabling. Disabling based on feedback from @nambrot for now.
|
|
83
86
|
// repeat = await confirm({
|
|
84
87
|
// message: 'Use this same config for remaining chains?',
|
|
@@ -93,7 +96,7 @@ export async function createIsmConfigMap({ format, outPath, chainConfigPath, })
|
|
|
93
96
|
throw new Error('Invalid ISM config');
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
|
-
export async function createIsmConfig(
|
|
99
|
+
export async function createIsmConfig(remote, origins) {
|
|
97
100
|
let lastConfig;
|
|
98
101
|
const moduleType = await select({
|
|
99
102
|
message: 'Select ISM type',
|
|
@@ -113,6 +116,11 @@ export async function createIsmConfig(chain, chainConfigPath) {
|
|
|
113
116
|
name: IsmType.ROUTING,
|
|
114
117
|
description: 'Each origin chain can be verified by the specified ISM type via RoutingISM',
|
|
115
118
|
},
|
|
119
|
+
{
|
|
120
|
+
value: IsmType.FALLBACK_ROUTING,
|
|
121
|
+
name: IsmType.FALLBACK_ROUTING,
|
|
122
|
+
description: "You can specify ISM type for specific chains you like and fallback to mailbox's default ISM for other chains via DefaultFallbackRoutingISM",
|
|
123
|
+
},
|
|
116
124
|
{
|
|
117
125
|
value: IsmType.AGGREGATION,
|
|
118
126
|
name: IsmType.AGGREGATION,
|
|
@@ -130,11 +138,12 @@ export async function createIsmConfig(chain, chainConfigPath) {
|
|
|
130
138
|
moduleType === IsmType.MERKLE_ROOT_MULTISIG) {
|
|
131
139
|
lastConfig = await createMultisigConfig(moduleType);
|
|
132
140
|
}
|
|
133
|
-
else if (moduleType === IsmType.ROUTING
|
|
134
|
-
|
|
141
|
+
else if (moduleType === IsmType.ROUTING ||
|
|
142
|
+
moduleType === IsmType.FALLBACK_ROUTING) {
|
|
143
|
+
lastConfig = await createRoutingConfig(moduleType, remote, origins);
|
|
135
144
|
}
|
|
136
145
|
else if (moduleType === IsmType.AGGREGATION) {
|
|
137
|
-
lastConfig = await createAggregationConfig(
|
|
146
|
+
lastConfig = await createAggregationConfig(remote, origins);
|
|
138
147
|
}
|
|
139
148
|
else if (moduleType === IsmType.TEST_ISM) {
|
|
140
149
|
lastConfig = { type: IsmType.TEST_ISM };
|
|
@@ -159,7 +168,7 @@ export async function createMultisigConfig(type) {
|
|
|
159
168
|
validators,
|
|
160
169
|
};
|
|
161
170
|
}
|
|
162
|
-
export async function createAggregationConfig(
|
|
171
|
+
export async function createAggregationConfig(remote, chains) {
|
|
163
172
|
const isms = parseInt(await input({
|
|
164
173
|
message: 'Enter the number of ISMs to aggregate (number)',
|
|
165
174
|
}), 10);
|
|
@@ -168,7 +177,7 @@ export async function createAggregationConfig(chain, chainConfigPath) {
|
|
|
168
177
|
}), 10);
|
|
169
178
|
const modules = [];
|
|
170
179
|
for (let i = 0; i < isms; i++) {
|
|
171
|
-
modules.push(await createIsmConfig(
|
|
180
|
+
modules.push(await createIsmConfig(remote, chains));
|
|
172
181
|
}
|
|
173
182
|
return {
|
|
174
183
|
type: IsmType.AGGREGATION,
|
|
@@ -176,24 +185,22 @@ export async function createAggregationConfig(chain, chainConfigPath) {
|
|
|
176
185
|
threshold,
|
|
177
186
|
};
|
|
178
187
|
}
|
|
179
|
-
export async function createRoutingConfig(
|
|
188
|
+
export async function createRoutingConfig(type, remote, chains) {
|
|
180
189
|
const owner = await input({
|
|
181
190
|
message: 'Enter owner address',
|
|
182
191
|
});
|
|
183
192
|
const ownerAddress = owner;
|
|
184
|
-
const
|
|
185
|
-
delete customChains[chain];
|
|
186
|
-
const chains = await runMultiChainSelectionStep(customChains, `Select origin chains to be verified on ${chain}`, [chain]);
|
|
193
|
+
const origins = chains.filter((chain) => chain !== remote);
|
|
187
194
|
const domainsMap = {};
|
|
188
|
-
for (const chain of
|
|
195
|
+
for (const chain of origins) {
|
|
189
196
|
await confirm({
|
|
190
197
|
message: `You are about to configure ISM from source chain ${chain}. Continue?`,
|
|
191
198
|
});
|
|
192
|
-
const config = await createIsmConfig(chain,
|
|
199
|
+
const config = await createIsmConfig(chain, chains);
|
|
193
200
|
domainsMap[chain] = config;
|
|
194
201
|
}
|
|
195
202
|
return {
|
|
196
|
-
type
|
|
203
|
+
type,
|
|
197
204
|
owner: ownerAddress,
|
|
198
205
|
domains: domainsMap,
|
|
199
206
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ism.js","sourceRoot":"","sources":["../../../src/config/ism.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ism.js","sourceRoot":"","sources":["../../../src/config/ism.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAuB,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAc,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,uBAA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M,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,CAAC;IACD,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,WAAW;QACzB,OAAO;QACP,SAAS;KACV,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAAgD,EAChD,MAAiB,EACjB,MAAmB;IAEnB,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC;QACxB,OAAO,EAAE,qBAAqB;KAC/B,CAAC,CAAC;IACH,MAAM,YAAY,GAAG,KAAK,CAAC;IAC3B,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC;IAE3D,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,OAAO,CAAC;YACZ,OAAO,EAAE,oDAAoD,KAAK,aAAa;SAChF,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACpD,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;IAC7B,CAAC;IACD,OAAO;QACL,IAAI;QACJ,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,UAAU;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multisig.d.ts","sourceRoot":"","sources":["../../../src/config/multisig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"multisig.d.ts","sourceRoot":"","sources":["../../../src/config/multisig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAS,MAAM,oBAAoB,CAAC;AAWrE,OAAO,EAAE,UAAU,EAAmC,MAAM,mBAAmB,CAAC;AAIhF,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;aAK5B,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,4BAiClD;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,WAEhD;AAED,wBAAsB,oBAAoB,CAAC,EACzC,MAAM,EACN,OAAO,EACP,eAAe,GAChB,EAAE;IACD,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;CACzB,iBAsDA"}
|