【问题标题】:Ganache Issue-Not showing the available networksGanache 问题-不显示可用网络
【发布时间】:2022-11-24 01:20:52
【问题描述】:

我正在尝试在 mac 中连接 Ganache,当我启动 Ganache 时,它​​没有显示可用帐户并打开服务器屏幕 - 无法选择主机名。它只有一个选项“服务器主机名 0.0.0.0 - 所有接口”。

我试过了

重新启动甘纳许, 重启电脑, 从应用程序中卸载并重新安装, Ganache 从下载 Ganache https://trufflesuite.com/ganache/

仅供参考:我已经安装了松露套件 松露 v5.5.20(核心:5.5.20) 伽纳彻 v7.2.0 Solidity v0.5.16 (solc-js) 节点 v16.15.1 Web3.js v1.7.4

任何人都知道如何解决这个问题。

提前致谢 拉希米

【问题讨论】:

    标签: blockchain ethereum solidity truffle ganache


    【解决方案1】:

    你的truffle.config.js应该有这个最低配置才能连接

    module.exports = {
      contracts_build_directory: "./public/contracts",
      networks: {
        development: {
          // in hte truffle HOSTNAME down set the correct host. "0.0.0.0" should accept this
          host: "127.0.0.1",
          port: 7545,
          network_id: "*",
        },
      },
    
      compilers: {
        solc: {
          version: "0.8.13",
        },
      },
    

    如果 ganache 正在运行,当你开始你的松露项目时,它应该会自动连接

    【讨论】:

      猜你喜欢
      • 2019-09-12
      • 1970-01-01
      • 2016-05-17
      • 1970-01-01
      • 2019-12-31
      • 1970-01-01
      • 2020-01-12
      • 2022-09-28
      • 2016-01-04
      相关资源
      最近更新 更多