Forked from radamosch/Truffle deploy to POA Network
Created
September 8, 2019 07:51
-
-
Save Godtide/1a84c98d1dc7ec434672bed17f3dd09c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* NB: since truffle-hdwallet-provider 0.0.5 you must wrap HDWallet providers in a | |
* function when declaring them. Failure to do so will cause commands to hang. ex: | |
* ``` | |
* mainnet: { | |
* provider: function() { | |
* return new HDWalletProvider(mnemonic, 'https://mainnet.infura.io/<infura-key>') | |
* }, | |
* network_id: '1', | |
* gas: 4500000, | |
* gasPrice: 10000000000, | |
* }, | |
*/ | |
var HDWalletProvider = require("truffle-hdwallet-provider"); | |
const mnemonic = process.env.MNEMONIC | |
const infura_apikey = process.env.INFURA_APIKEY | |
module.exports = { | |
networks: { | |
development: { | |
host: "localhost", | |
port: 8545, | |
network_id: "*", // Match any network id | |
gas: 4600000 | |
}, | |
ropsten: { | |
provider: function() { | |
return new HDWalletProvider(mnemonic, 'https://ropsten.infura.io/' + infura_apikey) | |
}, | |
network_id: 3, | |
gas: 2900000, | |
gasPrice: 50000000000 | |
}, | |
sokol: { | |
provider: function() { | |
return new HDWalletProvider(mnemonic, 'https://sokol.poa.network/') | |
}, | |
network_id: "77" | |
}, | |
core: { | |
provider: function() { | |
return new HDWalletProvider(mnemonic, 'https://core.poa.network/') | |
}, | |
network_id: "99" | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment