Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No associated wallet for addresses when using trezor with forge script #9294

Open
1 of 2 tasks
shaspitz opened this issue Nov 11, 2024 · 8 comments
Open
1 of 2 tasks
Labels
T-bug Type: bug T-to-reproduce Type: requires reproduction

Comments

@shaspitz
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (e028b92 2024-11-11T00:26:04.968342000Z)

What command(s) is the bug in?

forge script

Operating System

macOS (Apple Silicon)

Describe the bug

Maybe related to #7342.

I am experiencing an issue with forge 0.2.0 (e028b92 2024-11-11T00:26:04.968342000Z). I'm trying to specify forge script to use the m/44'/60'/0'/0/0 derivation path from my trezor, but the command is not finding/using the correct derivation path.

Note I am using trezor safe 5 (one of the newer models).

Command:

forge script scripts/validator-registry/DeployVanillaRegistry.s.sol:Deploy --rpc-url $URL --sender $SENDER --via-ir --chain-id $CHAIN_ID --use 0.8.26 --broadcast --verify --trezor --hd-paths 'm/44'\''/60'\''/0'\''/0/0'

Then password is asked for twice on hw wallet

Error:

Error: No associated wallet for addresses: [*SENDER from above*]. Unlocked wallets: [0xfb20adf75beb049fa5b60c798c3045e548c4cdfb]

This unlocked wallet is unrecognized, and does not show up in Trezor Suite.

@shaspitz shaspitz added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Nov 11, 2024
@shaspitz
Copy link
Author

Note also in Trezor Suite, SENDER from the commands says its derivation path is m/44'/60'/0'/0/0

@shaspitz
Copy link
Author

@shaspitz
Copy link
Author

shaspitz commented Nov 11, 2024

@klkvr @zerosnacks am I missing some configuration here, or is this a bug? Thanks!

@grandizzy
Copy link
Collaborator

@shaspitz try passing HD path as --hd-paths "m/44'/60'/0'/0/0" see a sample here #4692 (comment)

@shaspitz
Copy link
Author

Hey, I just tried

forge script scripts/validator-registry/DeployVanillaRegistry.s.sol:Deploy --rpc-url $URL --sender $SENDER --via-ir --chain-id $CHAIN_ID --use 0.8.26 --broadcast --verify --trezor --hd-paths "m/44'/60'/0'/0/0"

and had the same resp:

Error: No associated wallet for addresses: [*SENDER from above*]. Unlocked wallets: [0xfb20adf75beb049fa5b60c798c3045e548c4cdfb]

@grandizzy
Copy link
Collaborator

thanks, then most probably same with #7342 you linked

@shaspitz
Copy link
Author

To add context, if I replace --hd-paths with --mnemonic-indexes and try values of 0,1,2, etc., I can get the unlocked address to change. But that address is never the same as the expected sender

@grandizzy grandizzy added the T-to-reproduce Type: requires reproduction label Nov 12, 2024
@zerosnacks
Copy link
Member

considering we inherit most of the underlying logic through Alloy https://github.com/alloy-rs/alloy/tree/main/crates/signer-trezor and then the trezor-client next steps would be to narrow down if this is an issue in Foundry or in the underlying

@zerosnacks zerosnacks removed the T-needs-triage Type: this issue needs to be labelled label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug T-to-reproduce Type: requires reproduction
Projects
None yet
Development

No branches or pull requests

3 participants