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

Hardhat-ledger plugin error using blockchains that don't support EIP-1559 transaction format #5786

Open
daveroga opened this issue Sep 27, 2024 · 1 comment
Assignees
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working

Comments

@daveroga
Copy link

daveroga commented Sep 27, 2024

Version of Hardhat

2.22.10

What happened?

Trying to deploy smart contracts through hardhat and hardhat-ledger plugin (1.0.3) to Polygon zkEVM networks (Cardona or Mainnet) is not possible because it throws an error when trying to send signed transaction with eth_sendRawTransaction and EIP-1559 format.

{"jsonrpc":"2.0","id":17,"error":{"code":-32000,"message":"RPC error response: error getting from address"}}

Debugging it I see that is sending the transaction with type EIP-1559 that is not supported by zkEVM now (https://support.polygon.technology/support/solutions/articles/82000897869-does-polygon-zkevm-support-the-eip-1559-format-for-transactions-).

{
  "chainId": "2442",
  "type": "EIP-1559",
  ...
}

So at this moment to support deploying to Polygon zkEVM networks this ledger-plugin should send legacy transaction (type=0) instead and calcultaing then gasPrice.
This will produce legacy transaction format:

{
  "chainId": "2442",
  "type": "LegacyTransaction",
  ...
}

Minimal reproduction steps

  1. Install hardhat-ledger plugin following the instructions here https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-ledger
  2. Patch first getting accounts in hardhat-ledger provider for zkEVM networks with empty array [] because eth_accounts is not supported in zkEVM node now (Hardhat-ledger plugin error using rpc nodes that don't support eth_accounts #5785).
  3. Try to deploy a smart contract to zkEVM Cardona with some faucet through ledgerAccounts address with any Ledger device.

Search terms

hardhat-ledger zkevm eip-1559 eth_sendRawTransaction

@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Sep 27, 2024
@daveroga daveroga changed the title Hardhat-ledger plugin error using blockchains that don't support EIP-1559 format for transactions Hardhat-ledger plugin error using blockchains that don't support EIP-1559 transaction format Sep 27, 2024
@kanej kanej assigned kanej and unassigned ChristopherDedominici Oct 3, 2024
@kanej kanej added status:ready This issue is ready to be worked on type:bug Something isn't working and removed status:triaging labels Oct 21, 2024
@kanej kanej moved this from Backlog to To-do in Hardhat Oct 21, 2024
@kanej
Copy link
Member

kanej commented Oct 21, 2024

Thanks for the reproduction steps we will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working
Projects
Status: To-do
Development

No branches or pull requests

3 participants