Is it normal/possible to use 2 instances of the web3
object?
In my app, a user can
- trigger the deployment of new contracts by clicking a button on the UI. The gas comes from a wallet that belongs to the app
- send ether to the deployed contract on the same page (made simple via a button on the page, contract then sends tokens to user)
In this scenario, is it recommended to have 2 web3
instances,
- one using the
web3
belonging to the app - one injected by the user's browser (eg: Metamask)
If so, is there a naming convention for the 2 web3
instances, like web3App
and web3Browser
?
Is this also an unusual scenario?