foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.19k stars 1.71k forks source link

Include HW wallets in cast wallet ls #6958

Closed mattsse closed 5 months ago

mattsse commented 8 months ago
          I mostly use cast with hardware wallets and something like `cast wallet ls` for them would be extremely useful.

Originally posted by @lightclient in https://github.com/foundry-rs/foundry/issues/656#issuecomment-1916962482

PanGan21 commented 8 months ago

Hey @mattsse looking at this issue, what is the difference with the current implementation of cast wallet ls as described here? https://book.getfoundry.sh/reference/cast/cast-wallet-list

mattsse commented 8 months ago

I believe the limitation @lightclient ran into was that wallet ls only targets the local keystores.

maybe we add an --all option to also check connected wallets, if any?

grandizzy commented 7 months ago

I believe the limitation @lightclient ran into was that wallet ls only targets the local keystores.

maybe we add an --all option to also check connected wallets, if any?

can take this one, I propose following options for cast wallet list

  --dir (alias to default)
      List all the accounts in the keystore default directory
  -l, --ledger
      List accounts from Ledger hardware wallet
  -t, --trezor
      List accounts from Trezor hardware wallet
  --aws
      List configured AWS accounts
  --all
      List accounts from keystore default directory, hardware wallets and AWS

with an all option output like

Keystore default directory
 - test1
 - test2
Ledger
 LedgerLive HD path
  - 0x001...
  - 0x002...
  ...
 Legacy HD path
  - 0x003...
  - 0x004...
  ...
Trezor
 - 0x005...
 - 0x006...
 ...
AWS
 - 0x007...

(could also add option for the number of addresses and specific HD path to show)

lightclient commented 7 months ago

This makes sense to me.

grandizzy commented 7 months ago

This makes sense to me.

made a draft PR https://github.com/foundry-rs/foundry/pull/7123 looking for comments

grandizzy commented 5 months ago

fixed in #7123 @mattsse this can be closed