Title: bug: lz:deploy requires deploy task name matches contractName
Describe the bug
When running npx hardhat lz:deploy, if the contractName and deploy script do not match, the deployment process indicates success without generating a deployment file or submitting the contract on the blockchain.
To Reproduce
Steps to reproduce the behavior:
- Run the deploy command with mismatched names:
- Provide mismatched
contractName and deploy script when prompted.
- Observe the misleading success message despite no actual deployment:
Nothing to compile
✔ Which networks would you like to deploy? › sepolia-testnet
✔ Which deploy script tags would you like to use? … MyOFT
info: Will deploy 1 network: sepolia-testnet
info: Will use deploy scripts tagged with MyOFT
✔ Do you want to continue? … yes
info: ✓ Your contracts are now deployed
Expected behavior
The deployment process should either:
-
Fail with an error message indicating that the contractName and deploy script do not match, preventing a misleading success notification.
OR
-
Automatically handle the mismatch by either adjusting internally or prompting the user to correct the mismatch before proceeding.
Additionally, a deployment file should be generated, and the contract should be correctly submitted on the blockchain.
Screenshots
Example of misleading success message:
Nothing to compile
✔ Which networks would you like to deploy? › sepolia-testnet
✔ Which deploy script tags would you like to use? … MyOFT
info: Will deploy 1 network: sepolia-testnet
info: Will use deploy scripts tagged with MyOFT
✔ Do you want to continue? … yes
info: ✓ Your contracts are now deployed
Environment (please complete the following information):
- OS: [e.g., macOS]
- OS Version: [e.g., 12.6.3]
- VM: [e.g., Node.js]
- VM Version: [e.g., 18.16.0]
Additional context
This issue can lead to confusion and potential deployment issues, as developers might believe their contracts are deployed successfully while no actual deployment has occurred. Ensuring that contractName and deploy script names are synchronized is crucial for the reliability of the deployment process.
Title: bug:
lz:deployrequires deploy task name matchescontractNameDescribe the bug
When running
npx hardhat lz:deploy, if thecontractNameand deploy script do not match, the deployment process indicates success without generating a deployment file or submitting the contract on the blockchain.To Reproduce
Steps to reproduce the behavior:
contractNameand deploy script when prompted.Expected behavior
The deployment process should either:
Fail with an error message indicating that the
contractNameand deploy script do not match, preventing a misleading success notification.OR
Automatically handle the mismatch by either adjusting internally or prompting the user to correct the mismatch before proceeding.
Additionally, a deployment file should be generated, and the contract should be correctly submitted on the blockchain.
Screenshots
Example of misleading success message:
Environment (please complete the following information):
Additional context
This issue can lead to confusion and potential deployment issues, as developers might believe their contracts are deployed successfully while no actual deployment has occurred. Ensuring that
contractNameand deploy script names are synchronized is crucial for the reliability of the deployment process.