我一直遇到标题中指定的。
我开发了一个智能合约并成功编译并部署到网络如下: 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)
} };
如果有人遇到任何类似的问题并已解决,如果您能分享您是如何解决的,我将不胜感激。
提前致谢