diff --git a/.changeset/purple-bulldogs-report.md b/.changeset/purple-bulldogs-report.md new file mode 100644 index 000000000..d4e9aa39b --- /dev/null +++ b/.changeset/purple-bulldogs-report.md @@ -0,0 +1,5 @@ +--- +'@hyperlane-xyz/cli': patch +--- + +Remove domainId and protocolType setting when creating chain config diff --git a/typescript/cli/src/config/chain.ts b/typescript/cli/src/config/chain.ts index 2f33292bc..f3499fde7 100644 --- a/typescript/cli/src/config/chain.ts +++ b/typescript/cli/src/config/chain.ts @@ -1,4 +1,4 @@ -import { confirm, input, select } from '@inquirer/prompts'; +import { input } from '@inquirer/prompts'; import { ChainMap, @@ -81,30 +81,13 @@ export async function createChainConfig({ message: 'Enter chain name (one word, lower case)', }); const chainId = await input({ message: 'Enter chain id (number)' }); - const skipDomain = await confirm({ - message: 'Will the domainId match the chainId (recommended)?', - }); - let domainId: string; - if (skipDomain) { - domainId = chainId; - } else { - domainId = await input({ - message: 'Enter domain id (number, often matches chainId)', - }); - } - const protocol = await select({ - message: 'Select protocol type', - choices: Object.values(ProtocolType).map((protocol) => ({ - name: protocol, - value: protocol, - })), - }); + const domainId = chainId; const rpcUrl = await input({ message: 'Enter http or https rpc url' }); const metadata: ChainMetadata = { name, chainId: parseInt(chainId, 10), domainId: parseInt(domainId, 10), - protocol, + protocol: ProtocolType.Ethereum, rpcUrls: [{ http: rpcUrl }], }; const parseResult = ChainMetadataSchema.safeParse(metadata);