In this recipe, you will learn how to test your smart contract using the Remix IDE. Remix is a browser-based IDE that enables users to write Ethereum contracts in the solidity language and debug transactions. Remix has an inbuilt JavaScript-based solidity compiler and EVM to compile and run smart contracts.
Testing your contract with Remix
How to do it...
- Open Remix (https://remix.ethereum.org) in your desktop browser.
- Copy your smart contract to Remix and it will automatically compile your code. Warnings and errors, if any, will be displayed in the right panel.
- Remix has an inbuilt JavaScript VM for testing smart contracts. Ensure that you have selected JavaScript VM as the default environment under Run:
![](https://static.packt-cdn.com/products/9781789133998/graphics/assets/79e0df52-cb30-4b35-96d7-bea1ca949333.png)
- Select an account...