Go-Ethereum

使用 ganache 創建私有區塊鍊網路

  • July 4, 2018

我正在研究用於創建 DApp 的 Truffle 框架。我的問題是,在 ganache 中我可以使用我的私有區塊鍊網路地址而不是 testrpc 帳戶嗎?假設我在 ganache 中使用私有區塊鍊網路地址,我該如何公開訪問它。

通過介紹,Ganache CLI 是乙太坊開發工具 Truffle 套件的一部分,是 Ganache 的命令行版本,它是用於乙太坊開發的個人區塊鏈。請參閱有關使用 Genache Cli的文件。我猜你是在詢問

--account:指定--account=...(沒有’s’)任意次數傳遞任意私鑰及其相關餘額以生成初始地址:

$ ganache-cli --account="<privatekey>,balance" [--account="<privatekey>,balance"]

您可以指定主機,以便可以公開訪問。

-h or --host or --hostname: Hostname to listen on. Defaults to 127.0.0.1.

引用自:https://ethereum.stackexchange.com/questions/52639