Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: warp init simplified config #4504

Merged
merged 11 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(cli): removed error in case both --yes and --advanced flag were …
…provided
xeno097 committed Sep 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 66d3d44e521e7cff8a52e3d1ec7489e5bdaceb0d
4 changes: 2 additions & 2 deletions .changeset/long-swans-drive.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@hyperlane-xyz/cli': major
'@hyperlane-xyz/cli': minor
---

Add prompt in `warp init` command to choose if a trusted relayer should be used instead of making the choice by default for the user
Add prompt in `warp init` command to choose if a trusted relayer should be used instead of making the choice by default for the user adn enable the `--yes` flag to default to a trusted ISM
xeno097 marked this conversation as resolved.
Show resolved Hide resolved
13 changes: 3 additions & 10 deletions typescript/cli/src/config/warp.ts
Original file line number Diff line number Diff line change
@@ -107,13 +107,6 @@ export async function createWarpRouteDeployConfig({
outPath: string;
advanced: boolean;
}) {
// Providing the global --yes flag will trigger the usage of a trusted ISM while the
// --advanced flag will force the user to manually configure an ISM. Both flags should
// not be set to true at the same time.
if (context.skipConfirmation && advanced) {
throw new Error('Arguments advanced and yes are mutually exclusive');
}

logBlue('Creating a new warp route deployment config...');

const owner = await detectAndConfirmOrPrompt(
@@ -152,10 +145,10 @@ export async function createWarpRouteDeployConfig({
);

let createDefaultIsm: boolean;
if (context.skipConfirmation) {
createDefaultIsm = true;
} else if (advanced) {
if (advanced) {
createDefaultIsm = false;
} else if (context.skipConfirmation) {
createDefaultIsm = true;
} else {
createDefaultIsm = await confirm({
message: 'Use a trusted ISM for warp route',
xeno097 marked this conversation as resolved.
Show resolved Hide resolved