The sample code here for deploying to Ropsten used HDWalletProvider
and a mnemonic
in the configuration, but I am not sure I understand its purpose.
Is this just telling it the account that will become the contract owner when you deploy?
var HDWalletProvider = require("truffle-hdwallet-provider");
// 12-word mnemonic
var mnemonic = process.env.NMEMONIC;
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
},
ropsten: {
provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/"),
network_id: 3 // official id of the ropsten network
}
}
};