Skip to content

hardhat-ledger: HHE713 from ethers/viem due to missing params #8754

Open

Description

@kanej

hardhat-ledger's onRequest hook runs before Hardhat's request handlers fill a transaction. hardhat-ethers and hardhat-viem send eth_sendTransaction with only from, to, data and value, so a plain contract.method(), deployContract or sendTransaction from a Ledger account throws HHE713: Missing param "gas" from a tx being signed locally, before the device is asked to sign. Ignition is unaffected because it fills gas, fees and nonce itself, and the example script packages/example-project/scripts/ledger.ts hardcodes them.

This is a regression from Hardhat 2. There, extendProvider wrappers sat inside the sender, gas and gas-price wrappers, so hardhat-ledger received filled transactions. HH2 even enabled AutomaticGasPriceProvider on Hardhat Network for that reason. In HH3, plugin hooks wrap the built-in handlers, and there is no hook between the fillers and LocalAccountsHandler. #8706 keeps the same checks, so it doesn't change this.

The field-level behaviour is confirmed on 3.20.0 with a plugin hook in hardhat-ledger's position. The error itself needs a device: remove gasLimit, maxFeePerGas and maxPriorityFeePerGas from ethSendTransaction() in the example script.

This is coming out of #8656.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

  • Status
    Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions