@paraswap/dex-lib 3.8.15 → 3.8.16-oswap.1

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 (118) hide show
  1. package/build/abi/lite-psm/dai.json +333 -0
  2. package/build/abi/lite-psm/psm.json +468 -0
  3. package/build/abi/lite-psm/usdc.json +814 -0
  4. package/build/config.js +1 -0
  5. package/build/config.js.map +1 -1
  6. package/build/dex/angle-transmuter/angle-transmuter.js +1 -1
  7. package/build/dex/angle-transmuter/angle-transmuter.js.map +1 -1
  8. package/build/dex/dexalot/config.js +3 -0
  9. package/build/dex/dexalot/config.js.map +1 -1
  10. package/build/dex/idex.d.ts +11 -7
  11. package/build/dex/index.js +6 -0
  12. package/build/dex/index.js.map +1 -1
  13. package/build/dex/integral/integral.js +8 -9
  14. package/build/dex/integral/integral.js.map +1 -1
  15. package/build/dex/integral/types.d.ts +1 -0
  16. package/build/dex/integral/types.js.map +1 -1
  17. package/build/dex/lite-psm/config.d.ts +3 -0
  18. package/build/dex/lite-psm/config.js +29 -0
  19. package/build/dex/lite-psm/config.js.map +1 -0
  20. package/build/dex/lite-psm/lite-psm-event-pool.d.ts +29 -0
  21. package/build/dex/lite-psm/lite-psm-event-pool.js +164 -0
  22. package/build/dex/lite-psm/lite-psm-event-pool.js.map +1 -0
  23. package/build/dex/lite-psm/lite-psm.d.ts +52 -0
  24. package/build/dex/lite-psm/lite-psm.js +341 -0
  25. package/build/dex/lite-psm/lite-psm.js.map +1 -0
  26. package/build/dex/lite-psm/types.d.ts +40 -0
  27. package/build/dex/lite-psm/types.js +3 -0
  28. package/build/dex/lite-psm/types.js.map +1 -0
  29. package/build/dex/maker-psm/maker-psm.js +4 -1
  30. package/build/dex/maker-psm/maker-psm.js.map +1 -1
  31. package/build/dex/maverick-v2/config.js +4 -0
  32. package/build/dex/maverick-v2/config.js.map +1 -1
  33. package/build/dex/maverick-v2/maverick-math/maverick-pool-math.js +4 -0
  34. package/build/dex/maverick-v2/maverick-math/maverick-pool-math.js.map +1 -1
  35. package/build/dex/maverick-v2/maverick-v2-pool.d.ts +1 -1
  36. package/build/dex/maverick-v2/maverick-v2-pool.js +8 -8
  37. package/build/dex/maverick-v2/maverick-v2-pool.js.map +1 -1
  38. package/build/dex/maverick-v2/maverick-v2.d.ts +5 -4
  39. package/build/dex/maverick-v2/maverick-v2.js +73 -63
  40. package/build/dex/maverick-v2/maverick-v2.js.map +1 -1
  41. package/build/dex/maverick-v2/types.d.ts +4 -0
  42. package/build/dex/oswap/oswap-pool.js +8 -8
  43. package/build/dex/oswap/oswap-pool.js.map +1 -1
  44. package/build/dex/oswap/oswap.d.ts +2 -2
  45. package/build/dex/oswap/oswap.js +51 -44
  46. package/build/dex/oswap/oswap.js.map +1 -1
  47. package/build/dex/oswap/types.d.ts +4 -4
  48. package/build/dex/solidly-v3/solidly-v3.js +7 -0
  49. package/build/dex/solidly-v3/solidly-v3.js.map +1 -1
  50. package/build/dex/trader-joe-v2.1/base.d.ts +18 -0
  51. package/build/dex/trader-joe-v2.1/base.js +88 -0
  52. package/build/dex/trader-joe-v2.1/base.js.map +1 -0
  53. package/build/dex/trader-joe-v2.1/config.d.ts +3 -0
  54. package/build/dex/trader-joe-v2.1/config.js +7 -3
  55. package/build/dex/trader-joe-v2.1/config.js.map +1 -1
  56. package/build/dex/trader-joe-v2.1/optimizer.d.ts +2 -0
  57. package/build/dex/trader-joe-v2.1/optimizer.js +44 -0
  58. package/build/dex/trader-joe-v2.1/optimizer.js.map +1 -0
  59. package/build/dex/trader-joe-v2.1/trader-joe-v2.1.d.ts +2 -14
  60. package/build/dex/trader-joe-v2.1/trader-joe-v2.1.js +3 -85
  61. package/build/dex/trader-joe-v2.1/trader-joe-v2.1.js.map +1 -1
  62. package/build/dex/trader-joe-v2.1/trader-joe-v2.2.d.ts +7 -0
  63. package/build/dex/trader-joe-v2.1/trader-joe-v2.2.js +20 -0
  64. package/build/dex/trader-joe-v2.1/trader-joe-v2.2.js.map +1 -0
  65. package/build/dex/trader-joe-v2.1/types.d.ts +3 -3
  66. package/build/dex/weth/config.js +3 -0
  67. package/build/dex/weth/config.js.map +1 -1
  68. package/build/dex-helper/dummy-dex-helper.js +1 -1
  69. package/build/dex-helper/dummy-dex-helper.js.map +1 -1
  70. package/build/executor/types.d.ts +2 -1
  71. package/build/executor/types.js +1 -0
  72. package/build/executor/types.js.map +1 -1
  73. package/package.json +1 -1
  74. package/src/abi/lite-psm/dai.json +333 -0
  75. package/src/abi/lite-psm/psm.json +468 -0
  76. package/src/abi/lite-psm/usdc.json +814 -0
  77. package/src/abi/maverick-v2/MaverickV2Router.json +778 -0
  78. package/src/abi/oswap/oswap.abi.json +452 -0
  79. package/src/config.ts +1 -0
  80. package/src/dex/angle-transmuter/angle-transmuter.ts +1 -1
  81. package/src/dex/dexalot/config.ts +3 -0
  82. package/src/dex/dexalot/dexalot-e2e.test.ts +23 -1
  83. package/src/dex/dexalot/dexalot-integration.test.ts +122 -0
  84. package/src/dex/idex.ts +48 -41
  85. package/src/dex/index.ts +6 -0
  86. package/src/dex/lite-psm/config.ts +29 -0
  87. package/src/dex/lite-psm/lite-psm-e2e.test.ts +79 -0
  88. package/src/dex/lite-psm/lite-psm-event-pool.ts +216 -0
  89. package/src/dex/lite-psm/lite-psm-events.test.ts +61 -0
  90. package/src/dex/lite-psm/lite-psm-integration.test.ts +99 -0
  91. package/src/dex/lite-psm/lite-psm.ts +523 -0
  92. package/src/dex/lite-psm/types.ts +46 -0
  93. package/src/dex/maker-psm/maker-psm.ts +4 -1
  94. package/src/dex/maverick-v2/config.ts +4 -0
  95. package/src/dex/maverick-v2/maverick-math/maverick-pool-math.ts +5 -0
  96. package/src/dex/maverick-v2/maverick-v2-e2e.test.ts +21 -43
  97. package/src/dex/maverick-v2/maverick-v2-integration.test.ts +100 -96
  98. package/src/dex/maverick-v2/maverick-v2-pool.ts +8 -8
  99. package/src/dex/maverick-v2/maverick-v2.ts +111 -81
  100. package/src/dex/maverick-v2/types.ts +4 -0
  101. package/src/dex/oswap/config.ts +32 -0
  102. package/src/dex/oswap/oswap-e2e.test.ts +91 -0
  103. package/src/dex/oswap/oswap-events.test.ts +88 -0
  104. package/src/dex/oswap/oswap-integration.test.ts +269 -0
  105. package/src/dex/oswap/oswap-pool.ts +190 -0
  106. package/src/dex/oswap/oswap.ts +392 -0
  107. package/src/dex/oswap/types.ts +29 -0
  108. package/src/dex/solidly-v3/solidly-v3.ts +7 -0
  109. package/src/dex/trader-joe-v2.1/base.ts +167 -0
  110. package/src/dex/trader-joe-v2.1/config.ts +7 -2
  111. package/src/dex/trader-joe-v2.1/trader-joe-v2.1.ts +8 -165
  112. package/src/dex/trader-joe-v2.1/trader-joe-v2.2.ts +23 -0
  113. package/src/dex/trader-joe-v2.1/types.ts +3 -3
  114. package/src/dex/weth/config.ts +3 -0
  115. package/src/dex/weth/weth-e2e.test.ts +156 -0
  116. package/src/dex-helper/dummy-dex-helper.ts +1 -1
  117. package/src/executor/types.ts +1 -0
  118. package/tests/constants-e2e.ts +9 -0
