foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Include HW wallets in cast wallet ls

Open mattsse opened this issue 1 year ago • 5 comments
trafficstars

          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

mattsse avatar Jan 30 '24 14:01 mattsse

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

PanGan21 avatar Feb 04 '24 10:02 PanGan21

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?

mattsse avatar Feb 04 '24 13:02 mattsse

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)

grandizzy avatar Feb 13 '24 06:02 grandizzy

This makes sense to me.

lightclient avatar Feb 13 '24 13:02 lightclient

This makes sense to me.

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

grandizzy avatar Feb 14 '24 18:02 grandizzy

fixed in #7123 @mattsse this can be closed

grandizzy avatar Apr 16 '24 18:04 grandizzy