@paraswap/dex-lib 4.8.26 → 4.8.27

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.
Files changed (268) hide show
  1. package/build/dex/balancer-v2/balancer-v2.d.ts +0 -1
  2. package/build/dex/balancer-v2/balancer-v2.js +0 -4
  3. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  4. package/build/dex/bebop/bebop.d.ts +0 -1
  5. package/build/dex/bebop/bebop.js +0 -8
  6. package/build/dex/bebop/bebop.js.map +1 -1
  7. package/build/dex/cables/cables.d.ts +0 -1
  8. package/build/dex/cables/cables.js +0 -3
  9. package/build/dex/cables/cables.js.map +1 -1
  10. package/build/dex/curve-v1/curve-v1.d.ts +0 -1
  11. package/build/dex/curve-v1/curve-v1.js +0 -4
  12. package/build/dex/curve-v1/curve-v1.js.map +1 -1
  13. package/build/dex/curve-v1-factory/curve-v1-factory.d.ts +0 -1
  14. package/build/dex/curve-v1-factory/curve-v1-factory.js +0 -4
  15. package/build/dex/curve-v1-factory/curve-v1-factory.js.map +1 -1
  16. package/build/dex/curve-v2/curve-v2.d.ts +0 -1
  17. package/build/dex/curve-v2/curve-v2.js +0 -4
  18. package/build/dex/curve-v2/curve-v2.js.map +1 -1
  19. package/build/dex/hashflow/hashflow.d.ts +0 -1
  20. package/build/dex/hashflow/hashflow.js +0 -5
  21. package/build/dex/hashflow/hashflow.js.map +1 -1
  22. package/build/dex/idex.d.ts +0 -1
  23. package/build/dex/lite-psm/lite-psm.d.ts +0 -1
  24. package/build/dex/lite-psm/lite-psm.js +0 -3
  25. package/build/dex/lite-psm/lite-psm.js.map +1 -1
  26. package/build/dex/native/native.d.ts +0 -1
  27. package/build/dex/native/native.js +0 -6
  28. package/build/dex/native/native.js.map +1 -1
  29. package/build/dex/paraswap-limit-orders/paraswap-limit-orders.d.ts +0 -1
  30. package/build/dex/paraswap-limit-orders/paraswap-limit-orders.js +0 -5
  31. package/build/dex/paraswap-limit-orders/paraswap-limit-orders.js.map +1 -1
  32. package/build/dex/solidly-v3/solidly-v3.d.ts +0 -1
  33. package/build/dex/solidly-v3/solidly-v3.js +0 -4
  34. package/build/dex/solidly-v3/solidly-v3.js.map +1 -1
  35. package/build/dex/uniswap-v3/uniswap-v3.d.ts +0 -1
  36. package/build/dex/uniswap-v3/uniswap-v3.js +0 -4
  37. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  38. package/build/dex/uniswap-v4/api-go/compare-pricing.d.ts +1 -0
  39. package/build/dex/uniswap-v4/api-go/compare-pricing.js +187 -0
  40. package/build/dex/uniswap-v4/api-go/compare-pricing.js.map +1 -0
  41. package/build/dex/uniswap-v4/api-go/compare-states.d.ts +1 -0
  42. package/build/dex/uniswap-v4/api-go/compare-states.js +149 -0
  43. package/build/dex/uniswap-v4/api-go/compare-states.js.map +1 -0
  44. package/build/dex/uniswap-v4/api-go/fetch-pool-key.d.ts +0 -0
  45. package/build/dex/uniswap-v4/api-go/fetch-pool-key.js +140 -0
  46. package/build/dex/uniswap-v4/api-go/fetch-pool-key.js.map +1 -0
  47. package/build/implementations/local-paraswap-sdk.js +9 -4
  48. package/build/implementations/local-paraswap-sdk.js.map +1 -1
  49. package/build/tenderly-simulation.d.ts +221 -0
  50. package/build/tenderly-simulation.js +517 -0
  51. package/build/tenderly-simulation.js.map +1 -0
  52. package/package.json +1 -1
  53. package/build/abi/BProtocol.json +0 -1155
  54. package/build/abi/Jarvis.json +0 -1172
  55. package/build/abi/MStableAsset.json +0 -1545
  56. package/build/abi/OneInchLp.json +0 -1304
  57. package/build/abi/Onebit.json +0 -736
  58. package/build/abi/Shell.json +0 -1294
  59. package/build/abi/TraderJoeV2Router.json +0 -50
  60. package/build/abi/idle-dao/idle-cdo-factory.json +0 -38
  61. package/build/abi/idle-dao/idle-cdo.json +0 -1245
  62. package/build/abi/infusion/InfusionFactory.json +0 -147
  63. package/build/abi/infusion/InfusionPair.json +0 -658
  64. package/build/abi/infusion/InfusionRouter.json +0 -442
  65. package/build/abi/maker-psm/pot.json +0 -322
  66. package/build/abi/maker-psm/psm.json +0 -243
  67. package/build/abi/maker-psm/vat.json +0 -363
  68. package/build/abi/nomiswap-v2/nomiswap-v2-pool.json +0 -773
  69. package/build/abi/quick-perps/fast-price-events.json +0 -70
  70. package/build/abi/quick-perps/fast-price-feed.json +0 -741
  71. package/build/abi/quick-perps/reader.json +0 -313
  72. package/build/abi/quick-perps/vault-price-feed.json +0 -323
  73. package/build/abi/quick-perps/vault.json +0 -1953
  74. package/build/abi/uniswap-v2/excalibur-pool.json +0 -881
  75. package/build/abi/uniswap-v2/mdex-factory.json +0 -759
  76. package/build/abi/wUSDM.json +0 -757
  77. package/build/abi/zrx.v2.json +0 -1967
  78. package/build/abi/zrx.v3.json +0 -3454
  79. package/build/abi/zrx.v4.json +0 -2193
  80. package/build/dex/OneInchLp.d.ts +0 -24
  81. package/build/dex/OneInchLp.js +0 -43
  82. package/build/dex/OneInchLp.js.map +0 -1
  83. package/build/dex/bProtocol/bProtocol.d.ts +0 -15
  84. package/build/dex/bProtocol/bProtocol.js +0 -56
  85. package/build/dex/bProtocol/bProtocol.js.map +0 -1
  86. package/build/dex/bProtocol/types.d.ts +0 -11
  87. package/build/dex/bProtocol/types.js +0 -8
  88. package/build/dex/bProtocol/types.js.map +0 -1
  89. package/build/dex/ekubo/pools/base-pool.d.ts +0 -47
  90. package/build/dex/ekubo/pools/base-pool.js +0 -184
  91. package/build/dex/ekubo/pools/base-pool.js.map +0 -1
  92. package/build/dex/ekubo/pools/iface.d.ts +0 -46
  93. package/build/dex/ekubo/pools/iface.js +0 -75
  94. package/build/dex/ekubo/pools/iface.js.map +0 -1
  95. package/build/dex/ekubo/pools/math/price.d.ts +0 -7
  96. package/build/dex/ekubo/pools/math/price.js +0 -112
  97. package/build/dex/ekubo/pools/math/price.js.map +0 -1
  98. package/build/dex/ekubo/pools/oracle-pool.d.ts +0 -10
  99. package/build/dex/ekubo/pools/oracle-pool.js +0 -19
  100. package/build/dex/ekubo/pools/oracle-pool.js.map +0 -1
  101. package/build/dex/ekubo/pools/pool-utils.d.ts +0 -44
  102. package/build/dex/ekubo/pools/pool-utils.js +0 -240
  103. package/build/dex/ekubo/pools/pool-utils.js.map +0 -1
  104. package/build/dex/idle-dao/config.d.ts +0 -5
  105. package/build/dex/idle-dao/config.js +0 -24
  106. package/build/dex/idle-dao/config.js.map +0 -1
  107. package/build/dex/idle-dao/idle-dao.d.ts +0 -42
  108. package/build/dex/idle-dao/idle-dao.js +0 -279
  109. package/build/dex/idle-dao/idle-dao.js.map +0 -1
  110. package/build/dex/idle-dao/token_list.d.ts +0 -4
  111. package/build/dex/idle-dao/token_list.js +0 -289
  112. package/build/dex/idle-dao/token_list.js.map +0 -1
  113. package/build/dex/idle-dao/tokens.d.ts +0 -9
  114. package/build/dex/idle-dao/tokens.js +0 -68
  115. package/build/dex/idle-dao/tokens.js.map +0 -1
  116. package/build/dex/idle-dao/types.d.ts +0 -35
  117. package/build/dex/idle-dao/types.js +0 -11
  118. package/build/dex/idle-dao/types.js.map +0 -1
  119. package/build/dex/idle-dao/utils.d.ts +0 -8
  120. package/build/dex/idle-dao/utils.js +0 -149
  121. package/build/dex/idle-dao/utils.js.map +0 -1
  122. package/build/dex/infusion/config.d.ts +0 -3
  123. package/build/dex/infusion/config.js +0 -20
  124. package/build/dex/infusion/config.js.map +0 -1
  125. package/build/dex/infusion/infusion-stable-pool.d.ts +0 -4
  126. package/build/dex/infusion/infusion-stable-pool.js +0 -74
  127. package/build/dex/infusion/infusion-stable-pool.js.map +0 -1
  128. package/build/dex/infusion/infusion.d.ts +0 -51
  129. package/build/dex/infusion/infusion.js +0 -500
  130. package/build/dex/infusion/infusion.js.map +0 -1
  131. package/build/dex/infusion/types.d.ts +0 -45
  132. package/build/dex/infusion/types.js +0 -3
  133. package/build/dex/infusion/types.js.map +0 -1
  134. package/build/dex/infusion/utils/isStablePair.d.ts +0 -2
  135. package/build/dex/infusion/utils/isStablePair.js +0 -18
  136. package/build/dex/infusion/utils/isStablePair.js.map +0 -1
  137. package/build/dex/jarvis.d.ts +0 -56
  138. package/build/dex/jarvis.js +0 -163
  139. package/build/dex/jarvis.js.map +0 -1
  140. package/build/dex/mStable.d.ts +0 -44
  141. package/build/dex/mStable.js +0 -75
  142. package/build/dex/mStable.js.map +0 -1
  143. package/build/dex/maker-psm/config.d.ts +0 -11
  144. package/build/dex/maker-psm/config.js +0 -53
  145. package/build/dex/maker-psm/config.js.map +0 -1
  146. package/build/dex/maker-psm/maker-psm.d.ts +0 -103
  147. package/build/dex/maker-psm/maker-psm.js +0 -493
  148. package/build/dex/maker-psm/maker-psm.js.map +0 -1
  149. package/build/dex/maker-psm/types.d.ts +0 -39
  150. package/build/dex/maker-psm/types.js +0 -3
  151. package/build/dex/maker-psm/types.js.map +0 -1
  152. package/build/dex/onebit/onebit.d.ts +0 -16
  153. package/build/dex/onebit/onebit.js +0 -61
  154. package/build/dex/onebit/onebit.js.map +0 -1
  155. package/build/dex/onebit/types.d.ts +0 -14
  156. package/build/dex/onebit/types.js +0 -8
  157. package/build/dex/onebit/types.js.map +0 -1
  158. package/build/dex/quick-perps/config.d.ts +0 -11
  159. package/build/dex/quick-perps/config.js +0 -27
  160. package/build/dex/quick-perps/config.js.map +0 -1
  161. package/build/dex/quick-perps/fast-price-feed.d.ts +0 -26
  162. package/build/dex/quick-perps/fast-price-feed.js +0 -184
  163. package/build/dex/quick-perps/fast-price-feed.js.map +0 -1
  164. package/build/dex/quick-perps/pool.d.ts +0 -21
  165. package/build/dex/quick-perps/pool.js +0 -229
  166. package/build/dex/quick-perps/pool.js.map +0 -1
  167. package/build/dex/quick-perps/quick-perps.d.ts +0 -53
  168. package/build/dex/quick-perps/quick-perps.js +0 -247
  169. package/build/dex/quick-perps/quick-perps.js.map +0 -1
  170. package/build/dex/quick-perps/types.d.ts +0 -98
  171. package/build/dex/quick-perps/types.js +0 -3
  172. package/build/dex/quick-perps/types.js.map +0 -1
  173. package/build/dex/quick-perps/usdq.d.ts +0 -15
  174. package/build/dex/quick-perps/usdq.js +0 -62
  175. package/build/dex/quick-perps/usdq.js.map +0 -1
  176. package/build/dex/quick-perps/vault-price-feed.d.ts +0 -43
  177. package/build/dex/quick-perps/vault-price-feed.js +0 -203
  178. package/build/dex/quick-perps/vault-price-feed.js.map +0 -1
  179. package/build/dex/quick-perps/vault-utils.d.ts +0 -8
  180. package/build/dex/quick-perps/vault-utils.js +0 -42
  181. package/build/dex/quick-perps/vault-utils.js.map +0 -1
  182. package/build/dex/quick-perps/vault.d.ts +0 -46
  183. package/build/dex/quick-perps/vault.js +0 -182
  184. package/build/dex/quick-perps/vault.js.map +0 -1
  185. package/build/dex/se-vlr/config.d.ts +0 -3
  186. package/build/dex/se-vlr/config.js +0 -24
  187. package/build/dex/se-vlr/config.js.map +0 -1
  188. package/build/dex/se-vlr/se-vlr-pool.d.ts +0 -39
  189. package/build/dex/se-vlr/se-vlr-pool.js +0 -70
  190. package/build/dex/se-vlr/se-vlr-pool.js.map +0 -1
  191. package/build/dex/se-vlr/se-vlr.d.ts +0 -35
  192. package/build/dex/se-vlr/se-vlr.js +0 -131
  193. package/build/dex/se-vlr/se-vlr.js.map +0 -1
  194. package/build/dex/se-vlr/types.d.ts +0 -6
  195. package/build/dex/se-vlr/types.js +0 -3
  196. package/build/dex/se-vlr/types.js.map +0 -1
  197. package/build/dex/shell.d.ts +0 -25
  198. package/build/dex/shell.js +0 -41
  199. package/build/dex/shell.js.map +0 -1
  200. package/build/dex/solidly/forks-override/aerodrome.d.ts +0 -14
  201. package/build/dex/solidly/forks-override/aerodrome.js +0 -46
  202. package/build/dex/solidly/forks-override/aerodrome.js.map +0 -1
  203. package/build/dex/solidly/forks-override/chronos.d.ts +0 -23
  204. package/build/dex/solidly/forks-override/chronos.js +0 -141
  205. package/build/dex/solidly/forks-override/chronos.js.map +0 -1
  206. package/build/dex/solidly/forks-override/usdfi.d.ts +0 -8
  207. package/build/dex/solidly/forks-override/usdfi.js +0 -15
  208. package/build/dex/solidly/forks-override/usdfi.js.map +0 -1
  209. package/build/dex/solidly/forks-override/velocimeter.d.ts +0 -23
  210. package/build/dex/solidly/forks-override/velocimeter.js +0 -77
  211. package/build/dex/solidly/forks-override/velocimeter.js.map +0 -1
  212. package/build/dex/trader-joe-v2.d.ts +0 -40
  213. package/build/dex/trader-joe-v2.js +0 -74
  214. package/build/dex/trader-joe-v2.js.map +0 -1
  215. package/build/dex/uniswap-v2/dfyn.d.ts +0 -19
  216. package/build/dex/uniswap-v2/dfyn.js +0 -61
  217. package/build/dex/uniswap-v2/dfyn.js.map +0 -1
  218. package/build/dex/uniswap-v2/excalibur.d.ts +0 -24
  219. package/build/dex/uniswap-v2/excalibur.js +0 -47
  220. package/build/dex/uniswap-v2/excalibur.js.map +0 -1
  221. package/build/dex/uniswap-v2/mdex.d.ts +0 -24
  222. package/build/dex/uniswap-v2/mdex.js +0 -50
  223. package/build/dex/uniswap-v2/mdex.js.map +0 -1
  224. package/build/dex/uniswap-v2/nomiswap-v2.d.ts +0 -24
  225. package/build/dex/uniswap-v2/nomiswap-v2.js +0 -57
  226. package/build/dex/uniswap-v2/nomiswap-v2.js.map +0 -1
  227. package/build/dex/uniswap-v3/uniswap-v3-new.d.ts +0 -94
  228. package/build/dex/uniswap-v3/uniswap-v3-new.js +0 -923
  229. package/build/dex/uniswap-v3/uniswap-v3-new.js.map +0 -1
  230. package/build/dex/uniswap-v4/contract-math/Position.d.ts +0 -3
  231. package/build/dex/uniswap-v4/contract-math/Position.js +0 -10
  232. package/build/dex/uniswap-v4/contract-math/Position.js.map +0 -1
  233. package/build/dex/usual-bond/config.d.ts +0 -3
  234. package/build/dex/usual-bond/config.js +0 -13
  235. package/build/dex/usual-bond/config.js.map +0 -1
  236. package/build/dex/usual-bond/types.d.ts +0 -7
  237. package/build/dex/usual-bond/types.js +0 -3
  238. package/build/dex/usual-bond/types.js.map +0 -1
  239. package/build/dex/usual-bond/usual-bond.d.ts +0 -35
  240. package/build/dex/usual-bond/usual-bond.js +0 -176
  241. package/build/dex/usual-bond/usual-bond.js.map +0 -1
  242. package/build/dex/wusdm/config.d.ts +0 -3
  243. package/build/dex/wusdm/config.js +0 -43
  244. package/build/dex/wusdm/config.js.map +0 -1
  245. package/build/dex/wusdm/constants.d.ts +0 -2
  246. package/build/dex/wusdm/constants.js +0 -6
  247. package/build/dex/wusdm/constants.js.map +0 -1
  248. package/build/dex/wusdm/types.d.ts +0 -18
  249. package/build/dex/wusdm/types.js +0 -11
  250. package/build/dex/wusdm/types.js.map +0 -1
  251. package/build/dex/wusdm/wusdm-pool.d.ts +0 -21
  252. package/build/dex/wusdm/wusdm-pool.js +0 -74
  253. package/build/dex/wusdm/wusdm-pool.js.map +0 -1
  254. package/build/dex/wusdm/wusdm.d.ts +0 -46
  255. package/build/dex/wusdm/wusdm.js +0 -243
  256. package/build/dex/wusdm/wusdm.js.map +0 -1
  257. package/build/dex/zerox/config.d.ts +0 -2
  258. package/build/dex/zerox/config.js +0 -33
  259. package/build/dex/zerox/config.js.map +0 -1
  260. package/build/dex/zerox/index.d.ts +0 -22
  261. package/build/dex/zerox/index.js +0 -225
  262. package/build/dex/zerox/index.js.map +0 -1
  263. package/build/dex/zerox/order.d.ts +0 -88
  264. package/build/dex/zerox/order.js +0 -53
  265. package/build/dex/zerox/order.js.map +0 -1
  266. package/build/dex/zerox/types.d.ts +0 -73
  267. package/build/dex/zerox/types.js +0 -21
  268. package/build/dex/zerox/types.js.map +0 -1
