小编Sho*_*310的帖子

合约尚未部署到 Rinkeby Network 上检测到的网络(网络/工件不匹配)

我一直遇到标题中指定的。

我开发了一个智能合约并成功编译并部署到网络如下: 1. 运行 testrpc 2. truffle compile 3. truffle migrate

但是,仍然显示上述错误。然后我尝试删除构建文件并按照以下步骤操作: 1. 运行 testrpc 2. truffle compile 3. truffle migrate --network rinkeby

错误仍然显示。

下面是 truffle.js 文件

module.exports = {
  migrations_directory: "./migrations",
  networks: {
development: {
  host: "localhost",
  port: 8545,
  network_id: "*" // Match any network id
},
rinkeby: {
  host: "localhost", // Connect to geth on the specified
  port: 8545, 
  network_id: "*",
}
Run Code Online (Sandbox Code Playgroud)

} };

如果有人遇到任何类似的问题并已解决,如果您能分享您是如何解决的,我将不胜感激。

提前致谢

ethereum smartcontracts truffle consensys-truffle

5
推荐指数
3
解决办法
8619
查看次数