@paraswap/dex-lib 2.42.27-solidly-v3.2 → 2.42.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abi/{solidly-v3/SolidlyV3Pool.abi.json → algebra/AlgebraPool.abi.json} +282 -293
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +193 -0
- package/build/config.js +2 -2
- package/build/dex/{solidly-v3/solidly-v3-pool.d.ts → algebra/algebra-pool.d.ts} +16 -14
- package/build/dex/{solidly-v3/solidly-v3-pool.js → algebra/algebra-pool.js} +165 -127
- package/build/dex/algebra/algebra-pool.js.map +1 -0
- package/build/dex/index.js +2 -4
- package/build/dex/index.js.map +1 -1
- package/build/dex/quickswap/camelot-v3.d.ts +6 -0
- package/build/dex/quickswap/camelot-v3.js +19 -0
- package/build/dex/quickswap/camelot-v3.js.map +1 -0
- package/build/dex/quickswap/zyberswap-v3.d.ts +6 -0
- package/build/dex/quickswap/zyberswap-v3.js +19 -0
- package/build/dex/quickswap/zyberswap-v3.js.map +1 -0
- package/build/dex/uniswap-v2/rebase-tokens.json +7 -0
- package/package.json +1 -1
- package/src/config.ts +2 -2
- package/src/dex/index.ts +2 -4
- package/src/dex/uniswap-v3/uniswap-v3-events.test.ts +0 -3
- package/build/abi/solidly-v3/SolidlyV3StateMulticall.abi.json +0 -375
- package/build/dex/solidly-v3/config.d.ts +0 -9
- package/build/dex/solidly-v3/config.js +0 -58
- package/build/dex/solidly-v3/config.js.map +0 -1
- package/build/dex/solidly-v3/constants.d.ts +0 -27
- package/build/dex/solidly-v3/constants.js +0 -34
- package/build/dex/solidly-v3/constants.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/BitMath.d.ts +0 -4
- package/build/dex/solidly-v3/contract-math/BitMath.js +0 -93
- package/build/dex/solidly-v3/contract-math/BitMath.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/FixedPoint128.d.ts +0 -3
- package/build/dex/solidly-v3/contract-math/FixedPoint128.js +0 -8
- package/build/dex/solidly-v3/contract-math/FixedPoint128.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/FixedPoint96.d.ts +0 -4
- package/build/dex/solidly-v3/contract-math/FixedPoint96.js +0 -9
- package/build/dex/solidly-v3/contract-math/FixedPoint96.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/FullMath.d.ts +0 -4
- package/build/dex/solidly-v3/contract-math/FullMath.js +0 -19
- package/build/dex/solidly-v3/contract-math/FullMath.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/LiquidityMath.d.ts +0 -3
- package/build/dex/solidly-v3/contract-math/LiquidityMath.js +0 -22
- package/build/dex/solidly-v3/contract-math/LiquidityMath.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/SqrtPriceMath.d.ts +0 -10
- package/build/dex/solidly-v3/contract-math/SqrtPriceMath.js +0 -91
- package/build/dex/solidly-v3/contract-math/SqrtPriceMath.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/SwapMath.d.ts +0 -8
- package/build/dex/solidly-v3/contract-math/SwapMath.js +0 -70
- package/build/dex/solidly-v3/contract-math/SwapMath.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/Tick.d.ts +0 -7
- package/build/dex/solidly-v3/contract-math/Tick.js +0 -36
- package/build/dex/solidly-v3/contract-math/Tick.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/TickBitMap.d.ts +0 -7
- package/build/dex/solidly-v3/contract-math/TickBitMap.js +0 -84
- package/build/dex/solidly-v3/contract-math/TickBitMap.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/TickMath.d.ts +0 -8
- package/build/dex/solidly-v3/contract-math/TickMath.js +0 -162
- package/build/dex/solidly-v3/contract-math/TickMath.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/UnsafeMath.d.ts +0 -3
- package/build/dex/solidly-v3/contract-math/UnsafeMath.js +0 -10
- package/build/dex/solidly-v3/contract-math/UnsafeMath.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/uniswap-v3-math.d.ts +0 -31
- package/build/dex/solidly-v3/contract-math/uniswap-v3-math.js +0 -363
- package/build/dex/solidly-v3/contract-math/uniswap-v3-math.js.map +0 -1
- package/build/dex/solidly-v3/contract-math/utils.d.ts +0 -7
- package/build/dex/solidly-v3/contract-math/utils.js +0 -39
- package/build/dex/solidly-v3/contract-math/utils.js.map +0 -1
- package/build/dex/solidly-v3/solidly-v3-factory.d.ts +0 -26
- package/build/dex/solidly-v3/solidly-v3-factory.js +0 -44
- package/build/dex/solidly-v3/solidly-v3-factory.js.map +0 -1
- package/build/dex/solidly-v3/solidly-v3-pool.js.map +0 -1
- package/build/dex/solidly-v3/solidly-v3.d.ts +0 -67
- package/build/dex/solidly-v3/solidly-v3.js +0 -590
- package/build/dex/solidly-v3/solidly-v3.js.map +0 -1
- package/build/dex/solidly-v3/types.d.ts +0 -132
- package/build/dex/solidly-v3/types.js +0 -9
- package/build/dex/solidly-v3/types.js.map +0 -1
- package/build/dex/solidly-v3/utils.d.ts +0 -6
- package/build/dex/solidly-v3/utils.js +0 -53
- package/build/dex/solidly-v3/utils.js.map +0 -1
- package/build/dex/wombat/wombat-pool-poller.d.ts +0 -22
- package/build/dex/wombat/wombat-pool-poller.js +0 -164
- package/build/dex/wombat/wombat-pool-poller.js.map +0 -1
- package/src/abi/solidly-v3/SolidlyV3Pool.abi.json +0 -738
- package/src/abi/solidly-v3/SolidlyV3StateMulticall.abi.json +0 -375
- package/src/dex/solidly-v3/config.ts +0 -64
- package/src/dex/solidly-v3/constants.ts +0 -42
- package/src/dex/solidly-v3/contract-math/BitMath.ts +0 -90
- package/src/dex/solidly-v3/contract-math/FixedPoint128.ts +0 -3
- package/src/dex/solidly-v3/contract-math/FixedPoint96.ts +0 -4
- package/src/dex/solidly-v3/contract-math/FullMath.ts +0 -30
- package/src/dex/solidly-v3/contract-math/LiquidityMath.ts +0 -17
- package/src/dex/solidly-v3/contract-math/SqrtPriceMath.ts +0 -226
- package/src/dex/solidly-v3/contract-math/SwapMath.ts +0 -139
- package/src/dex/solidly-v3/contract-math/Tick.ts +0 -66
- package/src/dex/solidly-v3/contract-math/TickBitMap.ts +0 -123
- package/src/dex/solidly-v3/contract-math/TickMath.ts +0 -211
- package/src/dex/solidly-v3/contract-math/UnsafeMath.ts +0 -5
- package/src/dex/solidly-v3/contract-math/uniswap-v3-math.ts +0 -570
- package/src/dex/solidly-v3/contract-math/utils.ts +0 -50
- package/src/dex/solidly-v3/solidly-v3-e2e.test.ts +0 -124
- package/src/dex/solidly-v3/solidly-v3-events.test.ts +0 -144
- package/src/dex/solidly-v3/solidly-v3-factory.ts +0 -73
- package/src/dex/solidly-v3/solidly-v3-integration.test.ts +0 -358
- package/src/dex/solidly-v3/solidly-v3-pool.ts +0 -494
- package/src/dex/solidly-v3/solidly-v3.ts +0 -988
- package/src/dex/solidly-v3/types.ts +0 -158
- package/src/dex/solidly-v3/utils.ts +0 -71
|
@@ -13,7 +13,6 @@ import { Interface } from '@ethersproject/abi';
|
|
|
13
13
|
import ERC20ABI from '../../abi/erc20.json';
|
|
14
14
|
import StateMulticallABI from '../../abi/uniswap-v3/UniswapV3StateMulticall.abi.json';
|
|
15
15
|
import { AbiItem } from 'web3-utils';
|
|
16
|
-
import { decodeStateMultiCallResultWithRelativeBitmaps } from './utils';
|
|
17
16
|
|
|
18
17
|
jest.setTimeout(300 * 1000);
|
|
19
18
|
const dexKey = 'UniswapV3';
|
|
@@ -101,7 +100,6 @@ describe('UniswapV3 Event', function () {
|
|
|
101
100
|
StateMulticallABI as AbiItem[],
|
|
102
101
|
config.stateMulticall,
|
|
103
102
|
),
|
|
104
|
-
decodeStateMultiCallResultWithRelativeBitmaps,
|
|
105
103
|
new Interface(ERC20ABI),
|
|
106
104
|
config.factory,
|
|
107
105
|
poolFeeCode,
|
|
@@ -157,7 +155,6 @@ describe('UniswapV3 Event', function () {
|
|
|
157
155
|
StateMulticallABI as AbiItem[],
|
|
158
156
|
config.stateMulticall,
|
|
159
157
|
),
|
|
160
|
-
decodeStateMultiCallResultWithRelativeBitmaps,
|
|
161
158
|
new Interface(ERC20ABI),
|
|
162
159
|
_config.factory,
|
|
163
160
|
_feeCode,
|
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [
|
|
4
|
-
{
|
|
5
|
-
"internalType": "contract IUniswapV3Factory",
|
|
6
|
-
"name": "factory",
|
|
7
|
-
"type": "address"
|
|
8
|
-
},
|
|
9
|
-
{ "internalType": "address", "name": "tokenIn", "type": "address" },
|
|
10
|
-
{ "internalType": "address", "name": "tokenOut", "type": "address" },
|
|
11
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
12
|
-
{ "internalType": "int16", "name": "tickBitmapStart", "type": "int16" },
|
|
13
|
-
{ "internalType": "int16", "name": "tickBitmapEnd", "type": "int16" }
|
|
14
|
-
],
|
|
15
|
-
"name": "getAdditionalBitmapWithTicks",
|
|
16
|
-
"outputs": [
|
|
17
|
-
{
|
|
18
|
-
"components": [
|
|
19
|
-
{ "internalType": "int16", "name": "index", "type": "int16" },
|
|
20
|
-
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
|
21
|
-
],
|
|
22
|
-
"internalType": "struct IUniswapV3StateMulticall.TickBitMapMappings[]",
|
|
23
|
-
"name": "tickBitmap",
|
|
24
|
-
"type": "tuple[]"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"components": [
|
|
28
|
-
{ "internalType": "int24", "name": "index", "type": "int24" },
|
|
29
|
-
{
|
|
30
|
-
"components": [
|
|
31
|
-
{
|
|
32
|
-
"internalType": "uint128",
|
|
33
|
-
"name": "liquidityGross",
|
|
34
|
-
"type": "uint128"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"internalType": "int128",
|
|
38
|
-
"name": "liquidityNet",
|
|
39
|
-
"type": "int128"
|
|
40
|
-
},
|
|
41
|
-
{ "internalType": "bool", "name": "initialized", "type": "bool" }
|
|
42
|
-
],
|
|
43
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfo",
|
|
44
|
-
"name": "value",
|
|
45
|
-
"type": "tuple"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfoMappings[]",
|
|
49
|
-
"name": "ticks",
|
|
50
|
-
"type": "tuple[]"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"stateMutability": "view",
|
|
54
|
-
"type": "function"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"inputs": [
|
|
58
|
-
{
|
|
59
|
-
"internalType": "contract IUniswapV3Factory",
|
|
60
|
-
"name": "factory",
|
|
61
|
-
"type": "address"
|
|
62
|
-
},
|
|
63
|
-
{ "internalType": "address", "name": "tokenIn", "type": "address" },
|
|
64
|
-
{ "internalType": "address", "name": "tokenOut", "type": "address" },
|
|
65
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
66
|
-
{ "internalType": "int16", "name": "tickBitmapStart", "type": "int16" },
|
|
67
|
-
{ "internalType": "int16", "name": "tickBitmapEnd", "type": "int16" }
|
|
68
|
-
],
|
|
69
|
-
"name": "getAdditionalBitmapWithoutTicks",
|
|
70
|
-
"outputs": [
|
|
71
|
-
{
|
|
72
|
-
"components": [
|
|
73
|
-
{ "internalType": "int16", "name": "index", "type": "int16" },
|
|
74
|
-
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
|
75
|
-
],
|
|
76
|
-
"internalType": "struct IUniswapV3StateMulticall.TickBitMapMappings[]",
|
|
77
|
-
"name": "tickBitmap",
|
|
78
|
-
"type": "tuple[]"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"stateMutability": "view",
|
|
82
|
-
"type": "function"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"inputs": [
|
|
86
|
-
{
|
|
87
|
-
"internalType": "contract IUniswapV3Factory",
|
|
88
|
-
"name": "factory",
|
|
89
|
-
"type": "address"
|
|
90
|
-
},
|
|
91
|
-
{ "internalType": "address", "name": "tokenIn", "type": "address" },
|
|
92
|
-
{ "internalType": "address", "name": "tokenOut", "type": "address" },
|
|
93
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
94
|
-
{ "internalType": "int16", "name": "tickBitmapStart", "type": "int16" },
|
|
95
|
-
{ "internalType": "int16", "name": "tickBitmapEnd", "type": "int16" }
|
|
96
|
-
],
|
|
97
|
-
"name": "getFullState",
|
|
98
|
-
"outputs": [
|
|
99
|
-
{
|
|
100
|
-
"components": [
|
|
101
|
-
{
|
|
102
|
-
"internalType": "contract IUniswapV3Pool",
|
|
103
|
-
"name": "pool",
|
|
104
|
-
"type": "address"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"internalType": "uint256",
|
|
108
|
-
"name": "blockTimestamp",
|
|
109
|
-
"type": "uint256"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"components": [
|
|
113
|
-
{
|
|
114
|
-
"internalType": "uint160",
|
|
115
|
-
"name": "sqrtPriceX96",
|
|
116
|
-
"type": "uint160"
|
|
117
|
-
},
|
|
118
|
-
{ "internalType": "int24", "name": "tick", "type": "int24" },
|
|
119
|
-
{ "internalType": "uint24", "name": "fee", "type": "uint24" },
|
|
120
|
-
{ "internalType": "bool", "name": "unlocked", "type": "bool" }
|
|
121
|
-
],
|
|
122
|
-
"internalType": "struct IUniswapV3StateMulticall.Slot0",
|
|
123
|
-
"name": "slot0",
|
|
124
|
-
"type": "tuple"
|
|
125
|
-
},
|
|
126
|
-
{ "internalType": "uint128", "name": "liquidity", "type": "uint128" },
|
|
127
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
128
|
-
{
|
|
129
|
-
"internalType": "uint128",
|
|
130
|
-
"name": "maxLiquidityPerTick",
|
|
131
|
-
"type": "uint128"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"components": [
|
|
135
|
-
{ "internalType": "int16", "name": "index", "type": "int16" },
|
|
136
|
-
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
|
137
|
-
],
|
|
138
|
-
"internalType": "struct IUniswapV3StateMulticall.TickBitMapMappings[]",
|
|
139
|
-
"name": "tickBitmap",
|
|
140
|
-
"type": "tuple[]"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"components": [
|
|
144
|
-
{ "internalType": "int24", "name": "index", "type": "int24" },
|
|
145
|
-
{
|
|
146
|
-
"components": [
|
|
147
|
-
{
|
|
148
|
-
"internalType": "uint128",
|
|
149
|
-
"name": "liquidityGross",
|
|
150
|
-
"type": "uint128"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"internalType": "int128",
|
|
154
|
-
"name": "liquidityNet",
|
|
155
|
-
"type": "int128"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"internalType": "bool",
|
|
159
|
-
"name": "initialized",
|
|
160
|
-
"type": "bool"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfo",
|
|
164
|
-
"name": "value",
|
|
165
|
-
"type": "tuple"
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfoMappings[]",
|
|
169
|
-
"name": "ticks",
|
|
170
|
-
"type": "tuple[]"
|
|
171
|
-
}
|
|
172
|
-
],
|
|
173
|
-
"internalType": "struct IUniswapV3StateMulticall.StateResult",
|
|
174
|
-
"name": "state",
|
|
175
|
-
"type": "tuple"
|
|
176
|
-
}
|
|
177
|
-
],
|
|
178
|
-
"stateMutability": "view",
|
|
179
|
-
"type": "function"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"inputs": [
|
|
183
|
-
{
|
|
184
|
-
"internalType": "contract IUniswapV3Factory",
|
|
185
|
-
"name": "factory",
|
|
186
|
-
"type": "address"
|
|
187
|
-
},
|
|
188
|
-
{ "internalType": "address", "name": "tokenIn", "type": "address" },
|
|
189
|
-
{ "internalType": "address", "name": "tokenOut", "type": "address" },
|
|
190
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
191
|
-
{ "internalType": "int16", "name": "leftBitmapAmount", "type": "int16" },
|
|
192
|
-
{ "internalType": "int16", "name": "rightBitmapAmount", "type": "int16" }
|
|
193
|
-
],
|
|
194
|
-
"name": "getFullStateWithRelativeBitmaps",
|
|
195
|
-
"outputs": [
|
|
196
|
-
{
|
|
197
|
-
"components": [
|
|
198
|
-
{
|
|
199
|
-
"internalType": "contract IUniswapV3Pool",
|
|
200
|
-
"name": "pool",
|
|
201
|
-
"type": "address"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"internalType": "uint256",
|
|
205
|
-
"name": "blockTimestamp",
|
|
206
|
-
"type": "uint256"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"components": [
|
|
210
|
-
{
|
|
211
|
-
"internalType": "uint160",
|
|
212
|
-
"name": "sqrtPriceX96",
|
|
213
|
-
"type": "uint160"
|
|
214
|
-
},
|
|
215
|
-
{ "internalType": "int24", "name": "tick", "type": "int24" },
|
|
216
|
-
{ "internalType": "uint24", "name": "fee", "type": "uint24" },
|
|
217
|
-
{ "internalType": "bool", "name": "unlocked", "type": "bool" }
|
|
218
|
-
],
|
|
219
|
-
"internalType": "struct IUniswapV3StateMulticall.Slot0",
|
|
220
|
-
"name": "slot0",
|
|
221
|
-
"type": "tuple"
|
|
222
|
-
},
|
|
223
|
-
{ "internalType": "uint128", "name": "liquidity", "type": "uint128" },
|
|
224
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
225
|
-
{
|
|
226
|
-
"internalType": "uint128",
|
|
227
|
-
"name": "maxLiquidityPerTick",
|
|
228
|
-
"type": "uint128"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"components": [
|
|
232
|
-
{ "internalType": "int16", "name": "index", "type": "int16" },
|
|
233
|
-
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
|
234
|
-
],
|
|
235
|
-
"internalType": "struct IUniswapV3StateMulticall.TickBitMapMappings[]",
|
|
236
|
-
"name": "tickBitmap",
|
|
237
|
-
"type": "tuple[]"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"components": [
|
|
241
|
-
{ "internalType": "int24", "name": "index", "type": "int24" },
|
|
242
|
-
{
|
|
243
|
-
"components": [
|
|
244
|
-
{
|
|
245
|
-
"internalType": "uint128",
|
|
246
|
-
"name": "liquidityGross",
|
|
247
|
-
"type": "uint128"
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"internalType": "int128",
|
|
251
|
-
"name": "liquidityNet",
|
|
252
|
-
"type": "int128"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"internalType": "bool",
|
|
256
|
-
"name": "initialized",
|
|
257
|
-
"type": "bool"
|
|
258
|
-
}
|
|
259
|
-
],
|
|
260
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfo",
|
|
261
|
-
"name": "value",
|
|
262
|
-
"type": "tuple"
|
|
263
|
-
}
|
|
264
|
-
],
|
|
265
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfoMappings[]",
|
|
266
|
-
"name": "ticks",
|
|
267
|
-
"type": "tuple[]"
|
|
268
|
-
}
|
|
269
|
-
],
|
|
270
|
-
"internalType": "struct IUniswapV3StateMulticall.StateResult",
|
|
271
|
-
"name": "state",
|
|
272
|
-
"type": "tuple"
|
|
273
|
-
}
|
|
274
|
-
],
|
|
275
|
-
"stateMutability": "view",
|
|
276
|
-
"type": "function"
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"inputs": [
|
|
280
|
-
{
|
|
281
|
-
"internalType": "contract IUniswapV3Factory",
|
|
282
|
-
"name": "factory",
|
|
283
|
-
"type": "address"
|
|
284
|
-
},
|
|
285
|
-
{ "internalType": "address", "name": "tokenIn", "type": "address" },
|
|
286
|
-
{ "internalType": "address", "name": "tokenOut", "type": "address" },
|
|
287
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
288
|
-
{ "internalType": "int16", "name": "tickBitmapStart", "type": "int16" },
|
|
289
|
-
{ "internalType": "int16", "name": "tickBitmapEnd", "type": "int16" }
|
|
290
|
-
],
|
|
291
|
-
"name": "getFullStateWithoutTicks",
|
|
292
|
-
"outputs": [
|
|
293
|
-
{
|
|
294
|
-
"components": [
|
|
295
|
-
{
|
|
296
|
-
"internalType": "contract IUniswapV3Pool",
|
|
297
|
-
"name": "pool",
|
|
298
|
-
"type": "address"
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
"internalType": "uint256",
|
|
302
|
-
"name": "blockTimestamp",
|
|
303
|
-
"type": "uint256"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
"components": [
|
|
307
|
-
{
|
|
308
|
-
"internalType": "uint160",
|
|
309
|
-
"name": "sqrtPriceX96",
|
|
310
|
-
"type": "uint160"
|
|
311
|
-
},
|
|
312
|
-
{ "internalType": "int24", "name": "tick", "type": "int24" },
|
|
313
|
-
{ "internalType": "uint24", "name": "fee", "type": "uint24" },
|
|
314
|
-
{ "internalType": "bool", "name": "unlocked", "type": "bool" }
|
|
315
|
-
],
|
|
316
|
-
"internalType": "struct IUniswapV3StateMulticall.Slot0",
|
|
317
|
-
"name": "slot0",
|
|
318
|
-
"type": "tuple"
|
|
319
|
-
},
|
|
320
|
-
{ "internalType": "uint128", "name": "liquidity", "type": "uint128" },
|
|
321
|
-
{ "internalType": "int24", "name": "tickSpacing", "type": "int24" },
|
|
322
|
-
{
|
|
323
|
-
"internalType": "uint128",
|
|
324
|
-
"name": "maxLiquidityPerTick",
|
|
325
|
-
"type": "uint128"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
"components": [
|
|
329
|
-
{ "internalType": "int16", "name": "index", "type": "int16" },
|
|
330
|
-
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
|
331
|
-
],
|
|
332
|
-
"internalType": "struct IUniswapV3StateMulticall.TickBitMapMappings[]",
|
|
333
|
-
"name": "tickBitmap",
|
|
334
|
-
"type": "tuple[]"
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
"components": [
|
|
338
|
-
{ "internalType": "int24", "name": "index", "type": "int24" },
|
|
339
|
-
{
|
|
340
|
-
"components": [
|
|
341
|
-
{
|
|
342
|
-
"internalType": "uint128",
|
|
343
|
-
"name": "liquidityGross",
|
|
344
|
-
"type": "uint128"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"internalType": "int128",
|
|
348
|
-
"name": "liquidityNet",
|
|
349
|
-
"type": "int128"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"internalType": "bool",
|
|
353
|
-
"name": "initialized",
|
|
354
|
-
"type": "bool"
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfo",
|
|
358
|
-
"name": "value",
|
|
359
|
-
"type": "tuple"
|
|
360
|
-
}
|
|
361
|
-
],
|
|
362
|
-
"internalType": "struct IUniswapV3StateMulticall.TickInfoMappings[]",
|
|
363
|
-
"name": "ticks",
|
|
364
|
-
"type": "tuple[]"
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
"internalType": "struct IUniswapV3StateMulticall.StateResult",
|
|
368
|
-
"name": "state",
|
|
369
|
-
"type": "tuple"
|
|
370
|
-
}
|
|
371
|
-
],
|
|
372
|
-
"stateMutability": "view",
|
|
373
|
-
"type": "function"
|
|
374
|
-
}
|
|
375
|
-
]
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DexParams } from './types';
|
|
2
|
-
import { DexConfigMap, AdapterMappings } from '../../types';
|
|
3
|
-
import { Address } from '../../types';
|
|
4
|
-
export declare const PoolsToPreload: DexConfigMap<{
|
|
5
|
-
token0: Address;
|
|
6
|
-
token1: Address;
|
|
7
|
-
}[]>;
|
|
8
|
-
export declare const SolidlyV3Config: DexConfigMap<DexParams>;
|
|
9
|
-
export declare const Adapters: Record<number, AdapterMappings>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Adapters = exports.SolidlyV3Config = exports.PoolsToPreload = void 0;
|
|
4
|
-
const constants_1 = require("../../constants");
|
|
5
|
-
const SUPPORTED_TICK_SPACINGS = [1n, 10n, 50n, 100n];
|
|
6
|
-
// Pools that will be initialized on app startup
|
|
7
|
-
// They are added for testing
|
|
8
|
-
exports.PoolsToPreload = {
|
|
9
|
-
SolidlyV3: {
|
|
10
|
-
[constants_1.Network.MAINNET]: [
|
|
11
|
-
{
|
|
12
|
-
token0: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'.toLowerCase(),
|
|
13
|
-
token1: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'.toLowerCase(),
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
token0: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'.toLowerCase(),
|
|
17
|
-
token1: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'.toLowerCase(),
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
token0: '0x514910771AF9Ca656af840dff83E8264EcF986CA'.toLowerCase(),
|
|
21
|
-
token1: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'.toLowerCase(),
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
token0: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'.toLowerCase(),
|
|
25
|
-
token1: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'.toLowerCase(),
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
token0: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'.toLowerCase(),
|
|
29
|
-
token1: '0xdAC17F958D2ee523a2206206994597C13D831ec7'.toLowerCase(),
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
token0: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'.toLowerCase(),
|
|
33
|
-
token1: '0xdAC17F958D2ee523a2206206994597C13D831ec7'.toLowerCase(),
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
exports.SolidlyV3Config = {
|
|
39
|
-
SolidlyV3: {
|
|
40
|
-
[constants_1.Network.MAINNET]: {
|
|
41
|
-
factory: '0x70Fe4a44EA505cFa3A57b95cF2862D4fd5F0f687',
|
|
42
|
-
quoter: '0x61fFE014bA17989E743c5F6cB21bF9697530B21e',
|
|
43
|
-
supportedTickSpacings: SUPPORTED_TICK_SPACINGS,
|
|
44
|
-
stateMulticall: '0xb229563028302AA693EEaD62F80CC331aEDE4e26',
|
|
45
|
-
chunksCount: 10,
|
|
46
|
-
initRetryFrequency: 10,
|
|
47
|
-
initHash: `0xe9b68c5f77858eecac2e651646e208175e9b1359d68d0e14fc69f8c54e5010bf`,
|
|
48
|
-
subgraphURL: 'https://api.thegraph.com/subgraphs/name/solidlylabs/solidly-v3',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
exports.Adapters = {
|
|
53
|
-
[constants_1.Network.MAINNET]: {
|
|
54
|
-
[constants_1.SwapSide.SELL]: [{ name: 'Adapter04', index: 7 }],
|
|
55
|
-
[constants_1.SwapSide.BUY]: [{ name: 'BuyAdapter02', index: 3 }],
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/solidly-v3/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAGpD,MAAM,uBAAuB,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAErD,gDAAgD;AAChD,6BAA6B;AAChB,QAAA,cAAc,GAEvB;IACF,SAAS,EAAE;QACT,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB;gBACE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;gBAClE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;aACnE;YACD;gBACE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;gBAClE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;aACnE;YACD;gBACE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;gBAClE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;aACnE;YACD;gBACE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;gBAClE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;aACnE;YACD;gBACE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;gBAClE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;aACnE;YACD;gBACE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;gBAClE,MAAM,EAAE,4CAA4C,CAAC,WAAW,EAAE;aACnE;SACF;KACF;CACF,CAAC;AAEW,QAAA,eAAe,GAA4B;IACtD,SAAS,EAAE;QACT,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,OAAO,EAAE,4CAA4C;YACrD,MAAM,EAAE,4CAA4C;YACpD,qBAAqB,EAAE,uBAAuB;YAC9C,cAAc,EAAE,4CAA4C;YAC5D,WAAW,EAAE,EAAE;YACf,kBAAkB,EAAE,EAAE;YACtB,QAAQ,EAAE,oEAAoE;YAC9E,WAAW,EACT,gEAAgE;SACnE;KACF;CACF,CAAC;AAEW,QAAA,QAAQ,GAAoC;IACvD,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;QACjB,CAAC,oBAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAClD,CAAC,oBAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KACrD;CACF,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const UNISWAPV3_TICK_GAS_COST = 10000;
|
|
2
|
-
export declare const UNISWAPV3_TICK_BASE_OVERHEAD = 50000;
|
|
3
|
-
export declare const UNISWAPV3_POOL_SEARCH_OVERHEAD = 0;
|
|
4
|
-
export declare const TICK_BITMAP_TO_USE = 4n;
|
|
5
|
-
export declare const TICK_BITMAP_BUFFER = 8n;
|
|
6
|
-
export declare const MAX_PRICING_COMPUTATION_STEPS_ALLOWED = 128;
|
|
7
|
-
export declare const UNISWAPV3_SUBGRAPH_URL = "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3";
|
|
8
|
-
export declare const UNISWAPV3_EFFICIENCY_FACTOR = 3;
|
|
9
|
-
export declare const ZERO_TICK_INFO: {
|
|
10
|
-
liquidityGross: bigint;
|
|
11
|
-
liquidityNet: bigint;
|
|
12
|
-
initialized: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare const ZERO_ORACLE_OBSERVATION: {
|
|
15
|
-
blockTimestamp: bigint;
|
|
16
|
-
tickCumulative: bigint;
|
|
17
|
-
secondsPerLiquidityCumulativeX128: bigint;
|
|
18
|
-
initialized: boolean;
|
|
19
|
-
};
|
|
20
|
-
export declare const OUT_OF_RANGE_ERROR_POSTFIX = "INVALID_TICK_BIT_MAP_RANGES";
|
|
21
|
-
export declare const DEFAULT_POOL_INIT_CODE_HASH = "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54";
|
|
22
|
-
export declare enum DirectMethods {
|
|
23
|
-
directSell = "directUniV3Swap",
|
|
24
|
-
directBuy = "directUniV3Buy"
|
|
25
|
-
}
|
|
26
|
-
export declare const MIN_SQRT_RATIO: bigint;
|
|
27
|
-
export declare const MAX_SQRT_RATIO: bigint;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_SQRT_RATIO = exports.MIN_SQRT_RATIO = exports.DirectMethods = exports.DEFAULT_POOL_INIT_CODE_HASH = exports.OUT_OF_RANGE_ERROR_POSTFIX = exports.ZERO_ORACLE_OBSERVATION = exports.ZERO_TICK_INFO = exports.UNISWAPV3_EFFICIENCY_FACTOR = exports.UNISWAPV3_SUBGRAPH_URL = exports.MAX_PRICING_COMPUTATION_STEPS_ALLOWED = exports.TICK_BITMAP_BUFFER = exports.TICK_BITMAP_TO_USE = exports.UNISWAPV3_POOL_SEARCH_OVERHEAD = exports.UNISWAPV3_TICK_BASE_OVERHEAD = exports.UNISWAPV3_TICK_GAS_COST = void 0;
|
|
4
|
-
exports.UNISWAPV3_TICK_GAS_COST = 10000; // Ceiled
|
|
5
|
-
exports.UNISWAPV3_TICK_BASE_OVERHEAD = 50000;
|
|
6
|
-
exports.UNISWAPV3_POOL_SEARCH_OVERHEAD = 0;
|
|
7
|
-
// This is used for price calculation. If out of scope, return 0n
|
|
8
|
-
exports.TICK_BITMAP_TO_USE = 4n;
|
|
9
|
-
// This is used to check if the state is still valid.
|
|
10
|
-
exports.TICK_BITMAP_BUFFER = 8n;
|
|
11
|
-
exports.MAX_PRICING_COMPUTATION_STEPS_ALLOWED = 128;
|
|
12
|
-
exports.UNISWAPV3_SUBGRAPH_URL = 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3';
|
|
13
|
-
exports.UNISWAPV3_EFFICIENCY_FACTOR = 3;
|
|
14
|
-
exports.ZERO_TICK_INFO = {
|
|
15
|
-
liquidityGross: 0n,
|
|
16
|
-
liquidityNet: 0n,
|
|
17
|
-
initialized: false,
|
|
18
|
-
};
|
|
19
|
-
exports.ZERO_ORACLE_OBSERVATION = {
|
|
20
|
-
blockTimestamp: 0n,
|
|
21
|
-
tickCumulative: 0n,
|
|
22
|
-
secondsPerLiquidityCumulativeX128: 0n,
|
|
23
|
-
initialized: false,
|
|
24
|
-
};
|
|
25
|
-
exports.OUT_OF_RANGE_ERROR_POSTFIX = `INVALID_TICK_BIT_MAP_RANGES`;
|
|
26
|
-
exports.DEFAULT_POOL_INIT_CODE_HASH = `0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54`;
|
|
27
|
-
var DirectMethods;
|
|
28
|
-
(function (DirectMethods) {
|
|
29
|
-
DirectMethods["directSell"] = "directUniV3Swap";
|
|
30
|
-
DirectMethods["directBuy"] = "directUniV3Buy";
|
|
31
|
-
})(DirectMethods = exports.DirectMethods || (exports.DirectMethods = {}));
|
|
32
|
-
exports.MIN_SQRT_RATIO = BigInt('4295128739');
|
|
33
|
-
exports.MAX_SQRT_RATIO = BigInt('1461446703485210103287273052203988822378723970342');
|
|
34
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/dex/solidly-v3/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG,KAAM,CAAC,CAAC,SAAS;AAC3C,QAAA,4BAA4B,GAAG,KAAM,CAAC;AACtC,QAAA,8BAA8B,GAAG,CAAC,CAAC;AAEhD,iEAAiE;AACpD,QAAA,kBAAkB,GAAG,EAAE,CAAC;AAErC,qDAAqD;AACxC,QAAA,kBAAkB,GAAG,EAAE,CAAC;AAExB,QAAA,qCAAqC,GAAG,GAAG,CAAC;AAE5C,QAAA,sBAAsB,GACjC,4DAA4D,CAAC;AAElD,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAEhC,QAAA,cAAc,GAAG;IAC5B,cAAc,EAAE,EAAE;IAClB,YAAY,EAAE,EAAE;IAChB,WAAW,EAAE,KAAK;CACnB,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACrC,cAAc,EAAE,EAAE;IAClB,cAAc,EAAE,EAAE;IAClB,iCAAiC,EAAE,EAAE;IACrC,WAAW,EAAE,KAAK;CACnB,CAAC;AAEW,QAAA,0BAA0B,GAAG,6BAA6B,CAAC;AAE3D,QAAA,2BAA2B,GAAG,oEAAoE,CAAC;AAEhH,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,+CAA8B,CAAA;IAC9B,6CAA4B,CAAA;AAC9B,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AACY,QAAA,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACtC,QAAA,cAAc,GAAG,MAAM,CAClC,mDAAmD,CACpD,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BitMath = void 0;
|
|
4
|
-
const bigint_constants_1 = require("../../../bigint-constants");
|
|
5
|
-
const utils_1 = require("../../../utils");
|
|
6
|
-
class BitMath {
|
|
7
|
-
static mostSignificantBit(x) {
|
|
8
|
-
(0, utils_1._require)(x > 0, '', { x }, 'x > 0');
|
|
9
|
-
let r = 0n;
|
|
10
|
-
if (x >= 0x100000000000000000000000000000000n) {
|
|
11
|
-
x >>= 128n;
|
|
12
|
-
r += 128n;
|
|
13
|
-
}
|
|
14
|
-
if (x >= 0x10000000000000000n) {
|
|
15
|
-
x >>= 64n;
|
|
16
|
-
r += 64n;
|
|
17
|
-
}
|
|
18
|
-
if (x >= 0x100000000n) {
|
|
19
|
-
x >>= 32n;
|
|
20
|
-
r += 32n;
|
|
21
|
-
}
|
|
22
|
-
if (x >= 0x10000n) {
|
|
23
|
-
x >>= 16n;
|
|
24
|
-
r += 16n;
|
|
25
|
-
}
|
|
26
|
-
if (x >= 0x100n) {
|
|
27
|
-
x >>= 8n;
|
|
28
|
-
r += 8n;
|
|
29
|
-
}
|
|
30
|
-
if (x >= 0x10n) {
|
|
31
|
-
x >>= 4n;
|
|
32
|
-
r += 4n;
|
|
33
|
-
}
|
|
34
|
-
if (x >= 0x4n) {
|
|
35
|
-
x >>= 2n;
|
|
36
|
-
r += 2n;
|
|
37
|
-
}
|
|
38
|
-
if (x >= 0x2n)
|
|
39
|
-
r += 1n;
|
|
40
|
-
return r;
|
|
41
|
-
}
|
|
42
|
-
static leastSignificantBit(x) {
|
|
43
|
-
(0, utils_1._require)(x > 0, '', { x }, 'x > 0');
|
|
44
|
-
let r = 255n;
|
|
45
|
-
if ((x & bigint_constants_1.BI_MAX_UINT128) > 0n) {
|
|
46
|
-
r -= 128n;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
x >>= 128n;
|
|
50
|
-
}
|
|
51
|
-
if ((x & bigint_constants_1.BI_MAX_UINT64) > 0n) {
|
|
52
|
-
r -= 64n;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
x >>= 64n;
|
|
56
|
-
}
|
|
57
|
-
if ((x & bigint_constants_1.BI_MAX_UINT32) > 0n) {
|
|
58
|
-
r -= 32n;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
x >>= 32n;
|
|
62
|
-
}
|
|
63
|
-
if ((x & bigint_constants_1.BI_MAX_UINT16) > 0n) {
|
|
64
|
-
r -= 16n;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
x >>= 16n;
|
|
68
|
-
}
|
|
69
|
-
if ((x & bigint_constants_1.BI_MAX_UINT8) > 0n) {
|
|
70
|
-
r -= 8n;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
x >>= 8n;
|
|
74
|
-
}
|
|
75
|
-
if ((x & 0xfn) > 0n) {
|
|
76
|
-
r -= 4n;
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
x >>= 4n;
|
|
80
|
-
}
|
|
81
|
-
if ((x & 0x3n) > 0n) {
|
|
82
|
-
r -= 2n;
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
x >>= 2n;
|
|
86
|
-
}
|
|
87
|
-
if ((x & 0x1n) > 0n)
|
|
88
|
-
r -= 1n;
|
|
89
|
-
return r;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.BitMath = BitMath;
|
|
93
|
-
//# sourceMappingURL=BitMath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitMath.js","sourceRoot":"","sources":["../../../../src/dex/solidly-v3/contract-math/BitMath.ts"],"names":[],"mappings":";;;AAAA,gEAMmC;AACnC,0CAA0C;AAE1C,MAAa,OAAO;IAClB,MAAM,CAAC,kBAAkB,CAAC,CAAS;QACjC,IAAA,gBAAQ,EAAC,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,GAAG,EAAE,CAAC;QAEX,IAAI,CAAC,IAAI,oCAAoC,EAAE;YAC7C,CAAC,KAAK,IAAI,CAAC;YACX,CAAC,IAAI,IAAI,CAAC;SACX;QACD,IAAI,CAAC,IAAI,oBAAoB,EAAE;YAC7B,CAAC,KAAK,GAAG,CAAC;YACV,CAAC,IAAI,GAAG,CAAC;SACV;QACD,IAAI,CAAC,IAAI,YAAY,EAAE;YACrB,CAAC,KAAK,GAAG,CAAC;YACV,CAAC,IAAI,GAAG,CAAC;SACV;QACD,IAAI,CAAC,IAAI,QAAQ,EAAE;YACjB,CAAC,KAAK,GAAG,CAAC;YACV,CAAC,IAAI,GAAG,CAAC;SACV;QACD,IAAI,CAAC,IAAI,MAAM,EAAE;YACf,CAAC,KAAK,EAAE,CAAC;YACT,CAAC,IAAI,EAAE,CAAC;SACT;QACD,IAAI,CAAC,IAAI,KAAK,EAAE;YACd,CAAC,KAAK,EAAE,CAAC;YACT,CAAC,IAAI,EAAE,CAAC;SACT;QACD,IAAI,CAAC,IAAI,IAAI,EAAE;YACb,CAAC,KAAK,EAAE,CAAC;YACT,CAAC,IAAI,EAAE,CAAC;SACT;QACD,IAAI,CAAC,IAAI,IAAI;YAAE,CAAC,IAAI,EAAE,CAAC;QAEvB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,CAAC,mBAAmB,CAAC,CAAS;QAClC,IAAA,gBAAQ,EAAC,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAEpC,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,IAAI,CAAC,CAAC,GAAG,iCAAc,CAAC,GAAG,EAAE,EAAE;YAC7B,CAAC,IAAI,IAAI,CAAC;SACX;aAAM;YACL,CAAC,KAAK,IAAI,CAAC;SACZ;QACD,IAAI,CAAC,CAAC,GAAG,gCAAa,CAAC,GAAG,EAAE,EAAE;YAC5B,CAAC,IAAI,GAAG,CAAC;SACV;aAAM;YACL,CAAC,KAAK,GAAG,CAAC;SACX;QACD,IAAI,CAAC,CAAC,GAAG,gCAAa,CAAC,GAAG,EAAE,EAAE;YAC5B,CAAC,IAAI,GAAG,CAAC;SACV;aAAM;YACL,CAAC,KAAK,GAAG,CAAC;SACX;QACD,IAAI,CAAC,CAAC,GAAG,gCAAa,CAAC,GAAG,EAAE,EAAE;YAC5B,CAAC,IAAI,GAAG,CAAC;SACV;aAAM;YACL,CAAC,KAAK,GAAG,CAAC;SACX;QACD,IAAI,CAAC,CAAC,GAAG,+BAAY,CAAC,GAAG,EAAE,EAAE;YAC3B,CAAC,IAAI,EAAE,CAAC;SACT;aAAM;YACL,CAAC,KAAK,EAAE,CAAC;SACV;QACD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE;YACnB,CAAC,IAAI,EAAE,CAAC;SACT;aAAM;YACL,CAAC,KAAK,EAAE,CAAC;SACV;QACD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE;YACnB,CAAC,IAAI,EAAE,CAAC;SACT;aAAM;YACL,CAAC,KAAK,EAAE,CAAC;SACV;QACD,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE;YAAE,CAAC,IAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AAhFD,0BAgFC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FixedPoint128 = void 0;
|
|
4
|
-
class FixedPoint128 {
|
|
5
|
-
}
|
|
6
|
-
exports.FixedPoint128 = FixedPoint128;
|
|
7
|
-
FixedPoint128.Q128 = 0x100000000000000000000000000000000n;
|
|
8
|
-
//# sourceMappingURL=FixedPoint128.js.map
|