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

feat: add unsafe-password support to cast wallet import #6671

Merged
merged 4 commits into from
Mar 1, 2024

Conversation

misko9
Copy link
Contributor

@misko9 misko9 commented Dec 27, 2023

Adds an --unsafe-password option to the cast wallet import cli.

Motivation

Our test suite uses the foundry docker image to start anvil and then executes cast commands using that docker image. As test cases have been built, we found that it would be beneficial to be able to import an account using cast wallet import, but it requires a password prompt making this difficult in our test environment while other commands such as cast wallet new do not have this limitation.

Solution

An option, --unsafe-password, was added to the cast wallet import command to support bypassing the password prompt by passing the password in the cli. This solution is similar to the cast wallet new command along with other cast commands that use a keystore.

Note: this new option does not currently include a test case. There are no existing test cases for cast wallet import to mirror. I have a test case prepped, but subsequent test runs with it will fail due to the account name's keystore already existing unlike cast wallet new which will have a unique keystore filename on each run.

crates/cast/bin/cmd/wallet/mod.rs Outdated Show resolved Hide resolved
@misko9 misko9 requested a review from Evalir January 3, 2024 02:48
Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pending @mattsse / @klkvr

Copy link
Member

@klkvr klkvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Evalir
Copy link
Member

Evalir commented Mar 1, 2024

ci failure unrelated

@Evalir Evalir merged commit de33b6a into foundry-rs:master Mar 1, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants