You are viewing a single comment's thread from:

RE: Truffle实战指南

in #starnote4 years ago
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

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.026
BTC 58961.27
ETH 2500.29
USDT 1.00
SBD 2.45