This tutorial and course series covers an introduction to the Truffle suite and tools framework
What is a Truffle?
Truffle
is a javascript Ethereum development environment for developing and testing smart contracts and dapps full-stack blockchain applications.
Truffle helps blockchain developers to easy and automate the tasks of development and deployment of smart contracts, dapps to local Ethereum networks.
Truffle also has support built local network which provides compile, deploy and test contract locally without deploying to production code.
It provides a CLI environment for developers
- Compile smart contract
- deploy the contract to the Ethereum network
- debug and test contracts.
- Write front end apps such as Dapps
- Integrating contract with Dapps
- Tools to automate the process
It is a framework with a group of tools, helps developers with the following tools and features.
- Solidity Compiler
- Development and test environment
- Automated tools to the easy process
Prerequisite
The following technical skills or language tools are required to work on a truffle
- Javascript or typescript code
- Git for managing source code repository
- Nodejs Environment
- Metamask
Truffle Suite
Truffle Suite contains one-stop full-stack development of blockchain application with the following tools
- ganache: It is a local Ethereum environment to develop test, deploy contracts, and development of frontend dapps, It also provides inspect and monitor the execution of code in the blockchain.
Truffle
:Development Ethereum environment, testing tools and asset pipelines for Ethereum apps- Drizzle: It is javascript libraries helps to develop front end applications
Truffle Advantages
- Helps developers to test the solidity contract to deploy and test in the local Ethereum network
- It provides debugging to find out such as stack trace, logging, and error
- This framework is customizable and extendable to add extra features
- Supports typescript to have typed language support for catching an error during compile time.
- Opensource and community support
- Easy integration and extendable with plugins
Truffle Disadvantages
- Learning curve exists for the non-javascript developer as Basic knowledge of nodejs environment how package runs
Truffle Compilation Process
Truffle provides tasks to compile, test and deploy the contract.
compile task compiles solidity code to machine code as described below
--- ABI
|
Solidity code > Solidity Compiler --|
|
---- MachineByte Code -- Ethereum Blockchain