forked from JoinColony/colonyNetwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
136 lines (130 loc) · 3.22 KB
/
truffle.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
const HDWalletProvider = require("truffle-hdwallet-provider");
const ganache = require("ganache");
const ganacheProvider = ganache.provider({ total_accounts: 14, seed: "smoketest", logging: { quiet: true } });
const LedgerWalletProvider = require("@umaprotocol/truffle-ledger-provider");
const ledgerOptions = {
networkId: 100, // xdai
path: "44'/60'/0'/0", // ledger default derivation path
askConfirm: false,
accountsLength: 1,
accountsOffset: 0,
};
const DISABLE_DOCKER = !process.env.DISABLE_DOCKER;
const coverageOptimiserSettings = {
enabled: false,
runs: 200,
details: {
peephole: false,
jumpdestRemover: false,
orderLiterals: true, // <-- TRUE! Stack too deep when false
deduplicate: false,
cse: false,
constantOptimizer: false,
yul: true,
yulDetails: {
stackAllocation: true,
},
},
};
const normalOptimizerSettings = {
enabled: true,
runs: 200,
};
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
gasPrice: 0,
network_id: "*",
skipDryRun: true,
disableConfirmationListener: true,
},
development2: {
host: "localhost",
port: 8546,
gasPrice: 0,
network_id: "*",
skipDryRun: true,
disableConfirmationListener: true,
},
integration: {
host: "localhost",
port: 8545,
gasPrice: 0,
network_id: 1998,
skipDryRun: true,
},
coverage: {
host: "localhost",
port: 8555,
network_id: parseInt(process.env.CHAIN_ID, 10) || 1999,
skipDryRun: true,
disableConfirmationListener: true,
},
goerliFork: {
host: "localhost",
port: 8605,
gasPrice: 0,
network_id: "5",
},
mainnetFork: {
host: "localhost",
port: 8601,
gasPrice: 0,
network_id: "1",
},
goerli: {
provider: () => {
return new HDWalletProvider("replace-with-private-key-when-using", "https://goerli.infura.io/v3/e21146aa267845a2b7b4da025178196d");
},
network_id: "5",
},
mainnet: {
provider: () => {
return new HDWalletProvider("replace-with-private-key-when-using", "https://mainnet.infura.io/v3/e21146aa267845a2b7b4da025178196d");
},
network_id: "1",
},
storageSmoke: {
provider: () => {
return ganacheProvider;
},
network_id: "*",
},
xdai: {
url: "https://xdai-archive.blockscout.com/",
gasPrice: 2000000000,
network_id: 100,
},
xdaiLedger: {
provider() {
return new LedgerWalletProvider(ledgerOptions, "https://xdai-archive.blockscout.com/");
},
network_id: 100,
gasPrice: 2000000000,
},
},
mocha: {
reporter: "mocha-circleci-reporter",
reporterOptions: {
currency: "USD",
gasPrice: 5,
onlyCalledMethods: true,
excludeContracts: ["Migrations"],
},
slow: 1000,
},
compilers: {
solc: {
version: "0.8.23",
docker: DISABLE_DOCKER,
parser: "solcjs",
settings: {
optimizer: process.env.SOLIDITY_COVERAGE ? coverageOptimiserSettings : normalOptimizerSettings,
evmVersion: "istanbul",
},
},
},
plugins: ["solidity-coverage", "truffle-contract-size"],
};