-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtruffle-config.js
100 lines (90 loc) · 2.42 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
require("dotenv").config();
const celoGanache = require("@celo/ganache-cli");
const HDWalletProvider = require("@truffle/hdwallet-provider");
const getMnemonic = (network) => {
require("dotenv").config({ path: `.env.${network}` });
return process.env.MNEMONIC;
};
// celo's derivation path!
const celoDerivationPath = "m/44'/52752'/0'/0/";
module.exports = {
networks: {
development: {
network_id: "*",
gasPrice: 20000000000,
gas: 13000000,
provider: celoGanache.provider({
gasLimit: 13000000,
gasPrice: 20000000000,
default_balance_ether: 10000000000000000000,
}),
},
local: {
provider: () =>
new HDWalletProvider({
mnemonic: getMnemonic("local"),
providerOrUrl: `http://localhost:7545`,
derivationPath: celoDerivationPath,
}),
network_id: "*",
gasPrice: 20000000000,
gas: 13000000,
deploymentPollingInterval: 8000,
skipDryRun: true,
},
alfajores: {
provider: () =>
new HDWalletProvider({
mnemonic: getMnemonic("alfajores"),
providerOrUrl: `wss://alfajores-forno.celo-testnet.org/ws`,
//providerOrUrl: `https://celo-alfajores--rpc.datahub.figment.io/apikey/<apikey>`,
derivationPath: celoDerivationPath,
}),
network_id: 44787, // Alfajores network id
skipDryRun: true,
disableConfirmationListener: true,
},
baklava: {
provider: () =>
new HDWalletProvider({
mnemonic: getMnemonic("baklava"),
providerOrUrl: `https://baklava-forno.celo-testnet.org/`,
derivationPath: celoDerivationPath,
}),
network_id: 62320, // Baklava network id
skipDryRun: true,
disableConfirmationListener: true,
},
mainnet: {
provider: () =>
new HDWalletProvider({
mnemonic: getMnemonic("mainnet"),
providerOrUrl: `https://forno.celo.org`,
derivationPath: celoDerivationPath,
}),
network_id: 42220, // Mainnet network id
},
},
// Set default mocha options here, use special reporters etc.
mocha: {
timeout: 120000,
useColors: true,
},
plugins: ["solidity-coverage", "truffle-contract-size"],
// Configure your compilers
compilers: {
solc: {
version: "0.8.4",
docker: false, // Use "0.5.1" you've installed locally with docker (default: false)
settings: {
// See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: true,
runs: 200,
},
evmVersion: "istanbul",
metadata: { useLiteralContent: true },
},
},
},
};