@@ -1,1953 +0,0 @@
1
- [
2
- { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
3
- {
4
- "anonymous": false,
5
- "inputs": [
6
- {
7
- "indexed": false,
8
- "internalType": "address",
9
- "name": "account",
10
- "type": "address"
11
- },
12
- {
13
- "indexed": false,
14
- "internalType": "address",
15
- "name": "token",
16
- "type": "address"
17
- },
18
- {
19
- "indexed": false,
20
- "internalType": "uint256",
21
- "name": "tokenAmount",
22
- "type": "uint256"
23
- },
24
- {
25
- "indexed": false,
26
- "internalType": "uint256",
27
- "name": "usdqAmount",
28
- "type": "uint256"
29
- },
30
- {
31
- "indexed": false,
32
- "internalType": "uint256",
33
- "name": "feeBasisPoints",
34
- "type": "uint256"
35
- }
36
- ],
37
- "name": "BuyUSDQ",
38
- "type": "event"
39
- },
40
- {
41
- "anonymous": false,
42
- "inputs": [
43
- {
44
- "indexed": false,
45
- "internalType": "bytes32",
46
- "name": "key",
47
- "type": "bytes32"
48
- },
49
- {
50
- "indexed": false,
51
- "internalType": "uint256",
52
- "name": "size",
53
- "type": "uint256"
54
- },
55
- {
56
- "indexed": false,
57
- "internalType": "uint256",
58
- "name": "collateral",
59
- "type": "uint256"
60
- },
61
- {
62
- "indexed": false,
63
- "internalType": "uint256",
64
- "name": "averagePrice",
65
- "type": "uint256"
66
- },
67
- {
68
- "indexed": false,
69
- "internalType": "uint256",
70
- "name": "entryFundingRate",
71
- "type": "uint256"
72
- },
73
- {
74
- "indexed": false,
75
- "internalType": "uint256",
76
- "name": "reserveAmount",
77
- "type": "uint256"
78
- },
79
- {
80
- "indexed": false,
81
- "internalType": "int256",
82
- "name": "realisedPnl",
83
- "type": "int256"
84
- }
85
- ],
86
- "name": "ClosePosition",
87
- "type": "event"
88
- },
89
- {
90
- "anonymous": false,
91
- "inputs": [
92
- {
93
- "indexed": false,
94
- "internalType": "address",
95
- "name": "token",
96
- "type": "address"
97
- },
98
- {
99
- "indexed": false,
100
- "internalType": "uint256",
101
- "name": "feeUsd",
102
- "type": "uint256"
103
- },
104
- {
105
- "indexed": false,
106
- "internalType": "uint256",
107
- "name": "feeTokens",
108
- "type": "uint256"
109
- }
110
- ],
111
- "name": "CollectMarginFees",
112
- "type": "event"
113
- },
114
- {
115
- "anonymous": false,
116
- "inputs": [
117
- {
118
- "indexed": false,
119
- "internalType": "address",
120
- "name": "token",
121
- "type": "address"
122
- },
123
- {
124
- "indexed": false,
125
- "internalType": "uint256",
126
- "name": "feeUsd",
127
- "type": "uint256"
128
- },
129
- {
130
- "indexed": false,
131
- "internalType": "uint256",
132
- "name": "feeTokens",
133
- "type": "uint256"
134
- }
135
- ],
136
- "name": "CollectSwapFees",
137
- "type": "event"
138
- },
139
- {
140
- "anonymous": false,
141
- "inputs": [
142
- {
143
- "indexed": false,
144
- "internalType": "address",
145
- "name": "token",
146
- "type": "address"
147
- },
148
- {
149
- "indexed": false,
150
- "internalType": "uint256",
151
- "name": "amount",
152
- "type": "uint256"
153
- }
154
- ],
155
- "name": "DecreaseGuaranteedUsd",
156
- "type": "event"
157
- },
158
- {
159
- "anonymous": false,
160
- "inputs": [
161
- {
162
- "indexed": false,
163
- "internalType": "address",
164
- "name": "token",
165
- "type": "address"
166
- },
167
- {
168
- "indexed": false,
169
- "internalType": "uint256",
170
- "name": "amount",
171
- "type": "uint256"
172
- }
173
- ],
174
- "name": "DecreasePoolAmount",
175
- "type": "event"
176
- },
177
- {
178
- "anonymous": false,
179
- "inputs": [
180
- {
181
- "indexed": false,
182
- "internalType": "bytes32",
183
- "name": "key",
184
- "type": "bytes32"
185
- },
186
- {
187
- "indexed": false,
188
- "internalType": "address",
189
- "name": "account",
190
- "type": "address"
191
- },
192
- {
193
- "indexed": false,
194
- "internalType": "address",
195
- "name": "collateralToken",
196
- "type": "address"
197
- },
198
- {
199
- "indexed": false,
200
- "internalType": "address",
201
- "name": "indexToken",
202
- "type": "address"
203
- },
204
- {
205
- "indexed": false,
206
- "internalType": "uint256",
207
- "name": "collateralDelta",
208
- "type": "uint256"
209
- },
210
- {
211
- "indexed": false,
212
- "internalType": "uint256",
213
- "name": "sizeDelta",
214
- "type": "uint256"
215
- },
216
- {
217
- "indexed": false,
218
- "internalType": "bool",
219
- "name": "isLong",
220
- "type": "bool"
221
- },
222
- {
223
- "indexed": false,
224
- "internalType": "uint256",
225
- "name": "price",
226
- "type": "uint256"
227
- },
228
- {
229
- "indexed": false,
230
- "internalType": "uint256",
231
- "name": "fee",
232
- "type": "uint256"
233
- }
234
- ],
235
- "name": "DecreasePosition",
236
- "type": "event"
237
- },
238
- {
239
- "anonymous": false,
240
- "inputs": [
241
- {
242
- "indexed": false,
243
- "internalType": "address",
244
- "name": "token",
245
- "type": "address"
246
- },
247
- {
248
- "indexed": false,
249
- "internalType": "uint256",
250
- "name": "amount",
251
- "type": "uint256"
252
- }
253
- ],
254
- "name": "DecreaseReservedAmount",
255
- "type": "event"
256
- },
257
- {
258
- "anonymous": false,
259
- "inputs": [
260
- {
261
- "indexed": false,
262
- "internalType": "address",
263
- "name": "token",
264
- "type": "address"
265
- },
266
- {
267
- "indexed": false,
268
- "internalType": "uint256",
269
- "name": "amount",
270
- "type": "uint256"
271
- }
272
- ],
273
- "name": "DecreaseUsdqAmount",
274
- "type": "event"
275
- },
276
- {
277
- "anonymous": false,
278
- "inputs": [
279
- {
280
- "indexed": false,
281
- "internalType": "address",
282
- "name": "token",
283
- "type": "address"
284
- },
285
- {
286
- "indexed": false,
287
- "internalType": "uint256",
288
- "name": "amount",
289
- "type": "uint256"
290
- }
291
- ],
292
- "name": "DirectPoolDeposit",
293
- "type": "event"
294
- },
295
- {
296
- "anonymous": false,
297
- "inputs": [
298
- {
299
- "indexed": false,
300
- "internalType": "address",
301
- "name": "token",
302
- "type": "address"
303
- },
304
- {
305
- "indexed": false,
306
- "internalType": "uint256",
307
- "name": "amount",
308
- "type": "uint256"
309
- }
310
- ],
311
- "name": "IncreaseGuaranteedUsd",
312
- "type": "event"
313
- },
314
- {
315
- "anonymous": false,
316
- "inputs": [
317
- {
318
- "indexed": false,
319
- "internalType": "address",
320
- "name": "token",
321
- "type": "address"
322
- },
323
- {
324
- "indexed": false,
325
- "internalType": "uint256",
326
- "name": "amount",
327
- "type": "uint256"
328
- }
329
- ],
330
- "name": "IncreasePoolAmount",
331
- "type": "event"
332
- },
333
- {
334
- "anonymous": false,
335
- "inputs": [
336
- {
337
- "indexed": false,
338
- "internalType": "bytes32",
339
- "name": "key",
340
- "type": "bytes32"
341
- },
342
- {
343
- "indexed": false,
344
- "internalType": "address",
345
- "name": "account",
346
- "type": "address"
347
- },
348
- {
349
- "indexed": false,
350
- "internalType": "address",
351
- "name": "collateralToken",
352
- "type": "address"
353
- },
354
- {
355
- "indexed": false,
356
- "internalType": "address",
357
- "name": "indexToken",
358
- "type": "address"
359
- },
360
- {
361
- "indexed": false,
362
- "internalType": "uint256",
363
- "name": "collateralDelta",
364
- "type": "uint256"
365
- },
366
- {
367
- "indexed": false,
368
- "internalType": "uint256",
369
- "name": "sizeDelta",
370
- "type": "uint256"
371
- },
372
- {
373
- "indexed": false,
374
- "internalType": "bool",
375
- "name": "isLong",
376
- "type": "bool"
377
- },
378
- {
379
- "indexed": false,
380
- "internalType": "uint256",
381
- "name": "price",
382
- "type": "uint256"
383
- },
384
- {
385
- "indexed": false,
386
- "internalType": "uint256",
387
- "name": "fee",
388
- "type": "uint256"
389
- }
390
- ],
391
- "name": "IncreasePosition",
392
- "type": "event"
393
- },
394
- {
395
- "anonymous": false,
396
- "inputs": [
397
- {
398
- "indexed": false,
399
- "internalType": "address",
400
- "name": "token",
401
- "type": "address"
402
- },
403
- {
404
- "indexed": false,
405
- "internalType": "uint256",
406
- "name": "amount",
407
- "type": "uint256"
408
- }
409
- ],
410
- "name": "IncreaseReservedAmount",
411
- "type": "event"
412
- },
413
- {
414
- "anonymous": false,
415
- "inputs": [
416
- {
417
- "indexed": false,
418
- "internalType": "address",
419
- "name": "token",
420
- "type": "address"
421
- },
422
- {
423
- "indexed": false,
424
- "internalType": "uint256",
425
- "name": "amount",
426
- "type": "uint256"
427
- }
428
- ],
429
- "name": "IncreaseUsdqAmount",
430
- "type": "event"
431
- },
432
- {
433
- "anonymous": false,
434
- "inputs": [
435
- {
436
- "indexed": false,
437
- "internalType": "bytes32",
438
- "name": "key",
439
- "type": "bytes32"
440
- },
441
- {
442
- "indexed": false,
443
- "internalType": "address",
444
- "name": "account",
445
- "type": "address"
446
- },
447
- {
448
- "indexed": false,
449
- "internalType": "address",
450
- "name": "collateralToken",
451
- "type": "address"
452
- },
453
- {
454
- "indexed": false,
455
- "internalType": "address",
456
- "name": "indexToken",
457
- "type": "address"
458
- },
459
- {
460
- "indexed": false,
461
- "internalType": "bool",
462
- "name": "isLong",
463
- "type": "bool"
464
- },
465
- {
466
- "indexed": false,
467
- "internalType": "uint256",
468
- "name": "size",
469
- "type": "uint256"
470
- },
471
- {
472
- "indexed": false,
473
- "internalType": "uint256",
474
- "name": "collateral",
475
- "type": "uint256"
476
- },
477
- {
478
- "indexed": false,
479
- "internalType": "uint256",
480
- "name": "reserveAmount",
481
- "type": "uint256"
482
- },
483
- {
484
- "indexed": false,
485
- "internalType": "int256",
486
- "name": "realisedPnl",
487
- "type": "int256"
488
- },
489
- {
490
- "indexed": false,
491
- "internalType": "uint256",
492
- "name": "markPrice",
493
- "type": "uint256"
494
- }
495
- ],
496
- "name": "LiquidatePosition",
497
- "type": "event"
498
- },
499
- {
500
- "anonymous": false,
501
- "inputs": [
502
- {
503
- "indexed": false,
504
- "internalType": "address",
505
- "name": "account",
506
- "type": "address"
507
- },
508
- {
509
- "indexed": false,
510
- "internalType": "address",
511
- "name": "token",
512
- "type": "address"
513
- },
514
- {
515
- "indexed": false,
516
- "internalType": "uint256",
517
- "name": "usdqAmount",
518
- "type": "uint256"
519
- },
520
- {
521
- "indexed": false,
522
- "internalType": "uint256",
523
- "name": "tokenAmount",
524
- "type": "uint256"
525
- },
526
- {
527
- "indexed": false,
528
- "internalType": "uint256",
529
- "name": "feeBasisPoints",
530
- "type": "uint256"
531
- }
532
- ],
533
- "name": "SellUSDQ",
534
- "type": "event"
535
- },
536
- {
537
- "anonymous": false,
538
- "inputs": [
539
- {
540
- "indexed": false,
541
- "internalType": "address",
542
- "name": "account",
543
- "type": "address"
544
- },
545
- {
546
- "indexed": false,
547
- "internalType": "address",
548
- "name": "tokenIn",
549
- "type": "address"
550
- },
551
- {
552
- "indexed": false,
553
- "internalType": "address",
554
- "name": "tokenOut",
555
- "type": "address"
556
- },
557
- {
558
- "indexed": false,
559
- "internalType": "uint256",
560
- "name": "amountIn",
561
- "type": "uint256"
562
- },
563
- {
564
- "indexed": false,
565
- "internalType": "uint256",
566
- "name": "amountOut",
567
- "type": "uint256"
568
- },
569
- {
570
- "indexed": false,
571
- "internalType": "uint256",
572
- "name": "amountOutAfterFees",
573
- "type": "uint256"
574
- },
575
- {
576
- "indexed": false,
577
- "internalType": "uint256",
578
- "name": "feeBasisPoints",
579
- "type": "uint256"
580
- }
581
- ],
582
- "name": "Swap",
583
- "type": "event"
584
- },
585
- {
586
- "anonymous": false,
587
- "inputs": [
588
- {
589
- "indexed": false,
590
- "internalType": "address",
591
- "name": "token",
592
- "type": "address"
593
- },
594
- {
595
- "indexed": false,
596
- "internalType": "uint256",
597
- "name": "fundingRate",
598
- "type": "uint256"
599
- }
600
- ],
601
- "name": "UpdateFundingRate",
602
- "type": "event"
603
- },
604
- {
605
- "anonymous": false,
606
- "inputs": [
607
- {
608
- "indexed": false,
609
- "internalType": "bytes32",
610
- "name": "key",
611
- "type": "bytes32"
612
- },
613
- {
614
- "indexed": false,
615
- "internalType": "bool",
616
- "name": "hasProfit",
617
- "type": "bool"
618
- },
619
- {
620
- "indexed": false,
621
- "internalType": "uint256",
622
- "name": "delta",
623
- "type": "uint256"
624
- }
625
- ],
626
- "name": "UpdatePnl",
627
- "type": "event"
628
- },
629
- {
630
- "anonymous": false,
631
- "inputs": [
632
- {
633
- "indexed": false,
634
- "internalType": "bytes32",
635
- "name": "key",
636
- "type": "bytes32"
637
- },
638
- {
639
- "indexed": false,
640
- "internalType": "uint256",
641
- "name": "size",
642
- "type": "uint256"
643
- },
644
- {
645
- "indexed": false,
646
- "internalType": "uint256",
647
- "name": "collateral",
648
- "type": "uint256"
649
- },
650
- {
651
- "indexed": false,
652
- "internalType": "uint256",
653
- "name": "averagePrice",
654
- "type": "uint256"
655
- },
656
- {
657
- "indexed": false,
658
- "internalType": "uint256",
659
- "name": "entryFundingRate",
660
- "type": "uint256"
661
- },
662
- {
663
- "indexed": false,
664
- "internalType": "uint256",
665
- "name": "reserveAmount",
666
- "type": "uint256"
667
- },
668
- {
669
- "indexed": false,
670
- "internalType": "int256",
671
- "name": "realisedPnl",
672
- "type": "int256"
673
- },
674
- {
675
- "indexed": false,
676
- "internalType": "uint256",
677
- "name": "markPrice",
678
- "type": "uint256"
679
- }
680
- ],
681
- "name": "UpdatePosition",
682
- "type": "event"
683
- },
684
- {
685
- "inputs": [],
686
- "name": "BASIS_POINTS_DIVISOR",
687
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
688
- "stateMutability": "view",
689
- "type": "function"
690
- },
691
- {
692
- "inputs": [],
693
- "name": "FUNDING_RATE_PRECISION",
694
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
695
- "stateMutability": "view",
696
- "type": "function"
697
- },
698
- {
699
- "inputs": [],
700
- "name": "MAX_FEE_BASIS_POINTS",
701
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
702
- "stateMutability": "view",
703
- "type": "function"
704
- },
705
- {
706
- "inputs": [],
707
- "name": "MAX_FUNDING_RATE_FACTOR",
708
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
709
- "stateMutability": "view",
710
- "type": "function"
711
- },
712
- {
713
- "inputs": [],
714
- "name": "MAX_LIQUIDATION_FEE_USD",
715
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
716
- "stateMutability": "view",
717
- "type": "function"
718
- },
719
- {
720
- "inputs": [],
721
- "name": "MIN_FUNDING_RATE_INTERVAL",
722
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
723
- "stateMutability": "view",
724
- "type": "function"
725
- },
726
- {
727
- "inputs": [],
728
- "name": "MIN_LEVERAGE",
729
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
730
- "stateMutability": "view",
731
- "type": "function"
732
- },
733
- {
734
- "inputs": [],
735
- "name": "PRICE_PRECISION",
736
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
737
- "stateMutability": "view",
738
- "type": "function"
739
- },
740
- {
741
- "inputs": [],
742
- "name": "USDQ_DECIMALS",
743
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
744
- "stateMutability": "view",
745
- "type": "function"
746
- },
747
- {
748
- "inputs": [
749
- { "internalType": "address", "name": "_router", "type": "address" }
750
- ],
751
- "name": "addRouter",
752
- "outputs": [],
753
- "stateMutability": "nonpayable",
754
- "type": "function"
755
- },
756
- {
757
- "inputs": [
758
- { "internalType": "uint256", "name": "_amount", "type": "uint256" },
759
- { "internalType": "address", "name": "_tokenDiv", "type": "address" },
760
- { "internalType": "address", "name": "_tokenMul", "type": "address" }
761
- ],
762
- "name": "adjustForDecimals",
763
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
764
- "stateMutability": "view",
765
- "type": "function"
766
- },
767
- {
768
- "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
769
- "name": "allWhitelistedTokens",
770
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
771
- "stateMutability": "view",
772
- "type": "function"
773
- },
774
- {
775
- "inputs": [],
776
- "name": "allWhitelistedTokensLength",
777
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
778
- "stateMutability": "view",
779
- "type": "function"
780
- },
781
- {
782
- "inputs": [
783
- { "internalType": "address", "name": "", "type": "address" },
784
- { "internalType": "address", "name": "", "type": "address" }
785
- ],
786
- "name": "approvedRouters",
787
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
788
- "stateMutability": "view",
789
- "type": "function"
790
- },
791
- {
792
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
793
- "name": "bufferAmounts",
794
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
795
- "stateMutability": "view",
796
- "type": "function"
797
- },
798
- {
799
- "inputs": [
800
- { "internalType": "address", "name": "_token", "type": "address" },
801
- { "internalType": "address", "name": "_receiver", "type": "address" }
802
- ],
803
- "name": "buyUSDQ",
804
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
805
- "stateMutability": "nonpayable",
806
- "type": "function"
807
- },
808
- {
809
- "inputs": [
810
- { "internalType": "address", "name": "_token", "type": "address" }
811
- ],
812
- "name": "clearTokenConfig",
813
- "outputs": [],
814
- "stateMutability": "nonpayable",
815
- "type": "function"
816
- },
817
- {
818
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
819
- "name": "cumulativeFundingRates",
820
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
821
- "stateMutability": "view",
822
- "type": "function"
823
- },
824
- {
825
- "inputs": [
826
- { "internalType": "address", "name": "_account", "type": "address" },
827
- {
828
- "internalType": "address",
829
- "name": "_collateralToken",
830
- "type": "address"
831
- },
832
- { "internalType": "address", "name": "_indexToken", "type": "address" },
833
- {
834
- "internalType": "uint256",
835
- "name": "_collateralDelta",
836
- "type": "uint256"
837
- },
838
- { "internalType": "uint256", "name": "_sizeDelta", "type": "uint256" },
839
- { "internalType": "bool", "name": "_isLong", "type": "bool" },
840
- { "internalType": "address", "name": "_receiver", "type": "address" }
841
- ],
842
- "name": "decreasePosition",
843
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
844
- "stateMutability": "nonpayable",
845
- "type": "function"
846
- },
847
- {
848
- "inputs": [
849
- { "internalType": "address", "name": "_token", "type": "address" }
850
- ],
851
- "name": "directPoolDeposit",
852
- "outputs": [],
853
- "stateMutability": "nonpayable",
854
- "type": "function"
855
- },
856
- {
857
- "inputs": [],
858
- "name": "errorController",
859
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
860
- "stateMutability": "view",
861
- "type": "function"
862
- },
863
- {
864
- "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
865
- "name": "errors",
866
- "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
867
- "stateMutability": "view",
868
- "type": "function"
869
- },
870
- {
871
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
872
- "name": "feeReserves",
873
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
874
- "stateMutability": "view",
875
- "type": "function"
876
- },
877
- {
878
- "inputs": [],
879
- "name": "fundingInterval",
880
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
881
- "stateMutability": "view",
882
- "type": "function"
883
- },
884
- {
885
- "inputs": [],
886
- "name": "fundingRateFactor",
887
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
888
- "stateMutability": "view",
889
- "type": "function"
890
- },
891
- {
892
- "inputs": [
893
- { "internalType": "address", "name": "_indexToken", "type": "address" },
894
- { "internalType": "uint256", "name": "_size", "type": "uint256" },
895
- { "internalType": "uint256", "name": "_averagePrice", "type": "uint256" },
896
- { "internalType": "bool", "name": "_isLong", "type": "bool" },
897
- {
898
- "internalType": "uint256",
899
- "name": "_lastIncreasedTime",
900
- "type": "uint256"
901
- }
902
- ],
903
- "name": "getDelta",
904
- "outputs": [
905
- { "internalType": "bool", "name": "", "type": "bool" },
906
- { "internalType": "uint256", "name": "", "type": "uint256" }
907
- ],
908
- "stateMutability": "view",
909
- "type": "function"
910
- },
911
- {
912
- "inputs": [
913
- {
914
- "internalType": "address",
915
- "name": "_collateralToken",
916
- "type": "address"
917
- },
918
- { "internalType": "address", "name": "_indexToken", "type": "address" },
919
- { "internalType": "bool", "name": "_isLong", "type": "bool" }
920
- ],
921
- "name": "getEntryFundingRate",
922
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
923
- "stateMutability": "view",
924
- "type": "function"
925
- },
926
- {
927
- "inputs": [
928
- { "internalType": "address", "name": "_token", "type": "address" },
929
- { "internalType": "uint256", "name": "_usdqDelta", "type": "uint256" },
930
- {
931
- "internalType": "uint256",
932
- "name": "_feeBasisPoints",
933
- "type": "uint256"
934
- },
935
- {
936
- "internalType": "uint256",
937
- "name": "_taxBasisPoints",
938
- "type": "uint256"
939
- },
940
- { "internalType": "bool", "name": "_increment", "type": "bool" }
941
- ],
942
- "name": "getFeeBasisPoints",
943
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
944
- "stateMutability": "view",
945
- "type": "function"
946
- },
947
- {
948
- "inputs": [
949
- { "internalType": "address", "name": "_account", "type": "address" },
950
- {
951
- "internalType": "address",
952
- "name": "_collateralToken",
953
- "type": "address"
954
- },
955
- { "internalType": "address", "name": "_indexToken", "type": "address" },
956
- { "internalType": "bool", "name": "_isLong", "type": "bool" },
957
- { "internalType": "uint256", "name": "_size", "type": "uint256" },
958
- {
959
- "internalType": "uint256",
960
- "name": "_entryFundingRate",
961
- "type": "uint256"
962
- }
963
- ],
964
- "name": "getFundingFee",
965
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
966
- "stateMutability": "view",
967
- "type": "function"
968
- },
969
- {
970
- "inputs": [
971
- { "internalType": "address", "name": "_token", "type": "address" }
972
- ],
973
- "name": "getGlobalShortDelta",
974
- "outputs": [
975
- { "internalType": "bool", "name": "", "type": "bool" },
976
- { "internalType": "uint256", "name": "", "type": "uint256" }
977
- ],
978
- "stateMutability": "view",
979
- "type": "function"
980
- },
981
- {
982
- "inputs": [
983
- { "internalType": "address", "name": "_token", "type": "address" }
984
- ],
985
- "name": "getMaxPrice",
986
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
987
- "stateMutability": "view",
988
- "type": "function"
989
- },
990
- {
991
- "inputs": [
992
- { "internalType": "address", "name": "_token", "type": "address" }
993
- ],
994
- "name": "getMinPrice",
995
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
996
- "stateMutability": "view",
997
- "type": "function"
998
- },
999
- {
1000
- "inputs": [
1001
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1002
- { "internalType": "uint256", "name": "_size", "type": "uint256" },
1003
- { "internalType": "uint256", "name": "_averagePrice", "type": "uint256" },
1004
- { "internalType": "bool", "name": "_isLong", "type": "bool" },
1005
- { "internalType": "uint256", "name": "_nextPrice", "type": "uint256" },
1006
- { "internalType": "uint256", "name": "_sizeDelta", "type": "uint256" },
1007
- {
1008
- "internalType": "uint256",
1009
- "name": "_lastIncreasedTime",
1010
- "type": "uint256"
1011
- }
1012
- ],
1013
- "name": "getNextAveragePrice",
1014
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1015
- "stateMutability": "view",
1016
- "type": "function"
1017
- },
1018
- {
1019
- "inputs": [
1020
- { "internalType": "address", "name": "_token", "type": "address" }
1021
- ],
1022
- "name": "getNextFundingRate",
1023
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1024
- "stateMutability": "view",
1025
- "type": "function"
1026
- },
1027
- {
1028
- "inputs": [
1029
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1030
- { "internalType": "uint256", "name": "_nextPrice", "type": "uint256" },
1031
- { "internalType": "uint256", "name": "_sizeDelta", "type": "uint256" }
1032
- ],
1033
- "name": "getNextGlobalShortAveragePrice",
1034
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1035
- "stateMutability": "view",
1036
- "type": "function"
1037
- },
1038
- {
1039
- "inputs": [
1040
- { "internalType": "address", "name": "_account", "type": "address" },
1041
- {
1042
- "internalType": "address",
1043
- "name": "_collateralToken",
1044
- "type": "address"
1045
- },
1046
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1047
- { "internalType": "bool", "name": "_isLong", "type": "bool" }
1048
- ],
1049
- "name": "getPosition",
1050
- "outputs": [
1051
- { "internalType": "uint256", "name": "", "type": "uint256" },
1052
- { "internalType": "uint256", "name": "", "type": "uint256" },
1053
- { "internalType": "uint256", "name": "", "type": "uint256" },
1054
- { "internalType": "uint256", "name": "", "type": "uint256" },
1055
- { "internalType": "uint256", "name": "", "type": "uint256" },
1056
- { "internalType": "uint256", "name": "", "type": "uint256" },
1057
- { "internalType": "bool", "name": "", "type": "bool" },
1058
- { "internalType": "uint256", "name": "", "type": "uint256" }
1059
- ],
1060
- "stateMutability": "view",
1061
- "type": "function"
1062
- },
1063
- {
1064
- "inputs": [
1065
- { "internalType": "address", "name": "_account", "type": "address" },
1066
- {
1067
- "internalType": "address",
1068
- "name": "_collateralToken",
1069
- "type": "address"
1070
- },
1071
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1072
- { "internalType": "bool", "name": "_isLong", "type": "bool" }
1073
- ],
1074
- "name": "getPositionDelta",
1075
- "outputs": [
1076
- { "internalType": "bool", "name": "", "type": "bool" },
1077
- { "internalType": "uint256", "name": "", "type": "uint256" }
1078
- ],
1079
- "stateMutability": "view",
1080
- "type": "function"
1081
- },
1082
- {
1083
- "inputs": [
1084
- { "internalType": "address", "name": "_account", "type": "address" },
1085
- {
1086
- "internalType": "address",
1087
- "name": "_collateralToken",
1088
- "type": "address"
1089
- },
1090
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1091
- { "internalType": "bool", "name": "_isLong", "type": "bool" },
1092
- { "internalType": "uint256", "name": "_sizeDelta", "type": "uint256" }
1093
- ],
1094
- "name": "getPositionFee",
1095
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1096
- "stateMutability": "view",
1097
- "type": "function"
1098
- },
1099
- {
1100
- "inputs": [
1101
- { "internalType": "address", "name": "_account", "type": "address" },
1102
- {
1103
- "internalType": "address",
1104
- "name": "_collateralToken",
1105
- "type": "address"
1106
- },
1107
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1108
- { "internalType": "bool", "name": "_isLong", "type": "bool" }
1109
- ],
1110
- "name": "getPositionKey",
1111
- "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
1112
- "stateMutability": "pure",
1113
- "type": "function"
1114
- },
1115
- {
1116
- "inputs": [
1117
- { "internalType": "address", "name": "_account", "type": "address" },
1118
- {
1119
- "internalType": "address",
1120
- "name": "_collateralToken",
1121
- "type": "address"
1122
- },
1123
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1124
- { "internalType": "bool", "name": "_isLong", "type": "bool" }
1125
- ],
1126
- "name": "getPositionLeverage",
1127
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1128
- "stateMutability": "view",
1129
- "type": "function"
1130
- },
1131
- {
1132
- "inputs": [
1133
- { "internalType": "address", "name": "_token", "type": "address" },
1134
- { "internalType": "uint256", "name": "_usdqAmount", "type": "uint256" }
1135
- ],
1136
- "name": "getRedemptionAmount",
1137
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1138
- "stateMutability": "view",
1139
- "type": "function"
1140
- },
1141
- {
1142
- "inputs": [
1143
- { "internalType": "address", "name": "_token", "type": "address" }
1144
- ],
1145
- "name": "getRedemptionCollateral",
1146
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1147
- "stateMutability": "view",
1148
- "type": "function"
1149
- },
1150
- {
1151
- "inputs": [
1152
- { "internalType": "address", "name": "_token", "type": "address" }
1153
- ],
1154
- "name": "getRedemptionCollateralUsd",
1155
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1156
- "stateMutability": "view",
1157
- "type": "function"
1158
- },
1159
- {
1160
- "inputs": [
1161
- { "internalType": "address", "name": "_token", "type": "address" }
1162
- ],
1163
- "name": "getTargetUsdqAmount",
1164
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1165
- "stateMutability": "view",
1166
- "type": "function"
1167
- },
1168
- {
1169
- "inputs": [
1170
- { "internalType": "address", "name": "_token", "type": "address" }
1171
- ],
1172
- "name": "getUtilisation",
1173
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1174
- "stateMutability": "view",
1175
- "type": "function"
1176
- },
1177
- {
1178
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1179
- "name": "globalShortAveragePrices",
1180
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1181
- "stateMutability": "view",
1182
- "type": "function"
1183
- },
1184
- {
1185
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1186
- "name": "globalShortSizes",
1187
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1188
- "stateMutability": "view",
1189
- "type": "function"
1190
- },
1191
- {
1192
- "inputs": [],
1193
- "name": "gov",
1194
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
1195
- "stateMutability": "view",
1196
- "type": "function"
1197
- },
1198
- {
1199
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1200
- "name": "guaranteedUsd",
1201
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1202
- "stateMutability": "view",
1203
- "type": "function"
1204
- },
1205
- {
1206
- "inputs": [],
1207
- "name": "hasDynamicFees",
1208
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1209
- "stateMutability": "view",
1210
- "type": "function"
1211
- },
1212
- {
1213
- "inputs": [],
1214
- "name": "inManagerMode",
1215
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1216
- "stateMutability": "view",
1217
- "type": "function"
1218
- },
1219
- {
1220
- "inputs": [],
1221
- "name": "inPrivateLiquidationMode",
1222
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1223
- "stateMutability": "view",
1224
- "type": "function"
1225
- },
1226
- {
1227
- "inputs": [],
1228
- "name": "includeAmmPrice",
1229
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1230
- "stateMutability": "view",
1231
- "type": "function"
1232
- },
1233
- {
1234
- "inputs": [
1235
- { "internalType": "address", "name": "_account", "type": "address" },
1236
- {
1237
- "internalType": "address",
1238
- "name": "_collateralToken",
1239
- "type": "address"
1240
- },
1241
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1242
- { "internalType": "uint256", "name": "_sizeDelta", "type": "uint256" },
1243
- { "internalType": "bool", "name": "_isLong", "type": "bool" }
1244
- ],
1245
- "name": "increasePosition",
1246
- "outputs": [],
1247
- "stateMutability": "nonpayable",
1248
- "type": "function"
1249
- },
1250
- {
1251
- "inputs": [
1252
- { "internalType": "address", "name": "_router", "type": "address" },
1253
- { "internalType": "address", "name": "_usdq", "type": "address" },
1254
- { "internalType": "address", "name": "_priceFeed", "type": "address" },
1255
- {
1256
- "internalType": "uint256",
1257
- "name": "_liquidationFeeUsd",
1258
- "type": "uint256"
1259
- },
1260
- {
1261
- "internalType": "uint256",
1262
- "name": "_fundingRateFactor",
1263
- "type": "uint256"
1264
- },
1265
- {
1266
- "internalType": "uint256",
1267
- "name": "_stableFundingRateFactor",
1268
- "type": "uint256"
1269
- }
1270
- ],
1271
- "name": "initialize",
1272
- "outputs": [],
1273
- "stateMutability": "nonpayable",
1274
- "type": "function"
1275
- },
1276
- {
1277
- "inputs": [],
1278
- "name": "isInitialized",
1279
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1280
- "stateMutability": "view",
1281
- "type": "function"
1282
- },
1283
- {
1284
- "inputs": [],
1285
- "name": "isLeverageEnabled",
1286
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1287
- "stateMutability": "view",
1288
- "type": "function"
1289
- },
1290
- {
1291
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1292
- "name": "isLiquidator",
1293
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1294
- "stateMutability": "view",
1295
- "type": "function"
1296
- },
1297
- {
1298
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1299
- "name": "isManager",
1300
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1301
- "stateMutability": "view",
1302
- "type": "function"
1303
- },
1304
- {
1305
- "inputs": [],
1306
- "name": "isSwapEnabled",
1307
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1308
- "stateMutability": "view",
1309
- "type": "function"
1310
- },
1311
- {
1312
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1313
- "name": "lastFundingTimes",
1314
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1315
- "stateMutability": "view",
1316
- "type": "function"
1317
- },
1318
- {
1319
- "inputs": [
1320
- { "internalType": "address", "name": "_account", "type": "address" },
1321
- {
1322
- "internalType": "address",
1323
- "name": "_collateralToken",
1324
- "type": "address"
1325
- },
1326
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1327
- { "internalType": "bool", "name": "_isLong", "type": "bool" },
1328
- { "internalType": "address", "name": "_feeReceiver", "type": "address" }
1329
- ],
1330
- "name": "liquidatePosition",
1331
- "outputs": [],
1332
- "stateMutability": "nonpayable",
1333
- "type": "function"
1334
- },
1335
- {
1336
- "inputs": [],
1337
- "name": "liquidationFeeUsd",
1338
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1339
- "stateMutability": "view",
1340
- "type": "function"
1341
- },
1342
- {
1343
- "inputs": [],
1344
- "name": "marginFeeBasisPoints",
1345
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1346
- "stateMutability": "view",
1347
- "type": "function"
1348
- },
1349
- {
1350
- "inputs": [],
1351
- "name": "maxGasPrice",
1352
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1353
- "stateMutability": "view",
1354
- "type": "function"
1355
- },
1356
- {
1357
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1358
- "name": "maxGlobalShortSizes",
1359
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1360
- "stateMutability": "view",
1361
- "type": "function"
1362
- },
1363
- {
1364
- "inputs": [],
1365
- "name": "maxLeverage",
1366
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1367
- "stateMutability": "view",
1368
- "type": "function"
1369
- },
1370
- {
1371
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1372
- "name": "maxUsdqAmounts",
1373
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1374
- "stateMutability": "view",
1375
- "type": "function"
1376
- },
1377
- {
1378
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1379
- "name": "minProfitBasisPoints",
1380
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1381
- "stateMutability": "view",
1382
- "type": "function"
1383
- },
1384
- {
1385
- "inputs": [],
1386
- "name": "minProfitTime",
1387
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1388
- "stateMutability": "view",
1389
- "type": "function"
1390
- },
1391
- {
1392
- "inputs": [],
1393
- "name": "mintBurnFeeBasisPoints",
1394
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1395
- "stateMutability": "view",
1396
- "type": "function"
1397
- },
1398
- {
1399
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1400
- "name": "poolAmounts",
1401
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1402
- "stateMutability": "view",
1403
- "type": "function"
1404
- },
1405
- {
1406
- "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
1407
- "name": "positions",
1408
- "outputs": [
1409
- { "internalType": "uint256", "name": "size", "type": "uint256" },
1410
- { "internalType": "uint256", "name": "collateral", "type": "uint256" },
1411
- { "internalType": "uint256", "name": "averagePrice", "type": "uint256" },
1412
- {
1413
- "internalType": "uint256",
1414
- "name": "entryFundingRate",
1415
- "type": "uint256"
1416
- },
1417
- { "internalType": "uint256", "name": "reserveAmount", "type": "uint256" },
1418
- { "internalType": "int256", "name": "realisedPnl", "type": "int256" },
1419
- {
1420
- "internalType": "uint256",
1421
- "name": "lastIncreasedTime",
1422
- "type": "uint256"
1423
- }
1424
- ],
1425
- "stateMutability": "view",
1426
- "type": "function"
1427
- },
1428
- {
1429
- "inputs": [],
1430
- "name": "priceFeed",
1431
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
1432
- "stateMutability": "view",
1433
- "type": "function"
1434
- },
1435
- {
1436
- "inputs": [
1437
- { "internalType": "address", "name": "_router", "type": "address" }
1438
- ],
1439
- "name": "removeRouter",
1440
- "outputs": [],
1441
- "stateMutability": "nonpayable",
1442
- "type": "function"
1443
- },
1444
- {
1445
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1446
- "name": "reservedAmounts",
1447
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1448
- "stateMutability": "view",
1449
- "type": "function"
1450
- },
1451
- {
1452
- "inputs": [],
1453
- "name": "router",
1454
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
1455
- "stateMutability": "view",
1456
- "type": "function"
1457
- },
1458
- {
1459
- "inputs": [
1460
- { "internalType": "address", "name": "_token", "type": "address" },
1461
- { "internalType": "address", "name": "_receiver", "type": "address" }
1462
- ],
1463
- "name": "sellUSDQ",
1464
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1465
- "stateMutability": "nonpayable",
1466
- "type": "function"
1467
- },
1468
- {
1469
- "inputs": [
1470
- { "internalType": "address", "name": "_token", "type": "address" },
1471
- { "internalType": "uint256", "name": "_amount", "type": "uint256" }
1472
- ],
1473
- "name": "setBufferAmount",
1474
- "outputs": [],
1475
- "stateMutability": "nonpayable",
1476
- "type": "function"
1477
- },
1478
- {
1479
- "inputs": [
1480
- { "internalType": "uint256", "name": "_errorCode", "type": "uint256" },
1481
- { "internalType": "string", "name": "_error", "type": "string" }
1482
- ],
1483
- "name": "setError",
1484
- "outputs": [],
1485
- "stateMutability": "nonpayable",
1486
- "type": "function"
1487
- },
1488
- {
1489
- "inputs": [
1490
- {
1491
- "internalType": "address",
1492
- "name": "_errorController",
1493
- "type": "address"
1494
- }
1495
- ],
1496
- "name": "setErrorController",
1497
- "outputs": [],
1498
- "stateMutability": "nonpayable",
1499
- "type": "function"
1500
- },
1501
- {
1502
- "inputs": [
1503
- {
1504
- "internalType": "uint256",
1505
- "name": "_taxBasisPoints",
1506
- "type": "uint256"
1507
- },
1508
- {
1509
- "internalType": "uint256",
1510
- "name": "_stableTaxBasisPoints",
1511
- "type": "uint256"
1512
- },
1513
- {
1514
- "internalType": "uint256",
1515
- "name": "_mintBurnFeeBasisPoints",
1516
- "type": "uint256"
1517
- },
1518
- {
1519
- "internalType": "uint256",
1520
- "name": "_swapFeeBasisPoints",
1521
- "type": "uint256"
1522
- },
1523
- {
1524
- "internalType": "uint256",
1525
- "name": "_stableSwapFeeBasisPoints",
1526
- "type": "uint256"
1527
- },
1528
- {
1529
- "internalType": "uint256",
1530
- "name": "_marginFeeBasisPoints",
1531
- "type": "uint256"
1532
- },
1533
- {
1534
- "internalType": "uint256",
1535
- "name": "_liquidationFeeUsd",
1536
- "type": "uint256"
1537
- },
1538
- {
1539
- "internalType": "uint256",
1540
- "name": "_minProfitTime",
1541
- "type": "uint256"
1542
- },
1543
- { "internalType": "bool", "name": "_hasDynamicFees", "type": "bool" }
1544
- ],
1545
- "name": "setFees",
1546
- "outputs": [],
1547
- "stateMutability": "nonpayable",
1548
- "type": "function"
1549
- },
1550
- {
1551
- "inputs": [
1552
- {
1553
- "internalType": "uint256",
1554
- "name": "_fundingInterval",
1555
- "type": "uint256"
1556
- },
1557
- {
1558
- "internalType": "uint256",
1559
- "name": "_fundingRateFactor",
1560
- "type": "uint256"
1561
- },
1562
- {
1563
- "internalType": "uint256",
1564
- "name": "_stableFundingRateFactor",
1565
- "type": "uint256"
1566
- }
1567
- ],
1568
- "name": "setFundingRate",
1569
- "outputs": [],
1570
- "stateMutability": "nonpayable",
1571
- "type": "function"
1572
- },
1573
- {
1574
- "inputs": [
1575
- { "internalType": "address", "name": "_gov", "type": "address" }
1576
- ],
1577
- "name": "setGov",
1578
- "outputs": [],
1579
- "stateMutability": "nonpayable",
1580
- "type": "function"
1581
- },
1582
- {
1583
- "inputs": [
1584
- { "internalType": "bool", "name": "_inManagerMode", "type": "bool" }
1585
- ],
1586
- "name": "setInManagerMode",
1587
- "outputs": [],
1588
- "stateMutability": "nonpayable",
1589
- "type": "function"
1590
- },
1591
- {
1592
- "inputs": [
1593
- {
1594
- "internalType": "bool",
1595
- "name": "_inPrivateLiquidationMode",
1596
- "type": "bool"
1597
- }
1598
- ],
1599
- "name": "setInPrivateLiquidationMode",
1600
- "outputs": [],
1601
- "stateMutability": "nonpayable",
1602
- "type": "function"
1603
- },
1604
- {
1605
- "inputs": [
1606
- { "internalType": "bool", "name": "_isLeverageEnabled", "type": "bool" }
1607
- ],
1608
- "name": "setIsLeverageEnabled",
1609
- "outputs": [],
1610
- "stateMutability": "nonpayable",
1611
- "type": "function"
1612
- },
1613
- {
1614
- "inputs": [
1615
- { "internalType": "bool", "name": "_isSwapEnabled", "type": "bool" }
1616
- ],
1617
- "name": "setIsSwapEnabled",
1618
- "outputs": [],
1619
- "stateMutability": "nonpayable",
1620
- "type": "function"
1621
- },
1622
- {
1623
- "inputs": [
1624
- { "internalType": "address", "name": "_liquidator", "type": "address" },
1625
- { "internalType": "bool", "name": "_isActive", "type": "bool" }
1626
- ],
1627
- "name": "setLiquidator",
1628
- "outputs": [],
1629
- "stateMutability": "nonpayable",
1630
- "type": "function"
1631
- },
1632
- {
1633
- "inputs": [
1634
- { "internalType": "address", "name": "_manager", "type": "address" },
1635
- { "internalType": "bool", "name": "_isManager", "type": "bool" }
1636
- ],
1637
- "name": "setManager",
1638
- "outputs": [],
1639
- "stateMutability": "nonpayable",
1640
- "type": "function"
1641
- },
1642
- {
1643
- "inputs": [
1644
- { "internalType": "uint256", "name": "_maxGasPrice", "type": "uint256" }
1645
- ],
1646
- "name": "setMaxGasPrice",
1647
- "outputs": [],
1648
- "stateMutability": "nonpayable",
1649
- "type": "function"
1650
- },
1651
- {
1652
- "inputs": [
1653
- { "internalType": "address", "name": "_token", "type": "address" },
1654
- { "internalType": "uint256", "name": "_amount", "type": "uint256" }
1655
- ],
1656
- "name": "setMaxGlobalShortSize",
1657
- "outputs": [],
1658
- "stateMutability": "nonpayable",
1659
- "type": "function"
1660
- },
1661
- {
1662
- "inputs": [
1663
- { "internalType": "uint256", "name": "_maxLeverage", "type": "uint256" }
1664
- ],
1665
- "name": "setMaxLeverage",
1666
- "outputs": [],
1667
- "stateMutability": "nonpayable",
1668
- "type": "function"
1669
- },
1670
- {
1671
- "inputs": [
1672
- { "internalType": "address", "name": "_priceFeed", "type": "address" }
1673
- ],
1674
- "name": "setPriceFeed",
1675
- "outputs": [],
1676
- "stateMutability": "nonpayable",
1677
- "type": "function"
1678
- },
1679
- {
1680
- "inputs": [
1681
- { "internalType": "address", "name": "_token", "type": "address" },
1682
- {
1683
- "internalType": "uint256",
1684
- "name": "_tokenDecimals",
1685
- "type": "uint256"
1686
- },
1687
- { "internalType": "uint256", "name": "_tokenWeight", "type": "uint256" },
1688
- { "internalType": "uint256", "name": "_minProfitBps", "type": "uint256" },
1689
- {
1690
- "internalType": "uint256",
1691
- "name": "_maxUsdqAmount",
1692
- "type": "uint256"
1693
- },
1694
- { "internalType": "bool", "name": "_isStable", "type": "bool" },
1695
- { "internalType": "bool", "name": "_isShortable", "type": "bool" }
1696
- ],
1697
- "name": "setTokenConfig",
1698
- "outputs": [],
1699
- "stateMutability": "nonpayable",
1700
- "type": "function"
1701
- },
1702
- {
1703
- "inputs": [
1704
- { "internalType": "address", "name": "_token", "type": "address" },
1705
- { "internalType": "uint256", "name": "_amount", "type": "uint256" }
1706
- ],
1707
- "name": "setUsdqAmount",
1708
- "outputs": [],
1709
- "stateMutability": "nonpayable",
1710
- "type": "function"
1711
- },
1712
- {
1713
- "inputs": [
1714
- {
1715
- "internalType": "contract IVaultUtils",
1716
- "name": "_vaultUtils",
1717
- "type": "address"
1718
- }
1719
- ],
1720
- "name": "setVaultUtils",
1721
- "outputs": [],
1722
- "stateMutability": "nonpayable",
1723
- "type": "function"
1724
- },
1725
- {
1726
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1727
- "name": "shortableTokens",
1728
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1729
- "stateMutability": "view",
1730
- "type": "function"
1731
- },
1732
- {
1733
- "inputs": [],
1734
- "name": "stableFundingRateFactor",
1735
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1736
- "stateMutability": "view",
1737
- "type": "function"
1738
- },
1739
- {
1740
- "inputs": [],
1741
- "name": "stableSwapFeeBasisPoints",
1742
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1743
- "stateMutability": "view",
1744
- "type": "function"
1745
- },
1746
- {
1747
- "inputs": [],
1748
- "name": "stableTaxBasisPoints",
1749
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1750
- "stateMutability": "view",
1751
- "type": "function"
1752
- },
1753
- {
1754
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1755
- "name": "stableTokens",
1756
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1757
- "stateMutability": "view",
1758
- "type": "function"
1759
- },
1760
- {
1761
- "inputs": [
1762
- { "internalType": "address", "name": "_tokenIn", "type": "address" },
1763
- { "internalType": "address", "name": "_tokenOut", "type": "address" },
1764
- { "internalType": "address", "name": "_receiver", "type": "address" }
1765
- ],
1766
- "name": "swap",
1767
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1768
- "stateMutability": "nonpayable",
1769
- "type": "function"
1770
- },
1771
- {
1772
- "inputs": [],
1773
- "name": "swapFeeBasisPoints",
1774
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1775
- "stateMutability": "view",
1776
- "type": "function"
1777
- },
1778
- {
1779
- "inputs": [],
1780
- "name": "taxBasisPoints",
1781
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1782
- "stateMutability": "view",
1783
- "type": "function"
1784
- },
1785
- {
1786
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1787
- "name": "tokenBalances",
1788
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1789
- "stateMutability": "view",
1790
- "type": "function"
1791
- },
1792
- {
1793
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1794
- "name": "tokenDecimals",
1795
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1796
- "stateMutability": "view",
1797
- "type": "function"
1798
- },
1799
- {
1800
- "inputs": [
1801
- { "internalType": "address", "name": "_token", "type": "address" },
1802
- { "internalType": "uint256", "name": "_tokenAmount", "type": "uint256" }
1803
- ],
1804
- "name": "tokenToUsdMin",
1805
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1806
- "stateMutability": "view",
1807
- "type": "function"
1808
- },
1809
- {
1810
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1811
- "name": "tokenWeights",
1812
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1813
- "stateMutability": "view",
1814
- "type": "function"
1815
- },
1816
- {
1817
- "inputs": [],
1818
- "name": "totalTokenWeights",
1819
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1820
- "stateMutability": "view",
1821
- "type": "function"
1822
- },
1823
- {
1824
- "inputs": [
1825
- {
1826
- "internalType": "address",
1827
- "name": "_collateralToken",
1828
- "type": "address"
1829
- },
1830
- { "internalType": "address", "name": "_indexToken", "type": "address" }
1831
- ],
1832
- "name": "updateCumulativeFundingRate",
1833
- "outputs": [],
1834
- "stateMutability": "nonpayable",
1835
- "type": "function"
1836
- },
1837
- {
1838
- "inputs": [
1839
- { "internalType": "address", "name": "_newVault", "type": "address" },
1840
- { "internalType": "address", "name": "_token", "type": "address" },
1841
- { "internalType": "uint256", "name": "_amount", "type": "uint256" }
1842
- ],
1843
- "name": "upgradeVault",
1844
- "outputs": [],
1845
- "stateMutability": "nonpayable",
1846
- "type": "function"
1847
- },
1848
- {
1849
- "inputs": [
1850
- { "internalType": "address", "name": "_token", "type": "address" },
1851
- { "internalType": "uint256", "name": "_usdAmount", "type": "uint256" },
1852
- { "internalType": "uint256", "name": "_price", "type": "uint256" }
1853
- ],
1854
- "name": "usdToToken",
1855
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1856
- "stateMutability": "view",
1857
- "type": "function"
1858
- },
1859
- {
1860
- "inputs": [
1861
- { "internalType": "address", "name": "_token", "type": "address" },
1862
- { "internalType": "uint256", "name": "_usdAmount", "type": "uint256" }
1863
- ],
1864
- "name": "usdToTokenMax",
1865
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1866
- "stateMutability": "view",
1867
- "type": "function"
1868
- },
1869
- {
1870
- "inputs": [
1871
- { "internalType": "address", "name": "_token", "type": "address" },
1872
- { "internalType": "uint256", "name": "_usdAmount", "type": "uint256" }
1873
- ],
1874
- "name": "usdToTokenMin",
1875
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1876
- "stateMutability": "view",
1877
- "type": "function"
1878
- },
1879
- {
1880
- "inputs": [],
1881
- "name": "usdq",
1882
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
1883
- "stateMutability": "view",
1884
- "type": "function"
1885
- },
1886
- {
1887
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1888
- "name": "usdqAmounts",
1889
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1890
- "stateMutability": "view",
1891
- "type": "function"
1892
- },
1893
- {
1894
- "inputs": [],
1895
- "name": "useSwapPricing",
1896
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1897
- "stateMutability": "view",
1898
- "type": "function"
1899
- },
1900
- {
1901
- "inputs": [
1902
- { "internalType": "address", "name": "_account", "type": "address" },
1903
- {
1904
- "internalType": "address",
1905
- "name": "_collateralToken",
1906
- "type": "address"
1907
- },
1908
- { "internalType": "address", "name": "_indexToken", "type": "address" },
1909
- { "internalType": "bool", "name": "_isLong", "type": "bool" },
1910
- { "internalType": "bool", "name": "_raise", "type": "bool" }
1911
- ],
1912
- "name": "validateLiquidation",
1913
- "outputs": [
1914
- { "internalType": "uint256", "name": "", "type": "uint256" },
1915
- { "internalType": "uint256", "name": "", "type": "uint256" }
1916
- ],
1917
- "stateMutability": "view",
1918
- "type": "function"
1919
- },
1920
- {
1921
- "inputs": [],
1922
- "name": "vaultUtils",
1923
- "outputs": [
1924
- { "internalType": "contract IVaultUtils", "name": "", "type": "address" }
1925
- ],
1926
- "stateMutability": "view",
1927
- "type": "function"
1928
- },
1929
- {
1930
- "inputs": [],
1931
- "name": "whitelistedTokenCount",
1932
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1933
- "stateMutability": "view",
1934
- "type": "function"
1935
- },
1936
- {
1937
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
1938
- "name": "whitelistedTokens",
1939
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
1940
- "stateMutability": "view",
1941
- "type": "function"
1942
- },
1943
- {
1944
- "inputs": [
1945
- { "internalType": "address", "name": "_token", "type": "address" },
1946
- { "internalType": "address", "name": "_receiver", "type": "address" }
1947
- ],
1948
- "name": "withdrawFees",
1949
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
1950
- "stateMutability": "nonpayable",
1951
- "type": "function"
1952
- }
1953
- ]