-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDexT1DeploymentLogic.json
514 lines (514 loc) · 284 KB
/
DexT1DeploymentLogic.json
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
{
"address": "0x6779d9D2e8722724bb42328EE905911B64df7a21",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "liquidity_",
"type": "address"
},
{
"internalType": "address",
"name": "dexFactory_",
"type": "address"
},
{
"internalType": "address",
"name": "contractDeployer_",
"type": "address"
},
{
"internalType": "address",
"name": "colOperations_",
"type": "address"
},
{
"internalType": "address",
"name": "debtOperations_",
"type": "address"
},
{
"internalType": "address",
"name": "perfectOperationsAndSwapOut1_",
"type": "address"
},
{
"internalType": "address",
"name": "perfectOperationsAndSwapOut2_",
"type": "address"
},
{
"internalType": "address",
"name": "mainAddress1_",
"type": "address"
},
{
"internalType": "address",
"name": "mainAddress2_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "errorId_",
"type": "uint256"
}
],
"name": "FluidDexError",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "errorId",
"type": "uint256"
}
],
"name": "FluidDexFactoryError",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares_",
"type": "uint256"
}
],
"name": "FluidDexLiquidityOutput",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "token0Amt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "token1Amt",
"type": "uint256"
}
],
"name": "FluidDexPerfectLiquidityOutput",
"type": "error"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "lastStoredPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "centerPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "upperRange",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lowerRange",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "geometricMean",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "supplyToken0ExchangePrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowToken0ExchangePrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "supplyToken1ExchangePrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "borrowToken1ExchangePrice",
"type": "uint256"
}
],
"internalType": "struct Structs.PricesAndExchangePrice",
"name": "pex_",
"type": "tuple"
}
],
"name": "FluidDexPricesAndExchangeRates",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenAmt",
"type": "uint256"
}
],
"name": "FluidDexSingleTokenOutput",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"name": "FluidDexSwapResult",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "dex",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "dexId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "supplyToken",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "borrowToken",
"type": "address"
}
],
"name": "DexT1Deployed",
"type": "event"
},
{
"inputs": [],
"name": "ADDRESS_THIS",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ADMIN_IMPLEMENTATION",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "CONTRACT_DEPLOYER",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DEX_FACTORY",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "LIQUIDITY",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MINI_DEPLOYER",
"outputs": [
{
"internalType": "contract MiniDeployer",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SHIFT_IMPLEMENTATION",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "colOperationsCreationCode",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "debtOperationsCreationCode",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token0_",
"type": "address"
},
{
"internalType": "address",
"name": "token1_",
"type": "address"
},
{
"internalType": "uint256",
"name": "oracleMapping_",
"type": "uint256"
}
],
"name": "dexT1",
"outputs": [
{
"internalType": "bytes",
"name": "dexCreationBytecode_",
"type": "bytes"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "dexT1CreationBytecode",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "perfectOperationsCreationCode",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0x41bee083b6b8ad8005758104e095da136968c32352dc43f22240b20c85acab8e",
"receipt": {
"to": "0x4e59b44847b379578588920cA78FbF26c0B4956C",
"from": "0x0Ed35B1609Ec45c7079E80d11149a52717e4859A",
"contractAddress": null,
"transactionIndex": 120,
"gasUsed": "6396168",
"logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000400020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000200000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000400000000000000000000000000000000200000000000",
"blockHash": "0xcd449030310e56d7bb815fd9ea9121511ca070ffbad386083b872c1e03c15474",
"transactionHash": "0x41bee083b6b8ad8005758104e095da136968c32352dc43f22240b20c85acab8e",
"logs": [
{
"transactionIndex": 120,
"blockNumber": 21094683,
"transactionHash": "0x41bee083b6b8ad8005758104e095da136968c32352dc43f22240b20c85acab8e",
"address": "0xC87dff28B1E34b5e7f35916fC96E411aFd33Bd5d",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000091716c4eda1fb55e84bf8b4c7085f84285c19085"
],
"data": "0x",
"logIndex": 106,
"blockHash": "0xcd449030310e56d7bb815fd9ea9121511ca070ffbad386083b872c1e03c15474"
}
],
"blockNumber": 21094683,
"cumulativeGasUsed": "13349749",
"status": 1,
"byzantium": true
},
"args": [
"0x52Aa899454998Be5b000Ad077a46Bbe360F4e497",
"0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085",
"0x4EC7b668BAF70d4A4b0FC7941a7708A07b6d45Be",
"0xF2eC20b741d7b45C489421EE1782948135616c62",
"0xCF785854E47C33833147A075e1550f1E683e8afe",
"0x1569B2B3e98b8bDb1723a146634fF8012e54176E",
"0x2879d07B9c48EEc6F4B9328CD0d4e56eeF6BF740",
"0x64C702990a9aBDc29F5Ef7A57F192676E90801d8",
"0x87D8E111B4f94B3caBd1A303A55B567D13c34Bc8"
],
"numDeployments": 1,
"solcInputHash": "5ca2ad91017a828e368ec3008a413fcd",
"metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidity_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dexFactory_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"contractDeployer_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"colOperations_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"debtOperations_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"perfectOperationsAndSwapOut1_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"perfectOperationsAndSwapOut2_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"mainAddress1_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"mainAddress2_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorId_\",\"type\":\"uint256\"}],\"name\":\"FluidDexError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"errorId\",\"type\":\"uint256\"}],\"name\":\"FluidDexFactoryError\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares_\",\"type\":\"uint256\"}],\"name\":\"FluidDexLiquidityOutput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"token0Amt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"token1Amt\",\"type\":\"uint256\"}],\"name\":\"FluidDexPerfectLiquidityOutput\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"lastStoredPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"centerPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"upperRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lowerRange\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"geometricMean\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplyToken0ExchangePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowToken0ExchangePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplyToken1ExchangePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowToken1ExchangePrice\",\"type\":\"uint256\"}],\"internalType\":\"struct Structs.PricesAndExchangePrice\",\"name\":\"pex_\",\"type\":\"tuple\"}],\"name\":\"FluidDexPricesAndExchangeRates\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAmt\",\"type\":\"uint256\"}],\"name\":\"FluidDexSingleTokenOutput\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"}],\"name\":\"FluidDexSwapResult\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dex\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dexId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"supplyToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"borrowToken\",\"type\":\"address\"}],\"name\":\"DexT1Deployed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADDRESS_THIS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ADMIN_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"CONTRACT_DEPLOYER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEX_FACTORY\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LIQUIDITY\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINI_DEPLOYER\",\"outputs\":[{\"internalType\":\"contract MiniDeployer\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SHIFT_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"colOperationsCreationCode\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"debtOperationsCreationCode\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token0_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"oracleMapping_\",\"type\":\"uint256\"}],\"name\":\"dexT1\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"dexCreationBytecode_\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dexT1CreationBytecode\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"perfectOperationsCreationCode\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"DexT1Deployed(address,uint256,address,address)\":{\"params\":{\"borrowToken\":\"The address of the borrow token.\",\"dex\":\"The address of the newly deployed dex.\",\"dexId\":\"The id of the newly deployed dex.\",\"supplyToken\":\"The address of the supply token.\"}}},\"kind\":\"dev\",\"methods\":{\"colOperationsCreationCode()\":{\"details\":\"Retrieves the creation code for the FluidDexT1OperationsCol contract\"},\"debtOperationsCreationCode()\":{\"details\":\"Retrieves the creation code for the FluidDexT1OperationsDebt contract\"},\"perfectOperationsCreationCode()\":{\"details\":\"Retrieves the creation code for the FluidDexT1PerfectOperations contract\"}},\"stateVariables\":{\"COL_OPERATIONS_CREATIONCODE_ADDRESS\":{\"details\":\"SSTORE2 pointers for the creation code of various operations contracts\"},\"POOL_T1_CREATIONCODE_ADDRESS_1\":{\"details\":\"SSTORE2 pointer for the PoolT1 creation code. Stored externally to reduce factory bytecode (in 2 parts)\"}},\"version\":1},\"userdoc\":{\"errors\":{\"FluidDexSwapResult(uint256)\":[{\"notice\":\"used to simulate swap to find the output amount\"}]},\"events\":{\"DexT1Deployed(address,uint256,address,address)\":{\"notice\":\"Emitted when a new dexT1 is deployed.\"}},\"kind\":\"user\",\"methods\":{\"ADDRESS_THIS()\":{\"notice\":\"address of this contract\"},\"ADMIN_IMPLEMENTATION()\":{\"notice\":\"address of Admin implementation\"},\"CONTRACT_DEPLOYER()\":{\"notice\":\"address of Deployer Contract\"},\"DEX_FACTORY()\":{\"notice\":\"address of dexfactory contract\"},\"LIQUIDITY()\":{\"notice\":\"address of liquidity contract\"},\"MINI_DEPLOYER()\":{\"notice\":\"address of MiniDeployer Contract\"},\"SHIFT_IMPLEMENTATION()\":{\"notice\":\"address of Shift implementation\"},\"dexT1CreationBytecode()\":{\"notice\":\"returns the stored DexT1 creation bytecode\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/protocols/dex/factory/deploymentLogics/poolT1Logic.sol\":\"FluidDexT1DeploymentLogic\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"contracts/infiniteProxy/interfaces/iProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.21;\\n\\ninterface IProxy {\\n function setAdmin(address newAdmin_) external;\\n\\n function setDummyImplementation(address newDummyImplementation_) external;\\n\\n function addImplementation(address implementation_, bytes4[] calldata sigs_) external;\\n\\n function removeImplementation(address implementation_) external;\\n\\n function getAdmin() external view returns (address);\\n\\n function getDummyImplementation() external view returns (address);\\n\\n function getImplementationSigs(address impl_) external view returns (bytes4[] memory);\\n\\n function getSigsImplementation(bytes4 sig_) external view returns (address);\\n\\n function readFromStorage(bytes32 slot_) external view returns (uint256 result_);\\n}\\n\",\"keccak256\":\"0xbb605491d4bac08e816248feecae7dd17cfc1877c88b2e555abece2970f5ea00\",\"license\":\"MIT\"},\"contracts/libraries/addressCalcs.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\n/// @notice implements calculation of address for contracts deployed through CREATE.\\n/// Accepts contract deployed from which address & nonce\\nlibrary AddressCalcs {\\n\\n /// @notice Computes the address of a contract based\\n /// @param deployedFrom_ Address from which the contract was deployed\\n /// @param nonce_ Nonce at which the contract was deployed\\n /// @return contract_ Address of deployed contract\\n function addressCalc(address deployedFrom_, uint nonce_) internal pure returns (address contract_) {\\n // @dev based on https://ethereum.stackexchange.com/a/61413\\n\\n // nonce of smart contract always starts with 1. so, with nonce 0 there won't be any deployment\\n // hence, nonce of vault deployment starts with 1.\\n bytes memory data;\\n if (nonce_ == 0x00) {\\n return address(0);\\n } else if (nonce_ <= 0x7f) {\\n data = abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployedFrom_, uint8(nonce_));\\n } else if (nonce_ <= 0xff) {\\n data = abi.encodePacked(bytes1(0xd7), bytes1(0x94), deployedFrom_, bytes1(0x81), uint8(nonce_));\\n } else if (nonce_ <= 0xffff) {\\n data = abi.encodePacked(bytes1(0xd8), bytes1(0x94), deployedFrom_, bytes1(0x82), uint16(nonce_));\\n } else if (nonce_ <= 0xffffff) {\\n data = abi.encodePacked(bytes1(0xd9), bytes1(0x94), deployedFrom_, bytes1(0x83), uint24(nonce_));\\n } else {\\n data = abi.encodePacked(bytes1(0xda), bytes1(0x94), deployedFrom_, bytes1(0x84), uint32(nonce_));\\n }\\n\\n return address(uint160(uint256(keccak256(data))));\\n }\\n\\n}\",\"keccak256\":\"0xca389bcfef035463ff43939ac5eccab07ab74cbb053e201541f9bcd846b3105a\",\"license\":\"BUSL-1.1\"},\"contracts/libraries/bigMathMinified.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\n/// @title library that represents a number in BigNumber(coefficient and exponent) format to store in smaller bits.\\n/// @notice the number is divided into two parts: a coefficient and an exponent. This comes at a cost of losing some precision\\n/// at the end of the number because the exponent simply fills it with zeroes. This precision is oftentimes negligible and can\\n/// result in significant gas cost reduction due to storage space reduction.\\n/// Also note, a valid big number is as follows: if the exponent is > 0, then coefficient last bits should be occupied to have max precision.\\n/// @dev roundUp is more like a increase 1, which happens everytime for the same number.\\n/// roundDown simply sets trailing digits after coefficientSize to zero (floor), only once for the same number.\\nlibrary BigMathMinified {\\n /// @dev constants to use for `roundUp` input param to increase readability\\n bool internal constant ROUND_DOWN = false;\\n bool internal constant ROUND_UP = true;\\n\\n /// @dev converts `normal` number to BigNumber with `exponent` and `coefficient` (or precision).\\n /// e.g.:\\n /// 5035703444687813576399599 (normal) = (coefficient[32bits], exponent[8bits])[40bits]\\n /// 5035703444687813576399599 (decimal) => 10000101010010110100000011111011110010100110100000000011100101001101001101011101111 (binary)\\n /// => 10000101010010110100000011111011000000000000000000000000000000000000000000000000000\\n /// ^-------------------- 51(exponent) -------------- ^\\n /// coefficient = 1000,0101,0100,1011,0100,0000,1111,1011 (2236301563)\\n /// exponent = 0011,0011 (51)\\n /// bigNumber = 1000,0101,0100,1011,0100,0000,1111,1011,0011,0011 (572493200179)\\n ///\\n /// @param normal number which needs to be converted into Big Number\\n /// @param coefficientSize at max how many bits of precision there should be (64 = uint64 (64 bits precision))\\n /// @param exponentSize at max how many bits of exponent there should be (8 = uint8 (8 bits exponent))\\n /// @param roundUp signals if result should be rounded down or up\\n /// @return bigNumber converted bigNumber (coefficient << exponent)\\n function toBigNumber(\\n uint256 normal,\\n uint256 coefficientSize,\\n uint256 exponentSize,\\n bool roundUp\\n ) internal pure returns (uint256 bigNumber) {\\n assembly {\\n let lastBit_\\n let number_ := normal\\n if gt(number_, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {\\n number_ := shr(0x80, number_)\\n lastBit_ := 0x80\\n }\\n if gt(number_, 0xFFFFFFFFFFFFFFFF) {\\n number_ := shr(0x40, number_)\\n lastBit_ := add(lastBit_, 0x40)\\n }\\n if gt(number_, 0xFFFFFFFF) {\\n number_ := shr(0x20, number_)\\n lastBit_ := add(lastBit_, 0x20)\\n }\\n if gt(number_, 0xFFFF) {\\n number_ := shr(0x10, number_)\\n lastBit_ := add(lastBit_, 0x10)\\n }\\n if gt(number_, 0xFF) {\\n number_ := shr(0x8, number_)\\n lastBit_ := add(lastBit_, 0x8)\\n }\\n if gt(number_, 0xF) {\\n number_ := shr(0x4, number_)\\n lastBit_ := add(lastBit_, 0x4)\\n }\\n if gt(number_, 0x3) {\\n number_ := shr(0x2, number_)\\n lastBit_ := add(lastBit_, 0x2)\\n }\\n if gt(number_, 0x1) {\\n lastBit_ := add(lastBit_, 1)\\n }\\n if gt(number_, 0) {\\n lastBit_ := add(lastBit_, 1)\\n }\\n if lt(lastBit_, coefficientSize) {\\n // for throw exception\\n lastBit_ := coefficientSize\\n }\\n let exponent := sub(lastBit_, coefficientSize)\\n let coefficient := shr(exponent, normal)\\n if and(roundUp, gt(exponent, 0)) {\\n // rounding up is only needed if exponent is > 0, as otherwise the coefficient fully holds the original number\\n coefficient := add(coefficient, 1)\\n if eq(shl(coefficientSize, 1), coefficient) {\\n // case were coefficient was e.g. 111, with adding 1 it became 1000 (in binary) and coefficientSize 3 bits\\n // final coefficient would exceed it's size. -> reduce coefficent to 100 and increase exponent by 1.\\n coefficient := shl(sub(coefficientSize, 1), 1)\\n exponent := add(exponent, 1)\\n }\\n }\\n if iszero(lt(exponent, shl(exponentSize, 1))) {\\n // if exponent is >= exponentSize, the normal number is too big to fit within\\n // BigNumber with too small sizes for coefficient and exponent\\n revert(0, 0)\\n }\\n bigNumber := shl(exponentSize, coefficient)\\n bigNumber := add(bigNumber, exponent)\\n }\\n }\\n\\n /// @dev get `normal` number from `bigNumber`, `exponentSize` and `exponentMask`\\n function fromBigNumber(\\n uint256 bigNumber,\\n uint256 exponentSize,\\n uint256 exponentMask\\n ) internal pure returns (uint256 normal) {\\n assembly {\\n let coefficient := shr(exponentSize, bigNumber)\\n let exponent := and(bigNumber, exponentMask)\\n normal := shl(exponent, coefficient)\\n }\\n }\\n\\n /// @dev gets the most significant bit `lastBit` of a `normal` number (length of given number of binary format).\\n /// e.g.\\n /// 5035703444687813576399599 = 10000101010010110100000011111011110010100110100000000011100101001101001101011101111\\n /// lastBit = ^--------------------------------- 83 ----------------------------------------^\\n function mostSignificantBit(uint256 normal) internal pure returns (uint lastBit) {\\n assembly {\\n let number_ := normal\\n if gt(normal, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {\\n number_ := shr(0x80, number_)\\n lastBit := 0x80\\n }\\n if gt(number_, 0xFFFFFFFFFFFFFFFF) {\\n number_ := shr(0x40, number_)\\n lastBit := add(lastBit, 0x40)\\n }\\n if gt(number_, 0xFFFFFFFF) {\\n number_ := shr(0x20, number_)\\n lastBit := add(lastBit, 0x20)\\n }\\n if gt(number_, 0xFFFF) {\\n number_ := shr(0x10, number_)\\n lastBit := add(lastBit, 0x10)\\n }\\n if gt(number_, 0xFF) {\\n number_ := shr(0x8, number_)\\n lastBit := add(lastBit, 0x8)\\n }\\n if gt(number_, 0xF) {\\n number_ := shr(0x4, number_)\\n lastBit := add(lastBit, 0x4)\\n }\\n if gt(number_, 0x3) {\\n number_ := shr(0x2, number_)\\n lastBit := add(lastBit, 0x2)\\n }\\n if gt(number_, 0x1) {\\n lastBit := add(lastBit, 1)\\n }\\n if gt(number_, 0) {\\n lastBit := add(lastBit, 1)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf0be1002909edf30aec3dc6623c2bd2407ed94064b62674c01032b844dec206a\",\"license\":\"BUSL-1.1\"},\"contracts/libraries/bytesSliceAndConcat.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nlibrary BytesSliceAndConcat {\\n // @dev taken from https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol\\n function bytesConcat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n ) internal pure returns (bytes memory tempBytes) {\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n // @dev taken from https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol\\n function bytesSlice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n ) internal pure returns (bytes memory tempBytes) {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n}\\n\",\"keccak256\":\"0x42966896926a24dc7645ebf4679e6d701cb991144ef4d710d87738165d4024c7\",\"license\":\"BUSL-1.1\"},\"contracts/libraries/dexSlotsLink.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\n/// @notice library that helps in reading / working with storage slot data of Fluid Dex.\\n/// @dev as all data for Fluid Dex is internal, any data must be fetched directly through manual\\n/// slot reading through this library or, if gas usage is less important, through the FluidDexResolver.\\nlibrary DexSlotsLink {\\n /// @dev storage slot for variables at Dex\\n uint256 internal constant DEX_VARIABLES_SLOT = 0;\\n /// @dev storage slot for variables2 at Dex\\n uint256 internal constant DEX_VARIABLES2_SLOT = 1;\\n /// @dev storage slot for total supply shares at Dex\\n uint256 internal constant DEX_TOTAL_SUPPLY_SHARES_SLOT = 2;\\n /// @dev storage slot for user supply mapping at Dex\\n uint256 internal constant DEX_USER_SUPPLY_MAPPING_SLOT = 3;\\n /// @dev storage slot for total borrow shares at Dex\\n uint256 internal constant DEX_TOTAL_BORROW_SHARES_SLOT = 4;\\n /// @dev storage slot for user borrow mapping at Dex\\n uint256 internal constant DEX_USER_BORROW_MAPPING_SLOT = 5;\\n /// @dev storage slot for oracle mapping at Dex\\n uint256 internal constant DEX_ORACLE_MAPPING_SLOT = 6;\\n /// @dev storage slot for range and threshold shifts at Dex\\n uint256 internal constant DEX_RANGE_THRESHOLD_SHIFTS_SLOT = 7;\\n /// @dev storage slot for center price shift at Dex\\n uint256 internal constant DEX_CENTER_PRICE_SHIFT_SLOT = 8;\\n\\n // --------------------------------\\n // @dev stacked uint256 storage slots bits position data for each:\\n\\n // UserSupplyData\\n uint256 internal constant BITS_USER_SUPPLY_ALLOWED = 0;\\n uint256 internal constant BITS_USER_SUPPLY_AMOUNT = 1;\\n uint256 internal constant BITS_USER_SUPPLY_PREVIOUS_WITHDRAWAL_LIMIT = 65;\\n uint256 internal constant BITS_USER_SUPPLY_LAST_UPDATE_TIMESTAMP = 129;\\n uint256 internal constant BITS_USER_SUPPLY_EXPAND_PERCENT = 162;\\n uint256 internal constant BITS_USER_SUPPLY_EXPAND_DURATION = 176;\\n uint256 internal constant BITS_USER_SUPPLY_BASE_WITHDRAWAL_LIMIT = 200;\\n\\n // UserBorrowData\\n uint256 internal constant BITS_USER_BORROW_ALLOWED = 0;\\n uint256 internal constant BITS_USER_BORROW_AMOUNT = 1;\\n uint256 internal constant BITS_USER_BORROW_PREVIOUS_BORROW_LIMIT = 65;\\n uint256 internal constant BITS_USER_BORROW_LAST_UPDATE_TIMESTAMP = 129;\\n uint256 internal constant BITS_USER_BORROW_EXPAND_PERCENT = 162;\\n uint256 internal constant BITS_USER_BORROW_EXPAND_DURATION = 176;\\n uint256 internal constant BITS_USER_BORROW_BASE_BORROW_LIMIT = 200;\\n uint256 internal constant BITS_USER_BORROW_MAX_BORROW_LIMIT = 218;\\n\\n // --------------------------------\\n\\n /// @notice Calculating the slot ID for Dex contract for single mapping at `slot_` for `key_`\\n function calculateMappingStorageSlot(uint256 slot_, address key_) internal pure returns (bytes32) {\\n return keccak256(abi.encode(key_, slot_));\\n }\\n\\n /// @notice Calculating the slot ID for Dex contract for double mapping at `slot_` for `key1_` and `key2_`\\n function calculateDoubleMappingStorageSlot(\\n uint256 slot_,\\n address key1_,\\n address key2_\\n ) internal pure returns (bytes32) {\\n bytes32 intermediateSlot_ = keccak256(abi.encode(key1_, slot_));\\n return keccak256(abi.encode(key2_, intermediateSlot_));\\n }\\n}\\n\",\"keccak256\":\"0xf1d6550d83fb0155a26655234922c9bdf4a1bbcf7a3ca767e9123d367a795307\",\"license\":\"BUSL-1.1\"},\"contracts/libraries/errorTypes.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nlibrary LibsErrorTypes {\\n /***********************************|\\n | LiquidityCalcs | \\n |__________________________________*/\\n\\n /// @notice thrown when supply or borrow exchange price is zero at calc token data (token not configured yet)\\n uint256 internal constant LiquidityCalcs__ExchangePriceZero = 70001;\\n\\n /// @notice thrown when rate data is set to a version that is not implemented\\n uint256 internal constant LiquidityCalcs__UnsupportedRateVersion = 70002;\\n\\n /// @notice thrown when the calculated borrow rate turns negative. This should never happen.\\n uint256 internal constant LiquidityCalcs__BorrowRateNegative = 70003;\\n\\n /***********************************|\\n | SafeTransfer | \\n |__________________________________*/\\n\\n /// @notice thrown when safe transfer from for an ERC20 fails\\n uint256 internal constant SafeTransfer__TransferFromFailed = 71001;\\n\\n /// @notice thrown when safe transfer for an ERC20 fails\\n uint256 internal constant SafeTransfer__TransferFailed = 71002;\\n}\\n\",\"keccak256\":\"0xaf7732f30d00dd38082d37aa37887be485fc94b0c76ff302aff615d03381674f\",\"license\":\"BUSL-1.1\"},\"contracts/libraries/liquiditySlotsLink.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\n/// @notice library that helps in reading / working with storage slot data of Fluid Liquidity.\\n/// @dev as all data for Fluid Liquidity is internal, any data must be fetched directly through manual\\n/// slot reading through this library or, if gas usage is less important, through the FluidLiquidityResolver.\\nlibrary LiquiditySlotsLink {\\n /// @dev storage slot for status at Liquidity\\n uint256 internal constant LIQUIDITY_STATUS_SLOT = 1;\\n /// @dev storage slot for auths mapping at Liquidity\\n uint256 internal constant LIQUIDITY_AUTHS_MAPPING_SLOT = 2;\\n /// @dev storage slot for guardians mapping at Liquidity\\n uint256 internal constant LIQUIDITY_GUARDIANS_MAPPING_SLOT = 3;\\n /// @dev storage slot for user class mapping at Liquidity\\n uint256 internal constant LIQUIDITY_USER_CLASS_MAPPING_SLOT = 4;\\n /// @dev storage slot for exchangePricesAndConfig mapping at Liquidity\\n uint256 internal constant LIQUIDITY_EXCHANGE_PRICES_MAPPING_SLOT = 5;\\n /// @dev storage slot for rateData mapping at Liquidity\\n uint256 internal constant LIQUIDITY_RATE_DATA_MAPPING_SLOT = 6;\\n /// @dev storage slot for totalAmounts mapping at Liquidity\\n uint256 internal constant LIQUIDITY_TOTAL_AMOUNTS_MAPPING_SLOT = 7;\\n /// @dev storage slot for user supply double mapping at Liquidity\\n uint256 internal constant LIQUIDITY_USER_SUPPLY_DOUBLE_MAPPING_SLOT = 8;\\n /// @dev storage slot for user borrow double mapping at Liquidity\\n uint256 internal constant LIQUIDITY_USER_BORROW_DOUBLE_MAPPING_SLOT = 9;\\n /// @dev storage slot for listed tokens array at Liquidity\\n uint256 internal constant LIQUIDITY_LISTED_TOKENS_ARRAY_SLOT = 10;\\n /// @dev storage slot for listed tokens array at Liquidity\\n uint256 internal constant LIQUIDITY_CONFIGS2_MAPPING_SLOT = 11;\\n\\n // --------------------------------\\n // @dev stacked uint256 storage slots bits position data for each:\\n\\n // ExchangePricesAndConfig\\n uint256 internal constant BITS_EXCHANGE_PRICES_BORROW_RATE = 0;\\n uint256 internal constant BITS_EXCHANGE_PRICES_FEE = 16;\\n uint256 internal constant BITS_EXCHANGE_PRICES_UTILIZATION = 30;\\n uint256 internal constant BITS_EXCHANGE_PRICES_UPDATE_THRESHOLD = 44;\\n uint256 internal constant BITS_EXCHANGE_PRICES_LAST_TIMESTAMP = 58;\\n uint256 internal constant BITS_EXCHANGE_PRICES_SUPPLY_EXCHANGE_PRICE = 91;\\n uint256 internal constant BITS_EXCHANGE_PRICES_BORROW_EXCHANGE_PRICE = 155;\\n uint256 internal constant BITS_EXCHANGE_PRICES_SUPPLY_RATIO = 219;\\n uint256 internal constant BITS_EXCHANGE_PRICES_BORROW_RATIO = 234;\\n uint256 internal constant BITS_EXCHANGE_PRICES_USES_CONFIGS2 = 249;\\n\\n // RateData:\\n uint256 internal constant BITS_RATE_DATA_VERSION = 0;\\n // RateData: V1\\n uint256 internal constant BITS_RATE_DATA_V1_RATE_AT_UTILIZATION_ZERO = 4;\\n uint256 internal constant BITS_RATE_DATA_V1_UTILIZATION_AT_KINK = 20;\\n uint256 internal constant BITS_RATE_DATA_V1_RATE_AT_UTILIZATION_KINK = 36;\\n uint256 internal constant BITS_RATE_DATA_V1_RATE_AT_UTILIZATION_MAX = 52;\\n // RateData: V2\\n uint256 internal constant BITS_RATE_DATA_V2_RATE_AT_UTILIZATION_ZERO = 4;\\n uint256 internal constant BITS_RATE_DATA_V2_UTILIZATION_AT_KINK1 = 20;\\n uint256 internal constant BITS_RATE_DATA_V2_RATE_AT_UTILIZATION_KINK1 = 36;\\n uint256 internal constant BITS_RATE_DATA_V2_UTILIZATION_AT_KINK2 = 52;\\n uint256 internal constant BITS_RATE_DATA_V2_RATE_AT_UTILIZATION_KINK2 = 68;\\n uint256 internal constant BITS_RATE_DATA_V2_RATE_AT_UTILIZATION_MAX = 84;\\n\\n // TotalAmounts\\n uint256 internal constant BITS_TOTAL_AMOUNTS_SUPPLY_WITH_INTEREST = 0;\\n uint256 internal constant BITS_TOTAL_AMOUNTS_SUPPLY_INTEREST_FREE = 64;\\n uint256 internal constant BITS_TOTAL_AMOUNTS_BORROW_WITH_INTEREST = 128;\\n uint256 internal constant BITS_TOTAL_AMOUNTS_BORROW_INTEREST_FREE = 192;\\n\\n // UserSupplyData\\n uint256 internal constant BITS_USER_SUPPLY_MODE = 0;\\n uint256 internal constant BITS_USER_SUPPLY_AMOUNT = 1;\\n uint256 internal constant BITS_USER_SUPPLY_PREVIOUS_WITHDRAWAL_LIMIT = 65;\\n uint256 internal constant BITS_USER_SUPPLY_LAST_UPDATE_TIMESTAMP = 129;\\n uint256 internal constant BITS_USER_SUPPLY_EXPAND_PERCENT = 162;\\n uint256 internal constant BITS_USER_SUPPLY_EXPAND_DURATION = 176;\\n uint256 internal constant BITS_USER_SUPPLY_BASE_WITHDRAWAL_LIMIT = 200;\\n uint256 internal constant BITS_USER_SUPPLY_IS_PAUSED = 255;\\n\\n // UserBorrowData\\n uint256 internal constant BITS_USER_BORROW_MODE = 0;\\n uint256 internal constant BITS_USER_BORROW_AMOUNT = 1;\\n uint256 internal constant BITS_USER_BORROW_PREVIOUS_BORROW_LIMIT = 65;\\n uint256 internal constant BITS_USER_BORROW_LAST_UPDATE_TIMESTAMP = 129;\\n uint256 internal constant BITS_USER_BORROW_EXPAND_PERCENT = 162;\\n uint256 internal constant BITS_USER_BORROW_EXPAND_DURATION = 176;\\n uint256 internal constant BITS_USER_BORROW_BASE_BORROW_LIMIT = 200;\\n uint256 internal constant BITS_USER_BORROW_MAX_BORROW_LIMIT = 218;\\n uint256 internal constant BITS_USER_BORROW_IS_PAUSED = 255;\\n\\n // Configs2\\n uint256 internal constant BITS_CONFIGS2_MAX_UTILIZATION = 0;\\n\\n // --------------------------------\\n\\n /// @notice Calculating the slot ID for Liquidity contract for single mapping at `slot_` for `key_`\\n function calculateMappingStorageSlot(uint256 slot_, address key_) internal pure returns (bytes32) {\\n return keccak256(abi.encode(key_, slot_));\\n }\\n\\n /// @notice Calculating the slot ID for Liquidity contract for double mapping at `slot_` for `key1_` and `key2_`\\n function calculateDoubleMappingStorageSlot(\\n uint256 slot_,\\n address key1_,\\n address key2_\\n ) internal pure returns (bytes32) {\\n bytes32 intermediateSlot_ = keccak256(abi.encode(key1_, slot_));\\n return keccak256(abi.encode(key2_, intermediateSlot_));\\n }\\n}\\n\",\"keccak256\":\"0x0ae3e1d231bb6c14b54fc1f5ffa306edc0ac827a6a92279c77c0c09627fe08ae\",\"license\":\"BUSL-1.1\"},\"contracts/libraries/safeTransfer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity 0.8.21;\\n\\nimport { LibsErrorTypes as ErrorTypes } from \\\"./errorTypes.sol\\\";\\n\\n/// @notice provides minimalistic methods for safe transfers, e.g. ERC20 safeTransferFrom\\nlibrary SafeTransfer {\\n uint256 internal constant MAX_NATIVE_TRANSFER_GAS = 20000; // pass max. 20k gas for native transfers\\n\\n error FluidSafeTransferError(uint256 errorId_);\\n\\n /// @dev Transfer `amount_` of `token_` from `from_` to `to_`, spending the approval given by `from_` to the\\n /// calling contract. If `token_` returns no value, non-reverting calls are assumed to be successful.\\n /// Minimally modified from Solmate SafeTransferLib (address as input param for token, Custom Error):\\n /// https://github.com/transmissions11/solmate/blob/50e15bb566f98b7174da9b0066126a4c3e75e0fd/src/utils/SafeTransferLib.sol#L31-L63\\n function safeTransferFrom(address token_, address from_, address to_, uint256 amount_) internal {\\n bool success_;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Get a pointer to some free memory.\\n let freeMemoryPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)\\n mstore(add(freeMemoryPointer, 4), and(from_, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"from_\\\" argument.\\n mstore(add(freeMemoryPointer, 36), and(to_, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to_\\\" argument.\\n mstore(add(freeMemoryPointer, 68), amount_) // Append the \\\"amount_\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success_ := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.\\n // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.\\n // Counterintuitively, this call must be positioned second to the or() call in the\\n // surrounding and() call or else returndatasize() will be zero during the computation.\\n call(gas(), token_, 0, freeMemoryPointer, 100, 0, 32)\\n )\\n }\\n\\n if (!success_) {\\n revert FluidSafeTransferError(ErrorTypes.SafeTransfer__TransferFromFailed);\\n }\\n }\\n\\n /// @dev Transfer `amount_` of `token_` to `to_`.\\n /// If `token_` returns no value, non-reverting calls are assumed to be successful.\\n /// Minimally modified from Solmate SafeTransferLib (address as input param for token, Custom Error):\\n /// https://github.com/transmissions11/solmate/blob/50e15bb566f98b7174da9b0066126a4c3e75e0fd/src/utils/SafeTransferLib.sol#L65-L95\\n function safeTransfer(address token_, address to_, uint256 amount_) internal {\\n bool success_;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Get a pointer to some free memory.\\n let freeMemoryPointer := mload(0x40)\\n\\n // Write the abi-encoded calldata into memory, beginning with the function selector.\\n mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)\\n mstore(add(freeMemoryPointer, 4), and(to_, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the \\\"to_\\\" argument.\\n mstore(add(freeMemoryPointer, 36), amount_) // Append the \\\"amount_\\\" argument. Masking not required as it's a full 32 byte type.\\n\\n success_ := and(\\n // Set success to whether the call reverted, if not we check it either\\n // returned exactly 1 (can't just be non-zero data), or had no return data.\\n or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),\\n // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.\\n // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.\\n // Counterintuitively, this call must be positioned second to the or() call in the\\n // surrounding and() call or else returndatasize() will be zero during the computation.\\n call(gas(), token_, 0, freeMemoryPointer, 68, 0, 32)\\n )\\n }\\n\\n if (!success_) {\\n revert FluidSafeTransferError(ErrorTypes.SafeTransfer__TransferFailed);\\n }\\n }\\n\\n /// @dev Transfer `amount_` of ` native token to `to_`.\\n /// Minimally modified from Solmate SafeTransferLib (Custom Error):\\n /// https://github.com/transmissions11/solmate/blob/50e15bb566f98b7174da9b0066126a4c3e75e0fd/src/utils/SafeTransferLib.sol#L15-L25\\n function safeTransferNative(address to_, uint256 amount_) internal {\\n bool success_;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Transfer the ETH and store if it succeeded or not. Pass limited gas\\n success_ := call(MAX_NATIVE_TRANSFER_GAS, to_, amount_, 0, 0, 0, 0)\\n }\\n\\n if (!success_) {\\n revert FluidSafeTransferError(ErrorTypes.SafeTransfer__TransferFailed);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7f7d3a39d984c62e41c669a3d11deb899b3512ace9313263592575bf48a6e079\",\"license\":\"MIT OR Apache-2.0\"},\"contracts/libraries/storageRead.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\n/// @notice implements a method to read uint256 data from storage at a bytes32 storage slot key.\\ncontract StorageRead {\\n function readFromStorage(bytes32 slot_) public view returns (uint256 result_) {\\n assembly {\\n result_ := sload(slot_) // read value from the storage slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1b03dfe294c2f0376f7e34c3960fe7088d7ff44bb2ffd9cb2ac940486bfba8c9\",\"license\":\"BUSL-1.1\"},\"contracts/liquidity/adminModule/structs.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nabstract contract Structs {\\n struct AddressBool {\\n address addr;\\n bool value;\\n }\\n\\n struct AddressUint256 {\\n address addr;\\n uint256 value;\\n }\\n\\n /// @notice struct to set borrow rate data for version 1\\n struct RateDataV1Params {\\n ///\\n /// @param token for rate data\\n address token;\\n ///\\n /// @param kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100\\n /// utilization below kink usually means slow increase in rate, once utilization is above kink borrow rate increases fast\\n uint256 kink;\\n ///\\n /// @param rateAtUtilizationZero desired borrow rate when utilization is zero. in 1e2: 100% = 10_000; 1% = 100\\n /// i.e. constant minimum borrow rate\\n /// e.g. at utilization = 0.01% rate could still be at least 4% (rateAtUtilizationZero would be 400 then)\\n uint256 rateAtUtilizationZero;\\n ///\\n /// @param rateAtUtilizationKink borrow rate when utilization is at kink. in 1e2: 100% = 10_000; 1% = 100\\n /// e.g. when rate should be 7% at kink then rateAtUtilizationKink would be 700\\n uint256 rateAtUtilizationKink;\\n ///\\n /// @param rateAtUtilizationMax borrow rate when utilization is maximum at 100%. in 1e2: 100% = 10_000; 1% = 100\\n /// e.g. when rate should be 125% at 100% then rateAtUtilizationMax would be 12_500\\n uint256 rateAtUtilizationMax;\\n }\\n\\n /// @notice struct to set borrow rate data for version 2\\n struct RateDataV2Params {\\n ///\\n /// @param token for rate data\\n address token;\\n ///\\n /// @param kink1 first kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100\\n /// utilization below kink 1 usually means slow increase in rate, once utilization is above kink 1 borrow rate increases faster\\n uint256 kink1;\\n ///\\n /// @param kink2 second kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100\\n /// utilization below kink 2 usually means slow / medium increase in rate, once utilization is above kink 2 borrow rate increases fast\\n uint256 kink2;\\n ///\\n /// @param rateAtUtilizationZero desired borrow rate when utilization is zero. in 1e2: 100% = 10_000; 1% = 100\\n /// i.e. constant minimum borrow rate\\n /// e.g. at utilization = 0.01% rate could still be at least 4% (rateAtUtilizationZero would be 400 then)\\n uint256 rateAtUtilizationZero;\\n ///\\n /// @param rateAtUtilizationKink1 desired borrow rate when utilization is at first kink. in 1e2: 100% = 10_000; 1% = 100\\n /// e.g. when rate should be 7% at first kink then rateAtUtilizationKink would be 700\\n uint256 rateAtUtilizationKink1;\\n ///\\n /// @param rateAtUtilizationKink2 desired borrow rate when utilization is at second kink. in 1e2: 100% = 10_000; 1% = 100\\n /// e.g. when rate should be 7% at second kink then rateAtUtilizationKink would be 1_200\\n uint256 rateAtUtilizationKink2;\\n ///\\n /// @param rateAtUtilizationMax desired borrow rate when utilization is maximum at 100%. in 1e2: 100% = 10_000; 1% = 100\\n /// e.g. when rate should be 125% at 100% then rateAtUtilizationMax would be 12_500\\n uint256 rateAtUtilizationMax;\\n }\\n\\n /// @notice struct to set token config\\n struct TokenConfig {\\n ///\\n /// @param token address\\n address token;\\n ///\\n /// @param fee charges on borrower's interest. in 1e2: 100% = 10_000; 1% = 100\\n uint256 fee;\\n ///\\n /// @param threshold on when to update the storage slot. in 1e2: 100% = 10_000; 1% = 100\\n uint256 threshold;\\n ///\\n /// @param maxUtilization maximum allowed utilization. in 1e2: 100% = 10_000; 1% = 100\\n /// set to 100% to disable and have default limit of 100% (avoiding SLOAD).\\n uint256 maxUtilization;\\n }\\n\\n /// @notice struct to set user supply & withdrawal config\\n struct UserSupplyConfig {\\n ///\\n /// @param user address\\n address user;\\n ///\\n /// @param token address\\n address token;\\n ///\\n /// @param mode: 0 = without interest. 1 = with interest\\n uint8 mode;\\n ///\\n /// @param expandPercent withdrawal limit expand percent. in 1e2: 100% = 10_000; 1% = 100\\n /// Also used to calculate rate at which withdrawal limit should decrease (instant).\\n uint256 expandPercent;\\n ///\\n /// @param expandDuration withdrawal limit expand duration in seconds.\\n /// used to calculate rate together with expandPercent\\n uint256 expandDuration;\\n ///\\n /// @param baseWithdrawalLimit base limit, below this, user can withdraw the entire amount.\\n /// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:\\n /// with interest -> raw, without interest -> normal\\n uint256 baseWithdrawalLimit;\\n }\\n\\n /// @notice struct to set user borrow & payback config\\n struct UserBorrowConfig {\\n ///\\n /// @param user address\\n address user;\\n ///\\n /// @param token address\\n address token;\\n ///\\n /// @param mode: 0 = without interest. 1 = with interest\\n uint8 mode;\\n ///\\n /// @param expandPercent debt limit expand percent. in 1e2: 100% = 10_000; 1% = 100\\n /// Also used to calculate rate at which debt limit should decrease (instant).\\n uint256 expandPercent;\\n ///\\n /// @param expandDuration debt limit expand duration in seconds.\\n /// used to calculate rate together with expandPercent\\n uint256 expandDuration;\\n ///\\n /// @param baseDebtCeiling base borrow limit. until here, borrow limit remains as baseDebtCeiling\\n /// (user can borrow until this point at once without stepped expansion). Above this, automated limit comes in place.\\n /// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:\\n /// with interest -> raw, without interest -> normal\\n uint256 baseDebtCeiling;\\n ///\\n /// @param maxDebtCeiling max borrow ceiling, maximum amount the user can borrow.\\n /// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:\\n /// with interest -> raw, without interest -> normal\\n uint256 maxDebtCeiling;\\n }\\n}\\n\",\"keccak256\":\"0x10353c70015f27b880125cefab806dbed24a4458f187da66964f3ef60488f757\",\"license\":\"BUSL-1.1\"},\"contracts/liquidity/interfaces/iLiquidity.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.21;\\n\\nimport { IProxy } from \\\"../../infiniteProxy/interfaces/iProxy.sol\\\";\\nimport { Structs as AdminModuleStructs } from \\\"../adminModule/structs.sol\\\";\\n\\ninterface IFluidLiquidityAdmin {\\n /// @notice adds/removes auths. Auths generally could be contracts which can have restricted actions defined on contract.\\n /// auths can be helpful in reducing governance overhead where it's not needed.\\n /// @param authsStatus_ array of structs setting allowed status for an address.\\n /// status true => add auth, false => remove auth\\n function updateAuths(AdminModuleStructs.AddressBool[] calldata authsStatus_) external;\\n\\n /// @notice adds/removes guardians. Only callable by Governance.\\n /// @param guardiansStatus_ array of structs setting allowed status for an address.\\n /// status true => add guardian, false => remove guardian\\n function updateGuardians(AdminModuleStructs.AddressBool[] calldata guardiansStatus_) external;\\n\\n /// @notice changes the revenue collector address (contract that is sent revenue). Only callable by Governance.\\n /// @param revenueCollector_ new revenue collector address\\n function updateRevenueCollector(address revenueCollector_) external;\\n\\n /// @notice changes current status, e.g. for pausing or unpausing all user operations. Only callable by Auths.\\n /// @param newStatus_ new status\\n /// status = 2 -> pause, status = 1 -> resume.\\n function changeStatus(uint256 newStatus_) external;\\n\\n /// @notice update tokens rate data version 1. Only callable by Auths.\\n /// @param tokensRateData_ array of RateDataV1Params with rate data to set for each token\\n function updateRateDataV1s(AdminModuleStructs.RateDataV1Params[] calldata tokensRateData_) external;\\n\\n /// @notice update tokens rate data version 2. Only callable by Auths.\\n /// @param tokensRateData_ array of RateDataV2Params with rate data to set for each token\\n function updateRateDataV2s(AdminModuleStructs.RateDataV2Params[] calldata tokensRateData_) external;\\n\\n /// @notice updates token configs: fee charge on borrowers interest & storage update utilization threshold.\\n /// Only callable by Auths.\\n /// @param tokenConfigs_ contains token address, fee & utilization threshold\\n function updateTokenConfigs(AdminModuleStructs.TokenConfig[] calldata tokenConfigs_) external;\\n\\n /// @notice updates user classes: 0 is for new protocols, 1 is for established protocols.\\n /// Only callable by Auths.\\n /// @param userClasses_ struct array of uint256 value to assign for each user address\\n function updateUserClasses(AdminModuleStructs.AddressUint256[] calldata userClasses_) external;\\n\\n /// @notice sets user supply configs per token basis. Eg: with interest or interest-free and automated limits.\\n /// Only callable by Auths.\\n /// @param userSupplyConfigs_ struct array containing user supply config, see `UserSupplyConfig` struct for more info\\n function updateUserSupplyConfigs(AdminModuleStructs.UserSupplyConfig[] memory userSupplyConfigs_) external;\\n\\n /// @notice sets a new withdrawal limit as the current limit for a certain user\\n /// @param user_ user address for which to update the withdrawal limit\\n /// @param token_ token address for which to update the withdrawal limit\\n /// @param newLimit_ new limit until which user supply can decrease to.\\n /// Important: input in raw. Must account for exchange price in input param calculation.\\n /// Note any limit that is < max expansion or > current user supply will set max expansion limit or\\n /// current user supply as limit respectively.\\n /// - set 0 to make maximum possible withdrawable: instant full expansion, and if that goes\\n /// below base limit then fully down to 0.\\n /// - set type(uint256).max to make current withdrawable 0 (sets current user supply as limit).\\n function updateUserWithdrawalLimit(address user_, address token_, uint256 newLimit_) external;\\n\\n /// @notice setting user borrow configs per token basis. Eg: with interest or interest-free and automated limits.\\n /// Only callable by Auths.\\n /// @param userBorrowConfigs_ struct array containing user borrow config, see `UserBorrowConfig` struct for more info\\n function updateUserBorrowConfigs(AdminModuleStructs.UserBorrowConfig[] memory userBorrowConfigs_) external;\\n\\n /// @notice pause operations for a particular user in class 0 (class 1 users can't be paused by guardians).\\n /// Only callable by Guardians.\\n /// @param user_ address of user to pause operations for\\n /// @param supplyTokens_ token addresses to pause withdrawals for\\n /// @param borrowTokens_ token addresses to pause borrowings for\\n function pauseUser(address user_, address[] calldata supplyTokens_, address[] calldata borrowTokens_) external;\\n\\n /// @notice unpause operations for a particular user in class 0 (class 1 users can't be paused by guardians).\\n /// Only callable by Guardians.\\n /// @param user_ address of user to unpause operations for\\n /// @param supplyTokens_ token addresses to unpause withdrawals for\\n /// @param borrowTokens_ token addresses to unpause borrowings for\\n function unpauseUser(address user_, address[] calldata supplyTokens_, address[] calldata borrowTokens_) external;\\n\\n /// @notice collects revenue for tokens to configured revenueCollector address.\\n /// @param tokens_ array of tokens to collect revenue for\\n /// @dev Note that this can revert if token balance is < revenueAmount (utilization > 100%)\\n function collectRevenue(address[] calldata tokens_) external;\\n\\n /// @notice gets the current updated exchange prices for n tokens and updates all prices, rates related data in storage.\\n /// @param tokens_ tokens to update exchange prices for\\n /// @return supplyExchangePrices_ new supply rates of overall system for each token\\n /// @return borrowExchangePrices_ new borrow rates of overall system for each token\\n function updateExchangePrices(\\n address[] calldata tokens_\\n ) external returns (uint256[] memory supplyExchangePrices_, uint256[] memory borrowExchangePrices_);\\n}\\n\\ninterface IFluidLiquidityLogic is IFluidLiquidityAdmin {\\n /// @notice Single function which handles supply, withdraw, borrow & payback\\n /// @param token_ address of token (0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native)\\n /// @param supplyAmount_ if +ve then supply, if -ve then withdraw, if 0 then nothing\\n /// @param borrowAmount_ if +ve then borrow, if -ve then payback, if 0 then nothing\\n /// @param withdrawTo_ if withdrawal then to which address\\n /// @param borrowTo_ if borrow then to which address\\n /// @param callbackData_ callback data passed to `liquidityCallback` method of protocol\\n /// @return memVar3_ updated supplyExchangePrice\\n /// @return memVar4_ updated borrowExchangePrice\\n /// @dev to trigger skipping in / out transfers (gas optimization):\\n /// - ` callbackData_` MUST be encoded so that \\\"from\\\" address is the last 20 bytes in the last 32 bytes slot,\\n /// also for native token operations where liquidityCallback is not triggered!\\n /// from address must come at last position if there is more data. I.e. encode like:\\n /// abi.encode(otherVar1, otherVar2, FROM_ADDRESS). Note dynamic types used with abi.encode come at the end\\n /// so if dynamic types are needed, you must use abi.encodePacked to ensure the from address is at the end.\\n /// - this \\\"from\\\" address must match withdrawTo_ or borrowTo_ and must be == `msg.sender`\\n /// - `callbackData_` must in addition to the from address as described above include bytes32 SKIP_TRANSFERS\\n /// in the slot before (bytes 32 to 63)\\n /// - `msg.value` must be 0.\\n /// - Amounts must be either:\\n /// - supply(+) == borrow(+), withdraw(-) == payback(-).\\n /// - Liquidity must be on the winning side (deposit < borrow OR payback < withdraw).\\n function operate(\\n address token_,\\n int256 supplyAmount_,\\n int256 borrowAmount_,\\n address withdrawTo_,\\n address borrowTo_,\\n bytes calldata callbackData_\\n ) external payable returns (uint256 memVar3_, uint256 memVar4_);\\n}\\n\\ninterface IFluidLiquidity is IProxy, IFluidLiquidityLogic {}\\n\",\"keccak256\":\"0x4aa83e84baa7c2f4d58b07a3eca4ab7fe7d6fc660898daaac338dc3f129c4123\",\"license\":\"MIT\"},\"contracts/protocols/dex/error.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { Structs } from \\\"./poolT1/coreModule/structs.sol\\\";\\n\\nabstract contract Error {\\n error FluidDexError(uint256 errorId_);\\n\\n error FluidDexFactoryError(uint256 errorId);\\n\\n /// @notice used to simulate swap to find the output amount\\n error FluidDexSwapResult(uint256 amountOut);\\n\\n error FluidDexPerfectLiquidityOutput(uint256 token0Amt, uint token1Amt);\\n\\n error FluidDexSingleTokenOutput(uint256 tokenAmt);\\n\\n error FluidDexLiquidityOutput(uint256 shares_);\\n\\n error FluidDexPricesAndExchangeRates(Structs.PricesAndExchangePrice pex_);\\n}\\n\",\"keccak256\":\"0xfb70930e36c5c0d60e06fb1be8a6fffdfbc17d0ae9745582f4dda666e3b010aa\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/errorTypes.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nlibrary ErrorTypes {\\n /***********************************|\\n | DexT1 | \\n |__________________________________*/\\n\\n /// @notice thrown at reentrancy\\n uint256 internal constant DexT1__AlreadyEntered = 51001;\\n\\n uint256 internal constant DexT1__NotAnAuth = 51002;\\n\\n uint256 internal constant DexT1__SmartColNotEnabled = 51003;\\n\\n uint256 internal constant DexT1__SmartDebtNotEnabled = 51004;\\n\\n uint256 internal constant DexT1__PoolNotInitialized = 51005;\\n\\n uint256 internal constant DexT1__TokenReservesTooLow = 51006;\\n\\n uint256 internal constant DexT1__EthAndAmountInMisMatch = 51007;\\n\\n uint256 internal constant DexT1__EthSentForNonNativeSwap = 51008;\\n\\n uint256 internal constant DexT1__NoSwapRoute = 51009;\\n\\n uint256 internal constant DexT1__NotEnoughAmountOut = 51010;\\n\\n uint256 internal constant DexT1__LiquidityLayerTokenUtilizationCapReached = 51011;\\n\\n uint256 internal constant DexT1__HookReturnedFalse = 51012;\\n\\n // Either user's config are not set or user is paused\\n uint256 internal constant DexT1__UserSupplyInNotOn = 51013;\\n\\n // Either user's config are not set or user is paused\\n uint256 internal constant DexT1__UserDebtInNotOn = 51014;\\n\\n // Thrown when contract asks for more token0 or token1 than what user's wants to give on deposit\\n uint256 internal constant DexT1__AboveDepositMax = 51015;\\n\\n uint256 internal constant DexT1__MsgValueLowOnDepositOrPayback = 51016;\\n\\n uint256 internal constant DexT1__WithdrawLimitReached = 51017;\\n\\n // Thrown when contract gives less token0 or token1 than what user's wants on withdraw\\n uint256 internal constant DexT1__BelowWithdrawMin = 51018;\\n\\n uint256 internal constant DexT1__DebtLimitReached = 51019;\\n\\n // Thrown when contract gives less token0 or token1 than what user's wants on borrow\\n uint256 internal constant DexT1__BelowBorrowMin = 51020;\\n\\n // Thrown when contract asks for more token0 or token1 than what user's wants on payback\\n uint256 internal constant DexT1__AbovePaybackMax = 51021;\\n\\n uint256 internal constant DexT1__InvalidDepositAmts = 51022;\\n\\n uint256 internal constant DexT1__DepositAmtsZero = 51023;\\n\\n uint256 internal constant DexT1__SharesMintedLess = 51024;\\n\\n uint256 internal constant DexT1__WithdrawalNotEnough = 51025;\\n\\n uint256 internal constant DexT1__InvalidWithdrawAmts = 51026;\\n\\n uint256 internal constant DexT1__WithdrawAmtsZero = 51027;\\n\\n uint256 internal constant DexT1__WithdrawExcessSharesBurn = 51028;\\n\\n uint256 internal constant DexT1__InvalidBorrowAmts = 51029;\\n\\n uint256 internal constant DexT1__BorrowAmtsZero = 51030;\\n\\n uint256 internal constant DexT1__BorrowExcessSharesMinted = 51031;\\n\\n uint256 internal constant DexT1__PaybackAmtTooHigh = 51032;\\n\\n uint256 internal constant DexT1__InvalidPaybackAmts = 51033;\\n\\n uint256 internal constant DexT1__PaybackAmtsZero = 51034;\\n\\n uint256 internal constant DexT1__PaybackSharedBurnedLess = 51035;\\n\\n uint256 internal constant DexT1__NothingToArbitrage = 51036;\\n\\n uint256 internal constant DexT1__MsgSenderNotLiquidity = 51037;\\n\\n // On liquidity callback reentrancy bit should be on\\n uint256 internal constant DexT1__ReentrancyBitShouldBeOn = 51038;\\n\\n // Thrown is reentrancy is already on and someone tries to fetch oracle price. Should not be possible to this\\n uint256 internal constant DexT1__OraclePriceFetchAlreadyEntered = 51039;\\n\\n // Thrown when swap changes the current price by more than 5%\\n uint256 internal constant DexT1__OracleUpdateHugeSwapDiff = 51040;\\n\\n uint256 internal constant DexT1__Token0ShouldBeSmallerThanToken1 = 51041;\\n\\n uint256 internal constant DexT1__OracleMappingOverflow = 51042;\\n\\n /// @notice thrown if governance has paused the swapping & arbitrage so only perfect functions are usable\\n uint256 internal constant DexT1__SwapAndArbitragePaused = 51043;\\n\\n uint256 internal constant DexT1__ExceedsAmountInMax = 51044;\\n\\n /// @notice thrown if amount in is too high or too low\\n uint256 internal constant DexT1__SwapInLimitingAmounts = 51045;\\n\\n /// @notice thrown if amount out is too high or too low\\n uint256 internal constant DexT1__SwapOutLimitingAmounts = 51046;\\n\\n uint256 internal constant DexT1__MintAmtOverflow = 51047;\\n\\n uint256 internal constant DexT1__BurnAmtOverflow = 51048;\\n\\n uint256 internal constant DexT1__LimitingAmountsSwapAndNonPerfectActions = 51049;\\n\\n uint256 internal constant DexT1__InsufficientOracleData = 51050;\\n\\n uint256 internal constant DexT1__SharesAmountInsufficient = 51051;\\n\\n uint256 internal constant DexT1__CenterPriceOutOfRange = 51052;\\n\\n uint256 internal constant DexT1__DebtReservesTooLow = 51053;\\n\\n uint256 internal constant DexT1__SwapAndDepositTooLowOrTooHigh = 51054;\\n\\n uint256 internal constant DexT1__WithdrawAndSwapTooLowOrTooHigh = 51055;\\n\\n uint256 internal constant DexT1__BorrowAndSwapTooLowOrTooHigh = 51056;\\n\\n uint256 internal constant DexT1__SwapAndPaybackTooLowOrTooHigh = 51057;\\n\\n uint256 internal constant DexT1__InvalidImplementation = 51058;\\n\\n uint256 internal constant DexT1__OnlyDelegateCallAllowed = 51059;\\n\\n uint256 internal constant DexT1__IncorrectDataLength = 51060;\\n\\n uint256 internal constant DexT1__AmountToSendLessThanAmount = 51061;\\n\\n uint256 internal constant DexT1__InvalidCollateralReserves = 51062;\\n\\n uint256 internal constant DexT1__InvalidDebtReserves = 51063;\\n\\n uint256 internal constant DexT1__SupplySharesOverflow = 51064;\\n\\n uint256 internal constant DexT1__BorrowSharesOverflow = 51065;\\n\\n uint256 internal constant DexT1__OracleNotActive = 51066;\\n\\n /***********************************|\\n | DEX Admin | \\n |__________________________________*/\\n\\n /// @notice thrown when pool is not initialized\\n uint256 internal constant DexT1Admin__PoolNotInitialized = 52001;\\n\\n uint256 internal constant DexT1Admin__SmartColIsAlreadyOn = 52002;\\n\\n uint256 internal constant DexT1Admin__SmartDebtIsAlreadyOn = 52003;\\n\\n /// @notice thrown when any of the configs value overflow the maximum limit\\n uint256 internal constant DexT1Admin__ConfigOverflow = 52004;\\n\\n uint256 internal constant DexT1Admin__AddressNotAContract = 52005;\\n\\n uint256 internal constant DexT1Admin__InvalidParams = 52006;\\n\\n uint256 internal constant DexT1Admin__UserNotDefined = 52007;\\n\\n uint256 internal constant DexT1Admin__OnlyDelegateCallAllowed = 52008;\\n\\n uint256 internal constant DexT1Admin__UnexpectedPoolState = 52009;\\n\\n /// @notice thrown when trying to pause or unpause but user is already in the target pause state\\n uint256 internal constant DexT1Admin__InvalidPauseToggle = 52009;\\n\\n /***********************************|\\n | DEX Factory | \\n |__________________________________*/\\n\\n uint256 internal constant DexFactory__InvalidOperation = 53001;\\n uint256 internal constant DexFactory__Unauthorized = 53002;\\n uint256 internal constant DexFactory__SameTokenNotAllowed = 53003;\\n uint256 internal constant DexFactory__TokenConfigNotProper = 53004;\\n uint256 internal constant DexFactory__InvalidParams = 53005;\\n uint256 internal constant DexFactory__OnlyDelegateCallAllowed = 53006;\\n uint256 internal constant DexFactory__InvalidDexAddress = 53007;\\n}\\n\",\"keccak256\":\"0xc1f51cbf40f6b5c904a1f3a455dc76ef6d4ab9625e1f604d11b72670a268b6fb\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/factory/deploymentHelpers/miniDeployer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { Owned } from \\\"solmate/src/auth/Owned.sol\\\";\\n\\n/// @title MiniDeployer\\n/// @notice A contract that allows deployers to deploy any contract by passing the contract data in bytes\\n/// @dev The main objective of this contract is to avoid storing contract addresses in our protocols which requires 160 bits of storage\\n/// Instead, we can just store the nonce & deployment of this address to calculate the address realtime using \\\"AddressCalcs\\\" library\\ncontract MiniDeployer is Owned {\\n /// @notice Thrown when an invalid operation is attempted\\n error MiniDeployer__InvalidOperation();\\n\\n /// @notice Emitted when a new contract is deployed\\n event LogContractDeployed(address indexed contractAddress);\\n\\n /// @notice Constructor to initialize the contract\\n /// @param owner_ The address of the contract owner\\n constructor(address owner_) Owned(owner_) {}\\n\\n /// @notice Internal function to deploy a contract\\n /// @param bytecode_ The bytecode of the contract to deploy\\n /// @return address_ The address of the deployed contract\\n /// @dev Uses inline assembly for efficient deployment\\n function _deploy(bytes memory bytecode_) internal returns (address address_) {\\n if (bytecode_.length == 0) {\\n revert MiniDeployer__InvalidOperation();\\n }\\n /// @solidity memory-safe-assembly\\n assembly {\\n address_ := create(0, add(bytecode_, 0x20), mload(bytecode_))\\n }\\n if (address_ == address(0)) {\\n revert MiniDeployer__InvalidOperation();\\n }\\n }\\n\\n /// @notice Deploys a new contract\\n /// @param contractCode_ The bytecode of the contract to deploy\\n /// @return contractAddress_ The address of the deployed contract\\n /// @dev Decrements the deployer's allowed deployments count if not the owner\\n function deployContract(bytes calldata contractCode_) external onlyOwner returns (address contractAddress_) {\\n contractAddress_ = _deploy(contractCode_);\\n\\n emit LogContractDeployed(contractAddress_);\\n }\\n}\\n\",\"keccak256\":\"0xe2477b35f959992a710b8eb589baa5d346799e524adaeb5a03abe5ac469b1ca3\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/factory/deploymentLogics/poolT1Logic.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { SSTORE2 } from \\\"solmate/src/utils/SSTORE2.sol\\\";\\n\\nimport { Error } from \\\"../../error.sol\\\";\\nimport { ErrorTypes } from \\\"../../errorTypes.sol\\\";\\nimport { IFluidDexFactory } from \\\"../../interfaces/iDexFactory.sol\\\";\\nimport { MiniDeployer } from \\\"../deploymentHelpers/miniDeployer.sol\\\";\\nimport { LiquiditySlotsLink } from \\\"../../../../libraries/liquiditySlotsLink.sol\\\";\\nimport { BytesSliceAndConcat } from \\\"../../../../libraries/bytesSliceAndConcat.sol\\\";\\n\\nimport { IFluidDexT1 } from \\\"../../interfaces/iDexT1.sol\\\";\\nimport { FluidDexT1Shift } from \\\"../../poolT1/coreModule/core/shift.sol\\\";\\nimport { FluidDexT1Admin } from \\\"../../poolT1/adminModule/main.sol\\\";\\n\\ninterface IERC20 {\\n function decimals() external view returns (uint8);\\n}\\n\\ncontract FluidDexT1DeploymentLogic is Error {\\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n /// @dev SSTORE2 pointer for the PoolT1 creation code. Stored externally to reduce factory bytecode (in 2 parts)\\n address internal immutable POOL_T1_CREATIONCODE_ADDRESS_1;\\n address internal immutable POOL_T1_CREATIONCODE_ADDRESS_2;\\n\\n /// @dev SSTORE2 pointers for the creation code of various operations contracts\\n address internal immutable COL_OPERATIONS_CREATIONCODE_ADDRESS;\\n address internal immutable DEBT_OPERATIONS_CREATIONCODE_ADDRESS;\\n address internal immutable PERFECT_OPERATIONS_AND_SWAP_OUT_CREATIONCODE_ADDRESS_1;\\n address internal immutable PERFECT_OPERATIONS_AND_SWAP_OUT_CREATIONCODE_ADDRESS_2;\\n\\n /// @notice address of liquidity contract\\n address public immutable LIQUIDITY;\\n\\n /// @notice address of dexfactory contract\\n address public immutable DEX_FACTORY;\\n\\n /// @notice address of Admin implementation\\n address public immutable ADMIN_IMPLEMENTATION;\\n\\n /// @notice address of Shift implementation\\n address public immutable SHIFT_IMPLEMENTATION;\\n\\n /// @notice address of Deployer Contract\\n address public immutable CONTRACT_DEPLOYER;\\n\\n /// @notice address of MiniDeployer Contract\\n MiniDeployer public immutable MINI_DEPLOYER;\\n\\n /// @notice address of this contract\\n address public immutable ADDRESS_THIS;\\n\\n /// @notice Emitted when a new dexT1 is deployed.\\n /// @param dex The address of the newly deployed dex.\\n /// @param dexId The id of the newly deployed dex.\\n /// @param supplyToken The address of the supply token.\\n /// @param borrowToken The address of the borrow token.\\n event DexT1Deployed(address indexed dex, uint256 dexId, address indexed supplyToken, address indexed borrowToken);\\n\\n /// @dev Deploys a contract using the CREATE opcode with the provided bytecode (`bytecode_`).\\n /// This is an internal function, meant to be used within the contract to facilitate the deployment of other contracts.\\n /// @param bytecode_ The bytecode of the contract to be deployed.\\n /// @return address_ Returns the address of the deployed contract.\\n function _deploy(bytes memory bytecode_) internal returns (address address_) {\\n if (bytecode_.length == 0) {\\n revert FluidDexError(ErrorTypes.DexFactory__InvalidOperation);\\n }\\n /// @solidity memory-safe-assembly\\n assembly {\\n address_ := create(0, add(bytecode_, 0x20), mload(bytecode_))\\n }\\n if (address_ == address(0)) {\\n revert FluidDexError(ErrorTypes.DexFactory__InvalidOperation);\\n }\\n }\\n\\n constructor(\\n address liquidity_,\\n address dexFactory_,\\n address contractDeployer_,\\n address colOperations_,\\n address debtOperations_,\\n address perfectOperationsAndSwapOut1_,\\n address perfectOperationsAndSwapOut2_,\\n address mainAddress1_,\\n address mainAddress2_\\n ) {\\n LIQUIDITY = liquidity_;\\n DEX_FACTORY = dexFactory_;\\n CONTRACT_DEPLOYER = contractDeployer_;\\n\\n POOL_T1_CREATIONCODE_ADDRESS_1 = mainAddress1_;\\n POOL_T1_CREATIONCODE_ADDRESS_2 = mainAddress2_;\\n\\n ADDRESS_THIS = address(this);\\n\\n // Deploy mini deployer\\n MINI_DEPLOYER = new MiniDeployer(DEX_FACTORY);\\n\\n // Deploy admin implementation\\n FluidDexT1Admin adminImplementation = new FluidDexT1Admin();\\n ADMIN_IMPLEMENTATION = address(adminImplementation);\\n\\n // Deploy shift implementation\\n FluidDexT1Shift shiftImplementation = new FluidDexT1Shift(CONTRACT_DEPLOYER);\\n SHIFT_IMPLEMENTATION = address(shiftImplementation);\\n\\n COL_OPERATIONS_CREATIONCODE_ADDRESS = colOperations_;\\n DEBT_OPERATIONS_CREATIONCODE_ADDRESS = debtOperations_;\\n PERFECT_OPERATIONS_AND_SWAP_OUT_CREATIONCODE_ADDRESS_1 = perfectOperationsAndSwapOut1_;\\n PERFECT_OPERATIONS_AND_SWAP_OUT_CREATIONCODE_ADDRESS_2 = perfectOperationsAndSwapOut2_;\\n }\\n\\n function dexT1(\\n address token0_,\\n address token1_,\\n uint256 oracleMapping_\\n ) external returns (bytes memory dexCreationBytecode_) {\\n if (address(this) == ADDRESS_THIS) revert FluidDexError(ErrorTypes.DexFactory__OnlyDelegateCallAllowed);\\n\\n if (token0_ == token1_) revert FluidDexError(ErrorTypes.DexFactory__SameTokenNotAllowed);\\n if (token0_ > token1_) revert FluidDexError(ErrorTypes.DexFactory__TokenConfigNotProper);\\n\\n IFluidDexT1.ConstantViews memory constants_;\\n constants_.liquidity = LIQUIDITY;\\n constants_.factory = address(this);\\n constants_.implementations.shift = SHIFT_IMPLEMENTATION;\\n constants_.deployerContract = CONTRACT_DEPLOYER;\\n constants_.token0 = token0_;\\n constants_.token1 = token1_;\\n constants_.dexId = IFluidDexFactory(address(this)).totalDexes();\\n constants_.oracleMapping = oracleMapping_;\\n\\n address dex_ = IFluidDexFactory(address(this)).getDexAddress(constants_.dexId);\\n\\n constants_ = _calculateLiquidityDexSlots(constants_, dex_);\\n\\n // Deploy perfect operations and oracle implementation\\n address perfectOperationsAndOracle_ = MINI_DEPLOYER.deployContract(\\n abi.encodePacked(perfectOperationsCreationCode(), abi.encode(constants_))\\n );\\n\\n // Deploy col operations implementation through mini deployer\\n address colOperations_ = MINI_DEPLOYER.deployContract(\\n abi.encodePacked(colOperationsCreationCode(), abi.encode(constants_))\\n );\\n\\n // Deploy debt operations implementation\\n address debtOperations_ = MINI_DEPLOYER.deployContract(\\n abi.encodePacked(debtOperationsCreationCode(), abi.encode(constants_))\\n );\\n\\n constants_.implementations.admin = ADMIN_IMPLEMENTATION;\\n constants_.implementations.perfectOperationsAndOracle = perfectOperationsAndOracle_;\\n constants_.implementations.colOperations = colOperations_;\\n constants_.implementations.debtOperations = debtOperations_;\\n\\n dexCreationBytecode_ = abi.encodePacked(dexT1CreationBytecode(), abi.encode(constants_));\\n\\n emit DexT1Deployed(dex_, constants_.dexId, token0_, token1_);\\n\\n return dexCreationBytecode_;\\n }\\n\\n /// @notice returns the stored DexT1 creation bytecode\\n function dexT1CreationBytecode() public view returns (bytes memory) {\\n return\\n BytesSliceAndConcat.bytesConcat(\\n SSTORE2.read(POOL_T1_CREATIONCODE_ADDRESS_1),\\n SSTORE2.read(POOL_T1_CREATIONCODE_ADDRESS_2)\\n );\\n }\\n\\n /// @dev Retrieves the creation code for the FluidDexT1OperationsCol contract\\n function colOperationsCreationCode() public view returns (bytes memory) {\\n return SSTORE2.read(COL_OPERATIONS_CREATIONCODE_ADDRESS);\\n }\\n\\n /// @dev Retrieves the creation code for the FluidDexT1OperationsDebt contract\\n function debtOperationsCreationCode() public view returns (bytes memory) {\\n return SSTORE2.read(DEBT_OPERATIONS_CREATIONCODE_ADDRESS);\\n }\\n\\n /// @dev Retrieves the creation code for the FluidDexT1PerfectOperations contract\\n function perfectOperationsCreationCode() public view returns (bytes memory) {\\n return\\n BytesSliceAndConcat.bytesConcat(\\n SSTORE2.read(PERFECT_OPERATIONS_AND_SWAP_OUT_CREATIONCODE_ADDRESS_1),\\n SSTORE2.read(PERFECT_OPERATIONS_AND_SWAP_OUT_CREATIONCODE_ADDRESS_2)\\n );\\n }\\n\\n /// @dev Calculates the liquidity dex slots for the given supply token, borrow token, and dex (`dex_`).\\n /// @param constants_ Constants struct as used in Dex T1\\n /// @param dex_ The address of the dex.\\n /// @return liquidityDexSlots_ Returns the calculated liquidity dex slots set in the `IFluidDexT1.ConstantViews` struct.\\n function _calculateLiquidityDexSlots(\\n IFluidDexT1.ConstantViews memory constants_,\\n address dex_\\n ) private pure returns (IFluidDexT1.ConstantViews memory) {\\n constants_.supplyToken0Slot = LiquiditySlotsLink.calculateDoubleMappingStorageSlot(\\n LiquiditySlotsLink.LIQUIDITY_USER_SUPPLY_DOUBLE_MAPPING_SLOT,\\n dex_,\\n constants_.token0\\n );\\n constants_.borrowToken0Slot = LiquiditySlotsLink.calculateDoubleMappingStorageSlot(\\n LiquiditySlotsLink.LIQUIDITY_USER_BORROW_DOUBLE_MAPPING_SLOT,\\n dex_,\\n constants_.token0\\n );\\n constants_.supplyToken1Slot = LiquiditySlotsLink.calculateDoubleMappingStorageSlot(\\n LiquiditySlotsLink.LIQUIDITY_USER_SUPPLY_DOUBLE_MAPPING_SLOT,\\n dex_,\\n constants_.token1\\n );\\n constants_.borrowToken1Slot = LiquiditySlotsLink.calculateDoubleMappingStorageSlot(\\n LiquiditySlotsLink.LIQUIDITY_USER_BORROW_DOUBLE_MAPPING_SLOT,\\n dex_,\\n constants_.token1\\n );\\n constants_.exchangePriceToken0Slot = LiquiditySlotsLink.calculateMappingStorageSlot(\\n LiquiditySlotsLink.LIQUIDITY_EXCHANGE_PRICES_MAPPING_SLOT,\\n constants_.token0\\n );\\n constants_.exchangePriceToken1Slot = LiquiditySlotsLink.calculateMappingStorageSlot(\\n LiquiditySlotsLink.LIQUIDITY_EXCHANGE_PRICES_MAPPING_SLOT,\\n constants_.token1\\n );\\n\\n return constants_;\\n }\\n}\\n\",\"keccak256\":\"0x56f8332a78d4be65c1cb0294ea36cc3dea09e904b0e07f415cc87e8cb1b56069\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/interfaces/iDexFactory.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.21;\\n\\ninterface IFluidDexFactory {\\n /// @notice Global auth is auth for all dexes\\n function isGlobalAuth(address auth_) external view returns (bool);\\n\\n /// @notice Dex auth is auth for a specific dex\\n function isDexAuth(address vault_, address auth_) external view returns (bool);\\n\\n /// @notice Total dexes deployed.\\n function totalDexes() external view returns (uint256);\\n\\n /// @notice Compute dexAddress\\n function getDexAddress(uint256 dexId_) external view returns (address);\\n\\n /// @notice read uint256 `result_` for a storage `slot_` key\\n function readFromStorage(bytes32 slot_) external view returns (uint256 result_);\\n}\\n\",\"keccak256\":\"0xfc81e2f8de72dcf84022b69495996f59fe560cac430767f504de1064c32f550e\",\"license\":\"MIT\"},\"contracts/protocols/dex/interfaces/iDexT1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.21;\\n\\ninterface IFluidDexT1 {\\n error FluidDexError(uint256 errorId);\\n\\n /// @notice used to simulate swap to find the output amount\\n error FluidDexSwapResult(uint256 amountOut);\\n\\n error FluidDexPerfectLiquidityOutput(uint256 token0Amt, uint token1Amt);\\n\\n error FluidDexSingleTokenOutput(uint256 tokenAmt);\\n\\n error FluidDexLiquidityOutput(uint256 shares);\\n\\n error FluidDexPricesAndExchangeRates(PricesAndExchangePrice pex_);\\n\\n /// @notice returns the dex id\\n function DEX_ID() external view returns (uint256);\\n\\n /// @notice reads uint256 data `result_` from storage at a bytes32 storage `slot_` key.\\n function readFromStorage(bytes32 slot_) external view returns (uint256 result_);\\n\\n struct Implementations {\\n address shift;\\n address admin;\\n address colOperations;\\n address debtOperations;\\n address perfectOperationsAndOracle;\\n }\\n\\n struct ConstantViews {\\n uint256 dexId;\\n address liquidity;\\n address factory;\\n Implementations implementations;\\n address deployerContract;\\n address token0;\\n address token1;\\n bytes32 supplyToken0Slot;\\n bytes32 borrowToken0Slot;\\n bytes32 supplyToken1Slot;\\n bytes32 borrowToken1Slot;\\n bytes32 exchangePriceToken0Slot;\\n bytes32 exchangePriceToken1Slot;\\n uint256 oracleMapping;\\n }\\n\\n struct ConstantViews2 {\\n uint token0NumeratorPrecision;\\n uint token0DenominatorPrecision;\\n uint token1NumeratorPrecision;\\n uint token1DenominatorPrecision;\\n }\\n\\n struct PricesAndExchangePrice {\\n uint lastStoredPrice; // last stored price in 1e27 decimals\\n uint centerPrice; // last stored price in 1e27 decimals\\n uint upperRange; // price at upper range in 1e27 decimals\\n uint lowerRange; // price at lower range in 1e27 decimals\\n uint geometricMean; // geometric mean of upper range & lower range in 1e27 decimals\\n uint supplyToken0ExchangePrice;\\n uint borrowToken0ExchangePrice;\\n uint supplyToken1ExchangePrice;\\n uint borrowToken1ExchangePrice;\\n }\\n\\n struct CollateralReserves {\\n uint token0RealReserves;\\n uint token1RealReserves;\\n uint token0ImaginaryReserves;\\n uint token1ImaginaryReserves;\\n }\\n\\n struct DebtReserves {\\n uint token0Debt;\\n uint token1Debt;\\n uint token0RealReserves;\\n uint token1RealReserves;\\n uint token0ImaginaryReserves;\\n uint token1ImaginaryReserves;\\n }\\n\\n function getCollateralReserves(\\n uint geometricMean_,\\n uint upperRange_,\\n uint lowerRange_,\\n uint token0SupplyExchangePrice_,\\n uint token1SupplyExchangePrice_\\n ) external view returns (CollateralReserves memory c_);\\n\\n function getDebtReserves(\\n uint geometricMean_,\\n uint upperRange_,\\n uint lowerRange_,\\n uint token0BorrowExchangePrice_,\\n uint token1BorrowExchangePrice_\\n ) external view returns (DebtReserves memory d_);\\n\\n // reverts with FluidDexPricesAndExchangeRates(pex_);\\n function getPricesAndExchangePrices() external;\\n\\n function constantsView() external view returns (ConstantViews memory constantsView_);\\n\\n function constantsView2() external view returns (ConstantViews2 memory constantsView2_);\\n\\n struct Oracle {\\n uint twap1by0; // TWAP price\\n uint lowestPrice1by0; // lowest price point\\n uint highestPrice1by0; // highest price point\\n uint twap0by1; // TWAP price\\n uint lowestPrice0by1; // lowest price point\\n uint highestPrice0by1; // highest price point\\n }\\n\\n /// @dev This function allows users to swap a specific amount of input tokens for output tokens\\n /// @param swap0to1_ Direction of swap. If true, swaps token0 for token1; if false, swaps token1 for token0\\n /// @param amountIn_ The exact amount of input tokens to swap\\n /// @param amountOutMin_ The minimum amount of output tokens the user is willing to accept\\n /// @param to_ Recipient of swapped tokens. If to_ == address(0) then out tokens will be sent to msg.sender. If to_ == ADDRESS_DEAD then function will revert with amountOut_\\n /// @return amountOut_ The amount of output tokens received from the swap\\n function swapIn(\\n bool swap0to1_,\\n uint256 amountIn_,\\n uint256 amountOutMin_,\\n address to_\\n ) external payable returns (uint256 amountOut_);\\n\\n /// @dev Swap tokens with perfect amount out\\n /// @param swap0to1_ Direction of swap. If true, swaps token0 for token1; if false, swaps token1 for token0\\n /// @param amountOut_ The exact amount of tokens to receive after swap\\n /// @param amountInMax_ Maximum amount of tokens to swap in\\n /// @param to_ Recipient of swapped tokens. If to_ == address(0) then out tokens will be sent to msg.sender. If to_ == ADDRESS_DEAD then function will revert with amountIn_\\n /// @return amountIn_ The amount of input tokens used for the swap\\n function swapOut(\\n bool swap0to1_,\\n uint256 amountOut_,\\n uint256 amountInMax_,\\n address to_\\n ) external payable returns (uint256 amountIn_);\\n\\n /// @dev Deposit tokens in equal proportion to the current pool ratio\\n /// @param shares_ The number of shares to mint\\n /// @param maxToken0Deposit_ Maximum amount of token0 to deposit\\n /// @param maxToken1Deposit_ Maximum amount of token1 to deposit\\n /// @param estimate_ If true, function will revert with estimated deposit amounts without executing the deposit\\n /// @return token0Amt_ Amount of token0 deposited\\n /// @return token1Amt_ Amount of token1 deposited\\n function depositPerfect(\\n uint shares_,\\n uint maxToken0Deposit_,\\n uint maxToken1Deposit_,\\n bool estimate_\\n ) external payable returns (uint token0Amt_, uint token1Amt_);\\n\\n /// @dev This function allows users to withdraw a perfect amount of collateral liquidity\\n /// @param shares_ The number of shares to withdraw\\n /// @param minToken0Withdraw_ The minimum amount of token0 the user is willing to accept\\n /// @param minToken1Withdraw_ The minimum amount of token1 the user is willing to accept\\n /// @param to_ Recipient of swapped tokens. If to_ == address(0) then out tokens will be sent to msg.sender. If to_ == ADDRESS_DEAD then function will revert with token0Amt_ & token1Amt_\\n /// @return token0Amt_ The amount of token0 withdrawn\\n /// @return token1Amt_ The amount of token1 withdrawn\\n function withdrawPerfect(\\n uint shares_,\\n uint minToken0Withdraw_,\\n uint minToken1Withdraw_,\\n address to_\\n ) external returns (uint token0Amt_, uint token1Amt_);\\n\\n /// @dev This function allows users to borrow tokens in equal proportion to the current debt pool ratio\\n /// @param shares_ The number of shares to borrow\\n /// @param minToken0Borrow_ Minimum amount of token0 to borrow\\n /// @param minToken1Borrow_ Minimum amount of token1 to borrow\\n /// @param to_ Recipient of swapped tokens. If to_ == address(0) then out tokens will be sent to msg.sender. If to_ == ADDRESS_DEAD then function will revert with token0Amt_ & token1Amt_\\n /// @return token0Amt_ Amount of token0 borrowed\\n /// @return token1Amt_ Amount of token1 borrowed\\n function borrowPerfect(\\n uint shares_,\\n uint minToken0Borrow_,\\n uint minToken1Borrow_,\\n address to_\\n ) external returns (uint token0Amt_, uint token1Amt_);\\n\\n /// @dev This function allows users to pay back borrowed tokens in equal proportion to the current debt pool ratio\\n /// @param shares_ The number of shares to pay back\\n /// @param maxToken0Payback_ Maximum amount of token0 to pay back\\n /// @param maxToken1Payback_ Maximum amount of token1 to pay back\\n /// @param estimate_ If true, function will revert with estimated payback amounts without executing the payback\\n /// @return token0Amt_ Amount of token0 paid back\\n /// @return token1Amt_ Amount of token1 paid back\\n function paybackPerfect(\\n uint shares_,\\n uint maxToken0Payback_,\\n uint maxToken1Payback_,\\n bool estimate_\\n ) external payable returns (uint token0Amt_, uint token1Amt_);\\n\\n /// @dev This function allows users to deposit tokens in any proportion into the col pool\\n /// @param token0Amt_ The amount of token0 to deposit\\n /// @param token1Amt_ The amount of token1 to deposit\\n /// @param minSharesAmt_ The minimum amount of shares the user expects to receive\\n /// @param estimate_ If true, function will revert with estimated shares without executing the deposit\\n /// @return shares_ The amount of shares minted for the deposit\\n function deposit(\\n uint token0Amt_,\\n uint token1Amt_,\\n uint minSharesAmt_,\\n bool estimate_\\n ) external payable returns (uint shares_);\\n\\n /// @dev This function allows users to withdraw tokens in any proportion from the col pool\\n /// @param token0Amt_ The amount of token0 to withdraw\\n /// @param token1Amt_ The amount of token1 to withdraw\\n /// @param maxSharesAmt_ The maximum number of shares the user is willing to burn\\n /// @param to_ Recipient of swapped tokens. If to_ == address(0) then out tokens will be sent to msg.sender. If to_ == ADDRESS_DEAD then function will revert with shares_\\n /// @return shares_ The number of shares burned for the withdrawal\\n function withdraw(\\n uint token0Amt_,\\n uint token1Amt_,\\n uint maxSharesAmt_,\\n address to_\\n ) external returns (uint shares_);\\n\\n /// @dev This function allows users to borrow tokens in any proportion from the debt pool\\n /// @param token0Amt_ The amount of token0 to borrow\\n /// @param token1Amt_ The amount of token1 to borrow\\n /// @param maxSharesAmt_ The maximum amount of shares the user is willing to receive\\n /// @param to_ Recipient of swapped tokens. If to_ == address(0) then out tokens will be sent to msg.sender. If to_ == ADDRESS_DEAD then function will revert with shares_\\n /// @return shares_ The amount of borrow shares minted to represent the borrowed amount\\n function borrow(\\n uint token0Amt_,\\n uint token1Amt_,\\n uint maxSharesAmt_,\\n address to_\\n ) external returns (uint shares_);\\n\\n /// @dev This function allows users to payback tokens in any proportion to the debt pool\\n /// @param token0Amt_ The amount of token0 to payback\\n /// @param token1Amt_ The amount of token1 to payback\\n /// @param minSharesAmt_ The minimum amount of shares the user expects to burn\\n /// @param estimate_ If true, function will revert with estimated shares without executing the payback\\n /// @return shares_ The amount of borrow shares burned for the payback\\n function payback(\\n uint token0Amt_,\\n uint token1Amt_,\\n uint minSharesAmt_,\\n bool estimate_\\n ) external payable returns (uint shares_);\\n\\n /// @dev This function allows users to withdraw their collateral with perfect shares in one token\\n /// @param shares_ The number of shares to burn for withdrawal\\n /// @param minToken0_ The minimum amount of token0 the user expects to receive (set to 0 if withdrawing in token1)\\n /// @param minToken1_ The minimum amount of token1 the user expects to receive (set to 0 if withdrawing in token0)\\n /// @param to_ Recipient of swapped tokens. If to_ == address(0) then out tokens will be sent to msg.sender. If to_ == ADDRESS_DEAD then function will revert with withdrawAmt_\\n /// @return withdrawAmt_ The amount of tokens withdrawn in the chosen token\\n function withdrawPerfectInOneToken(\\n uint shares_,\\n uint minToken0_,\\n uint minToken1_,\\n address to_\\n ) external returns (\\n uint withdrawAmt_\\n );\\n\\n /// @dev This function allows users to payback their debt with perfect shares in one token\\n /// @param shares_ The number of shares to burn for payback\\n /// @param maxToken0_ The maximum amount of token0 the user is willing to pay (set to 0 if paying back in token1)\\n /// @param maxToken1_ The maximum amount of token1 the user is willing to pay (set to 0 if paying back in token0)\\n /// @param estimate_ If true, the function will revert with the estimated payback amount without executing the payback\\n /// @return paybackAmt_ The amount of tokens paid back in the chosen token\\n function paybackPerfectInOneToken(\\n uint shares_,\\n uint maxToken0_,\\n uint maxToken1_,\\n bool estimate_\\n ) external payable returns (\\n uint paybackAmt_\\n );\\n\\n /// @dev the oracle assumes last set price of pool till the next swap happens.\\n /// There's a possibility that during that time some interest is generated hence the last stored price is not the 100% correct price for the whole duration\\n /// but the difference due to interest will be super low so this difference is ignored\\n /// For example 2 swaps happened 10min (600 seconds) apart and 1 token has 10% higher interest than other.\\n /// then that token will accrue about 10% * 600 / secondsInAYear = ~0.0002%\\n /// @param secondsAgos_ array of seconds ago for which TWAP is needed. If user sends [10, 30, 60] then twaps_ will return [10-0, 30-10, 60-30]\\n /// @return twaps_ twap price, lowest price (aka minima) & highest price (aka maxima) between secondsAgo checkpoints\\n /// @return currentPrice_ price of pool after the most recent swap\\n function oraclePrice(\\n uint[] memory secondsAgos_\\n ) external view returns (\\n Oracle[] memory twaps_,\\n uint currentPrice_\\n );\\n}\\n\",\"keccak256\":\"0xa405007cdd45409412ce0fe02a991cadbae17760bc15402c839375505f69d7b2\",\"license\":\"MIT\"},\"contracts/protocols/dex/poolT1/adminModule/events.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { Structs } from \\\"./structs.sol\\\";\\n\\nabstract contract Events is Structs {\\n /// @dev Emitted when smart collateral is turned on\\n /// @param token0Amt The amount of token0 used for smart collateral\\n event LogTurnOnSmartCol(uint token0Amt);\\n\\n /// @dev Emitted when smart debt is turned on\\n /// @param token0Amt The amount of token0 used for smart debt\\n event LogTurnOnSmartDebt(uint token0Amt);\\n\\n /// @dev Emitted when fee and revenue cut are updated\\n /// @param fee The new fee value\\n /// @param revenueCut The new revenue cut value\\n event LogUpdateFeeAndRevenueCut(uint fee, uint revenueCut);\\n\\n /// @dev Emitted when range percents are updated\\n /// @param upperPercent The new upper percent value\\n /// @param lowerPercent The new lower percent value\\n /// @param shiftTime The new shift time value\\n event LogUpdateRangePercents(uint upperPercent, uint lowerPercent, uint shiftTime);\\n\\n /// @dev Emitted when threshold percent is updated\\n /// @param upperThresholdPercent The new upper threshold percent value\\n /// @param lowerThresholdPercent The new lower threshold percent value\\n /// @param thresholdShiftTime The new threshold shift time value\\n /// @param shiftTime The new shift time value\\n event LogUpdateThresholdPercent(\\n uint upperThresholdPercent,\\n uint lowerThresholdPercent,\\n uint thresholdShiftTime,\\n uint shiftTime\\n );\\n\\n /// @dev Emitted when center price address is updated\\n /// @param centerPriceAddress The new center price address nonce\\n /// @param percent The new percent value\\n /// @param time The new time value\\n event LogUpdateCenterPriceAddress(uint centerPriceAddress, uint percent, uint time);\\n\\n /// @dev Emitted when hook address is updated\\n /// @param hookAddress The new hook address nonce\\n event LogUpdateHookAddress(uint hookAddress);\\n\\n /// @dev Emitted when center price limits are updated\\n /// @param maxCenterPrice The new maximum center price\\n /// @param minCenterPrice The new minimum center price\\n event LogUpdateCenterPriceLimits(uint maxCenterPrice, uint minCenterPrice);\\n\\n /// @dev Emitted when utilization limit is updated\\n /// @param token0UtilizationLimit The new utilization limit for token0\\n /// @param token1UtilizationLimit The new utilization limit for token1\\n event LogUpdateUtilizationLimit(uint token0UtilizationLimit, uint token1UtilizationLimit);\\n\\n /// @dev Emitted when user supply configs are updated\\n /// @param userSupplyConfigs The array of updated user supply configurations\\n event LogUpdateUserSupplyConfigs(UserSupplyConfig[] userSupplyConfigs);\\n\\n /// @dev Emitted when user borrow configs are updated\\n /// @param userBorrowConfigs The array of updated user borrow configurations\\n event LogUpdateUserBorrowConfigs(UserBorrowConfig[] userBorrowConfigs);\\n\\n /// @dev Emitted when a user is paused\\n /// @param user The address of the paused user\\n /// @param pauseSupply Whether supply operations are paused\\n /// @param pauseBorrow Whether borrow operations are paused\\n event LogPauseUser(address user, bool pauseSupply, bool pauseBorrow);\\n\\n /// @dev Emitted when a user is unpaused\\n /// @param user The address of the unpaused user\\n /// @param unpauseSupply Whether supply operations are unpaused\\n /// @param unpauseBorrow Whether borrow operations are unpaused\\n event LogUnpauseUser(address user, bool unpauseSupply, bool unpauseBorrow);\\n\\n /// @notice Emitted when the pool configuration is initialized\\n /// @param smartCol Whether smart collateral is enabled\\n /// @param smartDebt Whether smart debt is enabled\\n /// @param token0ColAmt The amount of token0 collateral\\n /// @param token0DebtAmt The amount of token0 debt\\n /// @param fee The fee percentage (in 4 decimals, 10000 = 1%)\\n /// @param revenueCut The revenue cut percentage (in 4 decimals, 100000 = 10%)\\n /// @param centerPriceAddress The nonce for the center price contract address\\n /// @param hookAddress The nonce for the hook contract address\\n event LogInitializePoolConfig(\\n bool smartCol,\\n bool smartDebt,\\n uint token0ColAmt,\\n uint token0DebtAmt,\\n uint fee,\\n uint revenueCut,\\n uint centerPriceAddress,\\n uint hookAddress\\n );\\n\\n /// @notice Emitted when the price parameters are initialized\\n /// @param upperPercent The upper range percent (in 4 decimals, 10000 = 1%)\\n /// @param lowerPercent The lower range percent (in 4 decimals, 10000 = 1%)\\n /// @param upperShiftThreshold The upper shift threshold (in 4 decimals, 10000 = 1%)\\n /// @param lowerShiftThreshold The lower shift threshold (in 4 decimals, 10000 = 1%)\\n /// @param thresholdShiftTime The time for threshold shift (in seconds)\\n /// @param maxCenterPrice The maximum center price\\n /// @param minCenterPrice The minimum center price\\n event LogInitializePriceParams(\\n uint upperPercent,\\n uint lowerPercent,\\n uint upperShiftThreshold,\\n uint lowerShiftThreshold,\\n uint thresholdShiftTime,\\n uint maxCenterPrice,\\n uint minCenterPrice\\n );\\n\\n /// @dev Emitted when swap and arbitrage are paused\\n event LogPauseSwapAndArbitrage();\\n\\n /// @dev Emitted when swap and arbitrage are unpaused\\n event LogUnpauseSwapAndArbitrage();\\n\\n /// @notice emitted when user withdrawal limit is updated\\n event LogUpdateUserWithdrawalLimit(address user, uint256 newLimit);\\n\\n /// @dev Emitted when funds are rescued\\n /// @param token The address of the token\\n event LogRescueFunds(address token);\\n\\n /// @dev Emitted when max supply shares are updated\\n /// @param maxSupplyShares The new maximum supply shares\\n event LogUpdateMaxSupplyShares(uint maxSupplyShares);\\n\\n /// @dev Emitted when max borrow shares are updated\\n /// @param maxBorrowShares The new maximum borrow shares\\n event LogUpdateMaxBorrowShares(uint maxBorrowShares);\\n\\n /// @dev Emitted when oracle activation is toggled\\n /// @param turnOn Whether oracle is turned on\\n event LogToggleOracleActivation(bool turnOn);\\n}\\n\",\"keccak256\":\"0x994b70cf2b277da5b12e3f01dea21625002ee88b0bd4b985130a9192de7f6c01\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/adminModule/main.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { Variables } from \\\"../common/variables.sol\\\";\\nimport { Events } from \\\"./events.sol\\\";\\nimport { ErrorTypes } from \\\"../../errorTypes.sol\\\";\\nimport { Error } from \\\"../../error.sol\\\";\\nimport { BigMathMinified } from \\\"../../../../libraries/bigMathMinified.sol\\\";\\nimport { ConstantVariables } from \\\"../common/constantVariables.sol\\\";\\nimport { Structs } from \\\"./structs.sol\\\";\\nimport { IFluidDexT1 } from \\\"../../interfaces/iDexT1.sol\\\";\\nimport { IFluidLiquidity } from \\\"../../../../liquidity/interfaces/iLiquidity.sol\\\";\\nimport { SafeTransfer } from \\\"../../../../libraries/safeTransfer.sol\\\";\\nimport { AddressCalcs } from \\\"../../../../libraries/addressCalcs.sol\\\";\\nimport { DexSlotsLink } from \\\"../../../../libraries/dexSlotsLink.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/// @notice Fluid Dex protocol Admin Module contract.\\n/// Implements admin related methods to set pool configs\\n/// Methods are limited to be called via delegateCall only. Dex CoreModule (\\\"DexT1\\\" contract)\\n/// is expected to call the methods implemented here after checking the msg.sender is authorized.\\ncontract FluidDexT1Admin is ConstantVariables, Variables, Structs, Events, Error {\\n using BigMathMinified for uint256;\\n\\n address private immutable ADDRESS_THIS;\\n\\n constructor() {\\n ADDRESS_THIS = address(this);\\n }\\n\\n modifier _onlyDelegateCall() {\\n // also indirectly checked by `_check` because pool can never be initialized as long as the initialize method\\n // is delegate call only, but just to be sure on Admin logic we add the modifier everywhere nonetheless.\\n if (address(this) == ADDRESS_THIS) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__OnlyDelegateCallAllowed);\\n }\\n _;\\n }\\n\\n modifier _check() {\\n if ((dexVariables2 & 3) == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__PoolNotInitialized);\\n }\\n _;\\n }\\n\\n /// @dev checks that `value_` address is a contract (which includes address zero check) or native address\\n function _checkIsContractOrNativeAddress(address value_) internal view {\\n if (value_.code.length == 0 && value_ != NATIVE_TOKEN) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__AddressNotAContract);\\n }\\n }\\n\\n /// @dev checks that `value_` address is a contract (which includes address zero check)\\n function _checkIsContract(address value_) internal view {\\n if (value_.code.length == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__AddressNotAContract);\\n }\\n }\\n\\n function turnOnSmartCol(uint token0Amt_) public payable _check _onlyDelegateCall {\\n if (dexVariables2 & 1 == 1) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__SmartColIsAlreadyOn);\\n }\\n uint centerPrice_ = (dexVariables >> 81) & X40;\\n centerPrice_ = (centerPrice_ >> DEFAULT_EXPONENT_SIZE) << (centerPrice_ & DEFAULT_EXPONENT_MASK);\\n _turnOnSmartCol(token0Amt_, centerPrice_);\\n\\n dexVariables2 = dexVariables2 | 1;\\n\\n emit LogTurnOnSmartCol(token0Amt_);\\n }\\n\\n function _turnOnSmartCol(uint token0Amt_, uint centerPrice_) internal {\\n IFluidDexT1.ConstantViews memory c_ = IFluidDexT1(address(this)).constantsView();\\n IFluidDexT1.ConstantViews2 memory c2_ = IFluidDexT1(address(this)).constantsView2();\\n\\n uint token0AmtAdjusted_ = (token0Amt_ * c2_.token0NumeratorPrecision) / c2_.token0DenominatorPrecision;\\n\\n uint token1AmtAdjusted_ = (centerPrice_ * token0AmtAdjusted_) / 1e27;\\n\\n uint token1Amt_ = (token1AmtAdjusted_ * c2_.token1DenominatorPrecision) / c2_.token1NumeratorPrecision;\\n\\n IFluidLiquidity liquidity_ = IFluidLiquidity(c_.liquidity);\\n\\n // if both tokens are not native token and msg.value is sent, revert\\n if (msg.value > 0 && c_.token0 != NATIVE_TOKEN && c_.token1 != NATIVE_TOKEN) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n\\n address token_;\\n uint amt_;\\n for (uint i = 0; i < 2; i++) {\\n if (i == 0) {\\n token_ = c_.token0;\\n amt_ = token0Amt_;\\n } else {\\n token_ = c_.token1;\\n amt_ = token1Amt_;\\n }\\n if (token_ == NATIVE_TOKEN) {\\n if (msg.value > amt_) {\\n SafeTransfer.safeTransferNative(msg.sender, msg.value - amt_);\\n } else if (msg.value < amt_) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n // deposit\\n liquidity_.operate{ value: amt_ }(\\n token_,\\n int(amt_),\\n 0,\\n address(0),\\n address(0),\\n abi.encode(amt_, false, msg.sender)\\n );\\n } else {\\n // deposit\\n liquidity_.operate(token_, int(amt_), 0, address(0), address(0), abi.encode(amt_, false, msg.sender));\\n }\\n }\\n\\n // minting shares according to whatever tokenAmt is bigger\\n // adding shares on storage but not adding shares for any user, hence locking these shares forever\\n // adjusted amounts are in 12 decimals, making shares in 18 decimals\\n uint totalSupplyShares_ = (token0AmtAdjusted_ > token1AmtAdjusted_)\\n ? token0AmtAdjusted_ * 10 ** (18 - TOKENS_DECIMALS_PRECISION)\\n : token1AmtAdjusted_ * 10 ** (18 - TOKENS_DECIMALS_PRECISION);\\n\\n if (totalSupplyShares_ < NINE_DECIMALS) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__UnexpectedPoolState);\\n }\\n\\n // setting initial max shares as X128\\n totalSupplyShares_ = (totalSupplyShares_ & X128) | (X128 << 128);\\n // storing in storage\\n _totalSupplyShares = totalSupplyShares_;\\n }\\n\\n function turnOnSmartDebt(uint token0Amt_) public _check _onlyDelegateCall {\\n if (dexVariables2 & 2 == 2) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__SmartDebtIsAlreadyOn);\\n }\\n uint centerPrice_ = (dexVariables >> 81) & X40;\\n centerPrice_ = (centerPrice_ >> DEFAULT_EXPONENT_SIZE) << (centerPrice_ & DEFAULT_EXPONENT_MASK);\\n _turnOnSmartDebt(token0Amt_, centerPrice_);\\n\\n dexVariables2 = dexVariables2 | 2;\\n\\n emit LogTurnOnSmartDebt(token0Amt_);\\n }\\n\\n /// @dev Can only borrow if DEX pool address borrow config is added in Liquidity Layer for both the tokens else Liquidity Layer will revert\\n /// governance will have access to _turnOnSmartDebt, technically governance here can borrow as much as limits are set\\n /// so it's governance responsibility that it borrows small amount between $100 - $10,000\\n /// Borrowing in 50:50 ratio (doesn't matter if pool configuration is set to 20:80, 30:70, etc, external swap will arbitrage & balance the pool)\\n function _turnOnSmartDebt(uint token0Amt_, uint centerPrice_) internal {\\n IFluidDexT1.ConstantViews memory c_ = IFluidDexT1(address(this)).constantsView();\\n IFluidDexT1.ConstantViews2 memory c2_ = IFluidDexT1(address(this)).constantsView2();\\n\\n uint token0AmtAdjusted_ = (token0Amt_ * c2_.token0NumeratorPrecision) / c2_.token0DenominatorPrecision;\\n\\n uint token1AmtAdjusted_ = (centerPrice_ * token0AmtAdjusted_) / 1e27;\\n\\n uint token1Amt_ = (token1AmtAdjusted_ * c2_.token1DenominatorPrecision) / c2_.token1NumeratorPrecision;\\n\\n IFluidLiquidity liquidity_ = IFluidLiquidity(c_.liquidity);\\n\\n liquidity_.operate(c_.token0, 0, int(token0Amt_), address(0), TEAM_MULTISIG, new bytes(0));\\n liquidity_.operate(c_.token1, 0, int(token1Amt_), address(0), TEAM_MULTISIG, new bytes(0));\\n\\n // minting shares as whatever tokenAmt is bigger\\n // adding shares on storage but not adding shares for any user, hence locking these shares forever\\n // adjusted amounts are in 12 decimals, making shares in 18 decimals\\n uint totalBorrowShares_ = (token0AmtAdjusted_ > token1AmtAdjusted_)\\n ? token0AmtAdjusted_ * 10 ** (18 - TOKENS_DECIMALS_PRECISION)\\n : token1AmtAdjusted_ * 10 ** (18 - TOKENS_DECIMALS_PRECISION);\\n\\n if (totalBorrowShares_ < NINE_DECIMALS) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__UnexpectedPoolState);\\n }\\n\\n // setting initial max shares as X128\\n totalBorrowShares_ = (totalBorrowShares_ & X128) | (X128 << 128);\\n // storing in storage\\n _totalBorrowShares = totalBorrowShares_;\\n }\\n\\n /// @param fee_ in 4 decimals, 10000 = 1%\\n /// @param revenueCut_ in 4 decimals, 100000 = 10%, 10% cut on fee_, so if fee is 1% and cut is 10% then cut in swap amount will be 10% of 1% = 0.1%\\n function updateFeeAndRevenueCut(uint fee_, uint revenueCut_) public _check _onlyDelegateCall {\\n // cut is an integer in storage slot which is more than enough\\n // but from UI we are allowing to send in 4 decimals to maintain consistency & avoid human error in future\\n if (revenueCut_ != 0 && revenueCut_ < FOUR_DECIMALS) {\\n // human input error. should send 0 for wanting 0, not 0 because of precision reduction.\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n\\n revenueCut_ = revenueCut_ / FOUR_DECIMALS;\\n\\n if (fee_ > FIVE_DECIMALS || revenueCut_ > TWO_DECIMALS) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n\\n dexVariables2 =\\n (dexVariables2 & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC000003) |\\n (fee_ << 2) |\\n (revenueCut_ << 19);\\n\\n emit LogUpdateFeeAndRevenueCut(fee_, revenueCut_ * FOUR_DECIMALS);\\n }\\n\\n /// @param upperPercent_ in 4 decimals, 10000 = 1%\\n /// @param lowerPercent_ in 4 decimals, 10000 = 1%\\n /// @param shiftTime_ in secs, in how much time the upper percent configs change should be fully done\\n function updateRangePercents(\\n uint upperPercent_,\\n uint lowerPercent_,\\n uint shiftTime_\\n ) public _check _onlyDelegateCall {\\n uint dexVariables2_ = dexVariables2;\\n if (\\n (upperPercent_ > (SIX_DECIMALS - FOUR_DECIMALS)) || // capping range to 99%.\\n (lowerPercent_ > (SIX_DECIMALS - FOUR_DECIMALS)) || // capping range to 99%.\\n (upperPercent_ == 0) ||\\n (lowerPercent_ == 0) ||\\n (shiftTime_ > X20) ||\\n (((dexVariables2_ >> 26) & 1) == 1) // if last shift is still active then don't allow a newer shift\\n ) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n\\n dexVariables2 =\\n (dexVariables2_ & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80000000003FFFFFF) |\\n (uint((shiftTime_ > 0) ? 1 : 0) << 26) |\\n (upperPercent_ << 27) |\\n (lowerPercent_ << 47);\\n\\n uint oldUpperPercent_ = (dexVariables2_ >> 27) & X20;\\n uint oldLowerPercent_ = (dexVariables2_ >> 47) & X20;\\n\\n if (shiftTime_ > 0) {\\n _rangeShift = uint128(\\n oldUpperPercent_ | (oldLowerPercent_ << 20) | (shiftTime_ << 40) | (block.timestamp << 60)\\n );\\n }\\n // Note _rangeShift is reset when the previous shift is fully completed, which is forced to have happened through if check above\\n\\n emit LogUpdateRangePercents(upperPercent_, lowerPercent_, shiftTime_);\\n }\\n\\n /// @param upperThresholdPercent_ in 4 decimals, 10000 = 1%\\n /// @param lowerThresholdPercent_ in 4 decimals, 10000 = 1%\\n /// @param thresholdShiftTime_ in secs, in how much time the threshold percent should take to shift the ranges\\n /// @param shiftTime_ in secs, in how much time the upper config changes should be fully done.\\n function updateThresholdPercent(\\n uint upperThresholdPercent_,\\n uint lowerThresholdPercent_,\\n uint thresholdShiftTime_,\\n uint shiftTime_\\n ) public _check _onlyDelegateCall {\\n uint dexVariables2_ = dexVariables2;\\n\\n // thresholds are with 0.1% precision, hence removing last 3 decimals.\\n // we are allowing to send in 4 decimals to maintain consistency with other params\\n upperThresholdPercent_ = upperThresholdPercent_ / THREE_DECIMALS;\\n lowerThresholdPercent_ = lowerThresholdPercent_ / THREE_DECIMALS;\\n if (\\n (upperThresholdPercent_ > THREE_DECIMALS) ||\\n (lowerThresholdPercent_ > THREE_DECIMALS) ||\\n (thresholdShiftTime_ == 0) ||\\n (thresholdShiftTime_ > X24) ||\\n ((upperThresholdPercent_ == 0) && (lowerThresholdPercent_ > 0)) ||\\n ((upperThresholdPercent_ > 0) && (lowerThresholdPercent_ == 0)) ||\\n (shiftTime_ > X20) ||\\n (((dexVariables2_ >> 67) & 1) == 1) // if last shift is still active then don't allow a newer shift\\n ) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n\\n dexVariables2 =\\n (dexVariables2_ & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000007FFFFFFFFFFFFFFFF) |\\n (uint((shiftTime_ > 0) ? 1 : 0) << 67) |\\n (upperThresholdPercent_ << 68) |\\n (lowerThresholdPercent_ << 78) |\\n (thresholdShiftTime_ << 88);\\n\\n uint oldUpperThresholdPercent_ = (dexVariables2_ >> 68) & X10;\\n uint oldLowerThresholdPercent_ = (dexVariables2_ >> 78) & X10;\\n uint oldThresholdTime_ = (dexVariables2_ >> 88) & X24;\\n\\n if (shiftTime_ > 0) {\\n _thresholdShift = uint128(\\n oldUpperThresholdPercent_ |\\n (oldLowerThresholdPercent_ << 20) |\\n (shiftTime_ << 40) |\\n (block.timestamp << 60) |\\n (oldThresholdTime_ << 93)\\n );\\n }\\n // Note _thresholdShift is reset when the previous shift is fully completed, which is forced to have happened through if check above\\n\\n emit LogUpdateThresholdPercent(\\n upperThresholdPercent_ * THREE_DECIMALS,\\n lowerThresholdPercent_ * THREE_DECIMALS,\\n thresholdShiftTime_,\\n shiftTime_\\n );\\n }\\n\\n /// @dev we are storing uint nonce from which we will calculate the contract address, to store an address we need 160 bits\\n /// which is quite a lot of storage slot\\n /// @param centerPriceAddress_ nonce < X30, this nonce will be used to calculate contract address\\n function updateCenterPriceAddress(\\n uint centerPriceAddress_,\\n uint percent_,\\n uint time_\\n ) public _check _onlyDelegateCall {\\n if ((centerPriceAddress_ > X30) || (percent_ == 0) || (percent_ > X20) || (time_ == 0) || (time_ > X20)) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n\\n if (centerPriceAddress_ > 0) {\\n IFluidDexT1.ConstantViews memory c_ = IFluidDexT1(address(this)).constantsView();\\n address centerPrice_ = AddressCalcs.addressCalc(c_.deployerContract, centerPriceAddress_);\\n _checkIsContract(centerPrice_);\\n // note: if address is made 0 then as well in the last swap currentPrice is updated on storage, so code will start using that automatically\\n dexVariables2 =\\n (dexVariables2 & 0xFeFFFFFFFFFFFFFFFFFFFFFFFFFFC0000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF) |\\n (centerPriceAddress_ << 112) |\\n (uint(1) << 248);\\n\\n _centerPriceShift = block.timestamp | (percent_ << 33) | (time_ << 53);\\n } else {\\n dexVariables2 = (dexVariables2 & 0xFeFFFFFFFFFFFFFFFFFFFFFFFFFFC0000000FFFFFFFFFFFFFFFFFFFFFFFFFFFF);\\n\\n _centerPriceShift = 0;\\n }\\n\\n emit LogUpdateCenterPriceAddress(centerPriceAddress_, percent_, time_);\\n }\\n\\n /// @dev we are storing uint nonce from which we will calculate the contract address, to store an address we need 160 bits\\n /// which is quite a lot of storage slot\\n /// @param hookAddress_ nonce < X30, this nonce will be used to calculate contract address\\n function updateHookAddress(uint hookAddress_) public _check _onlyDelegateCall {\\n if (hookAddress_ > X30) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n\\n if (hookAddress_ > 0) {\\n IFluidDexT1.ConstantViews memory c_ = IFluidDexT1(address(this)).constantsView();\\n address hook_ = AddressCalcs.addressCalc(c_.deployerContract, hookAddress_);\\n _checkIsContract(hook_);\\n }\\n\\n dexVariables2 =\\n (dexVariables2 & 0xFFFFFFFFFFFFFFFFFFFFF00000003FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) |\\n (hookAddress_ << 142);\\n\\n emit LogUpdateHookAddress(hookAddress_);\\n }\\n\\n function updateCenterPriceLimits(uint maxCenterPrice_, uint minCenterPrice_) public _check _onlyDelegateCall {\\n uint centerPrice_ = (dexVariables >> 81) & X40;\\n centerPrice_ = (centerPrice_ >> DEFAULT_EXPONENT_SIZE) << (centerPrice_ & DEFAULT_EXPONENT_MASK);\\n\\n if (\\n (maxCenterPrice_ <= minCenterPrice_) ||\\n (centerPrice_ <= minCenterPrice_) ||\\n (centerPrice_ >= maxCenterPrice_) ||\\n (minCenterPrice_ == 0)\\n ) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n\\n dexVariables2 =\\n (dexVariables2 & 0xFFFFFFF00000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) |\\n (maxCenterPrice_.toBigNumber(20, 8, BigMathMinified.ROUND_UP) << 172) |\\n (minCenterPrice_.toBigNumber(20, 8, BigMathMinified.ROUND_DOWN) << 200);\\n\\n emit LogUpdateCenterPriceLimits(maxCenterPrice_, minCenterPrice_);\\n }\\n\\n function updateUtilizationLimit(\\n uint token0UtilizationLimit_,\\n uint token1UtilizationLimit_\\n ) public _check _onlyDelegateCall {\\n if (\\n (token0UtilizationLimit_ != 0 && token0UtilizationLimit_ < THREE_DECIMALS) ||\\n (token1UtilizationLimit_ != 0 && token1UtilizationLimit_ < THREE_DECIMALS)\\n ) {\\n // human input error. should send 0 for wanting 0, not 0 because of precision reduction.\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n\\n token0UtilizationLimit_ = token0UtilizationLimit_ / THREE_DECIMALS;\\n token1UtilizationLimit_ = token1UtilizationLimit_ / THREE_DECIMALS;\\n\\n if (token0UtilizationLimit_ > THREE_DECIMALS || token1UtilizationLimit_ > THREE_DECIMALS) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n\\n dexVariables2 =\\n (dexVariables2 & 0xFF00000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) |\\n (token0UtilizationLimit_ << 228) |\\n (token1UtilizationLimit_ << 238);\\n\\n emit LogUpdateUtilizationLimit(\\n token0UtilizationLimit_ * THREE_DECIMALS,\\n token1UtilizationLimit_ * THREE_DECIMALS\\n );\\n }\\n\\n function updateUserSupplyConfigs(UserSupplyConfig[] memory userSupplyConfigs_) external _check _onlyDelegateCall {\\n uint256 userSupplyData_;\\n\\n for (uint256 i; i < userSupplyConfigs_.length; ) {\\n _checkIsContract(userSupplyConfigs_[i].user);\\n if (userSupplyConfigs_[i].expandDuration == 0) {\\n // can not set expand duration to 0 as that could cause a division by 0 in LiquidityCalcs.\\n // having expand duration as 0 is anyway not an expected config so removing the possibility for that.\\n // if no expansion is wanted, simply set expandDuration to 1 and expandPercent to 0.\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n if (userSupplyConfigs_[i].expandPercent > FOUR_DECIMALS) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n if (userSupplyConfigs_[i].expandDuration > X24) {\\n // duration is max 24 bits\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n if (userSupplyConfigs_[i].baseWithdrawalLimit == 0) {\\n // base withdrawal limit can not be 0. As a side effect, this ensures that there is no supply config\\n // where all values would be 0, so configured users can be differentiated in the mapping.\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n // @dev baseWithdrawalLimit has no max bits amount as it is in normal token amount & converted to BigNumber\\n\\n // get current user config data from storage\\n userSupplyData_ = _userSupplyData[userSupplyConfigs_[i].user];\\n\\n // Updating user data on storage\\n _userSupplyData[userSupplyConfigs_[i].user] =\\n // mask to update first bit + bits 162-217 (expand percentage, expand duration, base limit)\\n (userSupplyData_ & 0xfffffffffc00000000000003ffffffffffffffffffffffffffffffffffffffff) |\\n (1) |\\n (userSupplyConfigs_[i].expandPercent << DexSlotsLink.BITS_USER_SUPPLY_EXPAND_PERCENT) |\\n (userSupplyConfigs_[i].expandDuration << DexSlotsLink.BITS_USER_SUPPLY_EXPAND_DURATION) |\\n // convert base withdrawal limit to BigNumber for storage (10 | 8). (below this, 100% can be withdrawn)\\n (userSupplyConfigs_[i].baseWithdrawalLimit.toBigNumber(\\n SMALL_COEFFICIENT_SIZE,\\n DEFAULT_EXPONENT_SIZE,\\n BigMathMinified.ROUND_DOWN\\n ) << DexSlotsLink.BITS_USER_SUPPLY_BASE_WITHDRAWAL_LIMIT);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit LogUpdateUserSupplyConfigs(userSupplyConfigs_);\\n }\\n\\n /// @notice sets a new withdrawal limit as the current limit for a certain user\\n /// @param user_ user address for which to update the withdrawal limit\\n /// @param newLimit_ new limit until which user supply can decrease to.\\n /// Important: input in raw. Must account for exchange price in input param calculation.\\n /// Note any limit that is < max expansion or > current user supply will set max expansion limit or\\n /// current user supply as limit respectively.\\n /// - set 0 to make maximum possible withdrawable: instant full expansion, and if that goes\\n /// below base limit then fully down to 0.\\n /// - set type(uint256).max to make current withdrawable 0 (sets current user supply as limit).\\n function updateUserWithdrawalLimit(address user_, uint256 newLimit_) external _check _onlyDelegateCall {\\n _checkIsContract(user_);\\n\\n // get current user config data from storage\\n uint256 userSupplyData_ = _userSupplyData[user_];\\n if (userSupplyData_ == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__UserNotDefined);\\n }\\n\\n // get current user supply amount\\n uint256 userSupply_ = (userSupplyData_ >> DexSlotsLink.BITS_USER_SUPPLY_AMOUNT) & X64;\\n userSupply_ = (userSupply_ >> DEFAULT_EXPONENT_SIZE) << (userSupply_ & DEFAULT_EXPONENT_MASK);\\n\\n // maxExpansionLimit_ => withdrawal limit expandPercent (is in 1e2 decimals)\\n uint256 maxExpansionLimit_ = (userSupplyData_ >> DexSlotsLink.BITS_USER_SUPPLY_EXPAND_PERCENT) & X14;\\n maxExpansionLimit_ = userSupply_ - ((userSupply_ * maxExpansionLimit_) / FOUR_DECIMALS);\\n\\n if (newLimit_ == 0 || newLimit_ < maxExpansionLimit_) {\\n // instant full expansion, and if that goes below base limit then fully down to 0.\\n // if we were to set a limit that goes below max expansion limit, then after 1 deposit or 1 withdrawal it would\\n // become based on the max expansion limit again (unless it goes below base limit), which can be confusing.\\n // Also updating base limit here to avoid the change after 1 interaction might have undesired effects.\\n // So limiting update to max. full expansion. If more is desired, this must be called again after some withdraws.\\n newLimit_ = maxExpansionLimit_;\\n } else if (newLimit_ == type(uint256).max || newLimit_ > userSupply_) {\\n // current withdrawable 0 (sets current user supply as limit).\\n newLimit_ = userSupply_;\\n }\\n // else => new limit is between > max expansion and < user supply.\\n\\n // set input limit as new current limit. instant withdrawable will be userSupply_ - newLimit_\\n\\n uint256 baseLimit_ = (userSupplyData_ >> DexSlotsLink.BITS_USER_SUPPLY_BASE_WITHDRAWAL_LIMIT) & X18;\\n baseLimit_ = (baseLimit_ >> DEFAULT_EXPONENT_SIZE) << (baseLimit_ & DEFAULT_EXPONENT_MASK);\\n if (userSupply_ < baseLimit_) {\\n newLimit_ = 0;\\n // Note if new limit goes below base limit, it follows default behavior: first there must be a withdrawal\\n // that brings user supply below base limit, then the limit will be set to 0.\\n // otherwise we would have the same problem as described above after 1 interaction.\\n }\\n\\n // Update on storage\\n _userSupplyData[user_] =\\n // mask to update bits 65-161 (withdrawal limit, timestamp)\\n (userSupplyData_ & 0xFFFFFFFFFFFFFFFFFFFFFFFC000000000000000000000001FFFFFFFFFFFFFFFF) |\\n (newLimit_.toBigNumber(DEFAULT_COEFFICIENT_SIZE, DEFAULT_EXPONENT_SIZE, BigMathMinified.ROUND_DOWN) <<\\n DexSlotsLink.BITS_USER_SUPPLY_PREVIOUS_WITHDRAWAL_LIMIT) | // converted to BigNumber can not overflow\\n (block.timestamp << DexSlotsLink.BITS_USER_SUPPLY_LAST_UPDATE_TIMESTAMP);\\n\\n emit LogUpdateUserWithdrawalLimit(user_, newLimit_);\\n }\\n\\n function updateUserBorrowConfigs(UserBorrowConfig[] memory userBorrowConfigs_) external _check _onlyDelegateCall {\\n uint256 userBorrowData_;\\n\\n for (uint256 i; i < userBorrowConfigs_.length; ) {\\n _checkIsContract(userBorrowConfigs_[i].user);\\n if (\\n // max debt ceiling must not be smaller than base debt ceiling. Also covers case where max = 0 but base > 0\\n userBorrowConfigs_[i].baseDebtCeiling > userBorrowConfigs_[i].maxDebtCeiling ||\\n // can not set expand duration to 0 as that could cause a division by 0 in LiquidityCalcs.\\n // having expand duration as 0 is anyway not an expected config so removing the possibility for that.\\n // if no expansion is wanted, simply set expandDuration to 1 and expandPercent to 0.\\n userBorrowConfigs_[i].expandDuration == 0\\n ) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n if (userBorrowConfigs_[i].expandPercent > X14) {\\n // expandPercent is max 14 bits\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n if (userBorrowConfigs_[i].expandDuration > X24) {\\n // duration is max 24 bits\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n if (userBorrowConfigs_[i].baseDebtCeiling == 0 || userBorrowConfigs_[i].maxDebtCeiling == 0) {\\n // limits can not be 0. As a side effect, this ensures that there is no borrow config\\n // where all values would be 0, so configured users can be differentiated in the mapping.\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n // @dev baseDebtCeiling & maxDebtCeiling have no max bits amount as they are in normal token amount\\n // and then converted to BigNumber\\n\\n // get current user config data from storage\\n userBorrowData_ = _userBorrowData[userBorrowConfigs_[i].user];\\n\\n // Updating user data on storage\\n\\n _userBorrowData[userBorrowConfigs_[i].user] =\\n // mask to update first bit (mode) + bits 162-235 (debt limit values)\\n (userBorrowData_ & 0xfffff0000000000000000003ffffffffffffffffffffffffffffffffffffffff) |\\n (1) |\\n (userBorrowConfigs_[i].expandPercent << DexSlotsLink.BITS_USER_BORROW_EXPAND_PERCENT) |\\n (userBorrowConfigs_[i].expandDuration << DexSlotsLink.BITS_USER_BORROW_EXPAND_DURATION) |\\n // convert base debt limit to BigNumber for storage (10 | 8). (borrow is always possible below this)\\n (userBorrowConfigs_[i].baseDebtCeiling.toBigNumber(\\n SMALL_COEFFICIENT_SIZE,\\n DEFAULT_EXPONENT_SIZE,\\n BigMathMinified.ROUND_DOWN\\n ) << DexSlotsLink.BITS_USER_BORROW_BASE_BORROW_LIMIT) |\\n // convert max debt limit to BigNumber for storage (10 | 8). (no borrowing ever possible above this)\\n (userBorrowConfigs_[i].maxDebtCeiling.toBigNumber(\\n SMALL_COEFFICIENT_SIZE,\\n DEFAULT_EXPONENT_SIZE,\\n BigMathMinified.ROUND_DOWN\\n ) << DexSlotsLink.BITS_USER_BORROW_MAX_BORROW_LIMIT);\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit LogUpdateUserBorrowConfigs(userBorrowConfigs_);\\n }\\n\\n function pauseUser(address user_, bool pauseSupply_, bool pauseBorrow_) public _onlyDelegateCall {\\n _checkIsContract(user_);\\n\\n uint256 userData_;\\n\\n if (pauseSupply_) {\\n // userData_ => userSupplyData_\\n userData_ = _userSupplyData[user_];\\n if (userData_ == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__UserNotDefined);\\n }\\n if (userData_ & 1 == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidPauseToggle);\\n }\\n // set first bit as 0, meaning all user's supply operations are paused\\n _userSupplyData[user_] = userData_ & (~uint(1));\\n }\\n\\n if (pauseBorrow_) {\\n // userData_ => userBorrowData_\\n userData_ = _userBorrowData[user_];\\n if (userData_ == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__UserNotDefined);\\n }\\n if (userData_ & 1 == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidPauseToggle);\\n }\\n // set first bit as 0, meaning all user's borrow operations are paused\\n _userBorrowData[user_] = userData_ & (~uint(1));\\n }\\n\\n emit LogPauseUser(user_, pauseSupply_, pauseBorrow_);\\n }\\n\\n function unpauseUser(address user_, bool unpauseSupply_, bool unpauseBorrow_) public _onlyDelegateCall {\\n _checkIsContract(user_);\\n\\n uint256 userData_;\\n\\n if (unpauseSupply_) {\\n // userData_ => userSupplyData_\\n userData_ = _userSupplyData[user_];\\n if (userData_ == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__UserNotDefined);\\n }\\n if (userData_ & 1 == 1) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidPauseToggle);\\n }\\n\\n // set first bit as 1, meaning unpause\\n _userSupplyData[user_] = userData_ | 1;\\n }\\n\\n if (unpauseBorrow_) {\\n // userData_ => userBorrowData_\\n userData_ = _userBorrowData[user_];\\n if (userData_ == 0) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__UserNotDefined);\\n }\\n if (userData_ & 1 == 1) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidPauseToggle);\\n }\\n\\n // set first bit as 1, meaning unpause\\n _userBorrowData[user_] = userData_ | 1;\\n }\\n\\n emit LogUnpauseUser(user_, unpauseSupply_, unpauseBorrow_);\\n }\\n\\n /// note we have not added updateUtilizationLimit in the params here because struct of InitializeVariables already has 16 variables\\n /// we might skip adding it and let it update through the indepdent function to keep initialize struct simple\\n function initialize(InitializeVariables memory i_) public payable _onlyDelegateCall {\\n _checkIsContract(TEAM_MULTISIG);\\n\\n if (!(i_.smartCol || i_.smartDebt)) {\\n // either 1 should be on upon pool initialization\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n // cut is an integer in storage slot which is more than enough\\n // but from UI we are allowing to send in 4 decimals to maintain consistency & avoid human error in future\\n if (i_.revenueCut != 0 && i_.revenueCut < FOUR_DECIMALS) {\\n // human input error. should send 0 for wanting 0, not 0 because of precision reduction.\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n\\n // revenue cut has no decimals\\n i_.revenueCut = i_.revenueCut / FOUR_DECIMALS;\\n i_.upperShiftThreshold = i_.upperShiftThreshold / THREE_DECIMALS;\\n i_.lowerShiftThreshold = i_.lowerShiftThreshold / THREE_DECIMALS;\\n\\n if (\\n (i_.fee > FIVE_DECIMALS) || // fee cannot be more than 10%\\n (i_.revenueCut > TWO_DECIMALS) ||\\n (i_.upperPercent > (SIX_DECIMALS - FOUR_DECIMALS)) || // capping range to 99%.\\n (i_.lowerPercent > (SIX_DECIMALS - FOUR_DECIMALS)) || // capping range to 99%.\\n (i_.upperPercent == 0) ||\\n (i_.lowerPercent == 0) ||\\n (i_.upperShiftThreshold > THREE_DECIMALS) ||\\n (i_.lowerShiftThreshold > THREE_DECIMALS) ||\\n ((i_.upperShiftThreshold == 0) && (i_.lowerShiftThreshold > 0)) ||\\n ((i_.upperShiftThreshold > 0) && (i_.lowerShiftThreshold == 0)) ||\\n (i_.thresholdShiftTime == 0) ||\\n (i_.thresholdShiftTime > X24) ||\\n (i_.centerPriceAddress > X30) ||\\n (i_.hookAddress > X30) ||\\n (i_.centerPrice <= i_.minCenterPrice) ||\\n (i_.centerPrice >= i_.maxCenterPrice) ||\\n (i_.minCenterPrice == 0)\\n ) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n\\n uint dexVariables2_;\\n\\n if (i_.smartCol) {\\n _turnOnSmartCol(i_.token0ColAmt, i_.centerPrice);\\n dexVariables2_ = dexVariables2_ | 1;\\n }\\n\\n if (i_.smartDebt) {\\n _turnOnSmartDebt(i_.token0DebtAmt, i_.centerPrice);\\n dexVariables2_ = dexVariables2_ | 2;\\n }\\n\\n i_.centerPrice = i_.centerPrice.toBigNumber(32, 8, BigMathMinified.ROUND_DOWN);\\n // setting up initial dexVariables\\n dexVariables =\\n (i_.centerPrice << 1) |\\n (i_.centerPrice << 41) |\\n (i_.centerPrice << 81) |\\n (block.timestamp << 121) |\\n (60 << 154) | // just setting 60 seconds, no particular reason for it why \\\"60\\\"\\n (7 << 176);\\n\\n dexVariables2 =\\n dexVariables2_ |\\n (i_.fee << 2) |\\n (i_.revenueCut << 19) |\\n (i_.upperPercent << 27) |\\n (i_.lowerPercent << 47) |\\n (i_.upperShiftThreshold << 68) |\\n (i_.lowerShiftThreshold << 78) |\\n (i_.thresholdShiftTime << 88) |\\n (i_.centerPriceAddress << 112) |\\n (i_.hookAddress << 142) |\\n (i_.maxCenterPrice.toBigNumber(20, 8, BigMathMinified.ROUND_UP) << 172) |\\n (i_.minCenterPrice.toBigNumber(20, 8, BigMathMinified.ROUND_DOWN) << 200) |\\n (THREE_DECIMALS << 228) | // setting initial token0 max utilization to 100%\\n (THREE_DECIMALS << 238); // setting initial token1 max utilization to 100%\\n\\n emit LogInitializePoolConfig(\\n i_.smartCol,\\n i_.smartDebt,\\n i_.token0ColAmt,\\n i_.token0DebtAmt,\\n i_.fee,\\n i_.revenueCut * FOUR_DECIMALS,\\n i_.centerPriceAddress,\\n i_.hookAddress\\n );\\n\\n emit LogInitializePriceParams(\\n i_.upperPercent,\\n i_.lowerPercent,\\n i_.upperShiftThreshold * THREE_DECIMALS,\\n i_.lowerShiftThreshold * THREE_DECIMALS,\\n i_.thresholdShiftTime,\\n i_.maxCenterPrice,\\n i_.minCenterPrice\\n );\\n }\\n\\n function pauseSwapAndArbitrage() public _onlyDelegateCall {\\n uint dexVariables2_ = dexVariables2;\\n if ((dexVariables2_ >> 255) == 1) {\\n // already paused\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n dexVariables2 = dexVariables2_ | (uint(1) << 255);\\n\\n emit LogPauseSwapAndArbitrage();\\n }\\n\\n function unpauseSwapAndArbitrage() public _onlyDelegateCall {\\n uint dexVariables2_ = dexVariables2;\\n if ((dexVariables2_ >> 255) == 0) {\\n // already unpaused\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n dexVariables2 = (dexVariables2_ << 1) >> 1;\\n\\n emit LogUnpauseSwapAndArbitrage();\\n }\\n\\n /// @notice sends any potentially stuck funds to Liquidity contract.\\n /// @dev this contract never holds any funds as all operations send / receive funds from user <-> Liquidity.\\n function rescueFunds(address token_) external _onlyDelegateCall {\\n address liquidity_ = IFluidDexT1(address(this)).constantsView().liquidity;\\n if (token_ == NATIVE_TOKEN) {\\n SafeTransfer.safeTransferNative(liquidity_, address(this).balance);\\n } else {\\n SafeTransfer.safeTransfer(token_, liquidity_, IERC20(token_).balanceOf(address(this)));\\n }\\n\\n emit LogRescueFunds(token_);\\n }\\n\\n function updateMaxSupplyShares(uint maxSupplyShares_) external _onlyDelegateCall {\\n uint totalSupplyShares_ = _totalSupplyShares;\\n\\n // totalSupplyShares_ can only be 0 when smart col pool is not initialized\\n if ((maxSupplyShares_ > X128) || (totalSupplyShares_ == 0)) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n _totalSupplyShares = (totalSupplyShares_ & X128) | (maxSupplyShares_ << 128);\\n\\n emit LogUpdateMaxSupplyShares(maxSupplyShares_);\\n }\\n\\n function updateMaxBorrowShares(uint maxBorrowShares_) external _onlyDelegateCall {\\n uint totalBorrowShares_ = _totalBorrowShares;\\n\\n // totalBorrowShares_ can only be 0 when smart debt pool is not initialized\\n if ((maxBorrowShares_ > X128) || (totalBorrowShares_ == 0)) {\\n revert FluidDexError(ErrorTypes.DexT1Admin__ConfigOverflow);\\n }\\n _totalBorrowShares = (totalBorrowShares_ & X128) | (maxBorrowShares_ << 128);\\n\\n emit LogUpdateMaxBorrowShares(maxBorrowShares_);\\n }\\n\\n /// @notice Toggles the oracle activation\\n /// @param turnOn_ Whether to turn on or off the oracle\\n function toggleOracleActivation(bool turnOn_) external _onlyDelegateCall {\\n uint dexVariables_ = dexVariables;\\n if ((((dexVariables_ >> 195) & 1 == 1) && turnOn_) || (((dexVariables_ >> 195) & 1 == 0) && !turnOn_)) {\\n // already active\\n revert FluidDexError(ErrorTypes.DexT1Admin__InvalidParams);\\n }\\n if (turnOn_) {\\n dexVariables = dexVariables_ | (uint(1) << 195);\\n } else {\\n dexVariables = dexVariables_ & (~(uint(1) << 195));\\n }\\n\\n emit LogToggleOracleActivation(turnOn_);\\n }\\n}\\n\",\"keccak256\":\"0xd1cd0627f3af278d8c0dcaed8e2be74738431b019291444e2c669fcd8e136b25\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/adminModule/structs.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nabstract contract Structs {\\n struct InitializeVariables {\\n bool smartCol;\\n uint token0ColAmt;\\n bool smartDebt;\\n uint token0DebtAmt;\\n uint centerPrice;\\n uint fee;\\n uint revenueCut;\\n uint upperPercent;\\n uint lowerPercent;\\n uint upperShiftThreshold;\\n uint lowerShiftThreshold;\\n uint thresholdShiftTime;\\n uint centerPriceAddress;\\n uint hookAddress;\\n uint maxCenterPrice;\\n uint minCenterPrice;\\n }\\n\\n /// @notice struct to set user supply & withdrawal config\\n struct UserSupplyConfig {\\n ///\\n /// @param user address\\n address user;\\n ///\\n /// @param expandPercent withdrawal limit expand percent. in 1e2: 100% = 10_000; 1% = 100\\n /// Also used to calculate rate at which withdrawal limit should decrease (instant).\\n uint256 expandPercent;\\n ///\\n /// @param expandDuration withdrawal limit expand duration in seconds.\\n /// used to calculate rate together with expandPercent\\n uint256 expandDuration;\\n ///\\n /// @param baseWithdrawalLimit base limit, below this, user can withdraw the entire amount.\\n /// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:\\n /// with interest -> raw, without interest -> normal\\n uint256 baseWithdrawalLimit;\\n }\\n\\n /// @notice struct to set user borrow & payback config\\n struct UserBorrowConfig {\\n ///\\n /// @param user address\\n address user;\\n ///\\n /// @param expandPercent debt limit expand percent. in 1e2: 100% = 10_000; 1% = 100\\n /// Also used to calculate rate at which debt limit should decrease (instant).\\n uint256 expandPercent;\\n ///\\n /// @param expandDuration debt limit expand duration in seconds.\\n /// used to calculate rate together with expandPercent\\n uint256 expandDuration;\\n ///\\n /// @param baseDebtCeiling base borrow limit. until here, borrow limit remains as baseDebtCeiling\\n /// (user can borrow until this point at once without stepped expansion). Above this, automated limit comes in place.\\n /// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:\\n /// with interest -> raw, without interest -> normal\\n uint256 baseDebtCeiling;\\n ///\\n /// @param maxDebtCeiling max borrow ceiling, maximum amount the user can borrow.\\n /// amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:\\n /// with interest -> raw, without interest -> normal\\n uint256 maxDebtCeiling;\\n }\\n}\\n\",\"keccak256\":\"0x78aafe0823a9ceeda9e3e7f44aac785b2bf6a4a7517798678a69ac06c0e33fe1\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/common/constantVariables.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { StorageRead } from \\\"../../../../libraries/storageRead.sol\\\";\\n\\ninterface ITokenDecimals {\\n function decimals() external view returns (uint8);\\n}\\n\\nabstract contract ConstantVariables is StorageRead {\\n /*//////////////////////////////////////////////////////////////\\n CONSTANTS / IMMUTABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n address internal constant TEAM_MULTISIG = 0x4F6F977aCDD1177DCD81aB83074855EcB9C2D49e;\\n\\n address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n uint256 internal constant NATIVE_TOKEN_DECIMALS = 18;\\n address internal constant ADDRESS_DEAD = 0x000000000000000000000000000000000000dEaD;\\n uint256 internal constant TOKENS_DECIMALS_PRECISION = 12;\\n uint256 internal constant TOKENS_DECIMALS = 1e12;\\n\\n uint256 internal constant SMALL_COEFFICIENT_SIZE = 10;\\n uint256 internal constant DEFAULT_COEFFICIENT_SIZE = 56;\\n uint256 internal constant DEFAULT_EXPONENT_SIZE = 8;\\n uint256 internal constant DEFAULT_EXPONENT_MASK = 0xFF;\\n\\n uint256 internal constant X2 = 0x3;\\n uint256 internal constant X3 = 0x7;\\n uint256 internal constant X5 = 0x1f;\\n uint256 internal constant X7 = 0x7f;\\n uint256 internal constant X8 = 0xff;\\n uint256 internal constant X9 = 0x1ff;\\n uint256 internal constant X10 = 0x3ff;\\n uint256 internal constant X11 = 0x7ff;\\n uint256 internal constant X14 = 0x3fff;\\n uint256 internal constant X16 = 0xffff;\\n uint256 internal constant X17 = 0x1ffff;\\n uint256 internal constant X18 = 0x3ffff;\\n uint256 internal constant X20 = 0xfffff;\\n uint256 internal constant X22 = 0x3fffff;\\n uint256 internal constant X23 = 0x7fffff;\\n uint256 internal constant X24 = 0xffffff;\\n uint256 internal constant X28 = 0xfffffff;\\n uint256 internal constant X30 = 0x3fffffff;\\n uint256 internal constant X32 = 0xffffffff;\\n uint256 internal constant X33 = 0x1ffffffff;\\n uint256 internal constant X40 = 0xffffffffff;\\n uint256 internal constant X64 = 0xffffffffffffffff;\\n uint256 internal constant X96 = 0xffffffffffffffffffffffff;\\n uint256 internal constant X128 = 0xffffffffffffffffffffffffffffffff;\\n\\n uint256 internal constant TWO_DECIMALS = 1e2;\\n uint256 internal constant THREE_DECIMALS = 1e3;\\n uint256 internal constant FOUR_DECIMALS = 1e4;\\n uint256 internal constant FIVE_DECIMALS = 1e5;\\n uint256 internal constant SIX_DECIMALS = 1e6;\\n uint256 internal constant EIGHT_DECIMALS = 1e8;\\n uint256 internal constant NINE_DECIMALS = 1e9;\\n\\n uint256 internal constant PRICE_PRECISION = 1e27;\\n\\n uint256 internal constant ORACLE_PRECISION = 1e18; // 100%\\n uint256 internal constant ORACLE_LIMIT = 5 * 1e16; // 5%\\n\\n /// after swap token0 reserves should not be less than token1InToken0 / MINIMUM_LIQUIDITY_SWAP\\n /// after swap token1 reserves should not be less than token0InToken1 / MINIMUM_LIQUIDITY_SWAP\\n uint256 internal constant MINIMUM_LIQUIDITY_SWAP = 1e4;\\n\\n /// after user operations (deposit, withdraw, borrow, payback) token0 reserves should not be less than token1InToken0 / MINIMUM_LIQUIDITY_USER_OPERATIONS\\n /// after user operations (deposit, withdraw, borrow, payback) token1 reserves should not be less than token0InToken0 / MINIMUM_LIQUIDITY_USER_OPERATIONS\\n uint256 internal constant MINIMUM_LIQUIDITY_USER_OPERATIONS = 1e6;\\n\\n /// To skip transfers in liquidity layer if token in & out is same and liquidity layer is on the winning side\\n bytes32 internal constant SKIP_TRANSFERS = keccak256(bytes(\\\"SKIP_TRANSFERS\\\"));\\n\\n function _decimals(address token_) internal view returns (uint256) {\\n return (token_ == NATIVE_TOKEN) ? NATIVE_TOKEN_DECIMALS : ITokenDecimals(token_).decimals();\\n }\\n}\\n\",\"keccak256\":\"0xab697f39bfede319530bac2bc86e71e663c6b81de2bafea4255f2cc65f2b520b\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/common/variables.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nabstract contract Variables {\\n /*//////////////////////////////////////////////////////////////\\n STORAGE VARIABLES\\n //////////////////////////////////////////////////////////////*/\\n\\n /// First 1 bit => 0 => re-entrancy. If 0 then allow transaction to go, else throw.\\n /// Next 40 bits => 1-40 => last to last stored price. BigNumber (32 bits precision, 8 bits exponent)\\n /// Next 40 bits => 41-80 => last stored price of pool. BigNumber (32 bits precision, 8 bits exponent)\\n /// Next 40 bits => 81-120 => center price. Center price from where the ranges will be calculated. BigNumber (32 bits precision, 8 bits exponent)\\n /// Next 33 bits => 121-153 => last interaction time stamp\\n /// Next 22 bits => 154-175 => max 4194303 seconds (~1165 hrs, ~48.5 days), time difference between last to last and last price stored\\n /// Next 3 bits => 176-178 => oracle checkpoint, if 0 then first slot, if 7 then last slot\\n /// Next 16 bits => 179-194 => current mapping or oracle, after every 8 transaction it will increase by 1. Max capacity is 65535 but it can be lower than that check dexVariables2\\n /// Next 1 bit => 195 => is oracle active?\\n uint internal dexVariables;\\n\\n /// Next 1 bit => 0 => is smart collateral enabled?\\n /// Next 1 bit => 1 => is smart debt enabled?\\n /// Next 17 bits => 2-18 => fee (1% = 10000, max value: 100000 = 10%, fee should not be more than 10%)\\n /// Next 7 bits => 19-25 => revenue cut from fee (1 = 1%, 100 = 100%). If fee is 1000 = 0.1% and revenue cut is 10 = 10% then governance get 0.01% of every swap\\n /// Next 1 bit => 26 => percent active change going on or not, 0 = false, 1 = true, if true than that means governance has updated the below percents and the update should happen with a specified time.\\n /// Next 20 bits => 27-46 => upperPercent (1% = 10000, max value: 104.8575%) upperRange - upperRange * upperPercent = centerPrice. Hence, upperRange = centerPrice / (1 - upperPercent)\\n /// Next 20 bits => 47-66 => lowerPercent. lowerRange = centerPrice - centerPrice * lowerPercent.\\n /// Next 1 bit => 67 => threshold percent active change going on or not, 0 = false, 1 = true, if true than that means governance has updated the below percents and the update should happen with a specified time.\\n /// Next 10 bits => 68-77 => upper shift threshold percent, 1 = 0.1%. 1000 = 100%. if currentPrice > (centerPrice + (upperRange - centerPrice) * (1000 - upperShiftThresholdPercent) / 1000) then trigger shift\\n /// Next 10 bits => 78-87 => lower shift threshold percent, 1 = 0.1%. 1000 = 100%. if currentPrice < (centerPrice - (centerPrice - lowerRange) * (1000 - lowerShiftThresholdPercent) / 1000) then trigger shift\\n /// Next 24 bits => 88-111 => Shifting time (~194 days) (rate = (% up + % down) / time ?)\\n /// Next 30 bits => 112-131 => Address of center price if center price should be fetched externally, for example, for wstETH <> ETH pool, fetch wstETH exchange rate into stETH from wstETH contract.\\n /// Why fetch it externally? Because let's say pool width is 0.1% and wstETH temporarily got depeg of 0.5% then pool will start to shift to newer pricing\\n /// but we don't want pool to shift to 0.5% because we know the depeg will recover so to avoid the loss for users.\\n /// Next 30 bits => 142-171 => Hooks bits, calculate hook address by storing deployment nonce from factory.\\n /// Next 28 bits => 172-199 => max center price. BigNumber (20 bits precision, 8 bits exponent)\\n /// Next 28 bits => 200-227 => min center price. BigNumber (20 bits precision, 8 bits exponent)\\n /// Next 10 bits => 228-237 => utilization limit of token0. Max value 1000 = 100%, if 100% then no need to check the utilization.\\n /// Next 10 bits => 238-247 => utilization limit of token1. Max value 1000 = 100%, if 100% then no need to check the utilization.\\n /// Next 1 bit => 248 => is center price shift active\\n /// Last 1 bit => 255 => Pause swap & arbitrage (only perfect functions will be usable), if we need to pause entire DEX then that can be done through pausing DEX on Liquidity Layer\\n uint internal dexVariables2;\\n\\n /// first 128 bits => 0-127 => total supply shares\\n /// last 128 bits => 128-255 => max supply shares\\n uint internal _totalSupplyShares;\\n\\n /// @dev user supply data: user -> data\\n /// Aside from 1st bit, entire bits here are same as liquidity layer _userSupplyData. Hence exact same supply & borrow limit library can be used\\n /// First 1 bit => 0 => is user allowed to supply? 0 = not allowed, 1 = allowed\\n /// Next 64 bits => 1- 64 => user supply amount/shares; BigMath: 56 | 8\\n /// Next 64 bits => 65-128 => previous user withdrawal limit; BigMath: 56 | 8\\n /// Next 33 bits => 129-161 => last triggered process timestamp (enough until 16 March 2242 -> max value 8589934591)\\n /// Next 14 bits => 162-175 => expand withdrawal limit percentage (in 1e2: 100% = 10_000; 1% = 100 -> max value 16_383).\\n /// @dev shrinking is instant\\n /// Next 24 bits => 176-199 => withdrawal limit expand duration in seconds.(Max value 16_777_215; ~4_660 hours, ~194 days)\\n /// Next 18 bits => 200-217 => base withdrawal limit: below this, 100% withdrawals can be done (aka shares can be burned); BigMath: 10 | 8\\n /// Next 38 bits => 218-255 => empty for future use\\n mapping(address => uint) internal _userSupplyData;\\n\\n /// first 128 bits => 0-127 => total borrow shares\\n /// last 128 bits => 128-255 => max borrow shares\\n uint internal _totalBorrowShares;\\n\\n /// @dev user borrow data: user -> data\\n /// Aside from 1st bit, entire bits here are same as liquidity layer _userBorrowData. Hence exact same supply & borrow limit library function can be used\\n /// First 1 bit => 0 => is user allowed to borrow? 0 = not allowed, 1 = allowed\\n /// Next 64 bits => 1- 64 => user debt amount/shares; BigMath: 56 | 8\\n /// Next 64 bits => 65-128 => previous user debt ceiling; BigMath: 56 | 8\\n /// Next 33 bits => 129-161 => last triggered process timestamp (enough until 16 March 2242 -> max value 8589934591)\\n /// Next 14 bits => 162-175 => expand debt ceiling percentage (in 1e2: 100% = 10_000; 1% = 100 -> max value 16_383)\\n /// @dev shrinking is instant\\n /// Next 24 bits => 176-199 => debt ceiling expand duration in seconds (Max value 16_777_215; ~4_660 hours, ~194 days)\\n /// Next 18 bits => 200-217 => base debt ceiling: below this, there's no debt ceiling limits; BigMath: 10 | 8\\n /// Next 18 bits => 218-235 => max debt ceiling: absolute maximum debt ceiling can expand to; BigMath: 10 | 8\\n /// Next 20 bits => 236-255 => empty for future use\\n mapping(address => uint) internal _userBorrowData;\\n\\n /// Price difference between last swap of last block & last swap of new block\\n /// If last swap happened at Block B - 4 and next swap happened after 4 blocks at Block B then it will store that difference\\n /// considering time difference between these 4 blocks is 48 seconds, hence time will be stored as 48\\n /// New oracle update:\\n /// time to 9 bits and precision to 22 bits\\n /// if time exceeds 9 bits which is 511 sec or ~8.5 min then we will use 2 oracle slot to store the data\\n /// we will leave the both time slot as 0 and on first sign + precision slot we will store time and\\n /// on second sign + precision slot we will store sign & precision\\n /// First 9 bits => 0- 8 => time, 511 seconds\\n /// Next 1 bit => 9 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 10- 31 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n /// Next 9 bits => 32- 40 => time, 511 seconds\\n /// Next 1 bit => 41 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 42- 63 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n /// Next 9 bits => 64- 72 => time, 511 seconds\\n /// Next 1 bit => 73 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 74- 95 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n /// Next 9 bits => 96-104 => time, 511 seconds\\n /// Next 1 bit => 105 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 106-127 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n /// Next 9 bits => 128-136 => time, 511 seconds\\n /// Next 1 bit => 137 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 138-159 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n /// Next 9 bits => 160-168 => time, 511 seconds\\n /// Next 1 bit => 169 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 170-191 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n /// Next 9 bits => 192-200 => time, 511 seconds\\n /// Next 1 bit => 201 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 202-223 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n /// Next 9 bits => 224-232 => time, 511 seconds\\n /// Next 1 bit => 233 => sign of percent in change, if 1 then 0 or positive, else negative\\n /// Next 22 bits => 234-255 => 4194303, change in price, max change is capped to 5%, so 4194303 = 5%, 1 = 0.0000011920931797249746%\\n mapping(uint => uint) internal _oracle;\\n\\n /// First 20 bits => 0-19 => old upper shift\\n /// Next 20 bits => 20-39 => old lower shift\\n /// Next 20 bits => 40-59 => in seconds, ~12 days max, shift can last for max ~12 days\\n /// Next 33 bits => 60-92 => timestamp of when the shift has started.\\n uint128 internal _rangeShift;\\n\\n /// First 10 bits => 0- 9 => old upper shift\\n /// Next 10 bits => 10-19 => empty so we can use same helper function\\n /// Next 10 bits => 20-29 => old lower shift\\n /// Next 10 bits => 30-39 => empty so we can use same helper function\\n /// Next 20 bits => 40-59 => in seconds, ~12 days max, shift can last for max ~12 days\\n /// Next 33 bits => 60-92 => timestamp of when the shift has started.\\n /// Next 24 bits => 93-116 => old threshold time\\n uint128 internal _thresholdShift;\\n\\n /// Shifting is fuzzy and with time it'll keep on getting closer and then eventually get over\\n /// First 33 bits => 0 -32 => starting timestamp\\n /// Next 20 bits => 33-52 => % shift\\n /// Next 20 bits => 53-72 => time to shift that percent\\n uint256 internal _centerPriceShift;\\n}\\n\",\"keccak256\":\"0x16b4df290f6f0b75669f726435b8d94fe0748c0a06720b694b9cded6832be722\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/coreModule/core/shift.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nimport { FixedPointMathLib } from \\\"solmate/src/utils/FixedPointMathLib.sol\\\";\\n\\nimport { Variables } from \\\"../../common/variables.sol\\\";\\nimport { ConstantVariables } from \\\"../../common/constantVariables.sol\\\";\\nimport { Events } from \\\"../events.sol\\\";\\nimport { ErrorTypes } from \\\"../../../errorTypes.sol\\\";\\nimport { ICenterPrice } from \\\"../interfaces.sol\\\";\\nimport { AddressCalcs } from \\\"../../../../../libraries/addressCalcs.sol\\\";\\nimport { Error } from \\\"../../../error.sol\\\";\\n\\ncontract FluidDexT1Shift is Variables, ConstantVariables, Events, Error {\\n address private immutable DEPLOYER_CONTRACT;\\n\\n address private immutable THIS_CONTRACT;\\n\\n constructor(address deployerContract_) {\\n DEPLOYER_CONTRACT = deployerContract_;\\n THIS_CONTRACT = address(this);\\n }\\n\\n modifier _onlyDelegateCall() {\\n // also indirectly checked by `_check` because pool can never be initialized as long as the initialize method\\n // is delegate call only, but just to be sure on Admin logic we add the modifier everywhere nonetheless.\\n if (address(this) == THIS_CONTRACT) {\\n revert FluidDexError(ErrorTypes.DexT1__OnlyDelegateCallAllowed);\\n }\\n _;\\n }\\n\\n /// @dev This function calculates the new value of a parameter after a shifting process.\\n /// @param current_ The current value is the final value where the shift ends\\n /// @param old_ The old value from where shifting started.\\n /// @param timePassed_ The time passed since shifting started.\\n /// @param shiftDuration_ The total duration of the shift when old_ reaches current_\\n /// @return The new value of the parameter after the shift.\\n function _calcShiftingDone(\\n uint current_,\\n uint old_,\\n uint timePassed_,\\n uint shiftDuration_\\n ) internal pure returns (uint) {\\n if (current_ > old_) {\\n uint diff_ = current_ - old_;\\n current_ = old_ + ((diff_ * timePassed_) / shiftDuration_);\\n } else {\\n uint diff_ = old_ - current_;\\n current_ = old_ - ((diff_ * timePassed_) / shiftDuration_);\\n }\\n return current_;\\n }\\n\\n /// @dev Calculates the new upper and lower range values during an active range shift\\n /// @param upperRange_ The target upper range value\\n /// @param lowerRange_ The target lower range value\\n /// @param dexVariables2_ needed in case shift is ended and we need to update dexVariables2\\n /// @return The updated upper range, lower range, and dexVariables2\\n /// @notice This function handles the gradual shifting of range values over time\\n /// @notice If the shift is complete, it updates the state and clears the shift data\\n function _calcRangeShifting(\\n uint upperRange_,\\n uint lowerRange_,\\n uint dexVariables2_\\n ) public _onlyDelegateCall returns (uint, uint, uint) {\\n uint rangeShift_ = _rangeShift;\\n uint oldUpperRange_ = rangeShift_ & X20;\\n uint oldLowerRange_ = (rangeShift_ >> 20) & X20;\\n uint shiftDuration_ = (rangeShift_ >> 40) & X20;\\n uint startTimeStamp_ = ((rangeShift_ >> 60) & X33);\\n if ((startTimeStamp_ + shiftDuration_) < block.timestamp) {\\n // shifting fully done\\n delete _rangeShift;\\n // making active shift as 0 because shift is over\\n // fetching from storage and storing in storage, aside from admin module dexVariables2 only updates from this function and _calcThresholdShifting.\\n dexVariables2_ = dexVariables2 & ~uint(1 << 26);\\n dexVariables2 = dexVariables2_;\\n return (upperRange_, lowerRange_, dexVariables2_);\\n }\\n uint timePassed_ = block.timestamp - startTimeStamp_;\\n return (\\n _calcShiftingDone(upperRange_, oldUpperRange_, timePassed_, shiftDuration_),\\n _calcShiftingDone(lowerRange_, oldLowerRange_, timePassed_, shiftDuration_),\\n dexVariables2_\\n );\\n }\\n\\n /// @dev Calculates the new upper and lower threshold values during an active threshold shift\\n /// @param upperThreshold_ The target upper threshold value\\n /// @param lowerThreshold_ The target lower threshold value\\n /// @param thresholdTime_ The time passed since shifting started\\n /// @return The updated upper threshold, lower threshold, and threshold time\\n /// @notice This function handles the gradual shifting of threshold values over time\\n /// @notice If the shift is complete, it updates the state and clears the shift data\\n function _calcThresholdShifting(\\n uint upperThreshold_,\\n uint lowerThreshold_,\\n uint thresholdTime_\\n ) public _onlyDelegateCall returns (uint, uint, uint) {\\n uint thresholdShift_ = _thresholdShift;\\n uint oldUpperThreshold_ = thresholdShift_ & X20;\\n uint oldLowerThreshold_ = (thresholdShift_ >> 20) & X20;\\n uint shiftDuration_ = (thresholdShift_ >> 40) & X20;\\n uint startTimeStamp_ = ((thresholdShift_ >> 60) & X33);\\n uint oldThresholdTime_ = (thresholdShift_ >> 93) & X24;\\n if ((startTimeStamp_ + shiftDuration_) < block.timestamp) {\\n // shifting fully done\\n delete _thresholdShift;\\n // making active shift as 0 because shift is over\\n // fetching from storage and storing in storage, aside from admin module dexVariables2 only updates from this function and _calcRangeShifting.\\n dexVariables2 = dexVariables2 & ~uint(1 << 67);\\n return (upperThreshold_, lowerThreshold_, thresholdTime_);\\n }\\n uint timePassed_ = block.timestamp - startTimeStamp_;\\n return (\\n _calcShiftingDone(upperThreshold_, oldUpperThreshold_, timePassed_, shiftDuration_),\\n _calcShiftingDone(lowerThreshold_, oldLowerThreshold_, timePassed_, shiftDuration_),\\n _calcShiftingDone(thresholdTime_, oldThresholdTime_, timePassed_, shiftDuration_)\\n );\\n }\\n\\n /// @dev Calculates the new center price during an active price shift\\n /// @param dexVariables_ The current state of dex variables\\n /// @param dexVariables2_ Additional dex variables\\n /// @return newCenterPrice_ The updated center price\\n /// @notice This function gradually shifts the center price towards a new target price over time\\n /// @notice It uses an external price source (via ICenterPrice) to determine the target price\\n /// @notice The shift continues until the current price reaches the target, or the shift duration ends\\n /// @notice Once the shift is complete, it updates the state and clears the shift data\\n /// @notice The shift rate is dynamic and depends on:\\n /// @notice - Time remaining in the shift duration\\n /// @notice - The new center price (fetched externally, which may change)\\n /// @notice - The current (old) center price\\n /// @notice This results in a fuzzy shifting mechanism where the rate can change as these parameters evolve\\n /// @notice The externally fetched new center price is expected to not differ significantly from the last externally fetched center price\\n function _calcCenterPrice(\\n uint dexVariables_,\\n uint dexVariables2_\\n ) public _onlyDelegateCall returns (uint newCenterPrice_) {\\n uint oldCenterPrice_ = (dexVariables_ >> 81) & X40;\\n oldCenterPrice_ = (oldCenterPrice_ >> DEFAULT_EXPONENT_SIZE) << (oldCenterPrice_ & DEFAULT_EXPONENT_MASK);\\n uint centerPriceShift_ = _centerPriceShift;\\n uint startTimeStamp_ = centerPriceShift_ & X33;\\n uint percent_ = (centerPriceShift_ >> 33) & X20;\\n uint time_ = (centerPriceShift_ >> 53) & X20;\\n\\n uint fromTimeStamp_ = (dexVariables_ >> 121) & X33;\\n fromTimeStamp_ = fromTimeStamp_ > startTimeStamp_ ? fromTimeStamp_ : startTimeStamp_;\\n\\n newCenterPrice_ = ICenterPrice(AddressCalcs.addressCalc(DEPLOYER_CONTRACT, ((dexVariables2_ >> 112) & X30)))\\n .centerPrice();\\n uint priceShift_ = (oldCenterPrice_ * percent_ * (block.timestamp - fromTimeStamp_)) / (time_ * SIX_DECIMALS);\\n\\n if (newCenterPrice_ > oldCenterPrice_) {\\n // shift on positive side\\n oldCenterPrice_ += priceShift_;\\n if (newCenterPrice_ > oldCenterPrice_) {\\n newCenterPrice_ = oldCenterPrice_;\\n } else {\\n // shifting fully done\\n delete _centerPriceShift;\\n // making active shift as 0 because shift is over\\n // fetching from storage and storing in storage, aside from admin module dexVariables2 only updates these shift function.\\n dexVariables2 = dexVariables2 & ~uint(1 << 248);\\n }\\n } else {\\n unchecked {\\n oldCenterPrice_ = oldCenterPrice_ > priceShift_ ? oldCenterPrice_ - priceShift_ : 0;\\n // In case of oldCenterPrice_ ending up 0, which could happen when a lot of time has passed (pool has no swaps for many days or weeks)\\n // then below we get into the else logic which will fully conclude shifting and return newCenterPrice_\\n // as it was fetched from the external center price source.\\n // not ideal that this would ever happen unless the pool is not in use and all/most users have left leaving not enough liquidity to trade on\\n }\\n if (newCenterPrice_ < oldCenterPrice_) {\\n newCenterPrice_ = oldCenterPrice_;\\n } else {\\n // shifting fully done\\n delete _centerPriceShift;\\n // making active shift as 0 because shift is over\\n // fetching from storage and storing in storage, aside from admin module dexVariables2 only updates these shift function.\\n dexVariables2 = dexVariables2 & ~uint(1 << 248);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x27182c118926bb799901a71636c75ebca18990af5bc6e90e4eb146dfbf55210d\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/coreModule/events.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nabstract contract Events {\\n /// @notice Emitted on token swaps\\n /// @param swap0to1 Indicates whether the swap is from token0 to token1 or vice-versa.\\n /// @param amountIn The amount of tokens to be sent to the vault to swap.\\n /// @param amountOut The amount of tokens user got from the swap.\\n /// @param to Recepient of swapped tokens.\\n event Swap(bool swap0to1, uint256 amountIn, uint256 amountOut, address to);\\n\\n /// @notice Emitted when liquidity is added with shares specified.\\n /// @param shares Expected exact shares to be received.\\n /// @param token0Amt Amount of token0 deposited.\\n /// @param token0Amt Amount of token1 deposited.\\n event LogDepositPerfectColLiquidity(uint shares, uint token0Amt, uint token1Amt);\\n\\n /// @notice Emitted when liquidity is withdrawn with shares specified.\\n /// @param shares shares burned\\n /// @param token0Amt Amount of token0 withdrawn.\\n /// @param token1Amt Amount of token1 withdrawn.\\n event LogWithdrawPerfectColLiquidity(uint shares, uint token0Amt, uint token1Amt);\\n\\n /// @notice Emitted when liquidity is borrowed with shares specified.\\n /// @param shares shares minted\\n /// @param token0Amt Amount of token0 borrowed.\\n /// @param token1Amt Amount of token1 borrowed.\\n event LogBorrowPerfectDebtLiquidity(uint shares, uint token0Amt, uint token1Amt);\\n\\n /// @notice Emitted when liquidity is paid back with shares specified.\\n /// @param shares shares burned\\n /// @param token0Amt Amount of token0 paid back.\\n /// @param token1Amt Amount of token1 paid back.\\n event LogPaybackPerfectDebtLiquidity(uint shares, uint token0Amt, uint token1Amt);\\n\\n /// @notice Emitted when liquidity is deposited with specified token0 & token1 amount\\n /// @param amount0 Amount of token0 deposited.\\n /// @param amount1 Amount of token1 deposited.\\n /// @param shares Amount of shares minted.\\n event LogDepositColLiquidity(uint amount0, uint amount1, uint shares);\\n\\n /// @notice Emitted when liquidity is withdrawn with specified token0 & token1 amount\\n /// @param amount0 Amount of token0 withdrawn.\\n /// @param amount1 Amount of token1 withdrawn.\\n /// @param shares Amount of shares burned.\\n event LogWithdrawColLiquidity(uint amount0, uint amount1, uint shares);\\n\\n /// @notice Emitted when liquidity is borrowed with specified token0 & token1 amount\\n /// @param amount0 Amount of token0 borrowed.\\n /// @param amount1 Amount of token1 borrowed.\\n /// @param shares Amount of shares minted.\\n event LogBorrowDebtLiquidity(uint amount0, uint amount1, uint shares);\\n\\n /// @notice Emitted when liquidity is paid back with specified token0 & token1 amount\\n /// @param amount0 Amount of token0 paid back.\\n /// @param amount1 Amount of token1 paid back.\\n /// @param shares Amount of shares burned.\\n event LogPaybackDebtLiquidity(uint amount0, uint amount1, uint shares);\\n\\n /// @notice Emitted when liquidity is withdrawn with shares specified into one token only.\\n /// @param shares shares burned\\n /// @param token0Amt Amount of token0 withdrawn.\\n /// @param token1Amt Amount of token1 withdrawn.\\n event LogWithdrawColInOneToken(uint shares, uint token0Amt, uint token1Amt);\\n\\n /// @notice Emitted when liquidity is paid back with shares specified from one token only.\\n /// @param shares shares burned\\n /// @param token0Amt Amount of token0 paid back.\\n /// @param token1Amt Amount of token1 paid back.\\n event LogPaybackDebtInOneToken(uint shares, uint token0Amt, uint token1Amt);\\n\\n /// @notice Emitted when internal arbitrage between 2 pools happen\\n /// @param routing if positive then routing is amtIn of token0 in deposit & borrow else token0 withdraw & payback\\n /// @param amtOut if routing is positive then token1 withdraw & payback amount else token1 deposit & borrow\\n event LogArbitrage(int routing, uint amtOut);\\n}\\n\",\"keccak256\":\"0x2ccdd6f07486693ec9abccbba5eaaf21ffe1b5436ed961322e663f78b6f1b998\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/coreModule/interfaces.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\ninterface IHook {\\n /// @notice Hook function to check for liquidation opportunities before external swaps\\n /// @dev The primary use of this hook is to check if a particular pair vault has liquidation available.\\n /// If liquidation is available, it gives priority to the liquidation process before allowing external swaps.\\n /// In most cases, this hook will not be set.\\n /// @param id_ Identifier for the operation type: 1 for swap, 2 for internal arbitrage\\n /// @param swap0to1_ Direction of the swap: true if swapping token0 for token1, false otherwise\\n /// @param token0_ Address of the first token in the pair\\n /// @param token1_ Address of the second token in the pair\\n /// @param price_ The price ratio of token1 to token0, expressed with 27 decimal places\\n /// @return isOk_ Boolean indicating whether the operation should proceed\\n function dexPrice(\\n uint id_,\\n bool swap0to1_,\\n address token0_,\\n address token1_,\\n uint price_\\n ) external returns (bool isOk_);\\n}\\n\\ninterface ICenterPrice {\\n /// @notice Retrieves the center price for the pool\\n /// @dev This function is marked as non-constant (potentially state-changing) to allow flexibility in price fetching mechanisms.\\n /// While typically used as a read-only operation, this design permits write operations if needed for certain token pairs\\n /// (e.g., fetching up-to-date exchange rates that may require state changes).\\n /// @return price The current price ratio of token1 to token0, expressed with 27 decimal places\\n function centerPrice() external returns (uint price);\\n}\\n\",\"keccak256\":\"0x6e42130fb15dbcfc2850e69bd7f26a1c709a6711cd00c10d2afb7aa1b97cfcc8\",\"license\":\"BUSL-1.1\"},\"contracts/protocols/dex/poolT1/coreModule/structs.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity 0.8.21;\\n\\nabstract contract Structs {\\n struct PricesAndExchangePrice {\\n uint lastStoredPrice; // last stored price in 1e27 decimals\\n uint centerPrice; // last stored price in 1e27 decimals\\n uint upperRange; // price at upper range in 1e27 decimals\\n uint lowerRange; // price at lower range in 1e27 decimals\\n uint geometricMean; // geometric mean of upper range & lower range in 1e27 decimals\\n uint supplyToken0ExchangePrice;\\n uint borrowToken0ExchangePrice;\\n uint supplyToken1ExchangePrice;\\n uint borrowToken1ExchangePrice;\\n }\\n\\n struct ExchangePrices {\\n uint supplyToken0ExchangePrice;\\n uint borrowToken0ExchangePrice;\\n uint supplyToken1ExchangePrice;\\n uint borrowToken1ExchangePrice;\\n }\\n\\n struct CollateralReserves {\\n uint token0RealReserves;\\n uint token1RealReserves;\\n uint token0ImaginaryReserves;\\n uint token1ImaginaryReserves;\\n }\\n\\n struct CollateralReservesSwap {\\n uint tokenInRealReserves;\\n uint tokenOutRealReserves;\\n uint tokenInImaginaryReserves;\\n uint tokenOutImaginaryReserves;\\n }\\n\\n struct DebtReserves {\\n uint token0Debt;\\n uint token1Debt;\\n uint token0RealReserves;\\n uint token1RealReserves;\\n uint token0ImaginaryReserves;\\n uint token1ImaginaryReserves;\\n }\\n\\n struct DebtReservesSwap {\\n uint tokenInDebt;\\n uint tokenOutDebt;\\n uint tokenInRealReserves;\\n uint tokenOutRealReserves;\\n uint tokenInImaginaryReserves;\\n uint tokenOutImaginaryReserves;\\n }\\n\\n struct SwapInMemory {\\n address tokenIn;\\n address tokenOut;\\n uint256 amtInAdjusted;\\n address withdrawTo;\\n address borrowTo;\\n uint price; // price of pool after swap\\n uint fee; // fee of pool\\n uint revenueCut; // revenue cut of pool\\n bool swap0to1;\\n int swapRoutingAmt;\\n bytes data; // just added to avoid stack-too-deep error\\n }\\n\\n struct SwapOutMemory {\\n address tokenIn;\\n address tokenOut;\\n uint256 amtOutAdjusted;\\n address withdrawTo;\\n address borrowTo;\\n uint price; // price of pool after swap\\n uint fee;\\n uint revenueCut; // revenue cut of pool\\n bool swap0to1;\\n int swapRoutingAmt;\\n bytes data; // just added to avoid stack-too-deep error\\n uint msgValue;\\n }\\n\\n struct DepositColMemory {\\n uint256 token0AmtAdjusted;\\n uint256 token1AmtAdjusted;\\n uint256 token0ReservesInitial;\\n uint256 token1ReservesInitial;\\n }\\n\\n struct WithdrawColMemory {\\n uint256 token0AmtAdjusted;\\n uint256 token1AmtAdjusted;\\n uint256 token0ReservesInitial;\\n uint256 token1ReservesInitial;\\n address to;\\n }\\n\\n struct BorrowDebtMemory {\\n uint256 token0AmtAdjusted;\\n uint256 token1AmtAdjusted;\\n uint256 token0DebtInitial;\\n uint256 token1DebtInitial;\\n address to;\\n }\\n\\n struct PaybackDebtMemory {\\n uint256 token0AmtAdjusted;\\n uint256 token1AmtAdjusted;\\n uint256 token0DebtInitial;\\n uint256 token1DebtInitial;\\n }\\n\\n struct OraclePriceMemory {\\n uint lowestPrice1by0;\\n uint highestPrice1by0;\\n uint oracleSlot;\\n uint oracleMap;\\n uint oracle;\\n }\\n\\n struct Oracle {\\n uint twap1by0; // TWAP price\\n uint lowestPrice1by0; // lowest price point\\n uint highestPrice1by0; // highest price point\\n uint twap0by1; // TWAP price\\n uint lowestPrice0by1; // lowest price point\\n uint highestPrice0by1; // highest price point\\n }\\n\\n struct Implementations {\\n address shift;\\n address admin;\\n address colOperations;\\n address debtOperations;\\n address perfectOperationsAndSwapOut;\\n }\\n\\n struct ConstantViews {\\n uint256 dexId;\\n address liquidity;\\n address factory;\\n Implementations implementations;\\n address deployerContract;\\n address token0;\\n address token1;\\n bytes32 supplyToken0Slot;\\n bytes32 borrowToken0Slot;\\n bytes32 supplyToken1Slot;\\n bytes32 borrowToken1Slot;\\n bytes32 exchangePriceToken0Slot;\\n bytes32 exchangePriceToken1Slot;\\n uint256 oracleMapping;\\n }\\n\\n struct ConstantViews2 {\\n uint token0NumeratorPrecision;\\n uint token0DenominatorPrecision;\\n uint token1NumeratorPrecision;\\n uint token1DenominatorPrecision;\\n }\\n}\\n\",\"keccak256\":\"0x1cccc3a9ff4f07f159ac2aebf969c2a714a6f912ef0e86b76362bf45a5ecb8be\",\"license\":\"BUSL-1.1\"},\"solmate/src/auth/Owned.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Simple single owner authorization mixin.\\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)\\nabstract contract Owned {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event OwnershipTransferred(address indexed user, address indexed newOwner);\\n\\n /*//////////////////////////////////////////////////////////////\\n OWNERSHIP STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n address public owner;\\n\\n modifier onlyOwner() virtual {\\n require(msg.sender == owner, \\\"UNAUTHORIZED\\\");\\n\\n _;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(address _owner) {\\n owner = _owner;\\n\\n emit OwnershipTransferred(address(0), _owner);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n OWNERSHIP LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n owner = newOwner;\\n\\n emit OwnershipTransferred(msg.sender, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xfedb27d14c508342c33eb067c9a02eabcdb0f9dcf93b04ded1001f580d12d0ea\",\"license\":\"AGPL-3.0-only\"},\"solmate/src/utils/FixedPointMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Arithmetic library with operations for fixed-point numbers.\\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol)\\n/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol)\\nlibrary FixedPointMathLib {\\n /*//////////////////////////////////////////////////////////////\\n SIMPLIFIED FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal constant MAX_UINT256 = 2**256 - 1;\\n\\n uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.\\n\\n function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.\\n }\\n\\n function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.\\n }\\n\\n function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.\\n }\\n\\n function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n LOW LEVEL FIXED POINT OPERATIONS\\n //////////////////////////////////////////////////////////////*/\\n\\n function mulDivDown(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))\\n if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {\\n revert(0, 0)\\n }\\n\\n // Divide x * y by the denominator.\\n z := div(mul(x, y), denominator)\\n }\\n }\\n\\n function mulDivUp(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 z) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))\\n if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {\\n revert(0, 0)\\n }\\n\\n // If x * y modulo the denominator is strictly greater than 0,\\n // 1 is added to round up the division of x * y by the denominator.\\n z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator))\\n }\\n }\\n\\n function rpow(\\n uint256 x,\\n uint256 n,\\n uint256 scalar\\n ) internal pure returns (uint256 z) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n switch x\\n case 0 {\\n switch n\\n case 0 {\\n // 0 ** 0 = 1\\n z := scalar\\n }\\n default {\\n // 0 ** n = 0\\n z := 0\\n }\\n }\\n default {\\n switch mod(n, 2)\\n case 0 {\\n // If n is even, store scalar in z for now.\\n z := scalar\\n }\\n default {\\n // If n is odd, store x in z for now.\\n z := x\\n }\\n\\n // Shifting right by 1 is like dividing by 2.\\n let half := shr(1, scalar)\\n\\n for {\\n // Shift n right by 1 before looping to halve it.\\n n := shr(1, n)\\n } n {\\n // Shift n right by 1 each iteration to halve it.\\n n := shr(1, n)\\n } {\\n // Revert immediately if x ** 2 would overflow.\\n // Equivalent to iszero(eq(div(xx, x), x)) here.\\n if shr(128, x) {\\n revert(0, 0)\\n }\\n\\n // Store x squared.\\n let xx := mul(x, x)\\n\\n // Round to the nearest number.\\n let xxRound := add(xx, half)\\n\\n // Revert if xx + half overflowed.\\n if lt(xxRound, xx) {\\n revert(0, 0)\\n }\\n\\n // Set x to scaled xxRound.\\n x := div(xxRound, scalar)\\n\\n // If n is even:\\n if mod(n, 2) {\\n // Compute z * x.\\n let zx := mul(z, x)\\n\\n // If z * x overflowed:\\n if iszero(eq(div(zx, x), z)) {\\n // Revert if x is non-zero.\\n if iszero(iszero(x)) {\\n revert(0, 0)\\n }\\n }\\n\\n // Round to the nearest number.\\n let zxRound := add(zx, half)\\n\\n // Revert if zx + half overflowed.\\n if lt(zxRound, zx) {\\n revert(0, 0)\\n }\\n\\n // Return properly scaled zxRound.\\n z := div(zxRound, scalar)\\n }\\n }\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n GENERAL NUMBER UTILITIES\\n //////////////////////////////////////////////////////////////*/\\n\\n function sqrt(uint256 x) internal pure returns (uint256 z) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let y := x // We start y at x, which will help us make our initial estimate.\\n\\n z := 181 // The \\\"correct\\\" value is 1, but this saves a multiplication later.\\n\\n // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad\\n // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.\\n\\n // We check y >= 2^(k + 8) but shift right by k bits\\n // each branch to ensure that if x >= 256, then y >= 256.\\n if iszero(lt(y, 0x10000000000000000000000000000000000)) {\\n y := shr(128, y)\\n z := shl(64, z)\\n }\\n if iszero(lt(y, 0x1000000000000000000)) {\\n y := shr(64, y)\\n z := shl(32, z)\\n }\\n if iszero(lt(y, 0x10000000000)) {\\n y := shr(32, y)\\n z := shl(16, z)\\n }\\n if iszero(lt(y, 0x1000000)) {\\n y := shr(16, y)\\n z := shl(8, z)\\n }\\n\\n // Goal was to get z*z*y within a small factor of x. More iterations could\\n // get y in a tighter range. Currently, we will have y in [256, 256*2^16).\\n // We ensured y >= 256 so that the relative difference between y and y+1 is small.\\n // That's not possible if x < 256 but we can just verify those cases exhaustively.\\n\\n // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.\\n // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.\\n // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.\\n\\n // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range\\n // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.\\n\\n // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate\\n // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.\\n\\n // There is no overflow risk here since y < 2^136 after the first branch above.\\n z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.\\n\\n // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n z := shr(1, add(z, div(x, z)))\\n\\n // If x+1 is a perfect square, the Babylonian method cycles between\\n // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.\\n // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division\\n // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.\\n // If you don't care whether the floor or ceil square root is returned, you can remove this statement.\\n z := sub(z, lt(div(x, z), z))\\n }\\n }\\n\\n function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Mod x by y. Note this will return\\n // 0 instead of reverting if y is zero.\\n z := mod(x, y)\\n }\\n }\\n\\n function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Divide x by y. Note this will return\\n // 0 instead of reverting if y is zero.\\n r := div(x, y)\\n }\\n }\\n\\n function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Add 1 to x * y if x % y > 0. Note this will\\n // return 0 instead of reverting if y is zero.\\n z := add(gt(mod(x, y), 0), div(x, y))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1b62af9baf5b8e991ed7531bc87f45550ba9d61e8dbff5caf237ccaf3a3fd843\",\"license\":\"AGPL-3.0-only\"},\"solmate/src/utils/SSTORE2.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Read and write to persistent storage at a fraction of the cost.\\n/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SSTORE2.sol)\\n/// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol)\\nlibrary SSTORE2 {\\n uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called.\\n\\n /*//////////////////////////////////////////////////////////////\\n WRITE LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function write(bytes memory data) internal returns (address pointer) {\\n // Prefix the bytecode with a STOP opcode to ensure it cannot be called.\\n bytes memory runtimeCode = abi.encodePacked(hex\\\"00\\\", data);\\n\\n bytes memory creationCode = abi.encodePacked(\\n //---------------------------------------------------------------------------------------------------------------//\\n // Opcode | Opcode + Arguments | Description | Stack View //\\n //---------------------------------------------------------------------------------------------------------------//\\n // 0x60 | 0x600B | PUSH1 11 | codeOffset //\\n // 0x59 | 0x59 | MSIZE | 0 codeOffset //\\n // 0x81 | 0x81 | DUP2 | codeOffset 0 codeOffset //\\n // 0x38 | 0x38 | CODESIZE | codeSize codeOffset 0 codeOffset //\\n // 0x03 | 0x03 | SUB | (codeSize - codeOffset) 0 codeOffset //\\n // 0x80 | 0x80 | DUP | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset //\\n // 0x92 | 0x92 | SWAP3 | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) //\\n // 0x59 | 0x59 | MSIZE | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) //\\n // 0x39 | 0x39 | CODECOPY | 0 (codeSize - codeOffset) //\\n // 0xf3 | 0xf3 | RETURN | //\\n //---------------------------------------------------------------------------------------------------------------//\\n hex\\\"60_0B_59_81_38_03_80_92_59_39_F3\\\", // Returns all code in the contract except for the first 11 (0B in hex) bytes.\\n runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit.\\n );\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Deploy a new contract with the generated creation code.\\n // We start 32 bytes into the code to avoid copying the byte length.\\n pointer := create(0, add(creationCode, 32), mload(creationCode))\\n }\\n\\n require(pointer != address(0), \\\"DEPLOYMENT_FAILED\\\");\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n READ LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function read(address pointer) internal view returns (bytes memory) {\\n return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET);\\n }\\n\\n function read(address pointer, uint256 start) internal view returns (bytes memory) {\\n start += DATA_OFFSET;\\n\\n return readBytecode(pointer, start, pointer.code.length - start);\\n }\\n\\n function read(\\n address pointer,\\n uint256 start,\\n uint256 end\\n ) internal view returns (bytes memory) {\\n start += DATA_OFFSET;\\n end += DATA_OFFSET;\\n\\n require(pointer.code.length >= end, \\\"OUT_OF_BOUNDS\\\");\\n\\n return readBytecode(pointer, start, end - start);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL HELPER LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function readBytecode(\\n address pointer,\\n uint256 start,\\n uint256 size\\n ) private view returns (bytes memory data) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Get a pointer to some free memory.\\n data := mload(0x40)\\n\\n // Update the free memory pointer to prevent overriding our data.\\n // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)).\\n // Adding 31 to size and running the result through the logic above ensures\\n // the memory pointer remains word-aligned, following the Solidity convention.\\n mstore(0x40, add(data, and(add(add(size, 32), 31), not(31))))\\n\\n // Store the size of the data in the first 32 byte chunk of free memory.\\n mstore(data, size)\\n\\n // Copy the code into memory right after the 32 bytes we used to store the size.\\n extcodecopy(pointer, add(data, 32), start, size)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc5359c92365c550c418725fc534a538426ea8f6e7f6c06c0a9d66647d864469d\",\"license\":\"AGPL-3.0-only\"}},\"version\":1}",
"bytecode": "0x6102206040523480156200001257600080fd5b506040516200764a3803806200764a8339810160408190526200003591620001ac565b6001600160a01b03808a16610140528881166101608190528882166101c05283821660805290821660a0523061020052604051620000739062000165565b6001600160a01b039091168152602001604051809103906000f080158015620000a0573d6000803e3d6000fd5b506001600160a01b03166101e052604051600090620000bf9062000173565b604051809103906000f080158015620000dc573d6000803e3d6000fd5b506001600160a01b038116610180526101c051604051919250600091620001039062000181565b6001600160a01b039091168152602001604051809103906000f08015801562000130573d6000803e3d6000fd5b506001600160a01b039081166101a05297881660c0525050505091831660e05282166101005216610120525062000267915050565b6104f4806200154583390190565b614f208062001a3983390190565b610cf1806200695983390190565b80516001600160a01b0381168114620001a757600080fd5b919050565b60008060008060008060008060006101208a8c031215620001cc57600080fd5b620001d78a6200018f565b9850620001e760208b016200018f565b9750620001f760408b016200018f565b96506200020760608b016200018f565b95506200021760808b016200018f565b94506200022760a08b016200018f565b93506200023760c08b016200018f565b92506200024760e08b016200018f565b9150620002586101008b016200018f565b90509295985092959850929598565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e0516102005161120a6200033b600039600081816101f0015261037b01526000818161016b0152818161070b0152818161080e015261091101526000818161019201526105c2015260008181610144015261059d0152600081816102170152610a2c015260006101b901526000818160de015261056301526000610313015260006102ea0152600061033e015260006102bc015260006102870152600061025e015261120a6000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063c758ec5611610081578063cc2fe94b1161005b578063cc2fe94b14610212578063d71f047014610239578063da3d57cb1461024157600080fd5b8063c758ec56146101db578063c995fa7a146101e3578063cc025f7c146101eb57600080fd5b80638cb1b071116100b25780638cb1b071146101665780639603fd271461018d57806397b87b4a146101b457600080fd5b80632861c7d1146100d95780635d5b87e01461012a5780637f2f809e1461013f575b600080fd5b6101007f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610132610254565b6040516101219190610ee5565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101326102b5565b6101326102e0565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b610132610337565b61013261024f366004610f5b565b610362565b60606102b06102827f0000000000000000000000000000000000000000000000000000000000000000610b6b565b6102ab7f0000000000000000000000000000000000000000000000000000000000000000610b6b565b610b9f565b905090565b60606102b07f0000000000000000000000000000000000000000000000000000000000000000610b6b565b60606102b061030e7f0000000000000000000000000000000000000000000000000000000000000000610b6b565b6102ab7f0000000000000000000000000000000000000000000000000000000000000000610b6b565b60606102b07f0000000000000000000000000000000000000000000000000000000000000000610b6b565b606073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036103dc576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0e60048201526024015b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610445576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0b60048201526024016103d3565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156104af576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0c60048201526024016103d3565b61054c604080516101c08101825260008082526020808301829052828401829052835160a08101855282815290810182905292830181905260608381018290526080840191909152909190820190815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101409091015290565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660208084019190915230604080850182905260608501517f0000000000000000000000000000000000000000000000000000000000000000851690527f00000000000000000000000000000000000000000000000000000000000000008416608086015288841660a086015292871660c085015282517f93656c17000000000000000000000000000000000000000000000000000000008152925190926393656c179260048083019391928290030181865afa158015610648573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066c9190610f9c565b8082526101a082018490526040517f12e366aa00000000000000000000000000000000000000000000000000000000815260009130916312e366aa916106b89160040190815260200190565b602060405180830381865afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f99190610fb5565b90506107058282610c17565b915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663798133dd61074d6102e0565b8560405160200161075e9190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261079a929160200161116b565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016107c59190610ee5565b6020604051808303816000875af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190610fb5565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663798133dd6108506102b5565b866040516020016108619190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261089d929160200161116b565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016108c89190610ee5565b6020604051808303816000875af11580156108e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090b9190610fb5565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663798133dd610953610337565b876040516020016109649190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526109a0929160200161116b565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016109cb9190610ee5565b6020604051808303816000875af11580156109ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0e9190610fb5565b6060808701805173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602090920191909152815187821660809091015281518682166040919091015290519083169101529050610a7f610254565b85604051602001610a909190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610acc929160200161116b565b60405160208183030381529060405295508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3fecd5f7aca6136a20a999e7d11ff5dcea4bd675cb125f93ccd7d53f98ec57e48860000151604051610b5791815260200190565b60405180910390a450505050509392505050565b6060610b99826001610b948173ffffffffffffffffffffffffffffffffffffffff84163b61119a565b610e80565b92915050565b60606040519050825180825260208201818101602086015b81831015610bcf578051835260209283019201610bb7565b50845184518101855292509050808201602085015b81831015610bfc578051835260209283019201610be4565b50601f19601f87518501158301011660405250505092915050565b610cb4604080516101c08101825260008082526020808301829052828401829052835160a08101855282815290810182905292830181905260608381018290526080840191909152909190820190815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101409091015290565b5060a082810180516040805173ffffffffffffffffffffffffffffffffffffffff9586166020808301829052600883850181905284518085038601815260608086018752815191840191909120968a16608080870191909152858a019790975285518086038a01815260c0958601875280519084012060e08c015287518651808501869052600981890181905288518083038a0181528285018a52805190870120928d16828b0152818c019290925287518082038c01815290870188528051908501206101008d0152858c0180518851808701889052808a019590955288518086038a0181528585018a52805190870120908d16858b0152848c015287518085038c01815293870188528351938501939093206101208d01528251875180860196909652858801919091528651808603880181528583018852805190850120908b1697850197909752838901969096528451808403909801885291909201835285519582019590952061014088015292518151908616818501526005818301819052825180830384018152918401835281519185019190912061016088015293518151951685840152848101939093528251808503840181529301909152815191012061018082015290565b60408051603f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101909152818152818360208301863c9392505050565b60005b83811015610edc578181015183820152602001610ec4565b50506000910152565b6020815260008251806020840152610f04816040850160208701610ec1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610f5857600080fd5b50565b600080600060608486031215610f7057600080fd5b8335610f7b81610f36565b92506020840135610f8b81610f36565b929592945050506040919091013590565b600060208284031215610fae57600080fd5b5051919050565b600060208284031215610fc757600080fd5b8151610fd281610f36565b9392505050565b8151815260208083015161024083019161100a9084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151611032604084018273ffffffffffffffffffffffffffffffffffffffff169052565b506060830151611090606084018273ffffffffffffffffffffffffffffffffffffffff808251168352806020830151166020840152806040830151166040840152806060830151166060840152806080830151166080840152505050565b5060808301516101006110ba8185018373ffffffffffffffffffffffffffffffffffffffff169052565b60a085015191506101206110e58186018473ffffffffffffffffffffffffffffffffffffffff169052565b60c086015192506101406111108187018573ffffffffffffffffffffffffffffffffffffffff169052565b60e0870151610160878101919091529287015161018080880191909152918701516101a080880191909152908701516101c0870152918601516101e08601528501516102008501529093015161022090920191909152919050565b6000835161117d818460208801610ec1565b835190830190611191818360208801610ec1565b01949350505050565b81810381811115610b99577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122047ae810e4eade4bcf76b71046aa2f36dbb495f291042aabff44c36828c0d833264736f6c63430008150033608060405234801561001057600080fd5b506040516104f43803806104f483398101604081905261002f9161007e565b600080546001600160a01b0319166001600160a01b03831690811782556040518392907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506100ae565b60006020828403121561009057600080fd5b81516001600160a01b03811681146100a757600080fd5b9392505050565b610437806100bd6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063798133dd146100465780638da5cb5b14610082578063f2fde38b146100a2575b600080fd5b610059610054366004610352565b6100b7565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6000546100599073ffffffffffffffffffffffffffffffffffffffff1681565b6100b56100b03660046103c4565b6101c7565b005b6000805473ffffffffffffffffffffffffffffffffffffffff16331461013e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b61017d83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506102b892505050565b60405190915073ffffffffffffffffffffffffffffffffffffffff8216907ff40020e78c6e173ba88aa2c344ed520fab87fe67b9e5aa34626af9d86a3cd47b90600090a292915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610248576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152606401610135565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600081516000036102f5576040517f830297c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151602083016000f0905073ffffffffffffffffffffffffffffffffffffffff811661034d576040517f830297c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000806020838503121561036557600080fd5b823567ffffffffffffffff8082111561037d57600080fd5b818501915085601f83011261039157600080fd5b8135818111156103a057600080fd5b8660208285010111156103b257600080fd5b60209290920196919550909350505050565b6000602082840312156103d657600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146103fa57600080fd5b939250505056fea2646970667358221220af536c9afad3ba8d61e4562d1c33e55496e94a329eeae2c137be91332db73f0164736f6c6343000815003360a060405234801561001057600080fd5b5030608052608051614e646100bc6000396000818161047c0152818161067701528181610a6401528181610bf301528181610ec70152818161111901528181611279015281816118150152818161196201528181611a7201528181611bc001528181611dac0152818161204e015281816122ce015281816123df0152818161253b015281816126f401528181612b0f01528181612c2801528181612e83015261307e0152614e646000f3fe6080604052600436106101755760003560e01c8063a295521c116100cb578063b5c736e41161007f578063e53b201711610059578063e53b2017146103bd578063e552a1e3146103dd578063fbfe2dac146103fd57600080fd5b8063b5c736e41461034c578063ba9af1e31461037d578063d2905ed61461039d57600080fd5b8063a9a362da116100b0578063a9a362da146102ec578063b3889bf41461030c578063b4e1e0321461032c57600080fd5b8063a295521c146102ac578063a71e4958146102cc57600080fd5b8063565ade831161012d57806374f04a361161010757806374f04a361461026457806382df165214610277578063999c14461461028c57600080fd5b8063565ade831461021c5780635cbbba281461023c5780636552d9661461024f57600080fd5b80632af693771161015e5780632af69377146101bc57806346887549146101dc57806353a97b41146101fc57600080fd5b8063021f4f451461017a57806326fda0b61461019c575b600080fd5b34801561018657600080fd5b5061019a61019536600461432c565b61041d565b005b3480156101a857600080fd5b5061019a6101b736600461449d565b61061d565b3480156101c857600080fd5b5061019a6101d7366004614575565b610a0a565b3480156101e857600080fd5b5061019a6101f73660046145ac565b610bdc565b34801561020857600080fd5b5061019a6102173660046145f1565b610e6d565b34801561022857600080fd5b5061019a61023736600461461d565b611102565b61019a61024a36600461463f565b611262565b34801561025b57600080fd5b5061019a6117fe565b61019a61027236600461432c565b611908565b34801561028357600080fd5b5061019a611a5b565b34801561029857600080fd5b5061019a6102a7366004614575565b611b66565b3480156102b857600080fd5b5061019a6102c7366004614713565b611d52565b3480156102d857600080fd5b5061019a6102e7366004614745565b611ff4565b3480156102f857600080fd5b5061019a61030736600461432c565b612274565b34801561031857600080fd5b5061019a61032736600461432c565b6123c8565b34801561033857600080fd5b5061019a610347366004614575565b6124e1565b34801561035857600080fd5b5061036b61036736600461432c565b5490565b60405190815260200160405180910390f35b34801561038957600080fd5b5061019a610398366004614771565b61269a565b3480156103a957600080fd5b5061019a6103b836600461432c565b612af8565b3480156103c957600080fd5b5061019a6103d836600461484c565b612c11565b3480156103e957600080fd5b5061019a6103f83660046145f1565b612e29565b34801561040957600080fd5b5061019a6104183660046145ac565b613067565b600154600316600003610465576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb2160048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036104d8576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b633fffffff81111561051a576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b80156105b25760003073ffffffffffffffffffffffffffffffffffffffff1663b7791bf26040518163ffffffff1660e01b815260040161024060405180830381865afa15801561056e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059291906148ef565b905060006105a482608001518461332c565b90506105af81613798565b50505b600180547ffffffffffffffffffffff00000003fffffffffffffffffffffffffffffffffff16608e83901b1790556040517f94102a9d6162476c3137d9fd67d61facaaa3948cf6bf84ee18357a1d5b8c8d67906106129083815260200190565b60405180910390a150565b600154600316600003610660576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036106d3576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b6000805b82518110156109ce576107068382815181106106f5576106f56149d6565b602002602001015160000151613798565b828181518110610718576107186149d6565b602002602001015160400151600003610761576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b612710838281518110610776576107766149d6565b60200260200101516020015111156107be576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b62ffffff8382815181106107d4576107d46149d6565b602002602001015160400151111561081c576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b82818151811061082e5761082e6149d6565b602002602001015160600151600003610877576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b6003600084838151811061088d5761088d6149d6565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915060c861090f600a600860008786815181106108f3576108f36149d6565b6020026020010151606001516137f0909392919063ffffffff16565b901b60b0848381518110610925576109256149d6565b602002602001015160400151901b60a2858481518110610947576109476149d6565b602002602001015160200151901b847ffffffffffc00000000000003ffffffffffffffffffffffffffffffffffffffff1660011717171760036000858481518110610994576109946149d6565b6020908102919091018101515173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020556001016106d7565b507fd680117828f16ca739150617fc61e326f97e4d9581d61b58992153b92c74fc73826040516109fe9190614a05565b60405180910390a15050565b600154600316600003610a4d576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610ac0576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b8015801590610ad0575061271081105b15610b0b576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b610b1761271082614aae565b9050620186a0821180610b2a5750606481115b15610b65576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b600180547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00000316600284901b17601383901b1790557f8708c2a2bbba04e8e9c7448cd64dc109b367341f5504a9835ffb5e7d9ae08ef682610bc761271084614ae9565b604080519283526020830191909152016109fe565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610c4f576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b610c5883613798565b60008215610d32575073ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081205490819003610cc5576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb27600482015260240161045c565b80600116600103610d06576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb29600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff841660009081526003602052604090206001821790555b8115610e0a575073ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604081205490819003610d9d576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb27600482015260240161045c565b80600116600103610dde576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb29600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff841660009081526005602052604090206001821790555b6040805173ffffffffffffffffffffffffffffffffffffffff861681528415156020820152831515918101919091527faf3eea5162d915eca532881ca41e1a5292bda2947fe94711cad3b4bb260b57f0906060015b60405180910390a150505050565b600154600316600003610eb0576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610f23576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b633fffffff831180610f33575081155b80610f405750620fffff82115b80610f49575080155b80610f565750620fffff81115b15610f91576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b821561108d5760003073ffffffffffffffffffffffffffffffffffffffff1663b7791bf26040518163ffffffff1660e01b815260040161024060405180830381865afa158015610fe5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100991906148ef565b9050600061101b82608001518661332c565b905061102681613798565b5050600180547ffeffffffffffffffffffffffffffc0000000ffffffffffffffffffffffffffff16607085901b177f010000000000000000000000000000000000000000000000000000000000000017905542602183901b17603582901b176008556110bb565b600180547ffeffffffffffffffffffffffffffc0000000ffffffffffffffffffffffffffff16905560006008555b60408051848152602081018490529081018290527f06020920d3b0c76370853b723475139901039a0e0d8a2b442b2fc50587a80475906060015b60405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003611175576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b600054600160c382901c811614801561118b5750815b806111a45750600160c382901c161580156111a4575081155b156111df576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b81156112095778080000000000000000000000000000000000000000000000008117600055611230565b7ffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffff81166000555b60405182151581527f6ac506c34780fe3464d2bb2861da5726cf15b2e1e42961aa0283d2628923125d906020016109fe565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036112d5576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b6112f2734f6f977acdd1177dcd81ab83074855ecb9c2d49e613798565b805180611300575080604001515b61133a576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b60c08101511580159061135257506127108160c00151105b1561138d576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b6127108160c0015161139f9190614aae565b60c08201526101208101516113b7906103e890614aae565b6101208201526101408101516113d0906103e890614aae565b61014082015260a0810151620186a010806113ef575060648160c00151115b8061140b5750611404612710620f4240614b00565b8160e00151115b806114285750611420612710620f4240614b00565b816101000151115b80611435575060e0810151155b806114435750610100810151155b8061145457506103e8816101200151115b8061146557506103e8816101400151115b80611483575061012081015115801561148357506000816101400151115b806114a1575060008161012001511180156114a15750610140810151155b806114af5750610160810151155b806114c1575062ffffff816101600151115b806114d45750633fffffff816101800151115b806114e75750633fffffff816101a00151115b806114fb5750806101e00151816080015111155b8061150f5750806101c00151816080015110155b8061151d57506101e0810151155b15611558576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b8051600090156115785761157482602001518360800151613919565b6001175b8160400151156115985761159482606001518360800151613e7b565b6002175b60808201516115ac906020600860006137f0565b6080830181905276070000f000000000000000000000000000000000000000600182901b602983901b1760519290921b919091174260791b171760009081556101e08301517efa000000000000000000000000000000000000000000000000000000000000917d3e80000000000000000000000000000000000000000000000000000000009160c89161164591906014906008906137f0565b6101c0860151911b9060ac90611660906014600860016137f0565b901b608e866101a00151901b6070876101800151901b6058886101600151901b604e896101400151901b60448a6101200151901b602f8b6101000151901b601b8c60e00151901b60138d60c00151901b60028e60a00151901b8d171717171717171717171717176001819055507fa2bd88124c6cef5f905c8de83ae31b7495469be7a44f0a14ec766e4f2926b9e482600001518360400151846020015185606001518660a001516127108860c001516117199190614ae9565b6101808901516101a08a01516040805198151589529615156020890152958701949094526060860192909252608085015260a084015260c083015260e08201526101000160405180910390a17f4df8f1fe60aa37610aa9a5f2958b11c634c2b231797213ea15069cd214bfb7888260e001518361010001516103e88561012001516117a49190614ae9565b6103e88661014001516117b79190614ae9565b6101608701516101c08801516101e0890151604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e0016109fe565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003611871576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b60015460ff81901c6000036118b6576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166001556040517f665227fdef5dd5aac81086c2301f0e50676c351cf8da0f456de2c2c3e16409de90600090a150565b60015460031660000361194b576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036119be576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b600154600116600103611a01576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb22600482015260240161045c565b600054605981901c63ffffffff1660519190911c60ff161b611a238282613919565b60018054811790556040518281527fa56b37b3edf9e1379ca408e58c1d4d85d03aa751c1dd8b76fa9813bfb2f9793d906020016109fe565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003611ace576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b600180549060ff82901c9003611b14576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b7f800000000000000000000000000000000000000000000000000000000000000081176001556040517f84039da4130b96ef0fa0fffa1bb1306c814913702f63ede2d1cbcdfa43fc67d690600090a150565b600154600316600003611ba9576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003611c1c576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b8115801590611c2c57506103e882105b80611c4257508015801590611c4257506103e881105b15611c7d576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b611c896103e883614aae565b9150611c976103e882614aae565b90506103e8821180611caa57506103e881115b15611ce5576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b600180547fff00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffff1660e484901b1760ee83901b1790557f6d66190870f5a401bd2f24056c4f721a7a9e522501ea222a140bbc2debd302cd611d466103e884614ae9565b610bc76103e884614ae9565b600154600316600003611d95576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003611e08576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b600154611e176103e886614aae565b9450611e256103e885614aae565b93506103e8851180611e3857506103e884115b80611e41575082155b80611e4e575062ffffff83115b80611e62575084158015611e625750600084115b80611e765750600085118015611e76575083155b80611e835750620fffff82115b80611e955750604381901c6001166001145b15611ed0576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b605883901b604e85901b604487901b604360008611611ef0576000611ef3565b60015b60ff16901b7fffffffffffffffffffffffffffffffffffff000000000007ffffffffffffffff8516171717176001556103ff604482901c811690604e83901c1662ffffff605884901c168415611f8b57600780546fffffffffffffffffffffffffffffffff601485901b8617602889901b1742603c1b17605d85901b1781167001000000000000000000000000000000000291161790555b7fdb32664896dae5696540e472ef73d084b10faf79a5560470bd88d34daee92401611fb86103e88a614ae9565b611fc46103e88a614ae9565b60408051928352602083019190915281018890526060810187905260800160405180910390a15050505050505050565b600154600316600003612037576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036120aa576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b6120b382613798565b73ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081205490819003612117576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb27600482015260240161045c565b66ffffffffffffff600982901c1660ff600183901c161b60a282901c613fff166127106121448284614ae9565b61214e9190614aae565b6121589083614b00565b905083158061216657508084105b15612173578093506121a9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8414806121a057508184115b156121a9578193505b6103ff60d084901c1660ff60c885901c161b808310156121c857600094505b4260811b60416121dd876038600860006137f0565b73ffffffffffffffffffffffffffffffffffffffff89166000818152600360209081526040918290209390941b7ffffffffffffffffffffffffc000000000000000000000001ffffffffffffffff8a16179490941790915582519081529081018790527fa0174ec7e13de1c5954dd270d67dafceaddc2e7c685d5dada0015b8bb51fb2d891015b60405180910390a1505050505050565b6001546003166000036122b7576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016300361232a576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b60015460021660020361236d576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb23600482015260240161045c565b600054605981901c63ffffffff1660519190911c60ff161b61238f8282613e7b565b6001805460021790556040518281527f171ddc092d7f435025cb4835ca5827641260e8f2d37ffc48aca4836509b79d50906020016109fe565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016300361243b576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b6002546fffffffffffffffffffffffffffffffff82118061245a575080155b15612495576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b608082901b6fffffffffffffffffffffffffffffffff8216176002556040518281527fc088c82669ad47d64d4487c772e86aeca1ae5e422fbe93853245a948011767e3906020016109fe565b600154600316600003612524576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003612597576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b600054605981901c63ffffffff1660519190911c60ff161b81831115806125be5750818111155b806125c95750828110155b806125d2575081155b1561260d576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b60c861261e836014600860006137f0565b901b60ac612631856014600860016137f0565b901b6001547ffffffff00000000000000fffffffffffffffffffffffffffffffffffffffffff1617176001819055507fd4436251a5b52c21c680a58a0c189dad238e3150aaa2848762b76807e000d0d683836040516110f5929190918252602082015260400190565b6001546003166000036126dd576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003612750576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b6000805b8251811015612ac8576127728382815181106106f5576106f56149d6565b828181518110612784576127846149d6565b6020026020010151608001518382815181106127a2576127a26149d6565b60200260200101516060015111806127d757508281815181106127c7576127c76149d6565b6020026020010151604001516000145b15612812576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b613fff838281518110612827576128276149d6565b602002602001015160200151111561286f576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b62ffffff838281518110612885576128856149d6565b60200260200101516040015111156128cd576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b8281815181106128df576128df6149d6565b602002602001015160600151600014806129165750828181518110612906576129066149d6565b6020026020010151608001516000145b15612951576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b60056000848381518110612967576129676149d6565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915060da6129e9600a600860008786815181106129cd576129cd6149d6565b6020026020010151608001516137f0909392919063ffffffff16565b901b60c8612a08600a600860008887815181106108f3576108f36149d6565b901b60b0858481518110612a1e57612a1e6149d6565b602002602001015160400151901b60a2868581518110612a4057612a406149d6565b602002602001015160200151901b857ffffff0000000000000000003ffffffffffffffffffffffffffffffffffffffff166001171717171760056000858481518110612a8e57612a8e6149d6565b6020908102919091018101515173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002055600101612754565b507fce933896f6e8c2a05b92cd7f854cd82e69ada9e533cf438643d5d3a7ac9cba9d826040516109fe9190614b13565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003612b6b576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b6004546fffffffffffffffffffffffffffffffff821180612b8a575080155b15612bc5576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b608082901b6fffffffffffffffffffffffffffffffff8216176004556040518281527f12023ef9d447c9848cfbd47b96a46c02c8a4d274bff375d21859c54cfa6ac9a1906020016109fe565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003612c84576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b60003073ffffffffffffffffffffffffffffffffffffffff1663b7791bf26040518163ffffffff1660e01b815260040161024060405180830381865afa158015612cd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf691906148ef565b6020015190507fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff831601612d4857612d438147614231565b612de3565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152612de3908390839073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015612dba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dde9190614b8a565b614282565b60405173ffffffffffffffffffffffffffffffffffffffff831681527fdff2a3947bcf9fc0807b142e7c8497066db9183428b7bdbfb1fcd0f55c27a3df906020016109fe565b600154600316600003612e6c576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb21600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003612edf576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b600154612ef1612710620f4240614b00565b841180612f0b5750612f08612710620f4240614b00565b83115b80612f14575083155b80612f1d575082155b80612f2a5750620fffff82115b80612f3c5750601a81901c6001166001145b15612f77576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb24600482015260240161045c565b602f83901b601b85901b601a60008511612f92576000612f95565b60015b60ff16901b7ffffffffffffffffffffffffffffffffffffffffffffffff80000000003ffffff8416171717600155620fffff601b82901c811690602f83901c16831561302957600780547fffffffffffffffffffffffffffffffff000000000000000000000000000000001642603c1b602887901b601485901b861717176fffffffffffffffffffffffffffffffff161790555b60408051878152602081018790529081018590527f4eb847e2909fd5c725b018d79e18739badfb33ba8aa65926fba2c644c3cc5a8e90606001612264565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036130da576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb28600482015260240161045c565b6130e383613798565b600082156131dc575073ffffffffffffffffffffffffffffffffffffffff831660009081526003602052604081205490819003613150576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb27600482015260240161045c565b80600116600003613191576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb29600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff841660009081526003602052604090207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe821690555b81156132d3575073ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604081205490819003613247576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb27600482015260240161045c565b80600116600003613288576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb29600482015260240161045c565b73ffffffffffffffffffffffffffffffffffffffff841660009081526005602052604090207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe821690555b6040805173ffffffffffffffffffffffffffffffffffffffff861681528415156020820152831515918101919091527fe785e6d4f9f1321c6c8d597385ff4ebcff4a597d59ac3911b5052fbf805eb6c990606001610e5f565b6000606082600003613342576000915050613792565b607f831161340b576040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602282015260f884901b7fff000000000000000000000000000000000000000000000000000000000000001660368201526037015b6040516020818303038152906040529050613787565b60ff83116134e8576040517fd70000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f8100000000000000000000000000000000000000000000000000000000000000603682015260f884901b7fff000000000000000000000000000000000000000000000000000000000000001660378201526038016133f5565b61ffff83116135c6576040517fd80000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f820000000000000000000000000000000000000000000000000000000000000060368201527fffff00000000000000000000000000000000000000000000000000000000000060f085901b1660378201526039016133f5565b62ffffff83116136a5576040517fd90000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f830000000000000000000000000000000000000000000000000000000000000060368201527fffffff000000000000000000000000000000000000000000000000000000000060e885901b166037820152603a016133f5565b6040517fda0000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f840000000000000000000000000000000000000000000000000000000000000060368201527fffffffff0000000000000000000000000000000000000000000000000000000060e085901b166037820152603b0160405160208183030381529060405290505b805160209091012090505b92915050565b8073ffffffffffffffffffffffffffffffffffffffff163b6000036137ed576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb25600482015260240161045c565b50565b600080856fffffffffffffffffffffffffffffffff8111156138135760809150811c5b67ffffffffffffffff81111561382b576040918201911c5b63ffffffff81111561383f576020918201911c5b61ffff811115613851576010918201911c5b60ff811115613862576008918201911c5b600f811115613873576004918201911c5b6003811115613884576002918201911c5b6001811115613894576001820191505b80156138a1576001820191505b50848110156138ad5750835b848103905085811c600082118416156138fc57600181019050806001871b036138fc57506001908101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86011b5b6001851b821061390b57600080fd5b90931b909201949350505050565b60003073ffffffffffffffffffffffffffffffffffffffff1663b7791bf26040518163ffffffff1660e01b815260040161024060405180830381865afa158015613967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061398b91906148ef565b905060003073ffffffffffffffffffffffffffffffffffffffff16631595cbd36040518163ffffffff1660e01b8152600401608060405180830381865afa1580156139da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139fe9190614ba3565b60208101518151919250600091613a159087614ae9565b613a1f9190614aae565b905060006b033b2e3c9fd0803ce8000000613a3a8387614ae9565b613a449190614aae565b905060008360400151846060015183613a5d9190614ae9565b613a679190614aae565b60208601519091503415801590613aac575060a086015173ffffffffffffffffffffffffffffffffffffffff1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14155b8015613ae6575060c086015173ffffffffffffffffffffffffffffffffffffffff1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14155b15613b21576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b60008060005b6002811015613da35780600003613b47578860a0015192508a9150613b52565b8860c0015192508491505b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff841601613cc75781341115613baf57613baa33613ba58434614b00565b614231565b613bed565b81341015613bed576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb26600482015260240161045c565b8373ffffffffffffffffffffffffffffffffffffffff1663ad967e15838585600080600089600033604051602001613c4e93929190928352901515602083015273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b6040516020818303038152906040526040518863ffffffff1660e01b8152600401613c7e96959493929190614c4d565b604080518083038185885af1158015613c9b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613cc09190614ca6565b5050613d91565b60408051602081018490526000818301819052336060808401919091528351808403909101815260808301938490527fad967e150000000000000000000000000000000000000000000000000000000090935273ffffffffffffffffffffffffffffffffffffffff87169263ad967e1592613d4c928892889282918291608401614c4d565b60408051808303816000875af1158015613d6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d8e9190614ca6565b50505b80613d9b81614cca565b915050613b27565b506000858711613dd357613db9600c6012614b00565b613dc490600a614e22565b613dce9087614ae9565b613df4565b613ddf600c6012614b00565b613dea90600a614e22565b613df49088614ae9565b9050633b9aca00811015613e38576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb29600482015260240161045c565b6fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff000000000000000000000000000000001760025550505050505050505050565b60003073ffffffffffffffffffffffffffffffffffffffff1663b7791bf26040518163ffffffff1660e01b815260040161024060405180830381865afa158015613ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613eed91906148ef565b905060003073ffffffffffffffffffffffffffffffffffffffff16631595cbd36040518163ffffffff1660e01b8152600401608060405180830381865afa158015613f3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f609190614ba3565b60208101518151919250600091613f779087614ae9565b613f819190614aae565b905060006b033b2e3c9fd0803ce8000000613f9c8387614ae9565b613fa69190614aae565b905060008360400151846060015183613fbf9190614ae9565b613fc99190614aae565b60208681015160a0880151604080516000808252948101918290527fad967e1500000000000000000000000000000000000000000000000000000000909152939450909273ffffffffffffffffffffffffffffffffffffffff84169263ad967e1592614055929091908d908290734f6f977acdd1177dcd81ab83074855ecb9c2d49e9060248101614c4d565b60408051808303816000875af1158015614073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140979190614ca6565b505060c086015160408051600080825260208201928390527fad967e150000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff84169263ad967e15926141189287908290734f6f977acdd1177dcd81ab83074855ecb9c2d49e9060248101614c4d565b60408051808303816000875af1158015614136573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061415a9190614ca6565b5050600083851161418b57614171600c6012614b00565b61417c90600a614e22565b6141869085614ae9565b6141ac565b614197600c6012614b00565b6141a290600a614e22565b6141ac9086614ae9565b9050633b9aca008110156141f0576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cb29600482015260240161045c565b6fffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffff00000000000000000000000000000000176004555050505050505050565b60008060008060008587614e20f190508061427d576040517fdee51a8a0000000000000000000000000000000000000000000000000000000081526201155a600482015260240161045c565b505050565b60006040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152826024820152602060006044836000895af13d15601f3d1160016000511416171691505080614326576040517fdee51a8a0000000000000000000000000000000000000000000000000000000081526201155a600482015260240161045c565b50505050565b60006020828403121561433e57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516080810167ffffffffffffffff8111828210171561439757614397614345565b60405290565b604051610200810167ffffffffffffffff8111828210171561439757614397614345565b60405160a0810167ffffffffffffffff8111828210171561439757614397614345565b6040516101c0810167ffffffffffffffff8111828210171561439757614397614345565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561444f5761444f614345565b604052919050565b600067ffffffffffffffff82111561447157614471614345565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff811681146137ed57600080fd5b600060208083850312156144b057600080fd5b823567ffffffffffffffff8111156144c757600080fd5b8301601f810185136144d857600080fd5b80356144eb6144e682614457565b614408565b81815260079190911b8201830190838101908783111561450a57600080fd5b928401925b8284101561456a57608084890312156145285760008081fd5b614530614374565b843561453b8161447b565b81528486013586820152604080860135908201526060808601359082015282526080909301929084019061450f565b979650505050505050565b6000806040838503121561458857600080fd5b50508035926020909101359150565b803580151581146145a757600080fd5b919050565b6000806000606084860312156145c157600080fd5b83356145cc8161447b565b92506145da60208501614597565b91506145e860408501614597565b90509250925092565b60008060006060848603121561460657600080fd5b505081359360208301359350604090920135919050565b60006020828403121561462f57600080fd5b61463882614597565b9392505050565b6000610200828403121561465257600080fd5b61465a61439d565b61466383614597565b81526020830135602082015261467b60408401614597565b6040820152606083810135908201526080808401359082015260a0808401359082015260c0808401359082015260e08084013590820152610100808401359082015261012080840135908201526101408084013590820152610160808401359082015261018080840135908201526101a080840135908201526101c080840135908201526101e0928301359281019290925250919050565b6000806000806080858703121561472957600080fd5b5050823594602084013594506040840135936060013592509050565b6000806040838503121561475857600080fd5b82356147638161447b565b946020939093013593505050565b6000602080838503121561478457600080fd5b823567ffffffffffffffff81111561479b57600080fd5b8301601f810185136147ac57600080fd5b80356147ba6144e682614457565b81815260a091820283018401918482019190888411156147d957600080fd5b938501935b838510156148405780858a0312156147f65760008081fd5b6147fe6143c1565b85356148098161447b565b81528587013587820152604080870135908201526060808701359082015260808087013590820152835293840193918501916147de565b50979650505050505050565b60006020828403121561485e57600080fd5b81356146388161447b565b80516145a78161447b565b600060a0828403121561488657600080fd5b61488e6143c1565b9050815161489b8161447b565b815260208201516148ab8161447b565b602082015260408201516148be8161447b565b604082015260608201516148d18161447b565b606082015260808201516148e48161447b565b608082015292915050565b6000610240828403121561490257600080fd5b61490a6143e4565b8251815261491a60208401614869565b602082015261492b60408401614869565b604082015261493d8460608501614874565b6060820152610100614950818501614869565b6080830152610120614963818601614869565b60a0840152610140614976818701614869565b60c08501526101608087015160e086015261018080880151858701526101a0945084880151848701526101c0880151838701526101e088015182870152610200880151818701525050505061022084015181830152508091505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602080825282518282018190526000919060409081850190868401855b82811015614a72578151805173ffffffffffffffffffffffffffffffffffffffff168552868101518786015285810151868601526060908101519085015260809093019290850190600101614a22565b5091979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082614ae4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b808202811582820484141761379257613792614a7f565b8181038181111561379257613792614a7f565b602080825282518282018190526000919060409081850190868401855b82811015614a72578151805173ffffffffffffffffffffffffffffffffffffffff16855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101614b30565b600060208284031215614b9c57600080fd5b5051919050565b600060808284031215614bb557600080fd5b614bbd614374565b825181526020830151602082015260408301516040820152606083015160608201528091505092915050565b6000815180845260005b81811015614c0f57602081850181015186830182015201614bf3565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352876020840152866040840152808616606084015280851660808401525060c060a0830152614c9a60c0830184614be9565b98975050505050505050565b60008060408385031215614cb957600080fd5b505080516020909101519092909150565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614cfb57614cfb614a7f565b5060010190565b600181815b80851115614d5b57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614d4157614d41614a7f565b80851615614d4e57918102915b93841c9390800290614d07565b509250929050565b600082614d7257506001613792565b81614d7f57506000613792565b8160018114614d955760028114614d9f57614dbb565b6001915050613792565b60ff841115614db057614db0614a7f565b50506001821b613792565b5060208310610133831016604e8410600b8410161715614dde575081810a613792565b614de88383614d02565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614e1a57614e1a614a7f565b029392505050565b60006146388383614d6356fea2646970667358221220ddc293a0b05b3b6f79473605a514fd3fc40a5af2bae74466b47cad61de494dee64736f6c6343000815003360c060405234801561001057600080fd5b50604051610cf1380380610cf183398101604081905261002f91610044565b6001600160a01b03166080523060a052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160a051610c4b6100a66000396000818160e50152818161024d01526104a6015260006102fc0152610c4b6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630d7cf0ab146100515780632f850fb314610084578063b5c736e4146100a5578063e8518a66146100b7575b600080fd5b61006461005f366004610aee565b6100ca565b604080519384526020840192909252908201526060015b60405180910390f35b610097610092366004610b1a565b610234565b60405190815260200161007b565b6100976100b3366004610b3c565b5490565b6100646100c5366004610aee565b61048b565b6000808073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610146576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261c77360048201526024015b60405180910390fd5b6007546fffffffffffffffffffffffffffffffff811690620fffff80821691601481901c821691602882901c1690603c1c6401ffffffff16426101898383610b84565b10156101f7575050600780547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555050600180547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbffffff1690819055945086935085925084915061022b9050565b60006102038242610b97565b90506102118c868386610609565b61021d8c868487610609565b8b9850985098505050505050505b93509350939050565b600073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036102a9576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261c773600482015260240161013d565b600854605984901c63ffffffff16605185901c60ff161b906401ffffffff80821690620fffff602184901c811691603585901c90911690607989901c168381116102f357836102f5565b805b905061032b7f0000000000000000000000000000000000000000000000000000000000000000633fffffff60708b901c16610682565b73ffffffffffffffffffffffffffffffffffffffff1663f763f7a66040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610377573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039b9190610baa565b965060006103ac620f424084610bc3565b6103b68342610b97565b6103c0868a610bc3565b6103ca9190610bc3565b6103d49190610bda565b90508688111561042c576103e88188610b84565b9650868811156103fa5786975061047e565b6000600855600180547ffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16905561047e565b80871161043a57600061043e565b8087035b9650868810156104505786975061047e565b6000600855600180547ffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690555b5050505050505092915050565b6000808073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610502576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261c773600482015260240161013d565b6007546fffffffffffffffffffffffffffffffff70010000000000000000000000000000000090910490811690620fffff80821691601481901c821691602882901c1690603c81901c6401ffffffff1690605d1c62ffffff16426105668484610b84565b10156105c1575050600780546fffffffffffffffffffffffffffffffff1690555050600180547ffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffff1690555086935085925084915061022b9050565b60006105cd8342610b97565b90506105db8d878387610609565b6105e78d878488610609565b6105f38d858589610609565b9950995099505050505050505093509350939050565b60008385111561064857600061061f8587610b97565b90508261062c8583610bc3565b6106369190610bda565b6106409086610b84565b955050610679565b60006106548686610b97565b9050826106618583610bc3565b61066b9190610bda565b6106759086610b97565b9550505b50929392505050565b6000606082600003610698576000915050610ae8565b607f8311610761576040517fd60000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b16602282015260f884901b7fff000000000000000000000000000000000000000000000000000000000000001660368201526037015b6040516020818303038152906040529050610add565b60ff831161083e576040517fd70000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f8100000000000000000000000000000000000000000000000000000000000000603682015260f884901b7fff0000000000000000000000000000000000000000000000000000000000000016603782015260380161074b565b61ffff831161091c576040517fd80000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f820000000000000000000000000000000000000000000000000000000000000060368201527fffff00000000000000000000000000000000000000000000000000000000000060f085901b16603782015260390161074b565b62ffffff83116109fb576040517fd90000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f830000000000000000000000000000000000000000000000000000000000000060368201527fffffff000000000000000000000000000000000000000000000000000000000060e885901b166037820152603a0161074b565b6040517fda0000000000000000000000000000000000000000000000000000000000000060208201527f940000000000000000000000000000000000000000000000000000000000000060218201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606086901b1660228201527f840000000000000000000000000000000000000000000000000000000000000060368201527fffffffff0000000000000000000000000000000000000000000000000000000060e085901b166037820152603b0160405160208183030381529060405290505b805160209091012090505b92915050565b600080600060608486031215610b0357600080fd5b505081359360208301359350604090920135919050565b60008060408385031215610b2d57600080fd5b50508035926020909101359150565b600060208284031215610b4e57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610ae857610ae8610b55565b81810381811115610ae857610ae8610b55565b600060208284031215610bbc57600080fd5b5051919050565b8082028115828204841417610ae857610ae8610b55565b600082610c10577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220791d728b1fa32ffd1d78d7f1edba6f6563a730e412c791546fc5ff408bdcf73464736f6c63430008150033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c8063c758ec5611610081578063cc2fe94b1161005b578063cc2fe94b14610212578063d71f047014610239578063da3d57cb1461024157600080fd5b8063c758ec56146101db578063c995fa7a146101e3578063cc025f7c146101eb57600080fd5b80638cb1b071116100b25780638cb1b071146101665780639603fd271461018d57806397b87b4a146101b457600080fd5b80632861c7d1146100d95780635d5b87e01461012a5780637f2f809e1461013f575b600080fd5b6101007f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610132610254565b6040516101219190610ee5565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101326102b5565b6101326102e0565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b6101007f000000000000000000000000000000000000000000000000000000000000000081565b610132610337565b61013261024f366004610f5b565b610362565b60606102b06102827f0000000000000000000000000000000000000000000000000000000000000000610b6b565b6102ab7f0000000000000000000000000000000000000000000000000000000000000000610b6b565b610b9f565b905090565b60606102b07f0000000000000000000000000000000000000000000000000000000000000000610b6b565b60606102b061030e7f0000000000000000000000000000000000000000000000000000000000000000610b6b565b6102ab7f0000000000000000000000000000000000000000000000000000000000000000610b6b565b60606102b07f0000000000000000000000000000000000000000000000000000000000000000610b6b565b606073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001630036103dc576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0e60048201526024015b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610445576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0b60048201526024016103d3565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1611156104af576040517f2fee3e0e00000000000000000000000000000000000000000000000000000000815261cf0c60048201526024016103d3565b61054c604080516101c08101825260008082526020808301829052828401829052835160a08101855282815290810182905292830181905260608381018290526080840191909152909190820190815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101409091015290565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660208084019190915230604080850182905260608501517f0000000000000000000000000000000000000000000000000000000000000000851690527f00000000000000000000000000000000000000000000000000000000000000008416608086015288841660a086015292871660c085015282517f93656c17000000000000000000000000000000000000000000000000000000008152925190926393656c179260048083019391928290030181865afa158015610648573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066c9190610f9c565b8082526101a082018490526040517f12e366aa00000000000000000000000000000000000000000000000000000000815260009130916312e366aa916106b89160040190815260200190565b602060405180830381865afa1580156106d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f99190610fb5565b90506107058282610c17565b915060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663798133dd61074d6102e0565b8560405160200161075e9190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261079a929160200161116b565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016107c59190610ee5565b6020604051808303816000875af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190610fb5565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663798133dd6108506102b5565b866040516020016108619190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261089d929160200161116b565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016108c89190610ee5565b6020604051808303816000875af11580156108e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090b9190610fb5565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663798133dd610953610337565b876040516020016109649190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526109a0929160200161116b565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016109cb9190610ee5565b6020604051808303816000875af11580156109ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0e9190610fb5565b6060808701805173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116602090920191909152815187821660809091015281518682166040919091015290519083169101529050610a7f610254565b85604051602001610a909190610fd9565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610acc929160200161116b565b60405160208183030381529060405295508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3fecd5f7aca6136a20a999e7d11ff5dcea4bd675cb125f93ccd7d53f98ec57e48860000151604051610b5791815260200190565b60405180910390a450505050509392505050565b6060610b99826001610b948173ffffffffffffffffffffffffffffffffffffffff84163b61119a565b610e80565b92915050565b60606040519050825180825260208201818101602086015b81831015610bcf578051835260209283019201610bb7565b50845184518101855292509050808201602085015b81831015610bfc578051835260209283019201610be4565b50601f19601f87518501158301011660405250505092915050565b610cb4604080516101c08101825260008082526020808301829052828401829052835160a08101855282815290810182905292830181905260608381018290526080840191909152909190820190815260006020820181905260408201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101409091015290565b5060a082810180516040805173ffffffffffffffffffffffffffffffffffffffff9586166020808301829052600883850181905284518085038601815260608086018752815191840191909120968a16608080870191909152858a019790975285518086038a01815260c0958601875280519084012060e08c015287518651808501869052600981890181905288518083038a0181528285018a52805190870120928d16828b0152818c019290925287518082038c01815290870188528051908501206101008d0152858c0180518851808701889052808a019590955288518086038a0181528585018a52805190870120908d16858b0152848c015287518085038c01815293870188528351938501939093206101208d01528251875180860196909652858801919091528651808603880181528583018852805190850120908b1697850197909752838901969096528451808403909801885291909201835285519582019590952061014088015292518151908616818501526005818301819052825180830384018152918401835281519185019190912061016088015293518151951685840152848101939093528251808503840181529301909152815191012061018082015290565b60408051603f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101909152818152818360208301863c9392505050565b60005b83811015610edc578181015183820152602001610ec4565b50506000910152565b6020815260008251806020840152610f04816040850160208701610ec1565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610f5857600080fd5b50565b600080600060608486031215610f7057600080fd5b8335610f7b81610f36565b92506020840135610f8b81610f36565b929592945050506040919091013590565b600060208284031215610fae57600080fd5b5051919050565b600060208284031215610fc757600080fd5b8151610fd281610f36565b9392505050565b8151815260208083015161024083019161100a9084018273ffffffffffffffffffffffffffffffffffffffff169052565b506040830151611032604084018273ffffffffffffffffffffffffffffffffffffffff169052565b506060830151611090606084018273ffffffffffffffffffffffffffffffffffffffff808251168352806020830151166020840152806040830151166040840152806060830151166060840152806080830151166080840152505050565b5060808301516101006110ba8185018373ffffffffffffffffffffffffffffffffffffffff169052565b60a085015191506101206110e58186018473ffffffffffffffffffffffffffffffffffffffff169052565b60c086015192506101406111108187018573ffffffffffffffffffffffffffffffffffffffff169052565b60e0870151610160878101919091529287015161018080880191909152918701516101a080880191909152908701516101c0870152918601516101e08601528501516102008501529093015161022090920191909152919050565b6000835161117d818460208801610ec1565b835190830190611191818360208801610ec1565b01949350505050565b81810381811115610b99577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea264697066735822122047ae810e4eade4bcf76b71046aa2f36dbb495f291042aabff44c36828c0d833264736f6c63430008150033",
"devdoc": {
"events": {
"DexT1Deployed(address,uint256,address,address)": {
"params": {
"borrowToken": "The address of the borrow token.",
"dex": "The address of the newly deployed dex.",
"dexId": "The id of the newly deployed dex.",
"supplyToken": "The address of the supply token."
}
}
},
"kind": "dev",
"methods": {
"colOperationsCreationCode()": {
"details": "Retrieves the creation code for the FluidDexT1OperationsCol contract"
},
"debtOperationsCreationCode()": {
"details": "Retrieves the creation code for the FluidDexT1OperationsDebt contract"
},
"perfectOperationsCreationCode()": {
"details": "Retrieves the creation code for the FluidDexT1PerfectOperations contract"
}
},
"stateVariables": {
"COL_OPERATIONS_CREATIONCODE_ADDRESS": {
"details": "SSTORE2 pointers for the creation code of various operations contracts"
},
"POOL_T1_CREATIONCODE_ADDRESS_1": {
"details": "SSTORE2 pointer for the PoolT1 creation code. Stored externally to reduce factory bytecode (in 2 parts)"
}
},
"version": 1
},
"userdoc": {
"errors": {
"FluidDexSwapResult(uint256)": [
{
"notice": "used to simulate swap to find the output amount"
}
]
},
"events": {
"DexT1Deployed(address,uint256,address,address)": {
"notice": "Emitted when a new dexT1 is deployed."
}
},
"kind": "user",
"methods": {
"ADDRESS_THIS()": {
"notice": "address of this contract"
},
"ADMIN_IMPLEMENTATION()": {
"notice": "address of Admin implementation"
},
"CONTRACT_DEPLOYER()": {
"notice": "address of Deployer Contract"
},
"DEX_FACTORY()": {
"notice": "address of dexfactory contract"
},
"LIQUIDITY()": {
"notice": "address of liquidity contract"
},
"MINI_DEPLOYER()": {
"notice": "address of MiniDeployer Contract"
},
"SHIFT_IMPLEMENTATION()": {
"notice": "address of Shift implementation"
},
"dexT1CreationBytecode()": {
"notice": "returns the stored DexT1 creation bytecode"
}
},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}