Skip to content

Commit cdcd237

Browse files
committed
feat(cli): warn when dev-contracts targets non-local chain
Fixes #3567
1 parent 9a855a7 commit cdcd237

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/cli/src/commands/dev-contracts.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ const commandModule: CommandModule<typeof devOptions, InferredOptionTypes<typeof
5656
);
5757

5858
rpc = "http://127.0.0.1:8545";
59+
} else if (!rpc.includes("127.0.0.1") && !rpc.includes("localhost")) {
60+
console.log(chalk.yellow("Warning: dev-contracts is intended for local development. Deploying to a non-local chain may cause unexpected failures."));
5961
}
6062

6163
// Watch for changes

0 commit comments

Comments
 (0)