Skip to content

Conversation

daveroga
Copy link

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

Fixes issues: #5785 , #5786

After fixing these issues with this code, I'm able to deploy with Ledger to networks that weren't supported before like Polygon zkEVM.

Copy link

changeset-bot bot commented Feb 24, 2025

🦋 Changeset detected

Latest commit: 914178c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/hardhat-ledger Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Feb 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2025 9:08pm

@antico5
Copy link
Contributor

antico5 commented Jun 4, 2025

@daveroga We just released a new version of hardhat (2.24.2) which wraps calls to eth_accounts, defaulting to empty array. Would it be possible for you to test with this new version and see if you are still having issues deploying to polygon or zkEVM ?

@daveroga
Copy link
Author

daveroga commented Jun 5, 2025

@daveroga We just released a new version of hardhat (2.24.2) which wraps calls to eth_accounts, defaulting to empty array. Would it be possible for you to test with this new version and see if you are still having issues deploying to polygon or zkEVM ?

@antico5 I tested and seems that issue for eth_accounts is solved but I still have error for only supporting legacy transactions on zkEVM:

ProviderError: RPC error response: only legacy transactions are supported

I solved this issue in my patch by forcing legacy transaction before signing tx in _ethSendTransaction if EIP1559 fields were not present.

   ...

   if (!hasEip1559Fields) {
      baseTx.type = 0; // Legacy transaction type
    }

    const txToSign =
      ethers.Transaction.from(baseTx).unsignedSerialized.substring(2);

  ...

@kanej
Copy link
Member

kanej commented Jun 5, 2025

Thanks @daveroga, you are right #5786 is still an issue.
We are looking now at porting the hardhat-ledger plugin to Hardhat 3. That should give us an opportunity to test chains that require legacy transactions and validate your approach.

@kanej kanej changed the base branch from main to v2 August 11, 2025 18:56
@ChristopherDedominici ChristopherDedominici mentioned this pull request Sep 2, 2025
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

4 participants