@paraswap/dex-lib 2.42.26 → 2.42.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 (66) hide show
  1. package/build/abi/smardex/all/smardex-router.json +648 -0
  2. package/build/abi/smardex/layer-1/smardex-factory.json +242 -0
  3. package/build/abi/smardex/layer-1/smardex-pool.json +506 -0
  4. package/build/abi/smardex/layer-2/smardex-factory.json +185 -0
  5. package/build/abi/smardex/layer-2/smardex-pool.json +578 -0
  6. package/build/config.js +20 -10
  7. package/build/config.js.map +1 -1
  8. package/build/dex/index.js +2 -0
  9. package/build/dex/index.js.map +1 -1
  10. package/build/dex/smardex/config.d.ts +4 -0
  11. package/build/dex/smardex/config.js +64 -0
  12. package/build/dex/smardex/config.js.map +1 -0
  13. package/build/dex/smardex/constants.d.ts +18 -0
  14. package/build/dex/smardex/constants.js +33 -0
  15. package/build/dex/smardex/constants.js.map +1 -0
  16. package/build/dex/smardex/sdk/constants.d.ts +6 -0
  17. package/build/dex/smardex/sdk/constants.js +13 -0
  18. package/build/dex/smardex/sdk/constants.js.map +1 -0
  19. package/build/dex/smardex/sdk/core.d.ts +113 -0
  20. package/build/dex/smardex/sdk/core.js +499 -0
  21. package/build/dex/smardex/sdk/core.js.map +1 -0
  22. package/build/dex/smardex/sdk/errors.d.ts +15 -0
  23. package/build/dex/smardex/sdk/errors.js +22 -0
  24. package/build/dex/smardex/sdk/errors.js.map +1 -0
  25. package/build/dex/smardex/sdk/types.d.ts +62 -0
  26. package/build/dex/smardex/sdk/types.js +3 -0
  27. package/build/dex/smardex/sdk/types.js.map +1 -0
  28. package/build/dex/smardex/sdk/utils.d.ts +44 -0
  29. package/build/dex/smardex/sdk/utils.js +133 -0
  30. package/build/dex/smardex/sdk/utils.js.map +1 -0
  31. package/build/dex/smardex/smardex-event-pool.d.ts +28 -0
  32. package/build/dex/smardex/smardex-event-pool.js +119 -0
  33. package/build/dex/smardex/smardex-event-pool.js.map +1 -0
  34. package/build/dex/smardex/smardex.d.ts +65 -0
  35. package/build/dex/smardex/smardex.js +519 -0
  36. package/build/dex/smardex/smardex.js.map +1 -0
  37. package/build/dex/smardex/types.d.ts +55 -0
  38. package/build/dex/smardex/types.js +3 -0
  39. package/build/dex/smardex/types.js.map +1 -0
  40. package/build/types.d.ts +1 -0
  41. package/package.json +3 -2
  42. package/src/abi/smardex/all/smardex-router.json +648 -0
  43. package/src/abi/smardex/layer-1/smardex-factory.json +242 -0
  44. package/src/abi/smardex/layer-1/smardex-pool.json +506 -0
  45. package/src/abi/smardex/layer-2/smardex-factory.json +185 -0
  46. package/src/abi/smardex/layer-2/smardex-pool.json +578 -0
  47. package/src/config.ts +21 -10
  48. package/src/dex/index.ts +2 -0
  49. package/src/dex/smardex/config.ts +67 -0
  50. package/src/dex/smardex/constants.ts +35 -0
  51. package/src/dex/smardex/sdk/constants.ts +10 -0
  52. package/src/dex/smardex/sdk/core.ts +832 -0
  53. package/src/dex/smardex/sdk/errors.ts +18 -0
  54. package/src/dex/smardex/sdk/types.ts +68 -0
  55. package/src/dex/smardex/sdk/utils.ts +156 -0
  56. package/src/dex/smardex/smardex-e2e.test.ts +275 -0
  57. package/src/dex/smardex/smardex-event-pool.ts +164 -0
  58. package/src/dex/smardex/smardex-events.test.ts +297 -0
  59. package/src/dex/smardex/smardex-integration.test.ts +258 -0
  60. package/src/dex/smardex/smardex.ts +770 -0
  61. package/src/dex/smardex/types.ts +69 -0
  62. package/src/types.ts +1 -0
  63. package/tests/constants-e2e.ts +26 -1
  64. package/.vscode/launch.json +0 -54
  65. package/.vscode/settings.json +0 -2
  66. package/.vscode/tasks.json +0 -15
