-
Notifications
You must be signed in to change notification settings - Fork 4
/
truffle-config.js
78 lines (68 loc) · 1.7 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
/* eslint-disable */
require('dotenv').config();
const Kit = require('@celo/contractkit')
const HDWalletProvider = require('@truffle/hdwallet-provider');
const infuraKey = process.env.SUMMA_RELAY_DEPLOY_INFURA_KEY;
const mnemonic = process.env.MNEMONIC;
const ropsten = {
provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/${infuraKey}`),
network_id: 3,
gas: 5500000,
confirmations: 2,
timeoutBlocks: 200
}
const kovan = {
provider: () => new HDWalletProvider(mnemonic, `https://kovan.infura.io/v3/${infuraKey}`),
network_id: 42,
gas: 5500000,
confirmations: 2,
timeoutBlocks: 200
}
const alfajores = {
provider: () => {
const provider = new HDWalletProvider(mnemonic, 'http://127.0.0.1:9999'); // sinkhole any requests
// slip44
const celoBIP44 = "m/44'/52752'/0'/0/0";
const hdkey = provider.hdwallet.derivePath(celoBIP44);
// Get the privkey and hand it to the kit
const privkey = hdkey._hdkey.privateKey.toString('hex');
const kit = Kit.newKit('https://alfajores-forno.celo-testnet.org');
kit.addAccount(privkey);
return kit.web3.currentProvider;
},
network_id: 44786,
gas: 5500000,
confirmations: 2,
timeoutBlocks: 200
}
module.exports = {
api_keys: {
etherscan: process.env.ETHERSCAN_KEY
},
plugins: [
'truffle-plugin-verify'
],
networks: {
coverage: {
host: "localhost",
network_id: "*",
port: 8555,
gas: 0xfffffffffff,
gasPrice: 0x01
},
ropsten: ropsten,
kovan: kovan,
alfajores: alfajores,
},
compilers: {
solc: {
version: "0.5.10",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
}
};