开启 Truffle Ganache MetaMask交互
生活随笔
收集整理的這篇文章主要介紹了
开启 Truffle Ganache MetaMask交互
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 開啟 Truffle Ganache? MetaMask交互
1. Ganache 運行
sudo ./ganache-2.1.2-linux-x86_64.AppImage
2. Truffle 運行 合約
truffle migrate
truffle console
3. MetaMask 運行
2.設置metamask 增加一個7545端口的網絡
image.png
?
image.png
3.導入賬戶 從ganache的accounts里面隨便找個賬戶的私鑰傳進去
image.png
?
?
4. 開啟 Truffle Ganache? MetaMask交互
對賬戶操作,檢查賬戶金額的變化
4.1?
truffle(development)> web3.eth.getBalance('0x4350A11ABE5c341E57C5fb7375c0A3e70F6EBb0E')
'30984200840000000000'
4.2?
MetaMask金額一致
?
?
?
總結
以上是生活随笔為你收集整理的开启 Truffle Ganache MetaMask交互的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【区块链-以太坊】5 Ubuntu下tr
- 下一篇: 以太坊开发实战:通过truffle-co