1、创建项目
npm install truffle
mkdir truffletest
cd truffletest
2、初始化项目
truffle init
3、编写智能合约
vim contracts/test.sol
1 pragma solidity ^0.4.25
2 contract Simple{
3 function add(uint a,uint b)returns(uint sum ){sum = a+b;}
4 function mul(uint a,uint b)returns(uint){sum = a*b;}
5 }