@hyperlane-xyz/cli 1.4.2-beta0

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.
Files changed (90) hide show
  1. package/README.md +57 -0
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +38 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/src/commands/chains.d.ts +6 -0
  7. package/dist/src/commands/chains.d.ts.map +1 -0
  8. package/dist/src/commands/chains.js +59 -0
  9. package/dist/src/commands/chains.js.map +1 -0
  10. package/dist/src/commands/config.d.ts +6 -0
  11. package/dist/src/commands/config.d.ts.map +1 -0
  12. package/dist/src/commands/config.js +94 -0
  13. package/dist/src/commands/config.js.map +1 -0
  14. package/dist/src/commands/deploy.d.ts +6 -0
  15. package/dist/src/commands/deploy.d.ts.map +1 -0
  16. package/dist/src/commands/deploy.js +72 -0
  17. package/dist/src/commands/deploy.js.map +1 -0
  18. package/dist/src/commands/options.d.ts +6 -0
  19. package/dist/src/commands/options.d.ts.map +1 -0
  20. package/dist/src/commands/options.js +19 -0
  21. package/dist/src/commands/options.js.map +1 -0
  22. package/dist/src/commands/send.d.ts +6 -0
  23. package/dist/src/commands/send.d.ts.map +1 -0
  24. package/dist/src/commands/send.js +110 -0
  25. package/dist/src/commands/send.js.map +1 -0
  26. package/dist/src/configs.d.ts +284 -0
  27. package/dist/src/configs.d.ts.map +1 -0
  28. package/dist/src/configs.js +110 -0
  29. package/dist/src/configs.js.map +1 -0
  30. package/dist/src/consts.d.ts +4 -0
  31. package/dist/src/consts.d.ts.map +1 -0
  32. package/dist/src/consts.js +4 -0
  33. package/dist/src/consts.js.map +1 -0
  34. package/dist/src/context.d.ts +373 -0
  35. package/dist/src/context.d.ts.map +1 -0
  36. package/dist/src/context.js +24 -0
  37. package/dist/src/context.js.map +1 -0
  38. package/dist/src/deploy/TestRecipientDeployer.d.ts +20 -0
  39. package/dist/src/deploy/TestRecipientDeployer.d.ts.map +1 -0
  40. package/dist/src/deploy/TestRecipientDeployer.js +35 -0
  41. package/dist/src/deploy/TestRecipientDeployer.js.map +1 -0
  42. package/dist/src/deploy/core.d.ts +6 -0
  43. package/dist/src/deploy/core.d.ts.map +1 -0
  44. package/dist/src/deploy/core.js +264 -0
  45. package/dist/src/deploy/core.js.map +1 -0
  46. package/dist/src/deploy/types.d.ts +21 -0
  47. package/dist/src/deploy/types.d.ts.map +1 -0
  48. package/dist/src/deploy/types.js +2 -0
  49. package/dist/src/deploy/types.js.map +1 -0
  50. package/dist/src/deploy/utils.d.ts +10 -0
  51. package/dist/src/deploy/utils.d.ts.map +1 -0
  52. package/dist/src/deploy/utils.js +24 -0
  53. package/dist/src/deploy/utils.js.map +1 -0
  54. package/dist/src/deploy/warp.d.ts +8 -0
  55. package/dist/src/deploy/warp.d.ts.map +1 -0
  56. package/dist/src/deploy/warp.js +230 -0
  57. package/dist/src/deploy/warp.js.map +1 -0
  58. package/dist/src/logger.d.ts +12 -0
  59. package/dist/src/logger.d.ts.map +1 -0
  60. package/dist/src/logger.js +25 -0
  61. package/dist/src/logger.js.map +1 -0
  62. package/dist/src/send/message.d.ts +10 -0
  63. package/dist/src/send/message.d.ts.map +1 -0
  64. package/dist/src/send/message.js +66 -0
  65. package/dist/src/send/message.js.map +1 -0
  66. package/dist/src/send/transfer.d.ts +14 -0
  67. package/dist/src/send/transfer.d.ts.map +1 -0
  68. package/dist/src/send/transfer.js +95 -0
  69. package/dist/src/send/transfer.js.map +1 -0
  70. package/dist/src/utils/balances.d.ts +6 -0
  71. package/dist/src/utils/balances.d.ts.map +1 -0
  72. package/dist/src/utils/balances.js +23 -0
  73. package/dist/src/utils/balances.js.map +1 -0
  74. package/dist/src/utils/files.d.ts +19 -0
  75. package/dist/src/utils/files.d.ts.map +1 -0
  76. package/dist/src/utils/files.js +100 -0
  77. package/dist/src/utils/files.js.map +1 -0
  78. package/dist/src/utils/keys.d.ts +4 -0
  79. package/dist/src/utils/keys.d.ts.map +1 -0
  80. package/dist/src/utils/keys.js +17 -0
  81. package/dist/src/utils/keys.js.map +1 -0
  82. package/dist/src/utils/time.d.ts +2 -0
  83. package/dist/src/utils/time.d.ts.map +1 -0
  84. package/dist/src/utils/time.js +5 -0
  85. package/dist/src/utils/time.js.map +1 -0
  86. package/examples/chain-config.yaml +44 -0
  87. package/examples/contract-artifacts.yaml +20 -0
  88. package/examples/multisig-ism.yaml +20 -0
  89. package/examples/warp-tokens.yaml +23 -0
  90. package/package.json +57 -0
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # Hyperlane CLI
2
+
3
+ The Hyperlane CLI is a command-line tool written in Typescript that facilitates common operations on Hyperlane, such as deploying the core contracts and/or warp routes to new chains.
4
+
5
+ ## Hyperlane overview
6
+
7
+ Hyperlane is an interchain messaging protocol that allows applications to communicate between blockchains.
8
+
9
+ Developers can use Hyperlane to share state between blockchains, allowing them to build interchain applications that live natively across multiple chains.
10
+
11
+ To read more about interchain applications, how the protocol works, and how to integrate with Hyperlane, please see the [documentation](https://docs.hyperlane.xyz).
12
+
13
+ ## Setup
14
+
15
+ Node 16 or newer is required.
16
+
17
+ **Option 1: Global install:**
18
+
19
+ ```bash
20
+ # Install with NPM
21
+ npm install -g @hyperlane-xyz/cli
22
+ # Or uninstall old versions
23
+ npm uninstall -g @hyperlane-xyz/cli
24
+ ```
25
+
26
+ **Option 2: Temp install:**
27
+
28
+ ```bash
29
+ # Run via NPM's npx command
30
+ npx @hyperlane-xyz/cli
31
+ # Or via Yarn's dlx command
32
+ yarn dlx @hyperlane-xyz/cli
33
+ ```
34
+
35
+ **Option 3: Run from source:**
36
+
37
+ ```bash
38
+ git clone https://github.com/hyperlane-xyz/hyperlane-monorepo.git
39
+ cd hyperlane-monorepo
40
+ yarn install && yarn build
41
+ cd typescript/cli
42
+ yarn hyperlane
43
+ ```
44
+
45
+ ## Common commands
46
+
47
+ View help: `hyperlane --help`
48
+
49
+ Create a core deployment config: `hyperlane config create`
50
+
51
+ Run hyperlane core deployments: `hyperlane deploy core`
52
+
53
+ Run warp route deployments: `hyperlane deploy warp`
54
+
55
+ View SDK contract addresses: `hyperlane chains addresses`
56
+
57
+ Send test message: `hyperlane send message`
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #! /usr/bin/env node
2
+ import './src/logger.js';
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAQA,OAAO,iBAAiB,CAAC"}
package/dist/cli.js ADDED
@@ -0,0 +1,38 @@
1
+ #! /usr/bin/env node
2
+ import chalk from 'chalk';
3
+ import yargs from 'yargs';
4
+ import { chainsCommand } from './src/commands/chains.js';
5
+ import { configCommand } from './src/commands/config.js';
6
+ import { deployCommand } from './src/commands/deploy.js';
7
+ import { sendCommand } from './src/commands/send.js';
8
+ import './src/logger.js';
9
+ import { errorRed } from './src/logger.js';
10
+ const MISSING_PARAMS_ERROR = 'Not enough non-option arguments';
11
+ console.log(chalk.blue('Hyperlane'), chalk.magentaBright('CLI'));
12
+ try {
13
+ await yargs(process.argv.slice(2))
14
+ .scriptName('hyperlane')
15
+ // TODO get version num from package.json
16
+ .version(false)
17
+ .command(chainsCommand)
18
+ .command(configCommand)
19
+ .command(deployCommand)
20
+ .command(sendCommand)
21
+ .demandCommand()
22
+ .strict()
23
+ .help()
24
+ .fail((msg, err, yargs) => {
25
+ if (msg && !msg.includes(MISSING_PARAMS_ERROR))
26
+ errorRed('Error: ' + msg);
27
+ console.log('');
28
+ yargs.showHelp();
29
+ console.log('');
30
+ if (err)
31
+ errorRed(err.toString());
32
+ process.exit(1);
33
+ }).argv;
34
+ }
35
+ catch (error) {
36
+ errorRed('Error: ' + error.message);
37
+ }
38
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AACA,OAAO,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AAC;QAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC,IAAI,CAAC;CACX;AAAC,OAAO,KAAU,EAAE;IACnB,QAAQ,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;CACrC"}
@@ -0,0 +1,6 @@
1
+ import { CommandModule } from 'yargs';
2
+ /**
3
+ * Parent command
4
+ */
5
+ export declare const chainsCommand: CommandModule;
6
+ //# sourceMappingURL=chains.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../src/commands/chains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAatC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,aAU3B,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { Chains, Mainnets, Testnets, chainMetadata, hyperlaneContractAddresses, } from '@hyperlane-xyz/sdk';
2
+ import { log, logBlue, logGray } from '../logger.js';
3
+ /**
4
+ * Parent command
5
+ */
6
+ export const chainsCommand = {
7
+ command: 'chains',
8
+ describe: 'View information about core Hyperlane chains',
9
+ builder: (yargs) => yargs
10
+ .command(listCommand)
11
+ .command(addressesCommand)
12
+ .version(false)
13
+ .demandCommand(),
14
+ handler: () => log('Command required'),
15
+ };
16
+ /**
17
+ * List command
18
+ */
19
+ const listCommand = {
20
+ command: 'list',
21
+ describe: 'List all core chains included in the Hyperlane SDK',
22
+ handler: () => {
23
+ logBlue('Hyperlane core mainnet chains:');
24
+ logGray('------------------------------');
25
+ log(Mainnets.map((chain) => chainMetadata[chain].displayName).join(', '));
26
+ log('');
27
+ logBlue('Hyperlane core testnet chains:');
28
+ logGray('------------------------------');
29
+ log(Testnets.map((chain) => chainMetadata[chain].displayName).join(', '));
30
+ },
31
+ };
32
+ /**
33
+ * Addresses command
34
+ */
35
+ const addressesCommand = {
36
+ command: 'addresses',
37
+ describe: 'Display the addresses of core Hyperlane contracts',
38
+ builder: (yargs) => yargs.options({
39
+ name: {
40
+ type: 'string',
41
+ description: 'Chain to display addresses for',
42
+ choices: Object.values(Chains),
43
+ },
44
+ }),
45
+ handler: (args) => {
46
+ const name = args.name;
47
+ if (name && hyperlaneContractAddresses[name]) {
48
+ logBlue('Hyperlane contract addresses for:', name);
49
+ logGray('---------------------------------');
50
+ log(JSON.stringify(hyperlaneContractAddresses[name], null, 2));
51
+ }
52
+ else {
53
+ logBlue('Hyperlane core contract addresses:');
54
+ logGray('----------------------------------');
55
+ log(JSON.stringify(hyperlaneContractAddresses, null, 2));
56
+ }
57
+ },
58
+ };
59
+ //# sourceMappingURL=chains.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chains.js","sourceRoot":"","sources":["../../../src/commands/chains.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAEN,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,8CAA8C;IACxD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,WAAW,CAAC;SACpB,OAAO,CAAC,gBAAgB,CAAC;SACzB,OAAO,CAAC,KAAK,CAAC;SACd,aAAa,EAAE;IACpB,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,GAAkB;IACjC,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,oDAAoD;IAC9D,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,CAAC,gCAAgC,CAAC,CAAC;QAC1C,OAAO,CAAC,gCAAgC,CAAC,CAAC;QAC1C,GAAG,CAAC,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B,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SAC1D;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { CommandModule } from 'yargs';
2
+ /**
3
+ * Parent command
4
+ */
5
+ export declare const configCommand: CommandModule;
6
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAYtC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,aAU3B,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { input } from '@inquirer/prompts';
2
+ import select from '@inquirer/select';
3
+ import { ProtocolType, isValidChainMetadata, } from '@hyperlane-xyz/sdk';
4
+ import { readChainConfig } from '../configs.js';
5
+ import { errorRed, logBlue, logGreen } from '../logger.js';
6
+ import { mergeYamlOrJson } from '../utils/files.js';
7
+ /**
8
+ * Parent command
9
+ */
10
+ export const configCommand = {
11
+ command: 'config',
12
+ describe: 'Create or validate Hyperlane configs',
13
+ builder: (yargs) => yargs
14
+ .command(createCommand)
15
+ .command(validateCommand)
16
+ .version(false)
17
+ .demandCommand(),
18
+ handler: () => console.log('Command required'),
19
+ };
20
+ /**
21
+ * Create command
22
+ */
23
+ const createCommand = {
24
+ command: 'create',
25
+ describe: 'Create a new, minimal Hyperlane config',
26
+ builder: (yargs) => yargs.options({
27
+ output: {
28
+ type: 'string',
29
+ alias: 'o',
30
+ description: 'Output file path',
31
+ },
32
+ format: {
33
+ type: 'string',
34
+ alias: 'f',
35
+ description: 'Output file format',
36
+ choices: ['json', 'yaml'],
37
+ },
38
+ }),
39
+ handler: async (argv) => {
40
+ const format = argv.format || 'yaml';
41
+ const output = argv.output || `./configs/chain-config.${format}`;
42
+ logBlue('Creating a new chain config');
43
+ const name = await input({
44
+ message: 'Enter chain name (one word, lower case)',
45
+ });
46
+ const chainId = await input({ message: 'Enter chain id (number)' });
47
+ const domainId = await input({
48
+ message: 'Enter domain id (number, often matches chainId)',
49
+ });
50
+ const protocol = await select({
51
+ message: 'Select protocol type',
52
+ choices: Object.values(ProtocolType).map((protocol) => ({
53
+ name: protocol,
54
+ value: protocol,
55
+ })),
56
+ });
57
+ const rpcUrl = await input({ message: 'Enter http or https rpc url' });
58
+ const metadata = {
59
+ name,
60
+ chainId: parseInt(chainId, 10),
61
+ domainId: parseInt(domainId, 10),
62
+ protocol,
63
+ rpcUrls: [{ http: rpcUrl }],
64
+ };
65
+ if (isValidChainMetadata(metadata)) {
66
+ logGreen(`Chain config is valid, writing to file ${output}`);
67
+ mergeYamlOrJson(output, { [name]: metadata }, format);
68
+ }
69
+ else {
70
+ errorRed(`Chain config is invalid, please see https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/cli/examples/chain-config.yaml for an example`);
71
+ throw new Error('Invalid chain config');
72
+ }
73
+ process.exit(0);
74
+ },
75
+ };
76
+ /**
77
+ * Validate command
78
+ */
79
+ const validateCommand = {
80
+ command: 'validate',
81
+ describe: 'Validate the configs in a YAML or JSON file',
82
+ builder: (yargs) => yargs.options({
83
+ path: {
84
+ type: 'string',
85
+ description: 'Input file path',
86
+ demandOption: true,
87
+ },
88
+ }),
89
+ handler: async (argv) => {
90
+ const path = argv.path;
91
+ readChainConfig(path);
92
+ },
93
+ };
94
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAGtC,OAAO,EAEL,YAAY,EACZ,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAA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,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iBAAiB;YAC9B,YAAY,EAAE,IAAI;SACnB;KACF,CAAC;IACJ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;QACjC,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { CommandModule } from 'yargs';
2
+ /**
3
+ * Parent command
4
+ */
5
+ export declare const deployCommand: CommandModule;
6
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAatC;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,aAU3B,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { runCoreDeploy } from '../deploy/core.js';
2
+ import { runWarpDeploy } from '../deploy/warp.js';
3
+ import { logGray } from '../logger.js';
4
+ import { chainsCommandOption, coreArtifactsOption, keyCommandOption, outDirCommandOption, } from './options.js';
5
+ /**
6
+ * Parent command
7
+ */
8
+ export const deployCommand = {
9
+ command: 'deploy',
10
+ describe: 'Permisionslessly deploy a Hyperlane contracts or extensions',
11
+ builder: (yargs) => yargs
12
+ .command(coreCommand)
13
+ .command(warpCommand)
14
+ .version(false)
15
+ .demandCommand(),
16
+ handler: () => console.log('Command required'),
17
+ };
18
+ /**
19
+ * Core command
20
+ */
21
+ const coreCommand = {
22
+ command: 'core',
23
+ describe: 'Deploy core Hyperlane contracts',
24
+ builder: (yargs) => yargs.options({
25
+ key: keyCommandOption,
26
+ chains: chainsCommandOption,
27
+ out: outDirCommandOption,
28
+ }),
29
+ handler: async (argv) => {
30
+ logGray('Hyperlane permissionless core deployment');
31
+ logGray('----------------------------------------');
32
+ const key = argv.key || process.env.HYP_KEY;
33
+ const chainConfigPath = argv.chains;
34
+ const outPath = argv.out;
35
+ await runCoreDeploy({ key, chainConfigPath, outPath });
36
+ process.exit(0);
37
+ },
38
+ };
39
+ /**
40
+ * Warp command
41
+ */
42
+ const warpCommand = {
43
+ command: 'warp',
44
+ describe: 'Deploy Warp Route contracts',
45
+ builder: (yargs) => yargs.options({
46
+ key: keyCommandOption,
47
+ chains: chainsCommandOption,
48
+ out: outDirCommandOption,
49
+ core: coreArtifactsOption,
50
+ config: {
51
+ type: 'string',
52
+ description: 'A path to a JSON or YAML file with a warp config.',
53
+ default: './configs/warp-tokens.yaml',
54
+ },
55
+ }),
56
+ handler: async (argv) => {
57
+ const key = argv.key || process.env.HYP_KEY;
58
+ const chainConfigPath = argv.chains;
59
+ const warpConfigPath = argv.config;
60
+ const coreArtifactsPath = argv.core;
61
+ const outPath = argv.out;
62
+ await runWarpDeploy({
63
+ key,
64
+ chainConfigPath,
65
+ warpConfigPath,
66
+ coreArtifactsPath,
67
+ outPath,
68
+ });
69
+ process.exit(0);
70
+ },
71
+ };
72
+ //# sourceMappingURL=deploy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../src/commands/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,6DAA6D;IACvE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,WAAW,CAAC;SACpB,OAAO,CAAC,WAAW,CAAC;SACp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EAAE,KAAK,EAAE,IAAS,EAAE,EAAE;QAC3B,MAAM,GAAG,GAAW,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;QACpD,MAAM,eAAe,GAAW,IAAI,CAAC,MAAM,CAAC;QAC5C,MAAM,cAAc,GAAW,IAAI,CAAC,MAAM,CAAC;QAC3C,MAAM,iBAAiB,GAAW,IAAI,CAAC,IAAI,CAAC;QAC5C,MAAM,OAAO,GAAW,IAAI,CAAC,GAAG,CAAC;QACjC,MAAM,aAAa,CAAC;YAClB,GAAG;YACH,eAAe;YACf,cAAc;YACd,iBAAiB;YACjB,OAAO;SACR,CAAC,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Options } from 'yargs';
2
+ export declare const keyCommandOption: Options;
3
+ export declare const chainsCommandOption: Options;
4
+ export declare const outDirCommandOption: Options;
5
+ export declare const coreArtifactsOption: Options;
6
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/commands/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,eAAO,MAAM,gBAAgB,EAAE,OAI9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAIjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAIjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OAGjC,CAAC"}
@@ -0,0 +1,19 @@
1
+ export const keyCommandOption = {
2
+ type: 'string',
3
+ description: 'A hex private key or seed phrase for transaction signing. Or use the HYP_KEY env var',
4
+ };
5
+ export const chainsCommandOption = {
6
+ type: 'string',
7
+ description: 'A path to a JSON or YAML file with chain configs.',
8
+ default: './configs/chain-config.yaml',
9
+ };
10
+ export const outDirCommandOption = {
11
+ type: 'string',
12
+ description: 'A folder name output artifacts into.',
13
+ default: './artifacts',
14
+ };
15
+ export const coreArtifactsOption = {
16
+ type: 'string',
17
+ description: 'File path to core deployment output artifacts',
18
+ };
19
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/commands/options.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gBAAgB,GAAY;IACvC,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,sFAAsF;CACzF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAY;IAC1C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,mDAAmD;IAChE,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAY;IAC1C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,sCAAsC;IACnD,OAAO,EAAE,aAAa;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAY;IAC1C,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,+CAA+C;CAC7D,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { CommandModule } from 'yargs';
2
+ /**
3
+ * Parent command
4
+ */
5
+ export declare const sendCommand: CommandModule;
6
+ //# sourceMappingURL=send.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/commands/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAW,MAAM,OAAO,CAAC;AAY/C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,aAUzB,CAAC"}
@@ -0,0 +1,110 @@
1
+ import { log } from '../logger.js';
2
+ import { sendTestMessage } from '../send/message.js';
3
+ import { sendTestTransfer } from '../send/transfer.js';
4
+ import { chainsCommandOption, coreArtifactsOption, keyCommandOption, } from './options.js';
5
+ /**
6
+ * Parent command
7
+ */
8
+ export const sendCommand = {
9
+ command: 'send',
10
+ describe: 'Send a test message or transfer',
11
+ builder: (yargs) => yargs
12
+ .command(messageCommand)
13
+ .command(transferCommand)
14
+ .version(false)
15
+ .demandCommand(),
16
+ handler: () => log('Command required'),
17
+ };
18
+ /**
19
+ * Message command
20
+ */
21
+ const messageOptions = {
22
+ key: keyCommandOption,
23
+ chains: chainsCommandOption,
24
+ core: coreArtifactsOption,
25
+ origin: {
26
+ type: 'string',
27
+ description: 'Origin chain to send message from',
28
+ demandOption: true,
29
+ },
30
+ destination: {
31
+ type: 'string',
32
+ description: 'Destination chain to send message to',
33
+ demandOption: true,
34
+ },
35
+ timeout: {
36
+ type: 'number',
37
+ description: 'Timeout in seconds',
38
+ default: 5 * 60,
39
+ },
40
+ };
41
+ const messageCommand = {
42
+ command: 'message',
43
+ describe: 'Send a test message to a remote chain',
44
+ builder: (yargs) => yargs.options(messageOptions),
45
+ handler: async (argv) => {
46
+ const key = argv.key || process.env.HYP_KEY;
47
+ const chainConfigPath = argv.chains;
48
+ const coreArtifactsPath = argv.core;
49
+ const origin = argv.origin;
50
+ const destination = argv.destination;
51
+ const timeout = argv.timeout;
52
+ await sendTestMessage({
53
+ key,
54
+ chainConfigPath,
55
+ coreArtifactsPath,
56
+ origin,
57
+ destination,
58
+ timeout,
59
+ });
60
+ process.exit(0);
61
+ },
62
+ };
63
+ /**
64
+ * Transfer command
65
+ */
66
+ const transferCommand = {
67
+ command: 'transfer',
68
+ describe: 'Send a test token transfer on a warp route',
69
+ builder: (yargs) => yargs.options({
70
+ ...messageOptions,
71
+ router: {
72
+ type: 'string',
73
+ description: 'The address of the token router contract',
74
+ demandOption: true,
75
+ },
76
+ wei: {
77
+ type: 'string',
78
+ description: 'Amount in wei to send',
79
+ default: 1,
80
+ },
81
+ recipient: {
82
+ type: 'string',
83
+ description: 'Token recipient address (defaults to sender)',
84
+ },
85
+ }),
86
+ handler: async (argv) => {
87
+ const key = argv.key || process.env.HYP_KEY;
88
+ const chainConfigPath = argv.chains;
89
+ const coreArtifactsPath = argv.core;
90
+ const origin = argv.origin;
91
+ const destination = argv.destination;
92
+ const timeout = argv.timeout;
93
+ const routerAddress = argv.router;
94
+ const wei = argv.wei;
95
+ const recipient = argv.recipient;
96
+ await sendTestTransfer({
97
+ key,
98
+ chainConfigPath,
99
+ coreArtifactsPath,
100
+ origin,
101
+ destination,
102
+ routerAddress,
103
+ wei,
104
+ recipient,
105
+ timeout,
106
+ });
107
+ process.exit(0);
108
+ },
109
+ };
110
+ //# sourceMappingURL=send.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/commands/send.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkB;IACxC,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,iCAAiC;IAC3C,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,eAAe,CAAC;SACxB,OAAO,CAAC,KAAK,CAAC;SACd,aAAa,EAAE;IACpB,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,cAAc,GAA6B;IAC/C,GAAG,EAAE,gBAAgB;IACrB,MAAM,EAAE,mBAAmB;IAC3B,IAAI,EAAE,mBAAmB;IACzB,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mCAAmC;QAChD,YAAY,EAAE,IAAI;KACnB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sCAAsC;QACnD,YAAY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