I would like to have a button that switches between main net and ropsten on my app, in order to do so I need to programatically change the current network with MetaMask. But I cannot find aby reference about this. Do you guys have any idea on how to achieve this?
[Ethereum] How to programatically change the current network with MetaMask
javascriptmetamask
Best Answer
You will need to prompt the users to change their network via MetaMask.
Assuming web3 is an initialised instance of the Web3 library with a provider: