I need to access two smart contracts through two different providers in the same app, is it possible to have two instances of
Web3 in the same dApp. Something like this:
const web3 = new Web3(); const web4 = new Web3(); ... web3.setProvider(myHttpProvider); web4.setProvider(myWSSProvider);
I actually have this code inside my dApp and it is working, but the problem is that I set my account credentials for the first instance only (through
HDWalletProvider), but the second one also uses the same account; so I'm not sure what is happening behind the scene!