-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtruffle-config.js
108 lines (104 loc) · 2.31 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
/* eslint-disable @typescript-eslint/restrict-plus-operands */
/* eslint-disable prefer-destructuring */
/* eslint-disable object-shorthand */
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
require('ts-node/register')
require('dotenv').config()
const wrapProvider = require('arb-ethers-web3-bridge').wrapProvider
const HDWalletProvider = require('@truffle/hdwallet-provider')
const { INFURA_KEY, POLYGONSCAN_KEY, ETHERSCAN_KEY, MNEMONIC, ARBISCAN_KEY } =
process.env
module.exports = {
test_file_extension_regexp: /.*\.ts$/,
contracts_build_directory: './build/contracts',
compilers: {
solc: {
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
},
},
},
},
networks: {
local: {
network_id: '*',
gas: 8500000,
provider: function () {
return new HDWalletProvider({
mnemonic: {
phrase: MNEMONIC,
},
providerOrUrl: 'http://127.0.0.1:8547/',
addressIndex: 0,
numberOfAddresses: 1,
})
},
},
arbitrum_testnet: {
network_id: 421611,
chain_id: 421611,
gas: 287853530,
provider: function () {
return wrapProvider(
new HDWalletProvider(
MNEMONIC,
'https://arbitrum-rinkeby.infura.io/v3/' + INFURA_KEY,
),
)
},
},
arbitrum_mainnet: {
network_id: 42161,
chain_id: 42161,
gas: 287853530,
gasPrice: 1400000000,
provider: function () {
return new HDWalletProvider(
MNEMONIC,
'https://arbitrum-mainnet.infura.io/v3/' + INFURA_KEY,
0,
1,
)
},
},
polygon_testnet: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
'https://polygon-mumbai.infura.io/v3/' + INFURA_KEY,
),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
polygon_mainnet: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
'https://polygon-mainnet.infura.io/v3/' + INFURA_KEY,
),
network_id: 137,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
gasPrice: 52000000000,
},
},
mocha: {
timeout: 100000,
},
db: {
enabled: false,
},
plugins: ['truffle-plugin-verify'],
api_keys: {
polygonscan: POLYGONSCAN_KEY,
etherscan: ETHERSCAN_KEY,
arbiscan: ARBISCAN_KEY,
},
}