@dhedge/v2-sdk 1.9.9 → 1.10.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.
@@ -0,0 +1,408 @@
1
+ { "abi": [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "uint256",
6
+ "name": "tokenId",
7
+ "type": "uint256"
8
+ }
9
+ ],
10
+ "name": "burn",
11
+ "outputs": [],
12
+ "stateMutability": "payable",
13
+ "type": "function"
14
+ },
15
+ {
16
+ "inputs": [
17
+ {
18
+ "components": [
19
+ {
20
+ "internalType": "uint256",
21
+ "name": "tokenId",
22
+ "type": "uint256"
23
+ },
24
+ {
25
+ "internalType": "address",
26
+ "name": "recipient",
27
+ "type": "address"
28
+ },
29
+ {
30
+ "internalType": "uint128",
31
+ "name": "amount0Max",
32
+ "type": "uint128"
33
+ },
34
+ {
35
+ "internalType": "uint128",
36
+ "name": "amount1Max",
37
+ "type": "uint128"
38
+ }
39
+ ],
40
+ "internalType": "struct IVelodromeNonfungiblePositionManager.CollectParams",
41
+ "name": "params",
42
+ "type": "tuple"
43
+ }
44
+ ],
45
+ "name": "collect",
46
+ "outputs": [
47
+ {
48
+ "internalType": "uint256",
49
+ "name": "amount0",
50
+ "type": "uint256"
51
+ },
52
+ {
53
+ "internalType": "uint256",
54
+ "name": "amount1",
55
+ "type": "uint256"
56
+ }
57
+ ],
58
+ "stateMutability": "payable",
59
+ "type": "function"
60
+ },
61
+ {
62
+ "inputs": [
63
+ {
64
+ "components": [
65
+ {
66
+ "internalType": "uint256",
67
+ "name": "tokenId",
68
+ "type": "uint256"
69
+ },
70
+ {
71
+ "internalType": "uint128",
72
+ "name": "liquidity",
73
+ "type": "uint128"
74
+ },
75
+ {
76
+ "internalType": "uint256",
77
+ "name": "amount0Min",
78
+ "type": "uint256"
79
+ },
80
+ {
81
+ "internalType": "uint256",
82
+ "name": "amount1Min",
83
+ "type": "uint256"
84
+ },
85
+ {
86
+ "internalType": "uint256",
87
+ "name": "deadline",
88
+ "type": "uint256"
89
+ }
90
+ ],
91
+ "internalType": "struct IVelodromeNonfungiblePositionManager.DecreaseLiquidityParams",
92
+ "name": "params",
93
+ "type": "tuple"
94
+ }
95
+ ],
96
+ "name": "decreaseLiquidity",
97
+ "outputs": [
98
+ {
99
+ "internalType": "uint256",
100
+ "name": "amount0",
101
+ "type": "uint256"
102
+ },
103
+ {
104
+ "internalType": "uint256",
105
+ "name": "amount1",
106
+ "type": "uint256"
107
+ }
108
+ ],
109
+ "stateMutability": "payable",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [],
114
+ "name": "factory",
115
+ "outputs": [
116
+ {
117
+ "internalType": "address",
118
+ "name": "",
119
+ "type": "address"
120
+ }
121
+ ],
122
+ "stateMutability": "view",
123
+ "type": "function"
124
+ },
125
+ {
126
+ "inputs": [
127
+ {
128
+ "components": [
129
+ {
130
+ "internalType": "uint256",
131
+ "name": "tokenId",
132
+ "type": "uint256"
133
+ },
134
+ {
135
+ "internalType": "uint256",
136
+ "name": "amount0Desired",
137
+ "type": "uint256"
138
+ },
139
+ {
140
+ "internalType": "uint256",
141
+ "name": "amount1Desired",
142
+ "type": "uint256"
143
+ },
144
+ {
145
+ "internalType": "uint256",
146
+ "name": "amount0Min",
147
+ "type": "uint256"
148
+ },
149
+ {
150
+ "internalType": "uint256",
151
+ "name": "amount1Min",
152
+ "type": "uint256"
153
+ },
154
+ {
155
+ "internalType": "uint256",
156
+ "name": "deadline",
157
+ "type": "uint256"
158
+ }
159
+ ],
160
+ "internalType": "struct IVelodromeNonfungiblePositionManager.IncreaseLiquidityParams",
161
+ "name": "params",
162
+ "type": "tuple"
163
+ }
164
+ ],
165
+ "name": "increaseLiquidity",
166
+ "outputs": [
167
+ {
168
+ "internalType": "uint128",
169
+ "name": "liquidity",
170
+ "type": "uint128"
171
+ },
172
+ {
173
+ "internalType": "uint256",
174
+ "name": "amount0",
175
+ "type": "uint256"
176
+ },
177
+ {
178
+ "internalType": "uint256",
179
+ "name": "amount1",
180
+ "type": "uint256"
181
+ }
182
+ ],
183
+ "stateMutability": "payable",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "inputs": [
188
+ {
189
+ "components": [
190
+ {
191
+ "internalType": "address",
192
+ "name": "token0",
193
+ "type": "address"
194
+ },
195
+ {
196
+ "internalType": "address",
197
+ "name": "token1",
198
+ "type": "address"
199
+ },
200
+ {
201
+ "internalType": "int24",
202
+ "name": "tickSpacing",
203
+ "type": "int24"
204
+ },
205
+ {
206
+ "internalType": "int24",
207
+ "name": "tickLower",
208
+ "type": "int24"
209
+ },
210
+ {
211
+ "internalType": "int24",
212
+ "name": "tickUpper",
213
+ "type": "int24"
214
+ },
215
+ {
216
+ "internalType": "uint256",
217
+ "name": "amount0Desired",
218
+ "type": "uint256"
219
+ },
220
+ {
221
+ "internalType": "uint256",
222
+ "name": "amount1Desired",
223
+ "type": "uint256"
224
+ },
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "amount0Min",
228
+ "type": "uint256"
229
+ },
230
+ {
231
+ "internalType": "uint256",
232
+ "name": "amount1Min",
233
+ "type": "uint256"
234
+ },
235
+ {
236
+ "internalType": "address",
237
+ "name": "recipient",
238
+ "type": "address"
239
+ },
240
+ {
241
+ "internalType": "uint256",
242
+ "name": "deadline",
243
+ "type": "uint256"
244
+ },
245
+ {
246
+ "internalType": "uint160",
247
+ "name": "sqrtPriceX96",
248
+ "type": "uint160"
249
+ }
250
+ ],
251
+ "internalType": "struct IVelodromeNonfungiblePositionManager.MintParams",
252
+ "name": "params",
253
+ "type": "tuple"
254
+ }
255
+ ],
256
+ "name": "mint",
257
+ "outputs": [
258
+ {
259
+ "internalType": "uint256",
260
+ "name": "tokenId",
261
+ "type": "uint256"
262
+ },
263
+ {
264
+ "internalType": "uint128",
265
+ "name": "liquidity",
266
+ "type": "uint128"
267
+ },
268
+ {
269
+ "internalType": "uint256",
270
+ "name": "amount0",
271
+ "type": "uint256"
272
+ },
273
+ {
274
+ "internalType": "uint256",
275
+ "name": "amount1",
276
+ "type": "uint256"
277
+ }
278
+ ],
279
+ "stateMutability": "payable",
280
+ "type": "function"
281
+ },
282
+ {
283
+ "inputs": [],
284
+ "name": "owner",
285
+ "outputs": [
286
+ {
287
+ "internalType": "address",
288
+ "name": "",
289
+ "type": "address"
290
+ }
291
+ ],
292
+ "stateMutability": "view",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [
297
+ {
298
+ "internalType": "uint256",
299
+ "name": "tokenId",
300
+ "type": "uint256"
301
+ }
302
+ ],
303
+ "name": "positions",
304
+ "outputs": [
305
+ {
306
+ "internalType": "uint96",
307
+ "name": "nonce",
308
+ "type": "uint96"
309
+ },
310
+ {
311
+ "internalType": "address",
312
+ "name": "operator",
313
+ "type": "address"
314
+ },
315
+ {
316
+ "internalType": "address",
317
+ "name": "token0",
318
+ "type": "address"
319
+ },
320
+ {
321
+ "internalType": "address",
322
+ "name": "token1",
323
+ "type": "address"
324
+ },
325
+ {
326
+ "internalType": "int24",
327
+ "name": "tickSpacing",
328
+ "type": "int24"
329
+ },
330
+ {
331
+ "internalType": "int24",
332
+ "name": "tickLower",
333
+ "type": "int24"
334
+ },
335
+ {
336
+ "internalType": "int24",
337
+ "name": "tickUpper",
338
+ "type": "int24"
339
+ },
340
+ {
341
+ "internalType": "uint128",
342
+ "name": "liquidity",
343
+ "type": "uint128"
344
+ },
345
+ {
346
+ "internalType": "uint256",
347
+ "name": "feeGrowthInside0LastX128",
348
+ "type": "uint256"
349
+ },
350
+ {
351
+ "internalType": "uint256",
352
+ "name": "feeGrowthInside1LastX128",
353
+ "type": "uint256"
354
+ },
355
+ {
356
+ "internalType": "uint128",
357
+ "name": "tokensOwed0",
358
+ "type": "uint128"
359
+ },
360
+ {
361
+ "internalType": "uint128",
362
+ "name": "tokensOwed1",
363
+ "type": "uint128"
364
+ }
365
+ ],
366
+ "stateMutability": "view",
367
+ "type": "function"
368
+ },
369
+ {
370
+ "inputs": [
371
+ {
372
+ "internalType": "address",
373
+ "name": "_owner",
374
+ "type": "address"
375
+ }
376
+ ],
377
+ "name": "setOwner",
378
+ "outputs": [],
379
+ "stateMutability": "nonpayable",
380
+ "type": "function"
381
+ },
382
+ {
383
+ "inputs": [
384
+ {
385
+ "internalType": "address",
386
+ "name": "_tokenDescriptor",
387
+ "type": "address"
388
+ }
389
+ ],
390
+ "name": "setTokenDescriptor",
391
+ "outputs": [],
392
+ "stateMutability": "nonpayable",
393
+ "type": "function"
394
+ },
395
+ {
396
+ "inputs": [],
397
+ "name": "tokenDescriptor",
398
+ "outputs": [
399
+ {
400
+ "internalType": "address",
401
+ "name": "",
402
+ "type": "address"
403
+ }
404
+ ],
405
+ "stateMutability": "view",
406
+ "type": "function"
407
+ }
408
+ ]}
package/src/config.ts CHANGED
@@ -77,7 +77,9 @@ export const stakingAddress: AddressDappNetworkMap = {
77
77
  [Dapp.AAVE]: "0x357D51124f59836DeD84c8a1730D72B749d8BC23",
78
78
  [Dapp.AAVEV3]: "0x929EC64c34a17401F460460D4B9390518E5B473e"
79
79
  },
