How can I have a local copy of the binance chain for use in ganache like to use BNB as default coin instead ETH?

I see here Ganache -f how can I fork the whole chain? that I must provide -f parameter but I don't know exactly how.

By the way... I need a CLI flavor because I'm using Ubuntu server.


Binance provide instructions how to run a full node. Then you can enable http requests and use the localhost endpoint with ganache to fork it.

There's ganache-cli that is headless.

  • Well I don't want to be part of Binance Chain as a full node. Can you explain a little more? Can I fork an already running node of somebody else?
    – Magno C
    May 13 at 5:15
  • @MagnoC Check BSC documentation docs.binance.org/smart-chain/developer/rpc.html for access to public RPC endpoints. Just be aware they are public so they have some restrictions like how many queries you can make.
    – Ismael
    May 13 at 6:00
  • Sorry but I realy need a LOCAL Binance Chain. I don't want someone put they hands on my contracts before I finish my ideas.
    – Magno C
    May 14 at 2:37
  • @MagnoC It doesn't seem BSC support light clients, so the only options are to run a full node or use an RPC provider. In any case when using ganache with fork option it will deploy your contract locally.
    – Ismael
    May 14 at 4:31
  • I think BSC was a fork from Ethereum therefore having same methods... I'll try it here. Thanks.
    – Magno C
    May 14 at 23:00

it's seems ganache-cli suport forking bsc network.

ganache-cli -f https://bsc-dataseed.binance.org


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.