@@ -0,0 +1,333 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ { "internalType": "uint256", "name": "chainId_", "type": "uint256" }
5
+ ],
6
+ "payable": false,
7
+ "stateMutability": "nonpayable",
8
+ "type": "constructor"
9
+ },
10
+ {
11
+ "anonymous": false,
12
+ "inputs": [
13
+ {
14
+ "indexed": true,
15
+ "internalType": "address",
16
+ "name": "src",
17
+ "type": "address"
18
+ },
19
+ {
20
+ "indexed": true,
21
+ "internalType": "address",
22
+ "name": "guy",
23
+ "type": "address"
24
+ },
25
+ {
26
+ "indexed": false,
27
+ "internalType": "uint256",
28
+ "name": "wad",
29
+ "type": "uint256"
30
+ }
31
+ ],
32
+ "name": "Approval",
33
+ "type": "event"
34
+ },
35
+ {
36
+ "anonymous": true,
37
+ "inputs": [
38
+ {
39
+ "indexed": true,
40
+ "internalType": "bytes4",
41
+ "name": "sig",
42
+ "type": "bytes4"
43
+ },
44
+ {
45
+ "indexed": true,
46
+ "internalType": "address",
47
+ "name": "usr",
48
+ "type": "address"
49
+ },
50
+ {
51
+ "indexed": true,
52
+ "internalType": "bytes32",
53
+ "name": "arg1",
54
+ "type": "bytes32"
55
+ },
56
+ {
57
+ "indexed": true,
58
+ "internalType": "bytes32",
59
+ "name": "arg2",
60
+ "type": "bytes32"
61
+ },
62
+ {
63
+ "indexed": false,
64
+ "internalType": "bytes",
65
+ "name": "data",
66
+ "type": "bytes"
67
+ }
68
+ ],
69
+ "name": "LogNote",
70
+ "type": "event"
71
+ },
72
+ {
73
+ "anonymous": false,
74
+ "inputs": [
75
+ {
76
+ "indexed": true,
77
+ "internalType": "address",
78
+ "name": "src",
79
+ "type": "address"
80
+ },
81
+ {
82
+ "indexed": true,
83
+ "internalType": "address",
84
+ "name": "dst",
85
+ "type": "address"
86
+ },
87
+ {
88
+ "indexed": false,
89
+ "internalType": "uint256",
90
+ "name": "wad",
91
+ "type": "uint256"
92
+ }
93
+ ],
94
+ "name": "Transfer",
95
+ "type": "event"
96
+ },
97
+ {
98
+ "constant": true,
99
+ "inputs": [],
100
+ "name": "DOMAIN_SEPARATOR",
101
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
102
+ "payable": false,
103
+ "stateMutability": "view",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "constant": true,
108
+ "inputs": [],
109
+ "name": "PERMIT_TYPEHASH",
110
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
111
+ "payable": false,
112
+ "stateMutability": "view",
113
+ "type": "function"
114
+ },
115
+ {
116
+ "constant": true,
117
+ "inputs": [
118
+ { "internalType": "address", "name": "", "type": "address" },
119
+ { "internalType": "address", "name": "", "type": "address" }
120
+ ],
121
+ "name": "allowance",
122
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
123
+ "payable": false,
124
+ "stateMutability": "view",
125
+ "type": "function"
126
+ },
127
+ {
128
+ "constant": false,
129
+ "inputs": [
130
+ { "internalType": "address", "name": "usr", "type": "address" },
131
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
132
+ ],
133
+ "name": "approve",
134
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
135
+ "payable": false,
136
+ "stateMutability": "nonpayable",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "constant": true,
141
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
142
+ "name": "balanceOf",
143
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
144
+ "payable": false,
145
+ "stateMutability": "view",
146
+ "type": "function"
147
+ },
148
+ {
149
+ "constant": false,
150
+ "inputs": [
151
+ { "internalType": "address", "name": "usr", "type": "address" },
152
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
153
+ ],
154
+ "name": "burn",
155
+ "outputs": [],
156
+ "payable": false,
157
+ "stateMutability": "nonpayable",
158
+ "type": "function"
159
+ },
160
+ {
161
+ "constant": true,
162
+ "inputs": [],
163
+ "name": "decimals",
164
+ "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
165
+ "payable": false,
166
+ "stateMutability": "view",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "constant": false,
171
+ "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }],
172
+ "name": "deny",
173
+ "outputs": [],
174
+ "payable": false,
175
+ "stateMutability": "nonpayable",
176
+ "type": "function"
177
+ },
178
+ {
179
+ "constant": false,
180
+ "inputs": [
181
+ { "internalType": "address", "name": "usr", "type": "address" },
182
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
183
+ ],
184
+ "name": "mint",
185
+ "outputs": [],
186
+ "payable": false,
187
+ "stateMutability": "nonpayable",
188
+ "type": "function"
189
+ },
190
+ {
191
+ "constant": false,
192
+ "inputs": [
193
+ { "internalType": "address", "name": "src", "type": "address" },
194
+ { "internalType": "address", "name": "dst", "type": "address" },
195
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
196
+ ],
197
+ "name": "move",
198
+ "outputs": [],
199
+ "payable": false,
200
+ "stateMutability": "nonpayable",
201
+ "type": "function"
202
+ },
203
+ {
204
+ "constant": true,
205
+ "inputs": [],
206
+ "name": "name",
207
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
208
+ "payable": false,
209
+ "stateMutability": "view",
210
+ "type": "function"
211
+ },
212
+ {
213
+ "constant": true,
214
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
215
+ "name": "nonces",
216
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
217
+ "payable": false,
218
+ "stateMutability": "view",
219
+ "type": "function"
220
+ },
221
+ {
222
+ "constant": false,
223
+ "inputs": [
224
+ { "internalType": "address", "name": "holder", "type": "address" },
225
+ { "internalType": "address", "name": "spender", "type": "address" },
226
+ { "internalType": "uint256", "name": "nonce", "type": "uint256" },
227
+ { "internalType": "uint256", "name": "expiry", "type": "uint256" },
228
+ { "internalType": "bool", "name": "allowed", "type": "bool" },
229
+ { "internalType": "uint8", "name": "v", "type": "uint8" },
230
+ { "internalType": "bytes32", "name": "r", "type": "bytes32" },
231
+ { "internalType": "bytes32", "name": "s", "type": "bytes32" }
232
+ ],
233
+ "name": "permit",
234
+ "outputs": [],
235
+ "payable": false,
236
+ "stateMutability": "nonpayable",
237
+ "type": "function"
238
+ },
239
+ {
240
+ "constant": false,
241
+ "inputs": [
242
+ { "internalType": "address", "name": "usr", "type": "address" },
243
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
244
+ ],
245
+ "name": "pull",
246
+ "outputs": [],
247
+ "payable": false,
248
+ "stateMutability": "nonpayable",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "constant": false,
253
+ "inputs": [
254
+ { "internalType": "address", "name": "usr", "type": "address" },
255
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
256
+ ],
257
+ "name": "push",
258
+ "outputs": [],
259
+ "payable": false,
260
+ "stateMutability": "nonpayable",
261
+ "type": "function"
262
+ },
263
+ {
264
+ "constant": false,
265
+ "inputs": [{ "internalType": "address", "name": "guy", "type": "address" }],
266
+ "name": "rely",
267
+ "outputs": [],
268
+ "payable": false,
269
+ "stateMutability": "nonpayable",
270
+ "type": "function"
271
+ },
272
+ {
273
+ "constant": true,
274
+ "inputs": [],
275
+ "name": "symbol",
276
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
277
+ "payable": false,
278
+ "stateMutability": "view",
279
+ "type": "function"
280
+ },
281
+ {
282
+ "constant": true,
283
+ "inputs": [],
284
+ "name": "totalSupply",
285
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
286
+ "payable": false,
287
+ "stateMutability": "view",
288
+ "type": "function"
289
+ },
290
+ {
291
+ "constant": false,
292
+ "inputs": [
293
+ { "internalType": "address", "name": "dst", "type": "address" },
294
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
295
+ ],
296
+ "name": "transfer",
297
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
298
+ "payable": false,
299
+ "stateMutability": "nonpayable",
300
+ "type": "function"
301
+ },
302
+ {
303
+ "constant": false,
304
+ "inputs": [
305
+ { "internalType": "address", "name": "src", "type": "address" },
306
+ { "internalType": "address", "name": "dst", "type": "address" },
307
+ { "internalType": "uint256", "name": "wad", "type": "uint256" }
308
+ ],
309
+ "name": "transferFrom",
310
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
311
+ "payable": false,
312
+ "stateMutability": "nonpayable",
313
+ "type": "function"
314
+ },
315
+ {
316
+ "constant": true,
317
+ "inputs": [],
318
+ "name": "version",
319
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
320
+ "payable": false,
321
+ "stateMutability": "view",
322
+ "type": "function"
323
+ },
324
+ {
325
+ "constant": true,
326
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
327
+ "name": "wards",
328
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
329
+ "payable": false,
330
+ "stateMutability": "view",
331
+ "type": "function"
332
+ }
333
+ ]