Cyfrin / foundry-simple-storage-cu

32 stars 30 forks source link

Lost the address corresponding to private key #16

Closed BilgeKaanGencdogan closed 2 weeks ago

BilgeKaanGencdogan commented 2 weeks ago

Hello, I have encrypted my private using below command;

cast wallet import your-account-name --interactive
Enter private key:
Enter password:
`your-account-name` keystore was saved successfully. Address: address-corresponding-to-private-key

but somehow, I forget the write that address-corresponding-to-private-key somewhere to use later for deploying my contract, is there way to get that with cast command,

Thank you.

Equious commented 2 weeks ago

You should be able to derive the wallet address using something like this: Foundry Book

PatrickAlphaC commented 2 weeks ago

There are some options on how to derive your address from your private key, but cast doesn't have the best ones.

And easy one is to import load your keystore into metamask and use your password to decrypt it, and metamask will display the address.

I'm going to close for now, feel free to follow up, let us know if you were unsuccessful.