@hyperlane-xyz/cli 3.20.0-beta1 → 4.0.0-alpha.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/README.md +1 -1
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/src/avs/config.d.ts +11 -0
- package/dist/src/avs/config.d.ts.map +1 -0
- package/dist/src/avs/config.js +10 -0
- package/dist/src/avs/config.js.map +1 -0
- package/dist/src/avs/stakeRegistry.d.ts +21 -0
- package/dist/src/avs/stakeRegistry.d.ts.map +1 -0
- package/dist/src/avs/stakeRegistry.js +64 -0
- package/dist/src/avs/stakeRegistry.js.map +1 -0
- package/dist/src/commands/avs.d.ts +12 -0
- package/dist/src/commands/avs.d.ts.map +1 -0
- package/dist/src/commands/avs.js +64 -0
- package/dist/src/commands/avs.js.map +1 -0
- package/dist/src/commands/config.js +9 -9
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/deploy.d.ts.map +1 -1
- package/dist/src/commands/deploy.js +8 -10
- package/dist/src/commands/deploy.js.map +1 -1
- package/dist/src/commands/hook.js +2 -2
- package/dist/src/commands/hook.js.map +1 -1
- package/dist/src/commands/ism.js +2 -2
- package/dist/src/commands/ism.js.map +1 -1
- package/dist/src/commands/options.d.ts +11 -5
- package/dist/src/commands/options.d.ts.map +1 -1
- package/dist/src/commands/options.js +43 -10
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/send.js +2 -2
- package/dist/src/commands/send.js.map +1 -1
- package/dist/src/commands/validator.d.ts +3 -0
- package/dist/src/commands/validator.d.ts.map +1 -0
- package/dist/src/commands/validator.js +34 -0
- package/dist/src/commands/validator.js.map +1 -0
- package/dist/src/config/chain.d.ts.map +1 -1
- package/dist/src/config/chain.js +21 -9
- package/dist/src/config/chain.js.map +1 -1
- package/dist/src/config/warp.d.ts +1 -1
- package/dist/src/config/warp.d.ts.map +1 -1
- package/dist/src/config/warp.js +89 -47
- package/dist/src/config/warp.js.map +1 -1
- package/dist/src/consts.d.ts +1 -0
- package/dist/src/consts.d.ts.map +1 -1
- package/dist/src/consts.js +1 -0
- package/dist/src/consts.js.map +1 -1
- package/dist/src/context/context.d.ts +1 -1
- package/dist/src/context/context.d.ts.map +1 -1
- package/dist/src/context/context.js +34 -12
- package/dist/src/context/context.js.map +1 -1
- package/dist/src/context/types.d.ts +1 -0
- package/dist/src/context/types.d.ts.map +1 -1
- package/dist/src/deploy/agent.js +1 -1
- package/dist/src/deploy/agent.js.map +1 -1
- package/dist/src/deploy/core.d.ts.map +1 -1
- package/dist/src/deploy/core.js +5 -3
- package/dist/src/deploy/core.js.map +1 -1
- package/dist/src/deploy/dry-run.d.ts +1 -1
- package/dist/src/deploy/dry-run.d.ts.map +1 -1
- package/dist/src/deploy/dry-run.js.map +1 -1
- package/dist/src/deploy/utils.d.ts +0 -7
- package/dist/src/deploy/utils.d.ts.map +1 -1
- package/dist/src/deploy/utils.js +4 -18
- package/dist/src/deploy/utils.js.map +1 -1
- package/dist/src/deploy/warp.d.ts.map +1 -1
- package/dist/src/deploy/warp.js +38 -123
- package/dist/src/deploy/warp.js.map +1 -1
- package/dist/src/send/message.d.ts.map +1 -1
- package/dist/src/send/message.js +4 -5
- package/dist/src/send/message.js.map +1 -1
- package/dist/src/send/transfer.d.ts.map +1 -1
- package/dist/src/send/transfer.js +5 -6
- package/dist/src/send/transfer.js.map +1 -1
- package/dist/src/submit/submit.d.ts +5 -0
- package/dist/src/submit/submit.d.ts.map +1 -0
- package/dist/src/submit/submit.js +30 -0
- package/dist/src/submit/submit.js.map +1 -0
- package/dist/src/submit/types.d.ts +18 -0
- package/dist/src/submit/types.d.ts.map +1 -0
- package/dist/src/submit/types.js +2 -0
- package/dist/src/submit/types.js.map +1 -0
- package/dist/src/tests/deployTestErc20.js +3 -2
- package/dist/src/tests/deployTestErc20.js.map +1 -1
- package/dist/src/utils/balances.d.ts +2 -2
- package/dist/src/utils/balances.d.ts.map +1 -1
- package/dist/src/utils/balances.js +8 -3
- package/dist/src/utils/balances.js.map +1 -1
- package/dist/src/utils/chains.d.ts +1 -0
- package/dist/src/utils/chains.d.ts.map +1 -1
- package/dist/src/utils/chains.js +20 -3
- package/dist/src/utils/chains.js.map +1 -1
- package/dist/src/utils/env.d.ts +3 -0
- package/dist/src/utils/env.d.ts.map +1 -1
- package/dist/src/utils/env.js +3 -0
- package/dist/src/utils/env.js.map +1 -1
- package/dist/src/utils/files.d.ts +1 -0
- package/dist/src/utils/files.d.ts.map +1 -1
- package/dist/src/utils/files.js +8 -0
- package/dist/src/utils/files.js.map +1 -1
- package/dist/src/utils/keys.d.ts +5 -3
- package/dist/src/utils/keys.d.ts.map +1 -1
- package/dist/src/utils/keys.js +14 -11
- package/dist/src/utils/keys.js.map +1 -1
- package/dist/src/validator/address.d.ts +10 -0
- package/dist/src/validator/address.d.ts.map +1 -0
- package/dist/src/validator/address.js +107 -0
- package/dist/src/validator/address.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.d.ts.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/examples/core-config.yaml +19 -0
- package/examples/hooks.yaml +8 -4
- package/examples/warp-route-deployment.yaml +2 -4
- package/package.json +7 -4
- package/dist/src/registry/MergedRegistry.d.ts +0 -35
- package/dist/src/registry/MergedRegistry.d.ts.map +0 -1
- package/dist/src/registry/MergedRegistry.js +0 -83
- package/dist/src/registry/MergedRegistry.js.map +0 -1
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import yargs from 'yargs';
|
|
4
4
|
import './env.js';
|
|
5
|
+
import { avsCommand } from './src/commands/avs.js';
|
|
5
6
|
import { chainsCommand } from './src/commands/chains.js';
|
|
6
7
|
import { configCommand } from './src/commands/config.js';
|
|
7
8
|
import { deployCommand } from './src/commands/deploy.js';
|
|
@@ -10,6 +11,7 @@ import { ismCommand } from './src/commands/ism.js';
|
|
|
10
11
|
import { keyCommandOption, logFormatCommandOption, logLevelCommandOption, overrideRegistryUriCommandOption, registryUriCommandOption, skipConfirmationOption, } from './src/commands/options.js';
|
|
11
12
|
import { sendCommand } from './src/commands/send.js';
|
|
12
13
|
import { statusCommand } from './src/commands/status.js';
|
|
14
|
+
import { validatorCommand } from './src/commands/validator.js';
|
|
13
15
|
import { contextMiddleware } from './src/context/context.js';
|
|
14
16
|
import { configureLogger, errorRed } from './src/logger.js';
|
|
15
17
|
import { checkVersion } from './src/utils/version-check.js';
|
|
@@ -34,6 +36,7 @@ try {
|
|
|
34
36
|
},
|
|
35
37
|
contextMiddleware,
|
|
36
38
|
])
|
|
39
|
+
.command(avsCommand)
|
|
37
40
|
.command(chainsCommand)
|
|
38
41
|
.command(configCommand)
|
|
39
42
|
.command(deployCommand)
|
|
@@ -41,6 +44,7 @@ try {
|
|
|
41
44
|
.command(ismCommand)
|
|
42
45
|
.command(sendCommand)
|
|
43
46
|
.command(statusCommand)
|
|
47
|
+
.command(validatorCommand)
|
|
44
48
|
.version(VERSION)
|
|
45
49
|
.demandCommand()
|
|
46
50
|
.strict()
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB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11 @@
|
|
|
1
|
+
import { ChainMap } from '@hyperlane-xyz/sdk';
|
|
2
|
+
import { Address } from '@hyperlane-xyz/utils';
|
|
3
|
+
interface AVSContracts {
|
|
4
|
+
avsDirectory: Address;
|
|
5
|
+
proxyAdmin: Address;
|
|
6
|
+
ecdsaStakeRegistry: Address;
|
|
7
|
+
hyperlaneServiceManager: Address;
|
|
8
|
+
}
|
|
9
|
+
export declare const avsAddresses: ChainMap<AVSContracts>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/avs/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,UAAU,YAAY;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,uBAAuB,EAAE,OAAO,CAAC;CAClC;AAGD,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,YAAY,CAO/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// TODO: move to registry
|
|
2
|
+
export const avsAddresses = {
|
|
3
|
+
holesky: {
|
|
4
|
+
avsDirectory: '0x055733000064333CaDDbC92763c58BF0192fFeBf',
|
|
5
|
+
proxyAdmin: '0x33dB966328Ea213b0f76eF96CA368AB37779F065',
|
|
6
|
+
ecdsaStakeRegistry: '0xFfa913705484C9BAea32Ffe9945BeA099A1DFF72',
|
|
7
|
+
hyperlaneServiceManager: '0xc76E477437065093D353b7d56c81ff54D167B0Ab',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/avs/config.ts"],"names":[],"mappings":"AAUA,yBAAyB;AACzB,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,OAAO,EAAE;QACP,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;QACxD,kBAAkB,EAAE,4CAA4C;QAChE,uBAAuB,EAAE,4CAA4C;KACtE;CACF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BigNumberish, utils } from 'ethers';
|
|
2
|
+
import { ChainName } from '@hyperlane-xyz/sdk';
|
|
3
|
+
import { Address } from '@hyperlane-xyz/utils';
|
|
4
|
+
import { WriteCommandContext } from '../context/types.js';
|
|
5
|
+
export type SignatureWithSaltAndExpiryStruct = {
|
|
6
|
+
signature: utils.BytesLike;
|
|
7
|
+
salt: utils.BytesLike;
|
|
8
|
+
expiry: BigNumberish;
|
|
9
|
+
};
|
|
10
|
+
export declare function registerOperatorWithSignature({ context, chain, operatorKeyPath, avsSigningKey, }: {
|
|
11
|
+
context: WriteCommandContext;
|
|
12
|
+
chain: ChainName;
|
|
13
|
+
operatorKeyPath: string;
|
|
14
|
+
avsSigningKey: Address;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
export declare function deregisterOperator({ context, chain, operatorKeyPath, }: {
|
|
17
|
+
context: WriteCommandContext;
|
|
18
|
+
chain: ChainName;
|
|
19
|
+
operatorKeyPath: string;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
//# sourceMappingURL=stakeRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stakeRegistry.d.ts","sourceRoot":"","sources":["../../../src/avs/stakeRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AAMrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAM1D,MAAM,MAAM,gCAAgC,GAAG;IAC7C,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,wBAAsB,6BAA6B,CAAC,EAClD,OAAO,EACP,KAAK,EACL,eAAe,EACf,aAAa,GACd,EAAE;IACD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,KAAK,EAAE,SAAS,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;CACxB,iBA+CA;AAED,wBAAsB,kBAAkB,CAAC,EACvC,OAAO,EACP,KAAK,EACL,eAAe,GAChB,EAAE;IACD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,KAAK,EAAE,SAAS,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB,iBAoBA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { password } from '@inquirer/prompts';
|
|
2
|
+
import { Wallet, utils } from 'ethers';
|
|
3
|
+
import { ECDSAStakeRegistry__factory, TestAVSDirectory__factory, } from '@hyperlane-xyz/core';
|
|
4
|
+
import { log, logBlue } from '../logger.js';
|
|
5
|
+
import { readFileAtPath, resolvePath } from '../utils/files.js';
|
|
6
|
+
import { avsAddresses } from './config.js';
|
|
7
|
+
export async function registerOperatorWithSignature({ context, chain, operatorKeyPath, avsSigningKey, }) {
|
|
8
|
+
const { multiProvider } = context;
|
|
9
|
+
const operatorAsSigner = await readOperatorFromEncryptedJson(operatorKeyPath);
|
|
10
|
+
const provider = multiProvider.getProvider(chain);
|
|
11
|
+
const connectedSigner = operatorAsSigner.connect(provider);
|
|
12
|
+
const stakeRegistryAddress = avsAddresses[chain].ecdsaStakeRegistry;
|
|
13
|
+
const ecdsaStakeRegistry = ECDSAStakeRegistry__factory.connect(stakeRegistryAddress, connectedSigner);
|
|
14
|
+
const domainId = multiProvider.getDomainId(chain);
|
|
15
|
+
const avsDirectoryAddress = avsAddresses[chain].avsDirectory;
|
|
16
|
+
const operatorSignature = await getOperatorSignature(domainId, avsAddresses[chain].hyperlaneServiceManager, avsDirectoryAddress, operatorAsSigner, connectedSigner);
|
|
17
|
+
// check if the operator is already registered
|
|
18
|
+
const operatorStatus = await ecdsaStakeRegistry.operatorRegistered(operatorAsSigner.address);
|
|
19
|
+
if (operatorStatus) {
|
|
20
|
+
logBlue(`Operator ${operatorAsSigner.address} already registered to Hyperlane AVS`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
log(`Registering operator ${operatorAsSigner.address} attesting ${avsSigningKey} with signature on ${chain}...`);
|
|
24
|
+
await multiProvider.handleTx(chain, ecdsaStakeRegistry.registerOperatorWithSignature(operatorSignature, avsSigningKey));
|
|
25
|
+
logBlue(`Operator ${operatorAsSigner.address} registered to Hyperlane AVS`);
|
|
26
|
+
}
|
|
27
|
+
export async function deregisterOperator({ context, chain, operatorKeyPath, }) {
|
|
28
|
+
const { multiProvider } = context;
|
|
29
|
+
const operatorAsSigner = await readOperatorFromEncryptedJson(operatorKeyPath);
|
|
30
|
+
const provider = multiProvider.getProvider(chain);
|
|
31
|
+
const connectedSigner = operatorAsSigner.connect(provider);
|
|
32
|
+
const stakeRegistryAddress = avsAddresses[chain].ecdsaStakeRegistry;
|
|
33
|
+
const ecdsaStakeRegistry = ECDSAStakeRegistry__factory.connect(stakeRegistryAddress, connectedSigner);
|
|
34
|
+
log(`Deregistering operator ${operatorAsSigner.address} on ${chain}...`);
|
|
35
|
+
await multiProvider.handleTx(chain, ecdsaStakeRegistry.deregisterOperator());
|
|
36
|
+
logBlue(`Operator ${operatorAsSigner.address} deregistered from Hyperlane AVS`);
|
|
37
|
+
}
|
|
38
|
+
async function readOperatorFromEncryptedJson(operatorKeyPath) {
|
|
39
|
+
const encryptedJson = readFileAtPath(resolvePath(operatorKeyPath));
|
|
40
|
+
const keyFilePassword = await password({
|
|
41
|
+
mask: '*',
|
|
42
|
+
message: 'Enter the password for the operator key file: ',
|
|
43
|
+
});
|
|
44
|
+
return await Wallet.fromEncryptedJson(encryptedJson, keyFilePassword);
|
|
45
|
+
}
|
|
46
|
+
async function getOperatorSignature(domain, serviceManager, avsDirectory, operator, signer) {
|
|
47
|
+
const avsDirectoryContract = TestAVSDirectory__factory.connect(avsDirectory, signer);
|
|
48
|
+
// random salt is ok, because we register the operator right after
|
|
49
|
+
const salt = utils.hexZeroPad(utils.randomBytes(32), 32);
|
|
50
|
+
// give a expiry timestamp 1 hour from now
|
|
51
|
+
const expiry = utils.hexZeroPad(utils.hexlify(Math.floor(Date.now() / 1000) + 60 * 60), 32);
|
|
52
|
+
const signingHash = await avsDirectoryContract.calculateOperatorAVSRegistrationDigestHash(operator.address, serviceManager, salt, expiry);
|
|
53
|
+
// Eigenlayer's AVSDirectory expects the signature over raw signed hash instead of EIP-191 compatible toEthSignedMessageHash
|
|
54
|
+
// see https://github.com/Layr-Labs/eigenlayer-contracts/blob/ef2ea4a7459884f381057aa9bbcd29c7148cfb63/src/contracts/libraries/EIP1271SignatureUtils.sol#L22
|
|
55
|
+
const signature = operator
|
|
56
|
+
._signingKey()
|
|
57
|
+
.signDigest(utils.arrayify(signingHash));
|
|
58
|
+
return {
|
|
59
|
+
signature: utils.joinSignature(signature),
|
|
60
|
+
salt,
|
|
61
|
+
expiry,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=stakeRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stakeRegistry.js","sourceRoot":"","sources":["../../../src/avs/stakeRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAgB,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAErD,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,qBAAqB,CAA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M,CAAC,iBAAiB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AACxE,CAAC;AAED,KAAK,UAAU,oBAAoB,CACjC,MAAc,EACd,cAAuB,EACvB,YAAqB,EACrB,QAAgB,EAChB,MAAc;IAEd,MAAM,oBAAoB,GAAG,yBAAyB,CAAC,OAAO,CAC5D,YAAY,EACZ,MAAM,CACP,CAAC;IAEF,kEAAkE;IAClE,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACzD,0CAA0C;IAC1C,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EACtD,EAAE,CACH,CAAC;IAEF,MAAM,WAAW,GACf,MAAM,oBAAoB,CAAC,0CAA0C,CACnE,QAAQ,CAAC,OAAO,EAChB,cAAc,EACd,IAAI,EACJ,MAAM,CACP,CAAC;IAEJ,4HAA4H;IAC5H,4JAA4J;IAC5J,MAAM,SAAS,GAAG,QAAQ;SACvB,WAAW,EAAE;SACb,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAE3C,OAAO;QACL,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC;QACzC,IAAI;QACJ,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CommandModule, Options } from 'yargs';
|
|
2
|
+
/**
|
|
3
|
+
* Parent command
|
|
4
|
+
*/
|
|
5
|
+
export declare const avsCommand: CommandModule;
|
|
6
|
+
/**
|
|
7
|
+
* Registration command
|
|
8
|
+
*/
|
|
9
|
+
export declare const registrationOptions: {
|
|
10
|
+
[k: string]: Options;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=avs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avs.d.ts","sourceRoot":"","sources":["../../../src/commands/avs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAY/C;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,aAUxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAiBvD,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { deregisterOperator, registerOperatorWithSignature, } from '../avs/stakeRegistry.js';
|
|
2
|
+
import { log } from '../logger.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parent command
|
|
5
|
+
*/
|
|
6
|
+
export const avsCommand = {
|
|
7
|
+
command: 'avs',
|
|
8
|
+
describe: 'Interact with the Hyperlane AVS',
|
|
9
|
+
builder: (yargs) => yargs
|
|
10
|
+
.command(registerCommand)
|
|
11
|
+
.command(deregisterCommand)
|
|
12
|
+
.version(false)
|
|
13
|
+
.demandCommand(),
|
|
14
|
+
handler: () => log('Command required'),
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Registration command
|
|
18
|
+
*/
|
|
19
|
+
export const registrationOptions = {
|
|
20
|
+
chain: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Chain to interact with the AVS on',
|
|
23
|
+
demandOption: true,
|
|
24
|
+
choices: ['holesky', 'ethereum'],
|
|
25
|
+
},
|
|
26
|
+
operatorKeyPath: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Path to the operator key file',
|
|
29
|
+
demandOption: true,
|
|
30
|
+
},
|
|
31
|
+
avsSigningKey: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Address of the AVS signing key',
|
|
34
|
+
demandOption: true,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const registerCommand = {
|
|
38
|
+
command: 'register',
|
|
39
|
+
describe: 'Register operator with the AVS',
|
|
40
|
+
builder: registrationOptions,
|
|
41
|
+
handler: async ({ context, chain, operatorKeyPath, avsSigningKey }) => {
|
|
42
|
+
await registerOperatorWithSignature({
|
|
43
|
+
context,
|
|
44
|
+
chain,
|
|
45
|
+
operatorKeyPath,
|
|
46
|
+
avsSigningKey,
|
|
47
|
+
});
|
|
48
|
+
process.exit(0);
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
const deregisterCommand = {
|
|
52
|
+
command: 'deregister',
|
|
53
|
+
describe: 'Deregister yourself with the AVS',
|
|
54
|
+
builder: registrationOptions,
|
|
55
|
+
handler: async ({ context, chain, operatorKeyPath }) => {
|
|
56
|
+
await deregisterOperator({
|
|
57
|
+
context,
|
|
58
|
+
chain,
|
|
59
|
+
operatorKeyPath,
|
|
60
|
+
});
|
|
61
|
+
process.exit(0);
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=avs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avs.js","sourceRoot":"","sources":["../../../src/commands/avs.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,iCAAiC;IAC3C,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,eAAe,CAAC;SACxB,OAAO,CAAC,iBAAiB,CAAC;SAC1B,OAAO,CAAC,KAAK,CAAC;SACd,aAAa,EAAE;IACpB,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA6B;IAC3D,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mCAAmC;QAChD,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;KACjC;IACD,eAAe,EAAE;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+BAA+B;QAC5C,YAAY,EAAE,IAAI;KACnB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,gCAAgC;QAC7C,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,eAAe,GAIhB;IACH,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,gCAAgC;IAC1C,OAAO,EAAE,mBAAmB;IAC5B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,EAAE,EAAE;QACpE,MAAM,6BAA6B,CAAC;YAClC,OAAO;YACP,KAAK;YACL,eAAe;YACf,aAAa;SACd,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC;AAEF,MAAM,iBAAiB,GAGlB;IACH,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,kCAAkC;IAC5C,OAAO,EAAE,mBAAmB;IAC5B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,EAAE;QACrD,MAAM,kBAAkB,CAAC;YACvB,OAAO;YACP,KAAK;YACL,eAAe;SAChB,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { createIsmConfigMap, readIsmConfig } from '../config/ism.js';
|
|
|
4
4
|
import { createMultisigConfig, readMultisigConfig, } from '../config/multisig.js';
|
|
5
5
|
import { createWarpRouteDeployConfig, readWarpRouteDeployConfig, } from '../config/warp.js';
|
|
6
6
|
import { log, logGreen } from '../logger.js';
|
|
7
|
-
import {
|
|
7
|
+
import { inputFileCommandOption, outputFileCommandOption } from './options.js';
|
|
8
8
|
/**
|
|
9
9
|
* Parent command
|
|
10
10
|
*/
|
|
@@ -45,7 +45,7 @@ const createIsmConfigCommand = {
|
|
|
45
45
|
command: 'ism',
|
|
46
46
|
describe: 'Create a basic or advanced ISM config for a validator set',
|
|
47
47
|
builder: {
|
|
48
|
-
out:
|
|
48
|
+
out: outputFileCommandOption('./configs/ism.yaml'),
|
|
49
49
|
advanced: {
|
|
50
50
|
type: 'boolean',
|
|
51
51
|
describe: 'Create an advanced ISM configuration',
|
|
@@ -66,7 +66,7 @@ const createHookConfigCommand = {
|
|
|
66
66
|
command: 'hooks',
|
|
67
67
|
describe: 'Create a new hooks config (required & default)',
|
|
68
68
|
builder: {
|
|
69
|
-
out:
|
|
69
|
+
out: outputFileCommandOption('./configs/hooks.yaml'),
|
|
70
70
|
},
|
|
71
71
|
handler: async ({ context, out }) => {
|
|
72
72
|
await createHooksConfigMap({ context, outPath: out });
|
|
@@ -77,7 +77,7 @@ const createWarpRouteDeployConfigCommand = {
|
|
|
77
77
|
command: 'warp',
|
|
78
78
|
describe: 'Create a new Warp Route deployment config',
|
|
79
79
|
builder: {
|
|
80
|
-
out:
|
|
80
|
+
out: outputFileCommandOption('./configs/warp-route-deployment.yaml'),
|
|
81
81
|
},
|
|
82
82
|
handler: async ({ context, out }) => {
|
|
83
83
|
await createWarpRouteDeployConfig({ context, outPath: out });
|
|
@@ -103,7 +103,7 @@ const validateChainCommand = {
|
|
|
103
103
|
command: 'chain',
|
|
104
104
|
describe: 'Validate a chain config file',
|
|
105
105
|
builder: {
|
|
106
|
-
path:
|
|
106
|
+
path: inputFileCommandOption,
|
|
107
107
|
},
|
|
108
108
|
handler: async ({ path }) => {
|
|
109
109
|
readChainConfigs(path);
|
|
@@ -115,7 +115,7 @@ const validateIsmCommand = {
|
|
|
115
115
|
command: 'ism',
|
|
116
116
|
describe: 'Validate the basic ISM config file',
|
|
117
117
|
builder: {
|
|
118
|
-
path:
|
|
118
|
+
path: inputFileCommandOption,
|
|
119
119
|
},
|
|
120
120
|
handler: async ({ path }) => {
|
|
121
121
|
readMultisigConfig(path);
|
|
@@ -127,7 +127,7 @@ const validateIsmAdvancedCommand = {
|
|
|
127
127
|
command: 'ism-advanced',
|
|
128
128
|
describe: 'Validate the advanced ISM config file',
|
|
129
129
|
builder: {
|
|
130
|
-
path:
|
|
130
|
+
path: inputFileCommandOption,
|
|
131
131
|
},
|
|
132
132
|
handler: async ({ path }) => {
|
|
133
133
|
readIsmConfig(path);
|
|
@@ -139,10 +139,10 @@ const validateWarpCommand = {
|
|
|
139
139
|
command: 'warp',
|
|
140
140
|
describe: 'Validate a Warp Route deployment config file',
|
|
141
141
|
builder: {
|
|
142
|
-
path:
|
|
142
|
+
path: inputFileCommandOption,
|
|
143
143
|
},
|
|
144
144
|
handler: async ({ path }) => {
|
|
145
|
-
readWarpRouteDeployConfig(path);
|
|
145
|
+
await readWarpRouteDeployConfig(path);
|
|
146
146
|
logGreen('Config is valid');
|
|
147
147
|
process.exit(0);
|
|
148
148
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,O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AAO,EAAE,KAAK;IACd,QAAQ,EAAE,oCAAoC;IAC9C,OAAO,EAAE;QACP,IAAI,EAAE,sBAAsB;KAC7B;IACD,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAC1B,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACzB,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC;AAEF,MAAM,0BAA0B,GAA+C;IAC7E,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,uCAAuC;IACjD,OAAO,EAAE;QACP,IAAI,EAAE,sBAAsB;KAC7B;IACD,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAC1B,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC;AAEF,MAAM,mBAAmB,GAA+C;IACtE,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,8CAA8C;IACxD,OAAO,EAAE;QACP,IAAI,EAAE,sBAAsB;KAC7B;IACD,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAC1B,MAAM,yBAAyB,CAAC,IAAI,CAAC,CAAC;QACtC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAwBtC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,aAW3B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { runKurtosisAgentDeploy } from '../deploy/agent.js';
|
|
2
2
|
import { runCoreDeploy } from '../deploy/core.js';
|
|
3
|
-
import { evaluateIfDryRunFailure
|
|
3
|
+
import { evaluateIfDryRunFailure } from '../deploy/dry-run.js';
|
|
4
4
|
import { runWarpRouteDeploy } from '../deploy/warp.js';
|
|
5
5
|
import { log, logGray } from '../logger.js';
|
|
6
|
-
import { agentConfigCommandOption, agentTargetsCommandOption, coreTargetsCommandOption,
|
|
6
|
+
import { agentConfigCommandOption, agentTargetsCommandOption, coreTargetsCommandOption, dryRunCommandOption, fromAddressCommandOption, hookCommandOption, ismCommandOption, originCommandOption, warpDeploymentConfigCommandOption, } from './options.js';
|
|
7
7
|
/**
|
|
8
8
|
* Parent command
|
|
9
9
|
*/
|
|
@@ -52,13 +52,12 @@ const coreCommand = {
|
|
|
52
52
|
ism: ismCommandOption,
|
|
53
53
|
hook: hookCommandOption,
|
|
54
54
|
agent: agentConfigCommandOption(false, './configs/agent.json'),
|
|
55
|
-
'dry-run':
|
|
55
|
+
'dry-run': dryRunCommandOption,
|
|
56
|
+
'from-address': fromAddressCommandOption,
|
|
56
57
|
},
|
|
57
58
|
handler: async ({ context, targets, ism, hook, agent, dryRun }) => {
|
|
58
59
|
logGray(`Hyperlane permissionless core deployment${dryRun ? ' dry-run' : ''}`);
|
|
59
|
-
logGray(
|
|
60
|
-
if (dryRun)
|
|
61
|
-
await verifyAnvil();
|
|
60
|
+
logGray(`------------------------------------------------`);
|
|
62
61
|
try {
|
|
63
62
|
const chains = targets?.split(',').map((r) => r.trim());
|
|
64
63
|
await runCoreDeploy({
|
|
@@ -83,14 +82,13 @@ const warpCommand = {
|
|
|
83
82
|
command: 'warp',
|
|
84
83
|
describe: 'Deploy Warp Route contracts',
|
|
85
84
|
builder: {
|
|
86
|
-
config:
|
|
87
|
-
'dry-run':
|
|
85
|
+
config: warpDeploymentConfigCommandOption,
|
|
86
|
+
'dry-run': dryRunCommandOption,
|
|
87
|
+
'from-address': fromAddressCommandOption,
|
|
88
88
|
},
|
|
89
89
|
handler: async ({ context, config, dryRun }) => {
|
|
90
90
|
logGray(`Hyperlane warp route deployment${dryRun ? ' dry-run' : ''}`);
|
|
91
91
|
logGray('------------------------------------------------');
|
|
92
|
-
if (dryRun)
|
|
93
|
-
await verifyAnvil();
|
|
94
92
|
try {
|
|
95
93
|
await runWarpRouteDeploy({
|
|
96
94
|
context,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,iCAAiC,GAClC,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO,EAAE,QAAQ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QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YACvC,MAAM,KAAK,CAAC;QACd,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readHookConfig } from '../hook/read.js';
|
|
2
2
|
import { log } from '../logger.js';
|
|
3
|
-
import { addressCommandOption, chainCommandOption,
|
|
3
|
+
import { addressCommandOption, chainCommandOption, outputFileCommandOption, } from './options.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parent command
|
|
6
6
|
*/
|
|
@@ -24,7 +24,7 @@ export const read = {
|
|
|
24
24
|
demandOption: true,
|
|
25
25
|
},
|
|
26
26
|
address: addressCommandOption('Address of the Hook to read.', true),
|
|
27
|
-
out:
|
|
27
|
+
out: outputFileCommandOption(),
|
|
28
28
|
},
|
|
29
29
|
handler: async (args) => {
|
|
30
30
|
await readHookConfig(args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/commands/hook.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/commands/hook.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB;IACxC,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,8BAA8B;IACxC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE;IACtE,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF,wBAAwB;AACxB,kDAAkD;AAClD,+FAA+F;AAC/F,mCAAmC;AACnC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,IAAI,GAIZ;IACH,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,sDAAsD;IAChE,OAAO,EAAE;QACP,KAAK,EAAE;YACL,GAAG,kBAAkB;YACrB,YAAY,EAAE,IAAI;SACnB;QACD,OAAO,EAAE,oBAAoB,CAAC,8BAA8B,EAAE,IAAI,CAAC;QACnE,GAAG,EAAE,uBAAuB,EAAE;KAC/B;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
|
package/dist/src/commands/ism.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readIsmConfig } from '../ism/read.js';
|
|
2
2
|
import { log } from '../logger.js';
|
|
3
|
-
import { addressCommandOption, chainCommandOption,
|
|
3
|
+
import { addressCommandOption, chainCommandOption, outputFileCommandOption, } from './options.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parent command
|
|
6
6
|
*/
|
|
@@ -26,7 +26,7 @@ export const read = {
|
|
|
26
26
|
demandOption: true,
|
|
27
27
|
},
|
|
28
28
|
address: addressCommandOption('Address of the Interchain Security Module to read.', true),
|
|
29
|
-
out:
|
|
29
|
+
out: outputFileCommandOption(),
|
|
30
30
|
},
|
|
31
31
|
handler: async (argv) => {
|
|
32
32
|
await readIsmConfig(argv);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ism.js","sourceRoot":"","sources":["../../../src/commands/ism.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"ism.js","sourceRoot":"","sources":["../../../src/commands/ism.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAkB;IACvC,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,6BAA6B;IACvC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE;IACtE,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF,wBAAwB;AACxB,mDAAmD;AACnD,2FAA2F;AAC3F,wDAAwD;AACxD,4FAA4F;AAC5F,gCAAgC;AAChC,gGAAgG;AAChG,MAAM,CAAC,MAAM,IAAI,GAIZ;IACH,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,qDAAqD;IAC/D,OAAO,EAAE;QACP,KAAK,EAAE;YACL,GAAG,kBAAkB;YACrB,YAAY,EAAE,IAAI;SACnB;QACD,OAAO,EAAE,oBAAoB,CAC3B,oDAAoD,EACpD,IAAI,CACL;QACD,GAAG,EAAE,uBAAuB,EAAE;KAC/B;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
|
|
@@ -10,12 +10,18 @@ export declare const agentTargetsCommandOption: Options;
|
|
|
10
10
|
export declare const originCommandOption: Options;
|
|
11
11
|
export declare const ismCommandOption: Options;
|
|
12
12
|
export declare const hookCommandOption: Options;
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
13
|
+
export declare const warpDeploymentConfigCommandOption: Options;
|
|
14
|
+
export declare const warpCoreConfigCommandOption: Options;
|
|
15
15
|
export declare const agentConfigCommandOption: (isIn: boolean, defaultPath?: string) => Options;
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
16
|
+
export declare const outputFileCommandOption: (defaultPath?: string) => Options;
|
|
17
|
+
export declare const inputFileCommandOption: Options;
|
|
18
|
+
export declare const fromAddressCommandOption: Options;
|
|
19
|
+
export declare const dryRunCommandOption: Options;
|
|
19
20
|
export declare const chainCommandOption: Options;
|
|
20
21
|
export declare const addressCommandOption: (description: string, demandOption?: boolean) => Options;
|
|
22
|
+
export declare const awsAccessKeyCommandOption: Options;
|
|
23
|
+
export declare const awsSecretKeyCommandOption: Options;
|
|
24
|
+
export declare const awsRegionCommandOption: Options;
|
|
25
|
+
export declare const awsBucketCommandOption: Options;
|
|
26
|
+
export declare const awsKeyIdCommandOption: Options;
|
|
21
27
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/commands/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/commands/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAShC,eAAO,MAAM,sBAAsB,EAAE,OAIpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,OAInC,CAAC;AAEF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} from '@hyperlane-xyz/utils';
|
|
3
4
|
import { ENV } from '../utils/env.js';
|
|
@@ -21,7 +22,7 @@ export const registryUriCommandOption = {
|
|
|
21
22
|
export const overrideRegistryUriCommandOption = {
|
|
22
23
|
type: 'string',
|
|
23
24
|
description: 'Path to a local registry to override the default registry',
|
|
24
|
-
default:
|
|
25
|
+
default: `${os.homedir()}/.hyperlane`,
|
|
25
26
|
};
|
|
26
27
|
export const skipConfirmationOption = {
|
|
27
28
|
type: 'boolean',
|
|
@@ -31,10 +32,10 @@ export const skipConfirmationOption = {
|
|
|
31
32
|
};
|
|
32
33
|
export const keyCommandOption = {
|
|
33
34
|
type: 'string',
|
|
34
|
-
description:
|
|
35
|
-
|
|
36
|
-
alias: 'k',
|
|
35
|
+
description: 'A hex private key or seed phrase for transaction signing, or use the HYP_KEY env var.',
|
|
36
|
+
alias: ['k', 'private-key', 'seed-phrase'],
|
|
37
37
|
default: ENV.HYP_KEY,
|
|
38
|
+
defaultDescription: 'process.env.HYP_KEY',
|
|
38
39
|
};
|
|
39
40
|
/* Command-specific options */
|
|
40
41
|
export const coreTargetsCommandOption = {
|
|
@@ -57,13 +58,13 @@ export const hookCommandOption = {
|
|
|
57
58
|
type: 'string',
|
|
58
59
|
description: 'A path to a JSON or YAML file with Hook configs (for every chain)',
|
|
59
60
|
};
|
|
60
|
-
export const
|
|
61
|
+
export const warpDeploymentConfigCommandOption = {
|
|
61
62
|
type: 'string',
|
|
62
63
|
description: 'A path to a JSON or YAML file with a warp route deployment config.',
|
|
63
64
|
default: './configs/warp-route-deployment.yaml',
|
|
64
65
|
alias: 'w',
|
|
65
66
|
};
|
|
66
|
-
export const
|
|
67
|
+
export const warpCoreConfigCommandOption = {
|
|
67
68
|
type: 'string',
|
|
68
69
|
description: 'File path to Warp Route config',
|
|
69
70
|
alias: 'w',
|
|
@@ -75,22 +76,27 @@ export const agentConfigCommandOption = (isIn, defaultPath) => ({
|
|
|
75
76
|
description: `${isIn ? 'Input' : 'Output'} file path for the agent configuration`,
|
|
76
77
|
default: defaultPath,
|
|
77
78
|
});
|
|
78
|
-
export const
|
|
79
|
+
export const outputFileCommandOption = (defaultPath) => ({
|
|
79
80
|
type: 'string',
|
|
80
81
|
description: 'Output file path',
|
|
81
82
|
default: defaultPath,
|
|
82
83
|
alias: 'o',
|
|
83
84
|
});
|
|
84
|
-
export const
|
|
85
|
+
export const inputFileCommandOption = {
|
|
85
86
|
type: 'string',
|
|
86
87
|
description: 'Input file path',
|
|
87
88
|
alias: 'i',
|
|
88
89
|
demandOption: true,
|
|
89
90
|
};
|
|
90
|
-
export const
|
|
91
|
+
export const fromAddressCommandOption = {
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: `An address to simulate transaction signing on a forked network`,
|
|
94
|
+
alias: 'f',
|
|
95
|
+
};
|
|
96
|
+
export const dryRunCommandOption = {
|
|
91
97
|
type: 'string',
|
|
92
98
|
description: 'Chain name to fork and simulate deployment. Please ensure an anvil node instance is running during execution via `anvil`.',
|
|
93
|
-
alias:
|
|
99
|
+
alias: 'd',
|
|
94
100
|
};
|
|
95
101
|
export const chainCommandOption = {
|
|
96
102
|
type: 'string',
|
|
@@ -101,4 +107,31 @@ export const addressCommandOption = (description, demandOption = false) => ({
|
|
|
101
107
|
description,
|
|
102
108
|
demandOption,
|
|
103
109
|
});
|
|
110
|
+
/* Validator options */
|
|
111
|
+
export const awsAccessKeyCommandOption = {
|
|
112
|
+
type: 'string',
|
|
113
|
+
description: 'AWS access key of IAM user associated with validator',
|
|
114
|
+
default: ENV.AWS_ACCESS_KEY_ID,
|
|
115
|
+
defaultDescription: 'process.env.AWS_ACCESS_KEY_ID',
|
|
116
|
+
};
|
|
117
|
+
export const awsSecretKeyCommandOption = {
|
|
118
|
+
type: 'string',
|
|
119
|
+
description: 'AWS secret access key of IAM user associated with validator',
|
|
120
|
+
default: ENV.AWS_SECRET_ACCESS_KEY,
|
|
121
|
+
defaultDescription: 'process.env.AWS_SECRET_ACCESS_KEY',
|
|
122
|
+
};
|
|
123
|
+
export const awsRegionCommandOption = {
|
|
124
|
+
type: 'string',
|
|
125
|
+
describe: 'AWS region associated with validator',
|
|
126
|
+
default: ENV.AWS_REGION,
|
|
127
|
+
defaultDescription: 'process.env.AWS_REGION',
|
|
128
|
+
};
|
|
129
|
+
export const awsBucketCommandOption = {
|
|
130
|
+
type: 'string',
|
|
131
|
+
describe: 'AWS S3 bucket containing validator signatures and announcement',
|
|
132
|
+
};
|
|
133
|
+
export const awsKeyIdCommandOption = {
|
|
134
|
+
type: 'string',
|
|
135
|
+
describe: 'Key ID from AWS KMS',
|
|
136
|
+
};
|
|
104
137
|
//# sourceMappingURL=options.js.map
|