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

bug: lz:deploy requires deploy task name matches contractName #1066

Open
St0rmBr3w opened this issue Nov 21, 2024 · 1 comment
Open

bug: lz:deploy requires deploy task name matches contractName #1066

St0rmBr3w opened this issue Nov 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@St0rmBr3w
Copy link
Contributor


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:

  1. Run the deploy command with mismatched names:
    npx hardhat lz:deploy
  2. Provide mismatched contractName and deploy script when prompted.
  3. 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.


@St0rmBr3w St0rmBr3w added the bug Something isn't working label Nov 21, 2024
@nazreen
Copy link
Contributor

nazreen commented Nov 25, 2024

I think the improvement can be to output "No deploy scripts match the given tag <TAG_HERE>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants