Truffle and Metamask
Prerequisites
truffle version: Truffle v3.2.1
npm version:
{ npm: '3.10.10',
ares: '1.10.1-DEV',
http_parser: '2.7.0',
icu: '58.2',
modules: '48',
node: '6.10.2',
openssl: '1.0.2k',
uv: '1.9.1',
v8: '5.1.281.98',
zlib: '1.2.11' }
testrpc version: EthereumJS TestRPC v3.0.3
metamask version: 3.5.2

And you have to reveal your seed words, copy them.


Step by Step
cd Desktop/
mkdir truffle-test
cd truffle-test/
testrpc -m "your seed words"

On another terminal:truffle init webpack

truffle compile
truffle migrate
npm run dev




Now the account 1 has 10000 META, and account 2 has 0 META. Let's transfer 1000 META to account 2.

Transfer successfully. The account 1 now just have 9000META, and account 2 has 1000 META.


References
Truffle and Metamask
Developing Ethereum Dapps with Truffle and MetaMask
Dapp tutorial: Truffle 3.0, Metamask and EthereumExplorer
BUILDING & TESTING A FRONTEND APP WITH TRUFFLE 3.0
Truffle Docs
网友评论