-
Notifications
You must be signed in to change notification settings - Fork 88
/
config-example.toml
315 lines (286 loc) · 9.18 KB
/
config-example.toml
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# router swap identifier, must have prefix 'routerswap'
Identifier = "routerswap#20210326"
# router swap type (eg. erc20swap, nftswap, anycallswap)
SwapType = "erc20swap"
# anycall has subtype of v5 (curve) and v6 (hundred)
SwapSubType = ""
# chain id black list of string array
ChainIDBlackList = []
# token id black list of string array
TokenIDBlackList = []
# account black list of string array
AccountBlackList = []
# token id black list on chain
[TokenIDBlackListOnChain]
43114 = []
25 = []
# router sever config (server only)
[Server]
# administrators who can do admin work
Admins = [
"0x1111111111111111111111111111111111111111",
"0x2222222222222222222222222222222222222222"
]
Assistants = [
"0x6666666666666666666666666666666666666666"
]
# enable replace swap job
EnableReplaceSwap = true
# enable pass big value swap job
EnablePassBigValueSwap = true
# replace plus gas price percentage
ReplacePlusGasPricePercent = 1
# wait time to replace swap
WaitTimeToReplace = 900
# maximum replace count
MaxReplaceCount = 20
# maximum replace distance
MaxReplaceDistance = 10
# plus gas price percentage
PlusGasPricePercentage = 10
# maximum plus gas price percentage
MaxPlusGasPricePercentage = 100
# maximum gas price flunct percentage
MaxGasPriceFluctPercent = 10
# apecify auto swap nonce enabled chainids
AutoSwapNonceEnabledChains = ["25"]
# retry send tx loop count, key is chainID. (in main thread)
[Server.RetrySendTxLoopCount]
43114 = 2
25 = 10
# send tx loop count until success in child routines (after retry loop)
# key is chainID. use negative to disable loop
[Server.SendTxLoopCount]
43114 = 30
25 = -1
# send tx until success in child routines loop interval of seconds, key is chainID.
[Server.SendTxLoopInterval]
43114 = 10
25 = 10
# default gas fee (string type)
#[Server.DefaultFee]
#1007961752911 = "6250"
# default gas limit. key is chainID. if not set, use 90000 as default.
[Server.DefaultGasLimit]
4 = 90000
46688 = 90000
# config maximum gas limit. key is chainID.
[Server.MaxGasLimit]
4 = 200000
46688 = 90000
# config maximum token gas limit. key is chainID. the last part (USDC here) is tokenID.
[Server.MaxTokenGasLimit.USDC]
4 = 2000000
46688 = 900000
# use fixed gas price (no adjust). key is chainID.
[Server.FixedGasPrice]
4 = "1000000001"
46688 = "1000000001"
# config maximum gas price. key is chainID.
[Server.MaxGasPrice]
4 = "3000000000"
46688 = "3000000000"
# swap nonce passed confirmed interval (seconds). key is chainID.
[Server.NoncePassedConfirmInterval]
4 = 600
46688 = 600
# dynamic fee tx config, the last part (3 here) is chainID
[Server.DynamicFeeTx.3]
PlusGasTipCapPercent = 10
PlusGasFeeCapPercent = 10
BlockCountFeeHistory = 3
MaxGasTipCap = "5000000000"
MaxGasFeeCap = "10000000000"
# how to calc gas price, eg. median (default), first, max, etc.
[Server.CalcGasPriceMethod]
43114 = "first"
# modgodb database connection config
[Server.MongoDB]
# DBURLs is prefered if exists. forbids set both DBURL and DBURLs.
#DBURL = "localhost:27017,localhost:12345"
DBURLs = ["localhost:27017", "localhost:12345"]
DBName = "databasename"
UserName = "username"
Password = "password"
# bridge API service
[Server.APIServer]
# listen port
Port = 11556
# CORS config
AllowedOrigins = []
# Maximum number of requests to limit per second
MaxRequestsLimit = 10
# oracle config (oracle only)
[Oracle]
# report oracle status to this server
ServerAPIAddress = "http://127.0.0.1:11556/rpc"
# don't check server connection
NoCheckServerConnection = false
# check gas token balance
CheckGasTokenBalance = false
[Extra]
# usdc attestation server
AttestationServer = ""
# is swap with permit enabled
EnableSwapWithPermit = false
# force call anySwapInAuto
ForceAnySwapInAuto = false
# for nft swap, add data in swapout log and swapin argument
IsNFTSwapWithData = false
# enalbe parallel swap
EnableParallelSwap = false
# use pending balace to prevent sending tx under not enough balance situation
UsePendingBalance = false
# dont panic in init router
DontPanicInInitRouter = false
# dont check in init router (quick loading)
DontCheckInInitRouter = false
# apecify dynamic fee tx enabled chainids
DynamicFeeTxEnabledChains = ["3"]
# enable check tx block hash for security reason
EnableCheckTxBlockHashChains = ["1285"]
# enable check tx block index for security reason
EnableCheckTxBlockIndexChains = ["1", "56"]
# chains don't use fromChainID from receipt log
DisableUseFromChainIDInReceiptChains = ["1666600000"]
# chains use fast mpc
UseFastMPCChains = ["1001313161554"]
# increase nonce when send tx
IncreaseNonceWhenSendTxChains = ["1"]
# check token balance
CheckTokenBalanceEnabledChains = ["1"]
DontCheckBalanceTokenIDs = ["USDC", "MIM"]
DontCheckTotalSupplyTokenIDs = ["USDC", "MIM"]
DontCheckReceivedTokenIDs = ["USDC", "MIM"]
# ignore apps that does not support anaycall fallback
IgnoreAnycallFallbackAppIDs = ["xxxxxxxxxxx"]
# allow call into router from contract's constructor
AllowCallByConstructor = false
# allow call into router from contract
AllowCallByContract = false
# whether check eip1167 master call by contract
CheckEIP1167Master = false
# min reserve fee. key is chainID. defaults to 1e17 wei
[Extra.MinReserveFee]
4 = 100000000000000000
46688 = 100000000000000000
# min reserve budget. key is chainID. defaults to 1e16 wei
[Extra.MinReserveBudget]
4 = 10000000000000000
46688 = 10000000000000000
# base fee percent, must be in range [-90, 500]. key is dest chainID
[Extra.BaseFeePercent]
4 = 100
46688 = 50
# RPC timeout, key is chainID, value is of seconds (deafults to 5)
[Extra.RPCClientTimeout]
1313161554 = 60
25 = 60
# customs, key is chainID. value is a mapping.
[Extra.Customs.1645027868239]
APIKey = "XXXXXX"
AssetPolicyKey = "xxxxxx"
AppendName = "false"
UseAPI = "true"
# big value whitelist, key is tokenID
[Extra.BigValueWhitelist]
USDC = ["0x1111111111111111111111111111111111111111"]
MIM = ["0x2222222222222222222222222222222222222222"]
# call by contract whitelist, key is chainID
[Extra.CallByContractWhitelist]
4 = [
"0x1111111111111111111111111111111111111111",
"0x2222222222222222222222222222222222222222"
]
# call by contract whitelist of code hash, key is chainID
[Extra.CallByContractCodeHashWhitelist]
4 = [
"0x1111111111111111111111111111111111111111111111111111111111111111"
]
# the last key is chainID
[Extra.LocalChainConfig.2025]
EstimatedGasMustBePositive = true
DontCheckAddressMixedCase = false
[Extra.LocalChainConfig.86]
SmallestGasPriceUnit = 1000000000
IsReswapSupported = false
[Extra.LocalChainConfig.25]
ForbidParallelLoading = true
ForbidSwapoutTokenIDs = ["USDC", "USDT"]
BigValueDiscount = 50
[Extra.LocalChainConfig.1007961752911]
FeeReceiverOnDestChain = "xxxxxx"
ChargeFeeOnDestChain.1000005788241 = ["XXX"]
[Extra.SpecialFlags]
key = "value"
# OnChain config
[OnChain]
# 0: disable, min:600, unit is seconds
ReloadCycle = 0
Contract = "0x3333333333333333333333333333333333333333"
APIAddress = ["http://127.0.0.1:8711", "http://127.0.0.1:8722"]
#WSServers = ["ws://127.0.0.1:7711"]
# Gateways config. key is chainID
[Gateways]
4 = ["http://127.0.0.1:6711", "http://127.0.0.1:6722"]
46688 = ["http://127.0.0.1:8711", "http://127.0.0.1:8722"]
# GatewaysExt config. key is chainID. used for broadcasting tx
[GatewaysExt]
4 = ["http://127.0.0.1:6000"]
46688 = ["http://127.0.0.1:8000"]
#[GRPCGateways]
#1007961752911 = ["XXXXXX"]
# FastMPC config
#[FastMPC]
## ec sign type key
#SignTypeEC256K1 = "EC256K1"
## mpc rpc api prefix
#APIPrefix = "smpc_"
#[FastMPC.DefaultNode]
# MPC config
[MPC]
# ec sign type key
SignTypeEC256K1 = "ECDSA"
# mpc rpc api prefix
APIPrefix = "dcrm_"
# RPC timeout
RPCTimeout = 10
# sign timeout of seconds
SignTimeout = 120
# drop sign group if max sign group consecutive failures (0 means disable)
MaxSignGroupFailures = 0
# min interval to add back sign group (seconds)
MinIntervalToAddSignGroup = 3600
# verify signature in accept sign info
VerifySignatureInAccept = false
# getting accept list loop interval (seconds) in accept job
GetAcceptListLoopInterval = 5
# getting accept list retry interval (seconds) in accept job
GetAcceptListRetryInterval = 3
# getting accept list expired time interval (seconds) in accept job
MaxAcceptSignTimeInterval = 600
# when meet invalid accept, ignore it instead of disagree it immediately
PendingInvalidAccept = false
# mpc group ID
GroupID = "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
# mpc threshold (NeededOracles=2,TotalOracles=3 represent '2/3' threshold)
NeededOracles = 2
TotalOracles = 3
# mpc mode (0:managed 1:private)
Mode = 0
# initiators of mpc sign
Initiators = [
"0x1111111111111111111111111111111111111111"
]
# mpc default node config
[MPC.DefaultNode]
# mpc sub groups for signing (server only)
SignGroups = [
"22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222",
"33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333"
]
# mpc user keystore and password file (suggest using absolute path)
KeystoreFile = "/home/xxx/accounts/keystore1"
PasswordFile = "/home/xxx/accounts/password1"
# mpc backend node (gmpc node RPC address)
RPCAddress = "http://127.0.0.1:2921"