-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
51 lines (48 loc) · 1.4 KB
/
truffle-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const HDWalletProvider = require("@truffle/hdwallet-provider");
const { CeloProvider } = require("@celo/contractkit");
require('dotenv').config(); // To store your private keys securely in a .env file
const mnemonic = process.env.MNEMONIC; // Store your mnemonic in a .env file
// const infuraKey = process.env.INFURA_KEY; // If needed, for fallback to Infura
module.exports = {
plugins: [
'truffle-plugin-verify'
],
networks: {
alfajores: {
provider: () =>
new HDWalletProvider(
mnemonic,
"https://alfajores-forno.celo-testnet.org"
),
network_id: 44787, // Celo Alfajores testnet ID
gas: 20000000,
gasPrice: 50000000000, // Set gas price to 50 Gwei
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
// Celo Mainnet Configuration
celo: {
provider: () =>
new HDWalletProvider({
mnemonic: {
phrase: mnemonic,
},
providerOrUrl: "https://forno.celo.org",
}),
network_id: 42220, // Celo mainnet network id
gas: 20000000, // Gas limit
gasPrice: 500000000, // Gas price
timeoutBlocks: 200,
skipDryRun: true,
},
},
compilers: {
solc: {
version: "0.8.0", // Fetch exact version from solc-bin (default: truffle's version)
},
api_keys: {
alfajores_celoscan: process.env.CELOSCAN_API_KEY
}
},
};