Created
November 13, 2024 11:09
-
-
Save rollendxavier/72d12b580265a3617efcffad3a368999 to your computer and use it in GitHub Desktop.
Configuring Truffle for Deployment
This file contains hidden or 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 infuraKey = "YOUR_INFURA_KEY"; | |
| const mnemonic = "your 12-word mnemonic"; | |
| module.exports = { | |
| networks: { | |
| rinkeby: { | |
| provider: () => new HDWalletProvider(mnemonic, `https://rinkeby.infura.io/v3/${infuraKey}`), | |
| network_id: 4, // Rinkeby ID | |
| gas: 5500000, | |
| }, | |
| }, | |
| compilers: { | |
| solc: { | |
| version: "0.8.0" | |
| } | |
| } | |
| }; | |
| module.exports = { | |
| networks: { | |
| development: { | |
| host: "127.0.0.1", // Localhost (default: none) | |
| port: 8545, // Standard Ethereum port (default: none) | |
| network_id: "*", // Any network (default: none) | |
| }, | |
| }, | |
| compilers: { | |
| solc: { | |
| version: "0.8.0", // Fetch exact version from solc-bin (default: truffle's version) | |
| }, | |
| }, | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment