-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathtruffle-config.js
107 lines (104 loc) · 3.16 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
const HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config();
module.exports = {
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard BSC port (default: none)
network_id: "*", // Any network (default: none)
},
testnet: {
provider: () => new HDWalletProvider(process.env.TESTNET_DEPLOYER_KEY, `https://data-seed-prebsc-1-s1.binance.org:8545`, 0, 10),
network_id: 97,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
bsc: {
provider: () => new HDWalletProvider(process.env.MAINNET_DEPLOYER_KEY, `https://bscrpc.com`),
network_id: 56,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
polygon: {
provider: () => new HDWalletProvider(process.env.MAINNET_DEPLOYER_KEY, `https://polygon-rpc.com/`),
network_id: 137,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
polygonTestnet: {
provider: () => new HDWalletProvider(process.env.TESTNET_DEPLOYER_KEY, `https://rpc-mumbai.matic.today`),
network_id: 80001,
confirmations: 2,
gasPrice: 4000000000,
timeoutBlocks: 200,
skipDryRun: true
},
eth: {
provider: () => new HDWalletProvider(process.env.MAINNET_DEPLOYER_KEY, `https://rpc.ankr.com/eth`),
network_id: 1,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
ropsten: {
provider: () => new HDWalletProvider(process.env.TESTNET_DEPLOYER_KEY, process.env.ROPSTEN_RPC),
network_id: 3,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
arbitrum: {
provider: () => new HDWalletProvider(process.env.MAINNET_DEPLOYER_KEY, `https://arbitrum.blockpi.network/v1/rpc/public`),
network_id: `42161`,
confirmations: 2,
gasPrice: 1e8,
timeoutBlocks: 200,
skipDryRun: false
},
},
plugins: [
'truffle-plugin-verify'
],
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY,
bscscan: process.env.BSCSCAN_API_KEY,
arbiscan: process.env.ARBISCAN_API_KEY,
},
// Set default mocha options here, use special reporters etc.
mocha: {
timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
//https://forum.openzeppelin.com/t/how-to-deploy-uniswapv2-on-ganache/3885
version: "0.6.6", // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // 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: 999999
},
evmVersion: "istanbul",
outputSelection: {
"*": {
"": [
"ast"
],
"*": [
"evm.bytecode.object",
"evm.deployedBytecode.object",
"abi",
"evm.bytecode.sourceMap",
"evm.deployedBytecode.sourceMap",
"metadata"
]
},
}
}
},
}
}