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

forge script should use sender address of the provided keystore #7320

Closed
Sabnock01 opened this issue Mar 6, 2024 · 3 comments
Closed

forge script should use sender address of the provided keystore #7320

Sabnock01 opened this issue Mar 6, 2024 · 3 comments
Labels
T-feature Type: feature

Comments

@Sabnock01
Copy link
Contributor

Component

Forge

Describe the feature you would like

When running forge script, one should not have to use the --sender flag if the --account flag is provided as it is redundant.

Additional context

Of note is the Foundry keystores do not contain the address as part of their JSON object. This is contrary to keystores generated from tools such as geth account and keythereum.

Is there a particular reason for this and would this be the fix necessary to make?

@Sabnock01 Sabnock01 added the T-feature Type: feature label Mar 6, 2024
@klkvr
Copy link
Member

klkvr commented Mar 6, 2024

You should be able to run scripts without providing --sender flag if --account is present, this was addressed in #7141.

@Sabnock01
Copy link
Contributor Author

You should be able to run scripts without providing --sender flag if --account is present, this was addressed in #7141.

Excellent! Didn't know this was solved already! Will close issue.

Still curious about the reason why Foundry keystores don't contain the address field though.

@klkvr
Copy link
Member

klkvr commented Mar 6, 2024

@Sabnock01 keystore support is enabled through ethers-rs (and partially through alloy now) which uses eth_keystore which has address field under geth-compat feature flag (https://github.com/roynalnaruto/eth-keystore-rs/blob/master/src/keystore.rs#L13)

So it shouldn't be hard to enable now, but would require some work for correct processing of existing keystores users might have created. Probably, we should simply populate "address" field on a first read of such file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature Type: feature
Projects
None yet
Development

No branches or pull requests

2 participants