mythril icon indicating copy to clipboard operation
mythril copied to clipboard

Support rpc for BSC

Open MrMegamind opened this issue 3 years ago • 3 comments

I tried to run myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed1.defibit.io:443 Assuming https://docs.binance.org/smart-chain/developer/rpc.html provide the custom RPC

But always get IPC / RPC error: 400 error

How to Reproduce

mythril.interfaces.cli [ERROR]: Could not connect to RPC server. Make sure that your node is running and that RPC parameters are set correctly. thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed4.binance.org mythril.interfaces.cli [ERROR]: Invalid RPC argument, use 'ganache', 'infura-[network]' or 'HOST:PORT' thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed4.binance.org:80 mythril.interfaces.cli [ERROR]: Could not connect to RPC server. Make sure that your node is running and that RPC parameters are set correctly. thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed4.binance.org:443 mythril.interfaces.cli [ERROR]: IPC / RPC error: 400 thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-ws-node.nariox.org:443 mythril.interfaces.cli [ERROR]: IPC / RPC error: 400 thezavya@instance-3:~$ sudo docker run -it --rm mythril/myth analyze -a 0x13b852e276f10281C72ccF33EdF81d81DD198Aae --rpc bsc-dataseed1.defibit.io:443 mythril.interfaces.cli [ERROR]: IPC / RPC error: 400

MrMegamind avatar Dec 03 '21 18:12 MrMegamind

I think you may be wrongly assuming that is a port misconfiguration. I have experienced a similar issue, there is no way to set network ID, it assumes is 1 as on Ethereum, yet other EVMs use different chain IDs.

stebansaa avatar Dec 12 '21 04:12 stebansaa

"--rpctls True" work for me

docker run mythril/myth analyze -a 0x4DB2495AfAd4c0E481fFc40FDaF66E13A786b619 --rpc bsc-dataseed1.binance.org:443 --rpctls True --infura-id MY_ID --max-depth 2

DeeeXy366 avatar Jul 06 '22 12:07 DeeeXy366

can you please tell how can I use roc for avalanche chain?

nandanv99 avatar Oct 12 '22 03:10 nandanv99