配置文件
指定网络:
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
}
}
};
development是这个网络配置的信息
我们可以添加N个网络,比如添加一个名为:live的网络:
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // match any network
},
live: {
host: "178.25.19.88", // Random IP for example purposes (do not use)
port: 80,
network_id: 1, // Ethereum public network
// optional config values:
// gas
// gasPrice
// from - default address to use for any transaction Truffle makes during migrations
// provider - web3