Allow `--unlock` functionality when ganache is already running
See original GitHub issue- I asked about this on gitter: [x]
- Link to my question on gitter: https://gitter.im/ConsenSys/truffle?at=5ea068f0f39e5c2fbb970216
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:
- Add a cli flag
--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. - Add a new custom RPC endpoint that accepts an address as a single parameter, and unlocks that address.
- Modify the behavior of
personal_unlockAccount
so that any account may be unlocked with a passphrase ofnull
. Optionally add a cli flag that enables this behavior.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to connect already running ganache-cli from brownie
I have tried running brownie run scripts/deploy.py without a network option, but it automatically creates a new ganache-cli.
Read more >Ganache settings - Truffle Suite
Ganache settings¶. You can change some features of the generated blockchain through the Settings pages, accessed by the gear icon in the top...
Read more >Ganache CLI - Nethereum Documentation
It allows you to make calls to the blockchain without the overheads of running an actual Ethereum node. Transactions are “mined” instantly. No...
Read more >Ganache CLI: (SECRET FEATURE!) Fork Mainnet for easy ...
FREE TRAININGS (WEB3 DEV, FLASH LOANS...) How to find your first 6-Figures Blockchain Developer Job: https://bit.ly/390ebTq Learn how to ......
Read more >How to Fork Ethereum Blockchain with Ganache. - QuickNode
1. Forking and running a local simulated Ethereum environment is essential if you want to work with DeFi... 2. Ganache is an Ethereum...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?
Implemented in #622