Deploying and Testing Ethereum Smart Contracts using Truffle and Ganache

Learn how to test your Solidity smart contracts locally

Wei-Meng Lee
CryptoStars
Published in
8 min readSep 1, 2022

--

Photo by Kanchanara on Unsplash

Typically, after you have written your smart contract, you need to deploy and test it. There are a number of ways to do it, and using the Remix IDE is one such way. For this article, I am going to discuss another suite of tools that you can also use for deploying and testing Solidity smart contracts — Truffle Suite.

What is the Truffle Suite?

The Truffle Suite is a collection of tools that is designed to ease the testing of your Ethereum Solidity smart contracts. Instead of using a testnet (such as Ropsten) and getting test ethers to deploy and use your contracts, you can now directly deploy your smart contracts locally on your computer. Best of all, there is no need to wait for transactions to be confirmed — your transactions are immediately confirmed after you have submitted them.

The Truffle Suite contains three components:

  • Truffle — A world class development environment, testing framework and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM).
  • Ganache — A simulated Ethereum blockchain where you can use to deploy contracts, develop your applications, and run tests.

--

--

ACLP Certified Trainer | Blockchain, Smart Contract, Data Analytics, Machine Learning, Deep Learning, and all things tech (http://calendar.learn2develop.net).