Skip to content

Commit

Permalink
feat: add warp route command + guide (#109)
Browse files Browse the repository at this point in the history
* feat: implement warp command

* refactor: add network field to deps

* feat: new logging system

* chore: remove redundant import

* fix: addPad

* fix: verbose line break

* feat: deploy warp

* fix: register context cmd

* feat: add contract abis

* feat: example cli

* feat: replace docs with cli-exp

* chore: yarn

* fix: use OSMO, not uOSMO

* fix: testnet deployment script

* feat: transfer command (ducktaped)

* feat: add warp route guide

* feat: add transfer command

* fix: remove abis & use @hyperlane-xyz/core

* Squashed commit of the following:

commit badf8f7
Merge: 117890c e8716c3
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Fri Mar 1 23:06:03 2024 +0900

    Merge branch 'main' into eddy/docs

commit 117890c
Author: ByeongSu Hong <hong@byeongsu.dev>
Date:   Thu Feb 29 01:39:30 2024 +0900

    feat: apply review changes (#97)

    * docs: add context / example

    * fix: real instant finality

    * fix: typo

commit 6d559d1
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 03:43:58 2024 +0900

    feat: context -> agent config

commit 07a36c3
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 03:43:47 2024 +0900

    wip: neutron deployment

commit a6f13cc
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 03:04:03 2024 +0900

    chore: remove testnet contexts

commit 5460617
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 03:00:17 2024 +0900

    fix: line break

commit 9a46e80
Author: ByeongSu Hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:59:10 2024 +0900

    docs: update README.md

commit e05c9b3
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:57:59 2024 +0900

    docs: done

commit 258936c
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:52:10 2024 +0900

    fix: trouble shooting

commit 50a98aa
Merge: 085d0d9 03f891d
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:43:51 2024 +0900

    Merge branch 'eddy/docs' of https://github.com/many-things/cw-hyperlane into eddy/docs

commit 085d0d9
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:43:41 2024 +0900

    feat: add test recipient

commit 03f891d
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:32:56 2024 +0900

    chore: ignore example

commit a9ef21d
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:21:21 2024 +0900

    fix: osmosis testnet network name

commit 82813c4
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 02:18:23 2024 +0900

    feat: more info to replace

commit a4af84e
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 01:45:03 2024 +0900

    fix: split length

commit 8791862
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 01:43:08 2024 +0900

    fix: xor

commit 8a3e684
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 01:35:03 2024 +0900

    line spacing

commit 42c8c3d
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 01:32:35 2024 +0900

    fix: use osmosis testnet

commit 29196f3
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 01:21:07 2024 +0900

    feat: wallet generator

commit 5e08066
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 00:56:36 2024 +0900

    feat: add wallet command

commit 4e13c7d
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 00:38:22 2024 +0900

    fix: hrp

commit 9ec59d7
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 00:36:03 2024 +0900

    fix: use localwasmd

commit 02fec54
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 00:30:44 2024 +0900

    fix: handle rest endpoint not working

commit 584394e
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Tue Feb 27 00:04:08 2024 +0900

    fix: add `yarn install`

commit 3adb874
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 23:56:19 2024 +0900

    fix: remove DATA_PATH

commit ec30b55
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 23:49:25 2024 +0900

    refactor: restruct guide

commit dc52114
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 22:32:48 2024 +0900

    fix: use localosmosis key

commit a8d56cb
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 22:26:51 2024 +0900

    fix: rename compose file

commit e791815
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 22:22:49 2024 +0900

    docs: wip guide & example

commit 99ec989
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 22:13:49 2024 +0900

    fix: prune imports

commit 4f16d4b
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 21:22:37 2024 +0900

    feat: mailbox null-check

commit a520235
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 21:21:24 2024 +0900

    env: add cw-hpl command

commit 0f5404e
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 21:21:14 2024 +0900

    env: yarn

commit 7407b52
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 20:49:06 2024 +0900

    build: yarn berry

commit a9d74b9
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 20:44:20 2024 +0900

    docs: owner -> <signer>

commit c04c8b7
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 20:35:15 2024 +0900

    chore: redundant args

commit 0d7f6cd
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 20:34:48 2024 +0900

    feat(script): add test-dispatch

commit b36a6f3
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 20:24:47 2024 +0900

    feat: generate agent config

commit a81a59a
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 17:44:14 2024 +0900

    feat: add grpc endpoint as config

commit 1850a1e
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 17:43:57 2024 +0900

    chore: trailing comma

commit daa3b21
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 10:59:02 2024 +0900

    chore(script): cleanup

commit 5db4cd8
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 10:58:30 2024 +0900

    feat(script): supprot mnemonic

commit 5aeee19
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 10:58:15 2024 +0900

    chore: detailed ignore policy

commit ac93aa9
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 10:58:01 2024 +0900

    feat(script): add migrate command

commit 1433d26
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 10:57:35 2024 +0900

    fix(hook): default gas denom

commit 3ebc54b
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 10:57:03 2024 +0900

    build: stride hyperlane deployment

commit 20fba5a
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 08:49:18 2024 +0900

    build: redeploy

commit 847c054
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 08:49:06 2024 +0900

    fix(script): make igp deployable

commit d6e4cbb
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Mon Feb 26 07:54:18 2024 +0900

    reorg script / cli

commit dbd3293
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Thu Feb 22 21:39:45 2024 +0900

    refactor(script): pull back project setup to root

commit b80bf31
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Thu Feb 22 21:39:10 2024 +0900

    refactor(ts): migrate sdk - 1

commit 75c5aaf
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Thu Feb 22 21:38:45 2024 +0900

    fix(schema): reflect missing contracts

commit 15672cc
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Wed Feb 14 18:50:16 2024 +0900

    swap

commit 210c149
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Wed Feb 14 18:42:09 2024 +0900

    toc

commit 556f54b
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Wed Feb 14 18:29:22 2024 +0900

    project structure & overview

commit 01fb20d
Author: byeongsu-hong <hong@byeongsu.dev>
Date:   Wed Feb 14 18:22:41 2024 +0900

    wip

* fix: typo

Co-authored-by: Nam Chu Hoai <nambrot@googlemail.com>

* cherry pick & lint

* merge deployment docs

---------

Co-authored-by: Nam Chu Hoai <nambrot@googlemail.com>
  • Loading branch information
byeongsu-hong and nambrot committed Mar 8, 2024
1 parent d8065f6 commit 5111393
Show file tree
Hide file tree
Showing 28 changed files with 1,003 additions and 127 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
138 changes: 75 additions & 63 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,52 +36,54 @@ You can check full list of example in [config.example.yaml](../config.example.ya

```yaml
networks:
- id: "osmo-test-5"
hrp: "osmo"
- id: 'osmo-test-5'
hrp: 'osmo'
endpoint:
rpc: "https://rpc.testnet.osmosis.zone"
rest: "https://lcd.testnet.osmosis.zone"
grpc: "https://grpc.testnet.osmosis.zone"
rpc: 'https://rpc.testnet.osmosis.zone'
rest: 'https://lcd.testnet.osmosis.zone'
grpc: 'https://grpc.testnet.osmosis.zone'
gas:
price: "0.025"
denom: "uosmo"
price: '0.025'
denom: 'uosmo'
# osmo-test-5 -> ascii / decimal -> sum.
# It's very arbitrary value, Perhaps you must need to change this value.
domain: 1037 # osmo-test-5 -> ascii / decimal -> sum

signer: "<private-key> or <mnemonic>"
signer: '<private-key> or <mnemonic>'

deploy:
ism:
- 11155111

hooks:
default:
type: aggregate
owner: <signer>
hooks:
- type: merkle

- type: igp
owner: <signer>
configs:
11155111:
exchange_rate: 3000
gas_price: 5000
default_gas_usage: 30000
type: mock

required:
type: aggregate
# if you keep it as "<signer>", the script will identify this as deployer address
owner: <signer>
hooks:
- type: merkle

- type: pausable
owner: <signer>
paused: false

- type: fee
owner: <signer>
fee:
# if you didn't set the denom, it will be set as gas denom of network config
denom: uosmo
amount: 1

- type: igp
owner: <signer>
configs:
11155111:
exchange_rate: 3000
gas_price: 5000
default_gas_usage: 30000
```

## 2. Upload Contract Codes
Expand All @@ -91,29 +93,29 @@ You can upload contract codes from local environment or from [Github](https://gi
### Local

```bash
$ yarn install
yarn install

# Build contracts from local environment
$ make optimize
make optimize
# Run compatibility test
$ make check
make check

# This command will make one file.
# - context with artifacts (default path: {project-root}/context/osmo-test-5.json)
$ yarn cw-hpl upload local -n osmo-test-5
yarn cw-hpl upload local -n osmo-test-5
```

### Remote

```bash
$ yarn install
yarn install

# check all versions of contract codes from Github
$ yarn cw-hpl upload remote-list -n osmo-test-5
yarn cw-hpl upload remote-list -n osmo-test-5

# This command will make one file.
# - context with artifacts (default path: {project-root}/context/osmo-test-5.json)
$ yarn cw-hpl upload remote v0.0.6-rc8 -n osmo-test-5
yarn cw-hpl upload remote v0.0.6-rc8 -n osmo-test-5
```

## 3. Instantiate Contracts
Expand All @@ -124,7 +126,7 @@ If you configured / uploaded contract codes correctly, you can deploy contract w
# This command will output two results.
# - context + deployment (default path: ./context/osmo-test-5.json)
# - Hyperlane agent-config (default path: ./context/osmo-test-5.config.json)
$ yarn cw-hpl deploy -n osmo-test-5
yarn cw-hpl deploy -n osmo-test-5
```

## 4. Setup Validator / Relayer config
Expand All @@ -133,26 +135,23 @@ Replace every `{sepolia_private_key}` and `{osmosis_private_key}` from files bel

- Sepolia Testnet (`{sepolia_private_key}`)

- [./example/hyperlane/relayer.json](./example/hyperlane/relayer.json)
- [./example/hyperlane/validator.sepolia.json](./example/hyperlane/validator.sepolia.json)
- [./hyperlane/relayer.json](./hyperlane/relayer.json)
- [./hyperlane/validator.sepolia.json](./hyperlane/validator.sepolia.json)

- Osmosis Testnet (`{osmosis_private_key}`)

- [./example/hyperlane/relayer.json](./example/hyperlane/relayer.json)
- [./example/hyperlane/validator.osmotest5.json](./example/hyperlane/validator.osmotest5.json)
- [./hyperlane/relayer.json](./hyperlane/relayer.json)
- [./hyperlane/validator.osmotest5.json](./hyperlane/validator.osmotest5.json)

And run with below command.

```bash
# Merge osmo-test-5.config.json and agent-config.docker.json
OSMOSIS_TESTNET_AGENT_CONFIG=$(cat ./context/osmo-test-5.config.json) && \
OSMOSIS_TESTNET_AGENT_CONFIG=$(cat ../context/osmo-test-5.config.json) && \
OSMOSIS_TESTNET_AGENT_CONFIG_NAME=$(echo $OSMOSIS_TESTNET_AGENT_CONFIG | jq -r '.name') && \
cat ./example/hyperlane/agent-config.docker.json \
cat ./hyperlane/agent-config.docker.json \
| jq ".chains.$OSMOSIS_TESTNET_AGENT_CONFIG_NAME=$(echo $OSMOSIS_TESTNET_AGENT_CONFIG)" > merge.tmp && \
mv merge.tmp ./example/hyperlane/agent-config.docker.json

# Change workdir to example
cd example
mv merge.tmp ./hyperlane/agent-config.docker.json

# Run Hyperlane with docker-compose
docker compose up
Expand All @@ -170,28 +169,10 @@ docker compose down
## 5. Deploy Test contracts on Sepolia

```bash
# 1. Deploy TestRecipient contract
$ cast send \
--rpc-url https://rpc.sepolia.org \
--private-key $SEPOLIA_PRIVATE_KEY \
--create $(cat ./TestRecipient.bin)

# 2. Deploy MultisigIsm for validating osmo-test-5 network
# Below address is messageIdMultisigIsmFactory came from agent-config.docker.json
$ cast send \
0xFEb9585b2f948c1eD74034205a7439261a9d27DD \
'deploy(address[],uint8)(address)' \
[$(cast wallet address --private-key $SEPOLIA_PRIVATE_KEY)] 1 \ # 1 validator and 1/1 threshold
--rpc-url https://rpc.sepolia.org \
--private-key $SEPOLIA_PRIVATE_KEY

# 3. Get deployed multisig ism address from receipt of above command
$ cast send \
$SEPOLIA_TEST_RECIPIENT_ADDRESS \ # output of step 1
'setInterchainSecurityModule(address)' \
$SEPOLIA_MULTISIG_ISM_ADDRESS \ # output of step 2
--rpc-url https://rpc.sepolia.org \
--private-key $SEPOLIA_PRIVATE_KEY
# if you want to use private key as signing account. then you can set `--pk` option
# if you want to use mnemonic as signing account. then you can set `--mn` option
# or if you want to use custom rpc endpoint. then you can set `--endpoint` option
yarn cw-hpl-exp deploy-test-recipient --pk 'YOUR_PRIVATE_KEY'
```

## 6. Run Messaging Test
Expand All @@ -200,7 +181,7 @@ $ cast send \

```bash
# Below address is mailbox came from agent-config.docker.json
$ cast send \
cast send \
0xfFAEF09B3cd11D9b20d1a19bECca54EEC2884766 --value 1wei \
'dispatch(uint32,bytes32,bytes)' \
1037 $OSMOSIS_TESTNET_TEST_RECIPIENT_ADDRESS 0x68656c6c6f \ # 0x68656c6c6f -> 'hello'
Expand All @@ -212,10 +193,41 @@ $ cast send \

```bash
# [dest-domain] [recipient-address] [message]
$ yarn cw-hpl contract test-dispatch -n osmo-test-5 11155111 $SEPOLIA_TEST_RECIPIENT_ADDRESS hello
yarn cw-hpl contract test-dispatch -n osmo-test-5 11155111 $SEPOLIA_TEST_RECIPIENT_ADDRESS hello
```

## 7. Warp Route

```bash
# deploy warp route on sepolia
yarn cw-hpl-exp warp deploy --pk 'YOUR_PRIVATE_KEY'

# then output will like this
{ "hypErc20Osmo": "0x..." }

# deploy warp route on osmo-test-5
yarn cw-hpl warp deploy create ./warp/uosmo.json -n osmo-test-5

# register osmo-test-5 warp route to sepolia warp route
yarn cw-hpl-exp warp link $hypErc20Osmo 1037 $OSMOSIS_WARP_ROUTE_ADDRESS --pk 'YOUR_PRIVATE_KEY'

# also register sepolia warp route to osmo-test-5 warp route
yarn cw-hpl warp link \
--asset-type native \
--asset-id uosmo \
--target-domain 11155111 \
--warp-address $hypErc20Osmo \
-n osmo-test-5

# test transfer
yarn cw-hpl warp transfer \
--asset-type native \
--asset-id uosmo \
--target-domain 11155111 \
-n osmo-test-5
```
## 7. Done 🎉
## 8. Done 🎉
This is it! You have successfully deployed Hyperlane between Osmosis Testnet and Sepolia Testnet.
Expand Down
90 changes: 90 additions & 0 deletions context/osmo-test-5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"artifacts": {
"hpl_mailbox": 7162,
"hpl_validator_announce": 7163,
"hpl_ism_aggregate": 7164,
"hpl_ism_multisig": 7165,
"hpl_ism_pausable": 7166,
"hpl_ism_routing": 7167,
"hpl_igp": 7168,
"hpl_hook_aggregate": 7169,
"hpl_hook_fee": 7170,
"hpl_hook_merkle": 7171,
"hpl_hook_pausable": 7172,
"hpl_hook_routing": 7173,
"hpl_hook_routing_custom": 7174,
"hpl_hook_routing_fallback": 7175,
"hpl_test_mock_hook": 7176,
"hpl_test_mock_ism": 7177,
"hpl_test_mock_msg_receiver": 7178,
"hpl_igp_oracle": 7179,
"hpl_warp_cw20": 7180,
"hpl_warp_native": 7181
},
"deployments": {
"core": {
"mailbox": {
"type": "hpl_mailbox",
"address": "osmo133mald0u39vge6mcv8gzc0j2838hn3klja3nshsyxaug95pndf8sufctsq"
},
"validator_announce": {
"type": "hpl_validator_announce",
"address": "osmo19amvm0gqzhc8wfktt55ppjadghdhemgzsjc6y3wp7v3ddd2p4ckshajfhp"
}
},
"isms": {
"type": "hpl_ism_multisig",
"address": "osmo1ydgvay2j86k73s9k67davma09u7vkvawyjg30lzcghqa994c4afqqv2dum"
},
"hooks": {
"default": {
"type": "hpl_hook_aggregate",
"address": "osmo1xx8qvhum836lpn7eftepegdrrnwlktytnylkfqzgsrvkvn5eqqzq02wlah",
"hooks": [
{
"type": "hpl_hook_merkle",
"address": "osmo1vxjlhn4dkq6htf5daaxvw0rs26vewhek2gwgmpmw7jvq0tvjrhxqljnact"
},
{
"type": "hpl_igp",
"address": "osmo19yadu0cunfv7zm9m8ewhgwnwvy7cxjuxcfs7qdcmlxsfr8taj9asdlajps",
"oracle": {
"type": "hpl_igp_oracle",
"address": "osmo1ncns63wyprqq6guvrd2uu2w2dt04mm5zjy4tuqvx997je2kjnnzqknyzmx"
}
}
]
},
"required": {
"type": "hpl_hook_aggregate",
"address": "osmo1zf80lhjyw2kmqn39xqz4ypnef7020slfd05skxv9gslss8yrm2pqzwdjzn",
"hooks": [
{
"type": "hpl_hook_pausable",
"address": "osmo1xwd2czumymaqe8gn292r2jjxsny8uklt90rjglxtwkj25s0v4sxqadwz35"
},
{
"type": "hpl_hook_fee",
"address": "osmo12g03dm27u3zrx3lcqrl9yrkywknftsanlzr60ws4wveqdxl9tzssghukur"
}
]
}
},
"warp": {
"native": [
{
"id": "uosmo",
"type": "hpl_warp_native",
"address": "osmo1v0vw7rsfhd8adyah20cphw45ercq5p2yj3ddsn8lx6rhhy278jcqj2l370"
}
],
"cw20": []
},
"test": {
"msg_receiver": {
"type": "hpl_test_mock_msg_receiver",
"address": "osmo1henzdxappv2sqzg2nlfl4nv42lmp39pc42fvwkjs8al3nsppn75st54ecq"
}
}
}
}
1 change: 0 additions & 1 deletion example/TestRecipient.bin

This file was deleted.

8 changes: 4 additions & 4 deletions example/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: "2"
version: '2'
services:
relayer:
container_name: hpl-relayer
image: gcr.io/abacus-labs-dev/hyperlane-agent:3bb4d87-20240129-164519
user: root
# restart: always
entrypoint: ["sh", "-c"]
entrypoint: ['sh', '-c']
command:
- |
rm -rf /app/config/* && \
Expand All @@ -24,7 +24,7 @@ services:
image: gcr.io/abacus-labs-dev/hyperlane-agent:3bb4d87-20240129-164519
user: root
# restart: always
entrypoint: ["sh", "-c"]
entrypoint: ['sh', '-c']
command:
- |
rm -rf /app/config/* && \
Expand All @@ -43,7 +43,7 @@ services:
image: gcr.io/abacus-labs-dev/hyperlane-agent:3bb4d87-20240129-164519
user: root
# restart: always
entrypoint: ["sh", "-c"]
entrypoint: ['sh', '-c']
command:
- |
rm -rf /app/config/* && \
Expand Down
27 changes: 27 additions & 0 deletions example/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import colors from 'colors';
import { Command } from 'commander';
import 'reflect-metadata';

import { version } from '../package.json';
import { injectDependencies } from './src/ioc';
import { recipientCmd } from './src/recipient';
import { warpCmd } from './src/warp';

colors.enable();

const cli = new Command();

cli
.name('cw-hpl-example')
.version(version)
.configureHelp({ showGlobalOptions: true })
.option('--pk --private-key <privateKey>', 'private key')
.option('--mn --mnemonic <mnemonic>', 'mnemonic phrase')
.option('--rpc --endpoint <endpoint>', 'endpoint')
.hook('preAction', injectDependencies)
.description('CosmWasm Hyperlane Examples');

cli.addCommand(warpCmd);
cli.addCommand(recipientCmd);

cli.parseAsync(process.argv).catch(console.error);
3 changes: 3 additions & 0 deletions example/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const HYP_MAILBOX = '0xfFAEF09B3cd11D9b20d1a19bECca54EEC2884766';
export const HYP_MULTSIG_ISM_FACTORY =
'0xFEb9585b2f948c1eD74034205a7439261a9d27DD';
Loading

0 comments on commit 5111393

Please sign in to comment.