stone-dapp icon indicating copy to clipboard operation
stone-dapp copied to clipboard

How do you deploy your DAPP?

Open songdaqi1125 opened this issue 7 years ago • 1 comments

Is it directly deployed to Rinkeby?

songdaqi1125 avatar Jul 18 '18 15:07 songdaqi1125

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

benzntech avatar Aug 22 '18 09:08 benzntech