Table of Contents
i. Introduction
ii. Setting up VSCode with Solidity extension
iii. Installing Ganache
iv. Installing Ethereum Remix extension in VSCode
v. Installing Truffle
Having a web development background, I fell in love with VS Code from day one. After getting into the crypto field and developing smart contracts in Solidity, the ability to harness my favorite tool was just the icing on the cake.
In the following sections, we will be installing and setting up the development environment for Solidity with:
And along with the tutorial, we will also code a simple ERC20 project to demonstrate the setup.
VSCode is a code editor that is built by Microsoft, with feature-rich functions like IntelliSense and a sea of extensions. It’s the most-loved development tool by the developer community globally. But I guess you already knew it before reading this article.
If you still have not installed VS Code, you can simply download it at the official website.
We can then add Solidity support by installing the Solidity extension made by Juan Blanco. You can search “Solidity” in the extension bar or in the marketplace.
This extension will help us to highlight Solidity syntax for better readability and snippets for faster development.
After the installation, we can start a new project by creating a new folder namely: example-coin , and a subfolder contractsin the project.
example-coin
|_ contracts
Next up, create a new contract under the contracts folder name token.sol
Now type ERC20 in the file. This will trigger a snippet by the Solidity extension and create a template for the ERC20 token. For the simplicity of this tutorial, I will not go in-depth into the code. At a high level, the code is basically a kick starter template for an ERC20 contract.
If for some reason you cannot generate the snippet, or that the snippet does not work, you can refer to the GitHub repository that I used to host the files I used in this example.
Now you have an ERC20 token code, let’s try to run it in the following sections.
Before testing our smart contracts, we will need to have an Ethereum Virtual Machine, or EVM, to host and run our contracts. To do that, there are two options,
1. Use the public testnets, such as Rinkeby, Ropsten
2. Self-host a private Ethereum blockchain
The advantage of using a public testnet is that it requires no configuration to use. Connect to it and you are good to go.
However, since it is still a public network, you will need testnet faucets to get Ether, which is essential as we need to pay gas to deploy our contracts — and sometimes they may be down — and you will have to wait for the services to go back online. But, before deploying to the mainnet, you should always deploy to the public testnet to test your contracts.
For a private blockchain, everything is in your control. You can control how the mining is done, the gas fee required, and all the customizations. Ganache is one of the software that can launch a private Ethereum blockchain for us.
To install Ganache, visit the official Ganache website to download the software from Truffle Suite. Launching the blockchain is also easy thanks to clear UI, all you need to do is to launch the application and click QUICKSTART to launch a new private Ethereum blockchain with 10 accounts already ready for testing.
Interface in Ganache at launchInterface in Ganache after starting a blockchainThe best thing about these testing accounts is that you can also import them into popular crypto wallets like Metamask for end-to-end testing before you deploy anything into the mainnet.
You can also check the status of the blockchain by blocks, transactions, contracts, events, and logs as well, giving yourself a complete overview of your testing environment — where your smart contacts’ triggers can be easily analysed, unlike in a public testnet where it is filled with thousands of other developers’ actions.
Now we have our blockchain ready, let's deploy our smart contract on it and try to run with the Remix extension.
Remix is the most popular IDE for Solidity developers, but we don’t have to abandon it just because we are using VSCode! Remix itself can help us to compile and deploy a contract on a blockchain, and provide an interface for easy testing, such as a button to trigger a function with different parameters.
VS Code itself cannot provide these features even with Solidity extension installed, but we can combine the best of two worlds by installing the Ethereum Remix extension in VSCode. This extension is coded and maintained by the official Ethereum Foundation, so the features provided in Remix are also present in this extension as well.
To download the extension, simply search Ethereum Remix in the extension tab or download it from the marketplace.
We can use the Remix extension to help us run the example-coin contract we just wrote:
Remix icon in the sidebarPaste this hostname with the port number in the Remix panel in the format of http://<hostname>:<port_number>, for me, it would be http://172.17.160.1:7545
5. Make sure your solidity file is active, then press compile in the Remix extension
Both panels are active in the workspace6. After compiling your smart contract, you can deploy your token to the blockchain using your custom configuration, then click deploy
UI after compiling7. Now you can interact with the smart contract easily by the run panel
Functions included in ABI are listed hereThis is an interactive way to test whether your smart contract is working as intended, just like what you would expect in the Remix IDE.
But testing each function manually is time-consuming and difficult to include every case for every little change, so this is only good for rapid development. To save time and effort in the long run, we will need an automatic testing solution to assist us, and Truffle can help us out with this.
Truffle is the automatic testing tool and deployment tool that can help us to facilitate our development and deployment process while providing the need
Ganache is also a software included in Truffle Suite, and now we can use another product from it, which is Truffle itself.
To install Truffle, you will need to first have npm installed. If you do not, you can head to the NPM website to follow the guide on how to install npm.
Installing Truffle with npm is as easy as entering the command
npm install -g truffle
Option -g will enable Truffle globally so you can use it everywhere in your system.
Now with Truffle installed, we can start to write test cases for our token with the following steps
contracts already exists in this directory…
?Overwrite contracts? (y/N)
Now you should have a folder structure as follows:
example-coin
|_ contracts
|_ token.sol
|_ migrations
|_ 1_initial_migration.js
|_ test
|_ .gitkeep
|_ truffle-config.js
3. Create a new file token.test.js under the test folder and copy the code below into the file.
const Standard_Token = artifacts.require("Standard_Token");
contract("Standard_Token", (accounts) => {
it("should put 10000 token in the first account", async () => {
const token = await Standard_Token.deployed();
const balance = await token.balanceOf(accounts[0]);
assert.equal(balance.toNumber(), 10000);
});
it("should transfer 100 token from the accounts[0] to accounts[1]", async () => {
const token = await Standard_Token.deployed();
await token.transfer(accounts[1], 100, { from: accounts[0]});
const balance = await token.balanceOf(accounts[1]);
assert.equal(balance.toNumber(), 100);
});
});
I have prepared two tests here, which are to check if the address to deploy the contract did receive 10000 tokens, and whether the transfer of 100 tokens from 1 address to another is successful.
4. Now we will need to make configurations for Truffle and deployment, first head to truffle-config.js and in the object networks.development, uncomment it and change the field to your Ganache configuration, you may leave the other settings unchanged at this point.
networks: {
development: {
host: "192.168.48.1", // Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
}
}
5. Next, we will teach how Truffle should deploy our contracts, copy the following code to replace the content of 1_initial_migration.js. This code is deploying the contract onto the blockchain and calls the constructor with our parameters
const Standard_Token = artifacts.require("Standard_Token");
module.exports = function (deployer) {
deployer.deploy(Standard_Token, 10000, "Example Coin", 1, "EPC");
};
6. Now we can run truffle test at the root level, it will automatically detect the tests in the test folder and run them for us. You should also see the following results
Contract: Standard_Token
✓ should put 10000 token in the first account (118ms)
✓ should transfer 100 token from the accounts[0] to accounts[1] (696ms)
2 passing (1s)
7. Now everything is ready, we can run truffle migrate to deploy the contracts on-chain!
So that is how I set up my environment to develop smart contracts on Ethereum, but notice that no two developers are alike, this only serves as a reference to you, and you should find the setup you find most comfortable. As for the sample project, you can find the whole code here.
This is my first blog on blockchain development-related fields, I hope this can help you to kickstart your Solidity adventure.
Want to Connect?
You can find me at Twitter Github Discord.
How to Setup a Local Solidity Development Environment With VSCode, Remix, and Truffle Suite was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.


![[Tambay] Tres niños na bagitos](https://www.rappler.com/tachyon/2026/01/TL-TRES-NINOS-NA-BAGITOS-JAN-17-2026.jpg)