hardhat-ignition icon indicating copy to clipboard operation
hardhat-ignition copied to clipboard

Ledger integration

Open kanej opened this issue 2 years ago • 0 comments

Integrate with hardhat-ledger to allow Ignition deployments to leverage a ledger hardware wallet.

There are several issues that create friction between Ignition and hardhat-ledger:

  1. hardhat ledger exposes ledger accounts through a ledgerAccounts property in the networks config, this information isn't easily available in Ignition Modules (i.e. m.getAccount doesn't know about ledgerAccounts), and needs to be passed either as a parameter or manually. We may want to consider adding a m.getLedgerAccount or some other API enhancement.
  2. Testing a ledger deploy locally means distributing eth to the ledger account to be used. There is not a clean way of doing this, you can override a task for node:server-created and hardhat_setBalance the ledger address. Or you can m.send in an Ignition module; however because m.useModule can't accept an after you can't encapsulate your live code from your test code, the deploys from the ledger address have to depend on the send directly.
  3. hardhat-ledger takes control of the cli UI to send messages about confirming the transaction in the ledger wallet. This control clashes with the Ignition cli UI.

TODO

  • [x] #720

kanej avatar Oct 31 '23 11:10 kanej