@paraswap/dex-lib 2.33.4-balancer-v2-multihop.2 → 2.35.0
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/algebra/AlgebraPool.abi.json +727 -0
- package/build/composed-event-subscriber.js +8 -2
- package/build/composed-event-subscriber.js.map +1 -1
- package/build/config.js +27 -0
- package/build/config.js.map +1 -1
- package/build/dex/algebra/algebra-pool-v1_1.d.ts +16 -2
- package/build/dex/algebra/algebra-pool-v1_1.js +166 -4
- package/build/dex/algebra/algebra-pool-v1_1.js.map +1 -1
- package/build/dex/algebra/algebra-pool.d.ts +46 -0
- package/build/dex/algebra/algebra-pool.js +336 -0
- package/build/dex/algebra/algebra-pool.js.map +1 -0
- package/build/dex/algebra/algebra.js +9 -7
- package/build/dex/algebra/algebra.js.map +1 -1
- package/build/dex/algebra/config.js +1 -0
- package/build/dex/algebra/config.js.map +1 -1
- package/build/dex/algebra/types.d.ts +3 -2
- package/build/dex/algebra/utils.d.ts +3 -1
- package/build/dex/algebra/utils.js +59 -1
- package/build/dex/algebra/utils.js.map +1 -1
- package/build/dex/balancer-v2/optimizer.d.ts +0 -1
- package/build/dex/balancer-v2/optimizer.js +21 -29
- package/build/dex/balancer-v2/optimizer.js.map +1 -1
- package/build/dex/index.js +2 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/solidly/forks-override/velodromeV2.js +4 -1
- package/build/dex/solidly/forks-override/velodromeV2.js.map +1 -1
- package/build/dex/uniswap-v2/nomiswap-v2.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3.js +7 -1
- package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
- package/build/lib/decoders.d.ts +3 -0
- package/build/lib/decoders.js +9 -1
- package/build/lib/decoders.js.map +1 -1
- package/build/stateful-event-subscriber.d.ts +1 -0
- package/build/stateful-event-subscriber.js +6 -0
- package/build/stateful-event-subscriber.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/algebra/AlgebraFactory-v1_1.abi.json +250 -0
- package/src/abi/api3-proxy.json +46 -0
- package/src/abi/api3-server-v1.json +463 -0
- package/src/abi/quick-perps/fast-price-events.json +70 -0
- package/src/abi/quick-perps/fast-price-feed.json +741 -0
- package/src/abi/quick-perps/reader.json +313 -0
- package/src/abi/quick-perps/vault-price-feed.json +323 -0
- package/src/abi/quick-perps/vault.json +1953 -0
- package/src/composed-event-subscriber.ts +16 -11
- package/src/config.ts +30 -0
- package/src/dex/algebra/algebra-integration.test.ts +122 -0
- package/src/dex/algebra/algebra-pool-v1_1.ts +259 -8
- package/src/dex/algebra/algebra.ts +9 -6
- package/src/dex/algebra/config.ts +1 -0
- package/src/dex/algebra/types.ts +3 -2
- package/src/dex/algebra/utils.ts +83 -2
- package/src/dex/balancer-v2/optimizer.ts +23 -38
- package/src/dex/index.ts +2 -0
- package/src/dex/quick-perps/config.ts +31 -0
- package/src/dex/quick-perps/fast-price-feed.ts +279 -0
- package/src/dex/quick-perps/pool.ts +372 -0
- package/src/dex/quick-perps/quick-perps-e2e.test.ts +65 -0
- package/src/dex/quick-perps/quick-perps-events.test.ts +101 -0
- package/src/dex/quick-perps/quick-perps-integration.test.ts +153 -0
- package/src/dex/quick-perps/quick-perps.ts +292 -0
- package/src/dex/quick-perps/types.ts +97 -0
- package/src/dex/quick-perps/usdq.ts +83 -0
- package/src/dex/quick-perps/vault-price-feed.ts +322 -0
- package/src/dex/quick-perps/vault-utils.ts +53 -0
- package/src/dex/quick-perps/vault.ts +290 -0
- package/src/dex/solidly/forks-override/velodromeV2.ts +4 -2
- package/src/dex/uniswap-v2/nomiswap-v2.ts +2 -1
- package/src/dex/uniswap-v2/uniswap-v2-e2e-bsc.test.ts +6 -8
- package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +52 -47
- package/src/dex/uniswap-v3/uniswap-v3-integration.test.ts +1 -9
- package/src/dex/uniswap-v3/uniswap-v3.ts +7 -1
- package/src/lib/api3-feed.ts +140 -0
- package/src/lib/decoders.ts +13 -0
- package/src/stateful-event-subscriber.ts +8 -0
- package/tests/constants-e2e.ts +29 -0
- package/tests/tenderly-simulation.ts +46 -2
- package/tests/utils-e2e.ts +18 -10
- package/build/abi/quickPerps/fast-price-events.json +0 -70
- package/build/abi/quickPerps/fast-price-feed.json +0 -748
- package/build/abi/quickPerps/reader.json +0 -313
- package/build/abi/quickPerps/vault-price-feed.json +0 -477
- package/build/abi/quickPerps/vault.json +0 -1953
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +0 -285
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +0 -583
- package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
- package/build/abi/woo-fi/WooPP.abi.json +0 -548
- package/build/abi/woo-fi/Wooracle.abi.json +0 -260
- package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
- package/build/dex/aave-v3/tokens/avalanche.json +0 -74
- package/build/dex/aave-v3/tokens/fantom.json +0 -62
- package/build/dex/aave-v3/tokens/optimism.json +0 -50
- package/build/dex/aave-v3/tokens/polygon.json +0 -116
- package/build/dex/balancer-v2/LinearMath.d.ts +0 -19
- package/build/dex/balancer-v2/LinearMath.js +0 -179
- package/build/dex/balancer-v2/LinearMath.js.map +0 -1
- package/build/dex/balancer-v2/LinearPool.d.ts +0 -47
- package/build/dex/balancer-v2/LinearPool.js +0 -324
- package/build/dex/balancer-v2/LinearPool.js.map +0 -1
- package/build/dex/balancer-v2/PhantomStablePool.d.ts +0 -47
- package/build/dex/balancer-v2/PhantomStablePool.js +0 -294
- package/build/dex/balancer-v2/PhantomStablePool.js.map +0 -1
- package/build/dex/balancer-v2/StableMath.d.ts +0 -9
- package/build/dex/balancer-v2/StableMath.js +0 -272
- package/build/dex/balancer-v2/StableMath.js.map +0 -1
- package/build/dex/balancer-v2/balancer-v2-pool.d.ts +0 -75
- package/build/dex/balancer-v2/balancer-v2-pool.js +0 -417
- package/build/dex/balancer-v2/balancer-v2-pool.js.map +0 -1
- package/build/dex/quickswap-v3.d.ts +0 -21
- package/build/dex/quickswap-v3.js +0 -40
- package/build/dex/quickswap-v3.js.map +0 -1
- package/build/dex/test-dex/config.d.ts +0 -4
- package/build/dex/test-dex/config.js +0 -15
- package/build/dex/test-dex/config.js.map +0 -1
- package/build/dex/test-dex/test-dex-pool.d.ts +0 -39
- package/build/dex/test-dex/test-dex-pool.js +0 -63
- package/build/dex/test-dex/test-dex-pool.js.map +0 -1
- package/build/dex/test-dex/test-dex.d.ts +0 -37
- package/build/dex/test-dex/test-dex.js +0 -126
- package/build/dex/test-dex/test-dex.js.map +0 -1
- package/build/dex/test-dex/types.d.ts +0 -6
- package/build/dex/test-dex/types.js +0 -3
- package/build/dex/test-dex/types.js.map +0 -1
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +0 -12
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +0 -23
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +0 -1
- package/build/dex/woo-fi/config.d.ts +0 -4
- package/build/dex/woo-fi/config.js +0 -141
- package/build/dex/woo-fi/config.js.map +0 -1
- package/build/dex/woo-fi/constants.d.ts +0 -5
- package/build/dex/woo-fi/constants.js +0 -20
- package/build/dex/woo-fi/constants.js.map +0 -1
- package/build/dex/woo-fi/types.d.ts +0 -48
- package/build/dex/woo-fi/types.js +0 -3
- package/build/dex/woo-fi/types.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
- package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
- package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
- package/build/dex/woo-fi/woo-fi-math.js +0 -300
- package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi.d.ts +0 -65
- package/build/dex/woo-fi/woo-fi.js +0 -480
- package/build/dex/woo-fi/woo-fi.js.map +0 -1
- package/build/dex/woo-fi-v2/woo-fi-math.d.ts +0 -16
- package/build/dex/woo-fi-v2/woo-fi-math.js +0 -137
- package/build/dex/woo-fi-v2/woo-fi-math.js.map +0 -1
- package/src/dex/balancer-v2/balancer-v2-optimizer.test.ts +0 -226
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [],
|
|
4
|
+
"name": "BASIS_POINTS_DIVISOR",
|
|
5
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
6
|
+
"stateMutability": "view",
|
|
7
|
+
"type": "function"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"inputs": [],
|
|
11
|
+
"name": "POSITION_PROPS_LENGTH",
|
|
12
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
13
|
+
"stateMutability": "view",
|
|
14
|
+
"type": "function"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"inputs": [],
|
|
18
|
+
"name": "PRICE_PRECISION",
|
|
19
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
20
|
+
"stateMutability": "view",
|
|
21
|
+
"type": "function"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"inputs": [],
|
|
25
|
+
"name": "USDQ_DECIMALS",
|
|
26
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
27
|
+
"stateMutability": "view",
|
|
28
|
+
"type": "function"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"inputs": [
|
|
32
|
+
{
|
|
33
|
+
"internalType": "contract IVault",
|
|
34
|
+
"name": "_vault",
|
|
35
|
+
"type": "address"
|
|
36
|
+
},
|
|
37
|
+
{ "internalType": "address", "name": "_tokenIn", "type": "address" },
|
|
38
|
+
{ "internalType": "address", "name": "_tokenOut", "type": "address" },
|
|
39
|
+
{ "internalType": "uint256", "name": "_amountIn", "type": "uint256" }
|
|
40
|
+
],
|
|
41
|
+
"name": "getAmountOut",
|
|
42
|
+
"outputs": [
|
|
43
|
+
{ "internalType": "uint256", "name": "", "type": "uint256" },
|
|
44
|
+
{ "internalType": "uint256", "name": "", "type": "uint256" }
|
|
45
|
+
],
|
|
46
|
+
"stateMutability": "view",
|
|
47
|
+
"type": "function"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"inputs": [
|
|
51
|
+
{
|
|
52
|
+
"internalType": "contract IVault",
|
|
53
|
+
"name": "_vault",
|
|
54
|
+
"type": "address"
|
|
55
|
+
},
|
|
56
|
+
{ "internalType": "address", "name": "_tokenIn", "type": "address" },
|
|
57
|
+
{ "internalType": "address", "name": "_tokenOut", "type": "address" },
|
|
58
|
+
{ "internalType": "uint256", "name": "_amountIn", "type": "uint256" }
|
|
59
|
+
],
|
|
60
|
+
"name": "getFeeBasisPoints",
|
|
61
|
+
"outputs": [
|
|
62
|
+
{ "internalType": "uint256", "name": "", "type": "uint256" },
|
|
63
|
+
{ "internalType": "uint256", "name": "", "type": "uint256" },
|
|
64
|
+
{ "internalType": "uint256", "name": "", "type": "uint256" }
|
|
65
|
+
],
|
|
66
|
+
"stateMutability": "view",
|
|
67
|
+
"type": "function"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"inputs": [
|
|
71
|
+
{ "internalType": "address", "name": "_vault", "type": "address" },
|
|
72
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
73
|
+
],
|
|
74
|
+
"name": "getFees",
|
|
75
|
+
"outputs": [
|
|
76
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
77
|
+
],
|
|
78
|
+
"stateMutability": "view",
|
|
79
|
+
"type": "function"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"inputs": [
|
|
83
|
+
{ "internalType": "address", "name": "_vault", "type": "address" },
|
|
84
|
+
{ "internalType": "address", "name": "_weth", "type": "address" },
|
|
85
|
+
{ "internalType": "uint256", "name": "_usdqAmount", "type": "uint256" },
|
|
86
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
87
|
+
],
|
|
88
|
+
"name": "getFullVaultTokenInfo",
|
|
89
|
+
"outputs": [
|
|
90
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
91
|
+
],
|
|
92
|
+
"stateMutability": "view",
|
|
93
|
+
"type": "function"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"inputs": [
|
|
97
|
+
{ "internalType": "address", "name": "_vault", "type": "address" },
|
|
98
|
+
{ "internalType": "address", "name": "_weth", "type": "address" },
|
|
99
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
100
|
+
],
|
|
101
|
+
"name": "getFundingRates",
|
|
102
|
+
"outputs": [
|
|
103
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
104
|
+
],
|
|
105
|
+
"stateMutability": "view",
|
|
106
|
+
"type": "function"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"inputs": [
|
|
110
|
+
{
|
|
111
|
+
"internalType": "contract IVault",
|
|
112
|
+
"name": "_vault",
|
|
113
|
+
"type": "address"
|
|
114
|
+
},
|
|
115
|
+
{ "internalType": "address", "name": "_tokenIn", "type": "address" },
|
|
116
|
+
{ "internalType": "address", "name": "_tokenOut", "type": "address" }
|
|
117
|
+
],
|
|
118
|
+
"name": "getMaxAmountIn",
|
|
119
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
120
|
+
"stateMutability": "view",
|
|
121
|
+
"type": "function"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"inputs": [
|
|
125
|
+
{ "internalType": "address", "name": "_vault", "type": "address" },
|
|
126
|
+
{ "internalType": "address", "name": "_account", "type": "address" },
|
|
127
|
+
{
|
|
128
|
+
"internalType": "address[]",
|
|
129
|
+
"name": "_collateralTokens",
|
|
130
|
+
"type": "address[]"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"internalType": "address[]",
|
|
134
|
+
"name": "_indexTokens",
|
|
135
|
+
"type": "address[]"
|
|
136
|
+
},
|
|
137
|
+
{ "internalType": "bool[]", "name": "_isLong", "type": "bool[]" }
|
|
138
|
+
],
|
|
139
|
+
"name": "getPositions",
|
|
140
|
+
"outputs": [
|
|
141
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
142
|
+
],
|
|
143
|
+
"stateMutability": "view",
|
|
144
|
+
"type": "function"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"inputs": [
|
|
148
|
+
{
|
|
149
|
+
"internalType": "contract IVaultPriceFeed",
|
|
150
|
+
"name": "_priceFeed",
|
|
151
|
+
"type": "address"
|
|
152
|
+
},
|
|
153
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
154
|
+
],
|
|
155
|
+
"name": "getPrices",
|
|
156
|
+
"outputs": [
|
|
157
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
158
|
+
],
|
|
159
|
+
"stateMutability": "view",
|
|
160
|
+
"type": "function"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"inputs": [
|
|
164
|
+
{ "internalType": "address", "name": "_account", "type": "address" },
|
|
165
|
+
{
|
|
166
|
+
"internalType": "address[]",
|
|
167
|
+
"name": "_yieldTrackers",
|
|
168
|
+
"type": "address[]"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"name": "getStakingInfo",
|
|
172
|
+
"outputs": [
|
|
173
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
174
|
+
],
|
|
175
|
+
"stateMutability": "view",
|
|
176
|
+
"type": "function"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"inputs": [
|
|
180
|
+
{ "internalType": "address", "name": "_account", "type": "address" },
|
|
181
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
182
|
+
],
|
|
183
|
+
"name": "getTokenBalances",
|
|
184
|
+
"outputs": [
|
|
185
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
186
|
+
],
|
|
187
|
+
"stateMutability": "view",
|
|
188
|
+
"type": "function"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"inputs": [
|
|
192
|
+
{ "internalType": "address", "name": "_account", "type": "address" },
|
|
193
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
194
|
+
],
|
|
195
|
+
"name": "getTokenBalancesWithSupplies",
|
|
196
|
+
"outputs": [
|
|
197
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
198
|
+
],
|
|
199
|
+
"stateMutability": "view",
|
|
200
|
+
"type": "function"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"inputs": [
|
|
204
|
+
{
|
|
205
|
+
"internalType": "contract IERC20",
|
|
206
|
+
"name": "_token",
|
|
207
|
+
"type": "address"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"internalType": "address[]",
|
|
211
|
+
"name": "_excludedAccounts",
|
|
212
|
+
"type": "address[]"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"name": "getTokenSupply",
|
|
216
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
217
|
+
"stateMutability": "view",
|
|
218
|
+
"type": "function"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"inputs": [
|
|
222
|
+
{
|
|
223
|
+
"internalType": "contract IERC20",
|
|
224
|
+
"name": "_token",
|
|
225
|
+
"type": "address"
|
|
226
|
+
},
|
|
227
|
+
{ "internalType": "address[]", "name": "_accounts", "type": "address[]" }
|
|
228
|
+
],
|
|
229
|
+
"name": "getTotalBalance",
|
|
230
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
231
|
+
"stateMutability": "view",
|
|
232
|
+
"type": "function"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"inputs": [
|
|
236
|
+
{
|
|
237
|
+
"internalType": "address[]",
|
|
238
|
+
"name": "_yieldTokens",
|
|
239
|
+
"type": "address[]"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"name": "getTotalStaked",
|
|
243
|
+
"outputs": [
|
|
244
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
245
|
+
],
|
|
246
|
+
"stateMutability": "view",
|
|
247
|
+
"type": "function"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"inputs": [
|
|
251
|
+
{ "internalType": "address", "name": "_vault", "type": "address" },
|
|
252
|
+
{ "internalType": "address", "name": "_weth", "type": "address" },
|
|
253
|
+
{ "internalType": "uint256", "name": "_usdqAmount", "type": "uint256" },
|
|
254
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
255
|
+
],
|
|
256
|
+
"name": "getVaultTokenInfo",
|
|
257
|
+
"outputs": [
|
|
258
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
259
|
+
],
|
|
260
|
+
"stateMutability": "view",
|
|
261
|
+
"type": "function"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"inputs": [
|
|
265
|
+
{ "internalType": "address", "name": "_vault", "type": "address" },
|
|
266
|
+
{ "internalType": "address", "name": "_weth", "type": "address" },
|
|
267
|
+
{ "internalType": "uint256", "name": "_usdqAmount", "type": "uint256" },
|
|
268
|
+
{ "internalType": "address[]", "name": "_tokens", "type": "address[]" }
|
|
269
|
+
],
|
|
270
|
+
"name": "getVaultTokenInfoV2",
|
|
271
|
+
"outputs": [
|
|
272
|
+
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
|
|
273
|
+
],
|
|
274
|
+
"stateMutability": "view",
|
|
275
|
+
"type": "function"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"inputs": [],
|
|
279
|
+
"name": "gov",
|
|
280
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
281
|
+
"stateMutability": "view",
|
|
282
|
+
"type": "function"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"inputs": [],
|
|
286
|
+
"name": "hasMaxGlobalShortSizes",
|
|
287
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
288
|
+
"stateMutability": "view",
|
|
289
|
+
"type": "function"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"inputs": [
|
|
293
|
+
{
|
|
294
|
+
"internalType": "bool",
|
|
295
|
+
"name": "_hasMaxGlobalShortSizes",
|
|
296
|
+
"type": "bool"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"name": "setConfig",
|
|
300
|
+
"outputs": [],
|
|
301
|
+
"stateMutability": "nonpayable",
|
|
302
|
+
"type": "function"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"inputs": [
|
|
306
|
+
{ "internalType": "address", "name": "_gov", "type": "address" }
|
|
307
|
+
],
|
|
308
|
+
"name": "setGov",
|
|
309
|
+
"outputs": [],
|
|
310
|
+
"stateMutability": "nonpayable",
|
|
311
|
+
"type": "function"
|
|
312
|
+
}
|
|
313
|
+
]
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
|
|
3
|
+
{
|
|
4
|
+
"inputs": [],
|
|
5
|
+
"name": "BASIS_POINTS_DIVISOR",
|
|
6
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
7
|
+
"stateMutability": "view",
|
|
8
|
+
"type": "function"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"inputs": [],
|
|
12
|
+
"name": "MAX_ADJUSTMENT_BASIS_POINTS",
|
|
13
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
14
|
+
"stateMutability": "view",
|
|
15
|
+
"type": "function"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"inputs": [],
|
|
19
|
+
"name": "MAX_ADJUSTMENT_INTERVAL",
|
|
20
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
21
|
+
"stateMutability": "view",
|
|
22
|
+
"type": "function"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"inputs": [],
|
|
26
|
+
"name": "MAX_SPREAD_BASIS_POINTS",
|
|
27
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
28
|
+
"stateMutability": "view",
|
|
29
|
+
"type": "function"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"inputs": [],
|
|
33
|
+
"name": "ONE_USD",
|
|
34
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
35
|
+
"stateMutability": "view",
|
|
36
|
+
"type": "function"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"inputs": [],
|
|
40
|
+
"name": "PRICE_PRECISION",
|
|
41
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
42
|
+
"stateMutability": "view",
|
|
43
|
+
"type": "function"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
47
|
+
"name": "adjustmentBasisPoints",
|
|
48
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
49
|
+
"stateMutability": "view",
|
|
50
|
+
"type": "function"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"inputs": [],
|
|
54
|
+
"name": "expireTimeForPriceFeed",
|
|
55
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
56
|
+
"stateMutability": "view",
|
|
57
|
+
"type": "function"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"inputs": [],
|
|
61
|
+
"name": "favorPrimaryPrice",
|
|
62
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
63
|
+
"stateMutability": "view",
|
|
64
|
+
"type": "function"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"inputs": [
|
|
68
|
+
{ "internalType": "address", "name": "_token", "type": "address" }
|
|
69
|
+
],
|
|
70
|
+
"name": "getLatestPrimaryPrice",
|
|
71
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
72
|
+
"stateMutability": "view",
|
|
73
|
+
"type": "function"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"inputs": [
|
|
77
|
+
{ "internalType": "address", "name": "_token", "type": "address" },
|
|
78
|
+
{ "internalType": "bool", "name": "_maximise", "type": "bool" },
|
|
79
|
+
{ "internalType": "bool", "name": "", "type": "bool" },
|
|
80
|
+
{ "internalType": "bool", "name": "", "type": "bool" }
|
|
81
|
+
],
|
|
82
|
+
"name": "getPrice",
|
|
83
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
84
|
+
"stateMutability": "view",
|
|
85
|
+
"type": "function"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"inputs": [
|
|
89
|
+
{ "internalType": "address", "name": "_token", "type": "address" },
|
|
90
|
+
{ "internalType": "bool", "name": "_maximise", "type": "bool" }
|
|
91
|
+
],
|
|
92
|
+
"name": "getPriceV1",
|
|
93
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
94
|
+
"stateMutability": "view",
|
|
95
|
+
"type": "function"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"inputs": [
|
|
99
|
+
{ "internalType": "address", "name": "_token", "type": "address" },
|
|
100
|
+
{ "internalType": "bool", "name": "", "type": "bool" }
|
|
101
|
+
],
|
|
102
|
+
"name": "getPrimaryPrice",
|
|
103
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
104
|
+
"stateMutability": "view",
|
|
105
|
+
"type": "function"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"inputs": [
|
|
109
|
+
{ "internalType": "address", "name": "_token", "type": "address" },
|
|
110
|
+
{
|
|
111
|
+
"internalType": "uint256",
|
|
112
|
+
"name": "_referencePrice",
|
|
113
|
+
"type": "uint256"
|
|
114
|
+
},
|
|
115
|
+
{ "internalType": "bool", "name": "_maximise", "type": "bool" }
|
|
116
|
+
],
|
|
117
|
+
"name": "getSecondaryPrice",
|
|
118
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
119
|
+
"stateMutability": "view",
|
|
120
|
+
"type": "function"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"inputs": [],
|
|
124
|
+
"name": "gov",
|
|
125
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
126
|
+
"stateMutability": "view",
|
|
127
|
+
"type": "function"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
131
|
+
"name": "isAdjustmentAdditive",
|
|
132
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
133
|
+
"stateMutability": "view",
|
|
134
|
+
"type": "function"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"inputs": [],
|
|
138
|
+
"name": "isSecondaryPriceEnabled",
|
|
139
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
140
|
+
"stateMutability": "view",
|
|
141
|
+
"type": "function"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
145
|
+
"name": "lastAdjustmentTimings",
|
|
146
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
147
|
+
"stateMutability": "view",
|
|
148
|
+
"type": "function"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"inputs": [],
|
|
152
|
+
"name": "maxStrictPriceDeviation",
|
|
153
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
154
|
+
"stateMutability": "view",
|
|
155
|
+
"type": "function"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
159
|
+
"name": "priceDecimals",
|
|
160
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
161
|
+
"stateMutability": "view",
|
|
162
|
+
"type": "function"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
166
|
+
"name": "priceFeedProxies",
|
|
167
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
168
|
+
"stateMutability": "view",
|
|
169
|
+
"type": "function"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"inputs": [],
|
|
173
|
+
"name": "secondaryPriceFeed",
|
|
174
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
175
|
+
"stateMutability": "view",
|
|
176
|
+
"type": "function"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"inputs": [
|
|
180
|
+
{ "internalType": "address", "name": "_token", "type": "address" },
|
|
181
|
+
{ "internalType": "bool", "name": "_isAdditive", "type": "bool" },
|
|
182
|
+
{ "internalType": "uint256", "name": "_adjustmentBps", "type": "uint256" }
|
|
183
|
+
],
|
|
184
|
+
"name": "setAdjustment",
|
|
185
|
+
"outputs": [],
|
|
186
|
+
"stateMutability": "nonpayable",
|
|
187
|
+
"type": "function"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"inputs": [
|
|
191
|
+
{
|
|
192
|
+
"internalType": "uint256",
|
|
193
|
+
"name": "_expireTimeForPriceFeed",
|
|
194
|
+
"type": "uint256"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"name": "setExpireTimeForPriceFeed",
|
|
198
|
+
"outputs": [],
|
|
199
|
+
"stateMutability": "nonpayable",
|
|
200
|
+
"type": "function"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"inputs": [
|
|
204
|
+
{ "internalType": "bool", "name": "_favorPrimaryPrice", "type": "bool" }
|
|
205
|
+
],
|
|
206
|
+
"name": "setFavorPrimaryPrice",
|
|
207
|
+
"outputs": [],
|
|
208
|
+
"stateMutability": "nonpayable",
|
|
209
|
+
"type": "function"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"inputs": [
|
|
213
|
+
{ "internalType": "address", "name": "_gov", "type": "address" }
|
|
214
|
+
],
|
|
215
|
+
"name": "setGov",
|
|
216
|
+
"outputs": [],
|
|
217
|
+
"stateMutability": "nonpayable",
|
|
218
|
+
"type": "function"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"inputs": [
|
|
222
|
+
{ "internalType": "bool", "name": "_isEnabled", "type": "bool" }
|
|
223
|
+
],
|
|
224
|
+
"name": "setIsSecondaryPriceEnabled",
|
|
225
|
+
"outputs": [],
|
|
226
|
+
"stateMutability": "nonpayable",
|
|
227
|
+
"type": "function"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"inputs": [
|
|
231
|
+
{
|
|
232
|
+
"internalType": "uint256",
|
|
233
|
+
"name": "_maxStrictPriceDeviation",
|
|
234
|
+
"type": "uint256"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"name": "setMaxStrictPriceDeviation",
|
|
238
|
+
"outputs": [],
|
|
239
|
+
"stateMutability": "nonpayable",
|
|
240
|
+
"type": "function"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"inputs": [
|
|
244
|
+
{
|
|
245
|
+
"internalType": "address",
|
|
246
|
+
"name": "_secondaryPriceFeed",
|
|
247
|
+
"type": "address"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"name": "setSecondaryPriceFeed",
|
|
251
|
+
"outputs": [],
|
|
252
|
+
"stateMutability": "nonpayable",
|
|
253
|
+
"type": "function"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"inputs": [
|
|
257
|
+
{ "internalType": "address", "name": "_token", "type": "address" },
|
|
258
|
+
{
|
|
259
|
+
"internalType": "uint256",
|
|
260
|
+
"name": "_spreadBasisPoints",
|
|
261
|
+
"type": "uint256"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"name": "setSpreadBasisPoints",
|
|
265
|
+
"outputs": [],
|
|
266
|
+
"stateMutability": "nonpayable",
|
|
267
|
+
"type": "function"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"inputs": [
|
|
271
|
+
{
|
|
272
|
+
"internalType": "uint256",
|
|
273
|
+
"name": "_spreadThresholdBasisPoints",
|
|
274
|
+
"type": "uint256"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"name": "setSpreadThresholdBasisPoints",
|
|
278
|
+
"outputs": [],
|
|
279
|
+
"stateMutability": "nonpayable",
|
|
280
|
+
"type": "function"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"inputs": [
|
|
284
|
+
{ "internalType": "address", "name": "_token", "type": "address" },
|
|
285
|
+
{
|
|
286
|
+
"internalType": "address",
|
|
287
|
+
"name": "_priceFeedProxy",
|
|
288
|
+
"type": "address"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"internalType": "uint256",
|
|
292
|
+
"name": "_priceDecimals",
|
|
293
|
+
"type": "uint256"
|
|
294
|
+
},
|
|
295
|
+
{ "internalType": "bool", "name": "_isStrictStable", "type": "bool" }
|
|
296
|
+
],
|
|
297
|
+
"name": "setTokenConfig",
|
|
298
|
+
"outputs": [],
|
|
299
|
+
"stateMutability": "nonpayable",
|
|
300
|
+
"type": "function"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
304
|
+
"name": "spreadBasisPoints",
|
|
305
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
306
|
+
"stateMutability": "view",
|
|
307
|
+
"type": "function"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"inputs": [],
|
|
311
|
+
"name": "spreadThresholdBasisPoints",
|
|
312
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
313
|
+
"stateMutability": "view",
|
|
314
|
+
"type": "function"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
318
|
+
"name": "strictStableTokens",
|
|
319
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
320
|
+
"stateMutability": "view",
|
|
321
|
+
"type": "function"
|
|
322
|
+
}
|
|
323
|
+
]
|