-
Notifications
You must be signed in to change notification settings - Fork 682
Allow --unlock
functionality when ganache is already running
#588
Comments
Did I open this in the wrong repo? Should I move it to |
Either repo is fine. I do prefer to triage these issues in core. We'll be switching to a mono repo Soon™️, so all issues will be merged together anyway. This sounds like an excellent idea, btw. I'm not sure the best way forward. I'm leaning towards a custom RPC method, but could be persuaded to implement other ideas instead. |
An RPC method would work fine for me.. I see in my initial writeup I suggested a flag as the best approach, but today I feel the custom RPC method is actually better as it doesn't require me to do anything special prior to launching. Thanks for your work on this tool btw! |
It would be useful to be able to simply unlock all accounts, preventing the need for RPC calls. I can't think of a test case that would rely on an account's being locked. |
I now see that that's already been suggested. In that case, I agree that |
Implemented in #622 |
Is there any way I can use this with the latest version (or a different branch) of Ganache CI so that I can unlock all the accounts? |
Summary
It is possible to unlock accounts with the
--unlock
flag when launching ganache. It would be useful to be able to do this while ganache is already running.Context
When combined with
--fork
,--unlock
is very powerful in that it lets the me simulate mainnet transactions from accounts I don't control. However, I like to play around in the console and so often don't know which accounts I want to unlock ahead of time. Currently each new unlock means exiting, restarting, and repeating a (sometimes lengthy) series of transactions.Possible Solution
I have three ideas for possible implementations:
--unlock-all
that arbitrarily allows transactions to be broadcast from any address, without having to explicitly unlock first. In my mind this is the best approach.personal_unlockAccount
so that any account may be unlocked with a passphrase ofnull
. Optionally add a cli flag that enables this behavior.The text was updated successfully, but these errors were encountered: