stone-dapp
stone-dapp copied to clipboard
How do you deploy your DAPP?
Is it directly deployed to Rinkeby?
With a public node like Infura
i. Install the needed libraries
Navigate into the project folder and run the following command:
npm init npm install truffle-hdwallet-provider --save
ii. In truffle.js, Add the following code to unlock your Metamask account and configure the Infura Ropsten node as entry point by providing the mnemonic phrase (Metamask / Settings / Reveal Seed Words)
var HDWalletProvider = require("truffle-hdwallet-provider");
var infura_apikey = "XXXXXX";
var mnemonic = "twelve words you can find in metamask/settings/reveal seed words blabla";
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*" // Match any network id
},
ropsten: {
provider: new HDWalletProvider(mnemonic, "https://ropsten.infura.io/"+infura_apikey),
network_id: 3
}
}
};
iii. Deploy on the ropsten network
$ truffle migrate --network ropsten
EDIT: Replace the solution by truffle-hdwallet-provider.Way more simple solution than ethereumjs-wallet bip39 web3-provider-engine web3