Created
October 28, 2020 11:36
-
-
Save yuyasugano/d066954002e579cad390a6eb052e611a to your computer and use it in GitHub Desktop.
truffle.js example for Rinkeby network
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
const HDWalletProvider = require("truffle-hdwallet-provider"); | |
const privKey = ""; | |
const rinkebyApi = "https://rinkeby.infura.io/v3/<endpoint>"; | |
const youraddress = ""; | |
module.exports = { | |
networks: { | |
// Useful for testing. The `development` name is special - truffle uses it by default | |
// if it's defined here and no other network is specified at the command line. | |
// You should run a client (like ganache-cli, geth or parity) in a separate terminal | |
// tab if you use this network and you must also set the `host`, `port` and `network_id` | |
// options below to some value. | |
// | |
development: { | |
host: "127.0.0.1", // Localhost (default: none) | |
port: 8545, // Standard Ethereum port (default: none) | |
network_id: "*", // Any network (default: none) | |
}, | |
rinkeby: { | |
provider: function() { | |
return new HDWalletProvider( | |
[privKey], rinkebyApi, 0, 1 | |
); | |
}, | |
network_id: 4, | |
gas: 500000, | |
gasPrice: 10000000000, | |
from: youraddress | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment