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"}}
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:
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 witheth_sendRawTransaction
and EIP-1559 format.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-).
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:Minimal reproduction steps
hardhat-ledger
plugin following the instructions here https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-ledgerprovider
for zkEVM networks with empty array [] becauseeth_accounts
is not supported in zkEVM node now (https://github.com/NomicFoundation/hardhat/issues/5785).ledgerAccounts
address with any Ledger device.Search terms
hardhat-ledger zkevm eip-1559 eth_sendRawTransaction