-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtruffle-config.js
113 lines (104 loc) · 3.07 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
101
102
103
104
105
106
107
108
109
110
111
112
113
const HDWalletProvider = require("@truffle/hdwallet-provider");
const mnemonicPhrase = process.env.MNEMONIC_PHRASE;
const RPC_ENDPOINT_OPTIMISM_GOERLI = process.env.RPC_ENDPOINT_OPTIMISM_GOERLI;
const RPC_ENDPOINT_OPTIMISM_MAINNET = process.env.RPC_ENDPOINT_OPTIMISM_MAINNET;
const RPC_ENDPOINT_OPTIMISM_SEPOLIA = process.env.RPC_ENDPOINT_OPTIMISM_SEPOLIA;
const RPC_ENDPOINT_POLYGON_MUMBAI = process.env.RPC_ENDPOINT_POLYGON_MUMBAI;
const RPC_ENDPOINT_POLYGON_MAINNET = process.env.RPC_ENDPOINT_POLYGON_MAINNET;
const RPC_ENDPOINT_ETHEREUM_MAINNET = process.env.RPC_ENDPOINT_ETHEREUM_MAINNET;
const RPC_ENDPOINT_BASE_MAINNET = process.env.RPC_ENDPOINT_BASE_MAINNET;
const GAS_VALUE = process.env.GAS_VALUE ? process.env.GAS_VALUE : 5500000;
const SOLIDITY_COMPILER_VERSION = "0.8.11";
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*",
gas: 800000000,
},
ethereum: {
provider: () =>
new HDWalletProvider(mnemonicPhrase, RPC_ENDPOINT_ETHEREUM_MAINNET),
network_id: 1,
gas: GAS_VALUE,
confirmations: 2,
timeoutBlocks: 2000,
networkCheckTimeout: 1000000,
skipDryRun: true,
},
optimism_goerli: {
provider: () =>
new HDWalletProvider(mnemonicPhrase, RPC_ENDPOINT_OPTIMISM_GOERLI),
network_id: 420,
gas: GAS_VALUE,
confirmations: 2,
timeoutBlocks: 2000,
networkCheckTimeout: 1000000,
skipDryRun: true,
},
optimism_sepolia: {
provider: () =>
new HDWalletProvider(mnemonicPhrase, RPC_ENDPOINT_OPTIMISM_SEPOLIA),
network_id: 11155420,
gas: GAS_VALUE,
confirmations: 2,
timeoutBlocks: 2000,
networkCheckTimeout: 1000000,
skipDryRun: true,
},
mumbai: {
provider: () =>
new HDWalletProvider(mnemonicPhrase, RPC_ENDPOINT_POLYGON_MUMBAI),
network_id: 80001,
gas: GAS_VALUE,
confirmations: 2,
timeoutBlocks: 200,
networkCheckTimeout: 1000000,
skipDryRun: true,
},
polygon: {
provider: () =>
new HDWalletProvider(mnemonicPhrase, RPC_ENDPOINT_POLYGON_MAINNET),
network_id: 137,
gas: GAS_VALUE,
gasPrice: 250000000000,
timeoutBlocks: 200,
networkCheckTimeout: 1000000,
skipDryRun: true,
},
optimism: {
provider: () =>
new HDWalletProvider(mnemonicPhrase, RPC_ENDPOINT_OPTIMISM_MAINNET),
network_id: 10,
gas: GAS_VALUE,
confirmations: 2,
timeoutBlocks: 2000,
networkCheckTimeout: 1000000,
skipDryRun: true,
},
base: {
provider: () =>
new HDWalletProvider(mnemonicPhrase, RPC_ENDPOINT_BASE_MAINNET),
network_id: 8453,
gas: GAS_VALUE,
gasPrice: 34000000,
confirmations: 2,
timeoutBlocks: 2000,
networkCheckTimeout: 1000000,
skipDryRun: true,
},
},
mocha: {},
compilers: {
solc: {
version: SOLIDITY_COMPILER_VERSION,
settings: {
optimizer: {
enabled: true,
},
},
},
},
test_directory: "contracts/test",
};