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(cast): add new cast wallet remove command #9873

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

startup-dreamer
Copy link
Contributor

@startup-dreamer startup-dreamer commented Feb 12, 2025

closes: #9701

Adds cast wallet remove which has required alias (--name), with an optional custom keystore directory (--dir).

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@zerosnacks
Copy link
Member

Hi @startup-dreamer thanks for your PR!

Would you mind adding an additional test here?

// tests that we can create a new wallet with keystore
casttest!(new_wallet_keystore_with_password, |_prj, cmd| {
cmd.args(["wallet", "new", ".", "--unsafe-password", "test"]).assert_success().stdout_eq(str![
[r#"
Created new encrypted keystore file: [..]
[ADDRESS]
"#]
]);
});
// tests that we can get the address of a keystore file
casttest!(wallet_address_keystore_with_password_file, |_prj, cmd| {
let keystore_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/keystore");
cmd.args([
"wallet",
"address",
"--keystore",
keystore_dir
.join("UTC--2022-12-20T10-30-43.591916000Z--ec554aeafe75601aaab43bd4621a22284db566c2")
.to_str()
.unwrap(),
"--password-file",
keystore_dir.join("password-ec554").to_str().unwrap(),
])
.assert_success()
.stdout_eq(str![[r#"
0xeC554aeAFE75601AaAb43Bd4621A22284dB566C2
"#]]);
});

@startup-dreamer
Copy link
Contributor Author

CI is failing for master as well.

Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Thanks!

@zerosnacks zerosnacks merged commit 3afcab4 into foundry-rs:master Feb 20, 2025
22 checks passed
@startup-dreamer startup-dreamer deleted the feat/cast_wallet_rm branch February 20, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

feat(cast): remove an account from cast wallet
4 participants