@@ -0,0 +1,242 @@
1
+ [
2
+ { "inputs": [], "name": "EmptyPair", "type": "error" },
3
+ { "inputs": [], "name": "WhitelistNotClosed", "type": "error" },
4
+ { "inputs": [], "name": "WhitelistNotOpen", "type": "error" },
5
+ {
6
+ "anonymous": false,
7
+ "inputs": [
8
+ {
9
+ "indexed": true,
10
+ "internalType": "address",
11
+ "name": "previousFeeTo",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "indexed": true,
16
+ "internalType": "address",
17
+ "name": "newFeeTo",
18
+ "type": "address"
19
+ }
20
+ ],
21
+ "name": "FeeToUpdated",
22
+ "type": "event"
23
+ },
24
+ {
25
+ "anonymous": false,
26
+ "inputs": [
27
+ {
28
+ "indexed": true,
29
+ "internalType": "uint256",
30
+ "name": "feesLP",
31
+ "type": "uint256"
32
+ },
33
+ {
34
+ "indexed": true,
35
+ "internalType": "uint256",
36
+ "name": "feesPool",
37
+ "type": "uint256"
38
+ }
39
+ ],
40
+ "name": "FeesChanged",
41
+ "type": "event"
42
+ },
43
+ {
44
+ "anonymous": false,
45
+ "inputs": [
46
+ {
47
+ "indexed": true,
48
+ "internalType": "address",
49
+ "name": "previousOwner",
50
+ "type": "address"
51
+ },
52
+ {
53
+ "indexed": true,
54
+ "internalType": "address",
55
+ "name": "newOwner",
56
+ "type": "address"
57
+ }
58
+ ],
59
+ "name": "OwnershipTransferred",
60
+ "type": "event"
61
+ },
62
+ {
63
+ "anonymous": false,
64
+ "inputs": [
65
+ {
66
+ "indexed": true,
67
+ "internalType": "address",
68
+ "name": "token0",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "indexed": true,
73
+ "internalType": "address",
74
+ "name": "token1",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "internalType": "address",
80
+ "name": "pair",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "indexed": false,
85
+ "internalType": "uint256",
86
+ "name": "totalPair",
87
+ "type": "uint256"
88
+ }
89
+ ],
90
+ "name": "PairAdded",
91
+ "type": "event"
92
+ },
93
+ {
94
+ "anonymous": false,
95
+ "inputs": [
96
+ {
97
+ "indexed": true,
98
+ "internalType": "address",
99
+ "name": "token0",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "indexed": true,
104
+ "internalType": "address",
105
+ "name": "token1",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "indexed": false,
110
+ "internalType": "address",
111
+ "name": "pair",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "indexed": false,
116
+ "internalType": "uint256",
117
+ "name": "totalPair",
118
+ "type": "uint256"
119
+ }
120
+ ],
121
+ "name": "PairCreated",
122
+ "type": "event"
123
+ },
124
+ {
125
+ "inputs": [
126
+ { "internalType": "address", "name": "_pair", "type": "address" }
127
+ ],
128
+ "name": "addPair",
129
+ "outputs": [],
130
+ "stateMutability": "nonpayable",
131
+ "type": "function"
132
+ },
133
+ {
134
+ "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
135
+ "name": "allPairs",
136
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
137
+ "stateMutability": "view",
138
+ "type": "function"
139
+ },
140
+ {
141
+ "inputs": [],
142
+ "name": "allPairsLength",
143
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
144
+ "stateMutability": "view",
145
+ "type": "function"
146
+ },
147
+ {
148
+ "inputs": [],
149
+ "name": "closeWhitelist",
150
+ "outputs": [],
151
+ "stateMutability": "nonpayable",
152
+ "type": "function"
153
+ },
154
+ {
155
+ "inputs": [
156
+ { "internalType": "address", "name": "_tokenA", "type": "address" },
157
+ { "internalType": "address", "name": "_tokenB", "type": "address" }
158
+ ],
159
+ "name": "createPair",
160
+ "outputs": [
161
+ { "internalType": "address", "name": "pair_", "type": "address" }
162
+ ],
163
+ "stateMutability": "nonpayable",
164
+ "type": "function"
165
+ },
166
+ {
167
+ "inputs": [],
168
+ "name": "feeTo",
169
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
170
+ "stateMutability": "view",
171
+ "type": "function"
172
+ },
173
+ {
174
+ "inputs": [],
175
+ "name": "getDefaultFees",
176
+ "outputs": [
177
+ { "internalType": "uint128", "name": "feesLP_", "type": "uint128" },
178
+ { "internalType": "uint128", "name": "feesPool_", "type": "uint128" }
179
+ ],
180
+ "stateMutability": "view",
181
+ "type": "function"
182
+ },
183
+ {
184
+ "inputs": [
185
+ { "internalType": "address", "name": "", "type": "address" },
186
+ { "internalType": "address", "name": "", "type": "address" }
187
+ ],
188
+ "name": "getPair",
189
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
190
+ "stateMutability": "view",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "owner",
196
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "renounceOwnership",
203
+ "outputs": [],
204
+ "stateMutability": "nonpayable",
205
+ "type": "function"
206
+ },
207
+ {
208
+ "inputs": [
209
+ { "internalType": "address", "name": "_feeTo", "type": "address" }
210
+ ],
211
+ "name": "setFeeTo",
212
+ "outputs": [],
213
+ "stateMutability": "nonpayable",
214
+ "type": "function"
215
+ },
216
+ {
217
+ "inputs": [
218
+ { "internalType": "uint128", "name": "_feesLP", "type": "uint128" },
219
+ { "internalType": "uint128", "name": "_feesPool", "type": "uint128" }
220
+ ],
221
+ "name": "setFees",
222
+ "outputs": [],
223
+ "stateMutability": "nonpayable",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [
228
+ { "internalType": "address", "name": "newOwner", "type": "address" }
229
+ ],
230
+ "name": "transferOwnership",
231
+ "outputs": [],
232
+ "stateMutability": "nonpayable",
233
+ "type": "function"
234
+ },
235
+ {
236
+ "inputs": [],
237
+ "name": "whitelistOpen",
238
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
239
+ "stateMutability": "view",
240
+ "type": "function"
241
+ }
242
+ ]