Binance Mainnet Fork with ganache-cli

Hello

I want to test my contracts against the Binance mainnet.

I am using ganache-cli and with the Ethereum mainnet it works painless.

I am running following command to start the BSC mainnet fork
ganache-cli — fork: https://bsc-dataseed.binance.org:8545

I tried also for binance test environment. I am following this document from Binance.

After it is running I am running my test but it seems to be not finding my token on mainnet with IERC20.at(mytoken).

Does someone use ganache-cli and forking binance smart chain

Sorry, I am not familiar with the BSC-Chain, maybe you should ask for help in their forum: Home | Binance Chain Forum

I have searched in the Ganache documentation, and I did not find anything about forking for the BSC, so I am not sure whether the Ganache has support BSC.

I think Ganache just doesn't play well with BSC RPC nodes. The fork command itself works: ganache-cli -p 7545 -f {provider}

But the problem is when you execute test scripts you get weird errors sometimes.

I think it really comes down to the provider.
I tried bsc-dataseed.binance.org, ankr and moralis. I had the most success using moralis RPC nodes.

The same script would work when using Moralis, but had some really weird error when using other nodes.