google cloud 搭建 ethereum测试环境(二)
2018-03-11 本文已影响10人
eversterd
在chrome浏览器测试 Dapp, 首先安装 MetaMask 这个插件,然后需要连接到测试网络
![](https://img.haomeiwen.com/i728905/a0dd58484f0962cd.png)
在Wallet Seed 中填入 启动 ganache-cli 时的mnemonic
![](https://img.haomeiwen.com/i728905/c325a169057cdaa6.jpg)
连接到测试网络后会使用默认创建的地址,测试网络下每个地址有100eth的余额
![](https://img.haomeiwen.com/i728905/ff0f4644fa4ea7b7.png)
![](https://img.haomeiwen.com/i728905/e01dc5c86ffbff10.jpg)
点击 adopt按钮, 领养一只宠物, 会弹出确认transaction的提示窗口。
![](https://img.haomeiwen.com/i728905/f11eee1c367a3097.jpg)
点击 submit 确认这笔 transaction, 可以看到账号下面出现一笔transaction 。账户余额也减少了,发送transaction 消耗了一定的gas。
![](https://img.haomeiwen.com/i728905/ffdcc0aada5043e7.png)
同时在测试网络环境中也看到这次transaction的记录, transaction number 是4, 而在测试环境中block number从0 开始,显示block number 是 5
![](https://img.haomeiwen.com/i728905/36ad34bca7030ad9.jpg)