The JavaScript VM in Remix¶
The JavaScript VM is a simulated Blockchain Environment that only exists in your browser. It also only exists as long as you keep the browser-tab open. Close it or reload it, you start from scratch.
On the positive side: it's super fast! No waiting for Transactions to be mined. No complicated setup. It's just there and it works out of the box
On the negative side: There's only limited ways to connect to it. Once you reload everything is gone (non persistant). Sometimes things in the browser simulation work, which won't work on a real blockchain.
It's a great way to get started!
Deploy to JavaScript VM in Remix¶
Select the JavaScript VM from the Environment Dropdown in the "Deploy & Run Transactions" Plugin:
Then simply hit "deploy":
See how quickly that deployed? No MetaMask Popup. No wait time. It's just there. Bam! ✨
But it's also not perfect, because there's no way to connect other tools to this blockchain. It's gone when you close the browser. All in all it's not perfect.
Let's checkout Ganache!