truffle init 初始化,生成以下文件
contract migrations test turffle-config.js truffle.js
truffle develop 启动编译环境
web3.eth.coinbase; //第0个帐户
web3.eth.account[1]; //第1个帐户
web3.eth.getBalance("addr") //查询余额
//eth = 100*10**18 wei, 后面18个零
//acount = web3.toWei(30, "ether");
web3.eth.sendTransaction({from:"0x3a...c35c", to:"0x6f...04", value:20000}); //转帐
truffle console --network ganachenet //交互
truffle compile //编译
truffle migrate --network ganachenet //布署到指定网络
migrations -> 2_initial_helloworld.js