80
- [Network.OPTIMISM]: {},
80
+ [Network.OPTIMISM]: {
81
+ [Dapp.AAVEV3]: "0x929EC64c34a17401F460460D4B9390518E5B473e"
82
+ },
81
83
  [Network.ARBITRUM]: {},
82
84
  [Network.BASE]: {}
83
85
  };
@@ -98,12 +100,20 @@ export const aaveAddressProvider: AddressDappNetworkMap = {
98
100
  [Dapp.AAVEV3]: "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D"
99
101
  }
100
102
  };
101
- export const nonfungiblePositionManagerAddress: AddressNetworkMap = {
102
- [Network.POLYGON]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88",
103
- [Network.OPTIMISM]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88",
104
- [Network.ARBITRUM]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88",
105
- // https://docs.uniswap.org/contracts/v3/reference/deployments
106
- [Network.BASE]: "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1"
103
+ export const nonfungiblePositionManagerAddress: AddressDappNetworkMap = {
104
+ [Network.POLYGON]: {
105
+ [Dapp.UNISWAPV3]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
106
+ },
107
+ [Network.OPTIMISM]: {
108
+ [Dapp.UNISWAPV3]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88",
109
+ [Dapp.VELODROMECL]: "0xbb5dfe1380333cee4c2eebd7202c80de2256adf4"
110
+ },
111
+ [Network.ARBITRUM]: {
112
+ [Dapp.UNISWAPV3]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
113
+ },
114
+ [Network.BASE]: {
115
+ [Dapp.UNISWAPV3]: "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1"
116
+ }
107
117
  };
108
118
 
109
119
  export const networkChainIdMap: NetworkChainIdMap = {