0

I have remix-ide installed.

I want to debug how my contract can be interacted in a browser using Web3JS.

How can I can run it in browser? Can it be done with JavaScript VM? Or which VM I should install? how to run it?

Do I need to install any browser plugins in order to do debugging? If yes, which plugins to install?

1

To interact with a contract it is mandatory to deploy it. You can't run the smart-contract directly into the browser as it is stored and executed in the EVM.

You don't need a JavaScript VM then, you just need an Ethereum VM, for which you'll find some written in JavaScript like Ethereumjs-vm.

If you need a whole emulated network you can try to use Ganache-cli.

You'll have then to deploy your smart contract on your test network. To test interactions easily you can use Metamask browser plug-in so you can interact with the networks with only a few clicks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.