太多的人问我如何在以太坊上用truffle测试,部署智能合约。为了节省时间,
sudo apt-get install -y nodejs
npm install -g ethereumjs-testrpc
npm install -g truffle
npm install web3 --save
npm install truffle-contract --save
truffle init webpack
truffle compile
testrpc
1.X版本:truffle deploy
2.X及以上版本:truffle migrate
2.X版本:truffle serve
3.X版本:npm run dev
http://blog.csdn.net/jerry81333/article/details/70669476?utm_source=itdadao&utm_medium=referral
遇到的问题
/usr/lib/node_modules/truffle/build/cli.bundled.js:124978
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
不要用 truffle serve 和 truffle unbox