question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow `--unlock` functionality when ganache is already running

See original GitHub issue

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:

  1. 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.
  2. Add a new custom RPC endpoint that accepts an address as a single parameter, and unlocks that address.
  3. Modify the behavior of personal_unlockAccount so that any account may be unlocked with a passphrase of null. Optionally add a cli flag that enables this behavior.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
surajsjaincommented, Aug 29, 2022

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?

0reactions
iamdefinitelyahumancommented, Oct 11, 2020

Implemented in #622

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found