发布于 2017-12-08 12:42:12
您需要将development部分添加到项目的truffle.js中的networks部分:
module.exports = {
networks: {
development: {
host: "localhost",
port: 7545,
network_id: "5777"
}
}
};确保端口和网络ID正确。这些都是缺省值,所以如果在Ganache中更改它们,您也需要在这里更改它们。
要使用这个指定的网络,在构建契约文件之后,可以使用以下命令
truffle migrate --network development发布于 2019-02-18 13:26:01
从https://truffleframework.com/ganache/下载ganache
从你的ganache文件目录中打开终端。键入以下内容并输入。
chmod a+x ganacheVersion.AppImage
https://ethereum.stackexchange.com/questions/32825
复制相似问题