hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
336 stars 369 forks source link

Epic: initial migration from infra to the CLI #3569

Open avious00 opened 7 months ago

avious00 commented 7 months ago

At the moment, internal management of contracts is done almost entirely within infra or the SDK. This can be broken into 3 pieces:

  1. Secret management (e.g. the deployer key, private RPC URLs, etc)
  2. Config (e.g. owners, ISM configs, hook configs, validator sets, etc)
  3. Artifacts (e.g. addresses in the SDK, verification info, etc)
  4. Deployment scripts (e.g. deploy.ts)

This epic tracks an intermediate step toward migrating these to more appropriate homes. For the initial imgration, the plan is:

  1. Secret management - this will live as-is in infra
  2. Config - this will live as-is in infra
  3. Artifacts - this will live in the registry
  4. Deployment scripts - this will live in the CLI

Rather than running deploy.ts in infra where all the magic behind the scenes interacts with 1, 2, and 3, instead we'll "stitch" infra together with the CLI.

Infra will continue to house secret management and config generation, but this will be serialized and used with the CLI. The resulting experience will be something close to:

ts-node ./infra/scripts/deploy.ts --config-only -m ism | hyperlane ism deploy --stdin

Where the infra script ism-config.ts will output secrets (e.g. deployer key & RPC URLs) and the ISM config, and the CLI takes this in via stdin.

### Tasks
- [ ] https://github.com/hyperlane-xyz/issues/issues/1170
- [ ] https://github.com/hyperlane-xyz/issues/issues/1173
- [ ] https://github.com/hyperlane-xyz/issues/issues/1171
- [ ] https://github.com/hyperlane-xyz/issues/issues/1172
- [ ] https://github.com/hyperlane-xyz/issues/issues/1174
- [ ] https://github.com/hyperlane-xyz/issues/issues/819
- [ ] https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/3581
avious00 commented 7 months ago

https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/3317 might be a dupe of this epic

tkporter commented 5 months ago

kinda related - a thread on how to use RPC URL secrets in the warp UI https://discord.com/channels/935678348330434570/935678739663192184/1250460560584081511