1

当我运行brownie consoleganache-cli 默认从127.0.0.1地址开始。这个地址怎么改0.0.0.0

我试图修改位于~/.brownie/network-config.yaml. 我已经改变了hostport在下面的部分

development:
  - name: Ganache-CLI
    id: development
    cmd: ganache-cli
    host: http://0.0.0.0
    cmd_settings:
      port: 8549
      gas_limit: 12000000
      accounts: 10
      evm_version: istanbul
      mnemonic: brownie

但重启后只有端口被正确更新。

4

1 回答 1

1

有两种方法可以做到这一点:

  1. 编辑网络
  2. 使用您要查找的 URL 添加新网络

编辑网络

brownie networks modity development host=http://0.0.0.0

添加新网络

brownie networks add development ganache-zero cmd=ganache-cli host=http://0.0.0.0 accounts=10 mnemonic=brownie port=8545

或者

brownie networks add Ethereum ganache-zero host=http://0.0.0.0:8545 chainid=1337
于 2021-10-25T13:14:41.637 回答