damm-sdk 1.4.38 → 1.4.39

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.
@@ -1,10 +1,130 @@
1
1
  /**
2
- * Pendle Router V4 ABI (ActionMiscV3 facet V1 reward claiming only).
2
+ * Pendle Router V4 ABI — full scoped function set.
3
3
  *
4
- * We only include redeemDueInterestAndRewards (V1) not V2 which adds
5
- * swap parameters we don't want to permit.
4
+ * The router is a diamond proxy (EIP-2535 style): the proxy address
5
+ * (0x8888...F946) holds all funds; facets are pure logic contracts.
6
+ * This ABI covers every function in the no-aggregator / no-limit-order
7
+ * scope (ADR-0001). Excluded: multicall, callAndReflect, swapCallback,
8
+ * limitRouterCallback, swapTokensToTokens, redeemDueInterestAndRewardsV2,
9
+ * setSelectorToFacets, simulate, swapExactPtForYt, swapExactYtForPt
10
+ * (PT↔YT are not real router functions — absent from source + selectorToFacet
11
+ * returns 0x0 on the Monad router) — see ADR-0001.
12
+ *
13
+ * Struct encoding (all as ABI tuples):
14
+ * SwapData = (uint8 swapType, address extRouter, bytes extCalldata, bool needScale)
15
+ * TokenInput = (address tokenIn, uint256 netTokenIn, address tokenMintSy, address pendleSwap, SwapData swapData)
16
+ * TokenOutput = (address tokenOut, uint256 minTokenOut, address tokenRedeemSy, address pendleSwap, SwapData swapData)
17
+ * ApproxParams = (uint256 guessMin, uint256 guessMax, uint256 guessOffchain, uint256 maxIteration, uint256 eps)
18
+ * Order = (uint256 salt, uint256 expiry, uint256 nonce, uint8 orderType, address token, address YT, address maker, address receiver, uint256 makingAmount, uint256 lnImpliedRate, uint256 failSafeRate, bytes permit)
19
+ * FillOrderParams = (Order order, bytes signature, uint256 makingAmount)
20
+ * LimitOrderData = (address limitRouter, uint256 epsSkipMarket, FillOrderParams[] normalFills, FillOrderParams[] flashFills, bytes optData)
21
+ *
22
+ * Verified against pendle-core-v2-public source + Monad deployment 143-core.json (2026-06-29).
23
+ * Source: contracts/router/ActionBase.sol, IPAllActionTypeV3.sol, IPSwapAggregator.sol
6
24
  */
25
+
26
+ // ---------------------------------------------------------------------------
27
+ // Shared struct components — named for readability; referenced inline below
28
+ // ---------------------------------------------------------------------------
29
+
30
+ const swapDataComponents = [
31
+ { internalType: "enum SwapType", name: "swapType", type: "uint8" },
32
+ { internalType: "address", name: "extRouter", type: "address" },
33
+ { internalType: "bytes", name: "extCalldata", type: "bytes" },
34
+ { internalType: "bool", name: "needScale", type: "bool" },
35
+ ] as const;
36
+
37
+ const tokenInputComponents = [
38
+ { internalType: "address", name: "tokenIn", type: "address" },
39
+ { internalType: "uint256", name: "netTokenIn", type: "uint256" },
40
+ { internalType: "address", name: "tokenMintSy", type: "address" },
41
+ { internalType: "address", name: "pendleSwap", type: "address" },
42
+ {
43
+ internalType: "struct SwapData",
44
+ name: "swapData",
45
+ type: "tuple",
46
+ components: swapDataComponents,
47
+ },
48
+ ] as const;
49
+
50
+ const tokenOutputComponents = [
51
+ { internalType: "address", name: "tokenOut", type: "address" },
52
+ { internalType: "uint256", name: "minTokenOut", type: "uint256" },
53
+ { internalType: "address", name: "tokenRedeemSy", type: "address" },
54
+ { internalType: "address", name: "pendleSwap", type: "address" },
55
+ {
56
+ internalType: "struct SwapData",
57
+ name: "swapData",
58
+ type: "tuple",
59
+ components: swapDataComponents,
60
+ },
61
+ ] as const;
62
+
63
+ const approxParamsComponents = [
64
+ { internalType: "uint256", name: "guessMin", type: "uint256" },
65
+ { internalType: "uint256", name: "guessMax", type: "uint256" },
66
+ { internalType: "uint256", name: "guessOffchain", type: "uint256" },
67
+ { internalType: "uint256", name: "maxIteration", type: "uint256" },
68
+ { internalType: "uint256", name: "eps", type: "uint256" },
69
+ ] as const;
70
+
71
+ const orderComponents = [
72
+ { internalType: "uint256", name: "salt", type: "uint256" },
73
+ { internalType: "uint256", name: "expiry", type: "uint256" },
74
+ { internalType: "uint256", name: "nonce", type: "uint256" },
75
+ { internalType: "enum OrderType", name: "orderType", type: "uint8" },
76
+ { internalType: "address", name: "token", type: "address" },
77
+ { internalType: "address", name: "YT", type: "address" },
78
+ { internalType: "address", name: "maker", type: "address" },
79
+ { internalType: "address", name: "receiver", type: "address" },
80
+ { internalType: "uint256", name: "makingAmount", type: "uint256" },
81
+ { internalType: "uint256", name: "lnImpliedRate", type: "uint256" },
82
+ { internalType: "uint256", name: "failSafeRate", type: "uint256" },
83
+ { internalType: "bytes", name: "permit", type: "bytes" },
84
+ ] as const;
85
+
86
+ const fillOrderParamsComponents = [
87
+ {
88
+ internalType: "struct Order",
89
+ name: "order",
90
+ type: "tuple",
91
+ components: orderComponents,
92
+ },
93
+ { internalType: "bytes", name: "signature", type: "bytes" },
94
+ { internalType: "uint256", name: "makingAmount", type: "uint256" },
95
+ ] as const;
96
+
97
+ const limitOrderDataComponents = [
98
+ { internalType: "address", name: "limitRouter", type: "address" },
99
+ { internalType: "uint256", name: "epsSkipMarket", type: "uint256" },
100
+ {
101
+ internalType: "struct FillOrderParams[]",
102
+ name: "normalFills",
103
+ type: "tuple[]",
104
+ components: fillOrderParamsComponents,
105
+ },
106
+ {
107
+ internalType: "struct FillOrderParams[]",
108
+ name: "flashFills",
109
+ type: "tuple[]",
110
+ components: fillOrderParamsComponents,
111
+ },
112
+ { internalType: "bytes", name: "optData", type: "bytes" },
113
+ ] as const;
114
+
115
+ // ---------------------------------------------------------------------------
116
+ // ABI entries
117
+ // ---------------------------------------------------------------------------
118
+
7
119
  export default [
120
+ // =========================================================================
121
+ // ActionMiscV3 — SY wrap / PY mint-redeem / V1 reward claiming
122
+ // =========================================================================
123
+
124
+ /**
125
+ * redeemDueInterestAndRewards (V1) — no swap params; safe to scope as-is.
126
+ * Retained from the original minimal ABI for backward compatibility.
127
+ */
8
128
  {
9
129
  inputs: [
10
130
  { internalType: "address", name: "user", type: "address" },
@@ -17,4 +137,677 @@ export default [
17
137
  stateMutability: "nonpayable",
18
138
  type: "function",
19
139
  },
140
+
141
+ /** mintSyFromToken — wraps a SY-native token into SY. Pin pendleSwap=0, swapType=NONE for no-aggregator path. */
142
+ {
143
+ inputs: [
144
+ { internalType: "address", name: "receiver", type: "address" },
145
+ { internalType: "address", name: "SY", type: "address" },
146
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
147
+ {
148
+ internalType: "struct TokenInput",
149
+ name: "input",
150
+ type: "tuple",
151
+ components: tokenInputComponents,
152
+ },
153
+ ],
154
+ name: "mintSyFromToken",
155
+ outputs: [{ internalType: "uint256", name: "netSyOut", type: "uint256" }],
156
+ stateMutability: "payable",
157
+ type: "function",
158
+ },
159
+
160
+ /** redeemSyToToken — unwraps SY back to a token. Pin pendleSwap=0, swapType=NONE for no-aggregator path. */
161
+ {
162
+ inputs: [
163
+ { internalType: "address", name: "receiver", type: "address" },
164
+ { internalType: "address", name: "SY", type: "address" },
165
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
166
+ {
167
+ internalType: "struct TokenOutput",
168
+ name: "output",
169
+ type: "tuple",
170
+ components: tokenOutputComponents,
171
+ },
172
+ ],
173
+ name: "redeemSyToToken",
174
+ outputs: [{ internalType: "uint256", name: "netTokenOut", type: "uint256" }],
175
+ stateMutability: "nonpayable",
176
+ type: "function",
177
+ },
178
+
179
+ /** mintPyFromToken — mints PT+YT from a token via SY. Pin pendleSwap=0, swapType=NONE. */
180
+ {
181
+ inputs: [
182
+ { internalType: "address", name: "receiver", type: "address" },
183
+ { internalType: "address", name: "YT", type: "address" },
184
+ { internalType: "uint256", name: "minPyOut", type: "uint256" },
185
+ {
186
+ internalType: "struct TokenInput",
187
+ name: "input",
188
+ type: "tuple",
189
+ components: tokenInputComponents,
190
+ },
191
+ ],
192
+ name: "mintPyFromToken",
193
+ outputs: [
194
+ { internalType: "uint256", name: "netPyOut", type: "uint256" },
195
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
196
+ ],
197
+ stateMutability: "payable",
198
+ type: "function",
199
+ },
200
+
201
+ /** redeemPyToToken — redeems PT+YT to a token. Pin pendleSwap=0, swapType=NONE. */
202
+ {
203
+ inputs: [
204
+ { internalType: "address", name: "receiver", type: "address" },
205
+ { internalType: "address", name: "YT", type: "address" },
206
+ { internalType: "uint256", name: "netPyIn", type: "uint256" },
207
+ {
208
+ internalType: "struct TokenOutput",
209
+ name: "output",
210
+ type: "tuple",
211
+ components: tokenOutputComponents,
212
+ },
213
+ ],
214
+ name: "redeemPyToToken",
215
+ outputs: [
216
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
217
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
218
+ ],
219
+ stateMutability: "nonpayable",
220
+ type: "function",
221
+ },
222
+
223
+ /** mintPyFromSy — mints PT+YT directly from SY. No aggregator struct at all. */
224
+ {
225
+ inputs: [
226
+ { internalType: "address", name: "receiver", type: "address" },
227
+ { internalType: "address", name: "YT", type: "address" },
228
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
229
+ { internalType: "uint256", name: "minPyOut", type: "uint256" },
230
+ ],
231
+ name: "mintPyFromSy",
232
+ outputs: [{ internalType: "uint256", name: "netPyOut", type: "uint256" }],
233
+ stateMutability: "nonpayable",
234
+ type: "function",
235
+ },
236
+
237
+ /** redeemPyToSy — redeems PT+YT back to SY. No aggregator struct at all. */
238
+ {
239
+ inputs: [
240
+ { internalType: "address", name: "receiver", type: "address" },
241
+ { internalType: "address", name: "YT", type: "address" },
242
+ { internalType: "uint256", name: "netPyIn", type: "uint256" },
243
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
244
+ ],
245
+ name: "redeemPyToSy",
246
+ outputs: [{ internalType: "uint256", name: "netSyOut", type: "uint256" }],
247
+ stateMutability: "nonpayable",
248
+ type: "function",
249
+ },
250
+
251
+ // =========================================================================
252
+ // ActionSwapPTV3 — PT swaps
253
+ // =========================================================================
254
+
255
+ /** swapExactTokenForPt — token to PT via SY. Pin pendleSwap=0/swapType=NONE, limitRouter=0. */
256
+ {
257
+ inputs: [
258
+ { internalType: "address", name: "receiver", type: "address" },
259
+ { internalType: "address", name: "market", type: "address" },
260
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
261
+ {
262
+ internalType: "struct ApproxParams",
263
+ name: "guess",
264
+ type: "tuple",
265
+ components: approxParamsComponents,
266
+ },
267
+ {
268
+ internalType: "struct TokenInput",
269
+ name: "input",
270
+ type: "tuple",
271
+ components: tokenInputComponents,
272
+ },
273
+ {
274
+ internalType: "struct LimitOrderData",
275
+ name: "limit",
276
+ type: "tuple",
277
+ components: limitOrderDataComponents,
278
+ },
279
+ ],
280
+ name: "swapExactTokenForPt",
281
+ outputs: [
282
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
283
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
284
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
285
+ ],
286
+ stateMutability: "payable",
287
+ type: "function",
288
+ },
289
+
290
+ /** swapExactSyForPt — SY to PT. No aggregator struct. Pin limitRouter=0. */
291
+ {
292
+ inputs: [
293
+ { internalType: "address", name: "receiver", type: "address" },
294
+ { internalType: "address", name: "market", type: "address" },
295
+ { internalType: "uint256", name: "exactSyIn", type: "uint256" },
296
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
297
+ {
298
+ internalType: "struct ApproxParams",
299
+ name: "guess",
300
+ type: "tuple",
301
+ components: approxParamsComponents,
302
+ },
303
+ {
304
+ internalType: "struct LimitOrderData",
305
+ name: "limit",
306
+ type: "tuple",
307
+ components: limitOrderDataComponents,
308
+ },
309
+ ],
310
+ name: "swapExactSyForPt",
311
+ outputs: [
312
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
313
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
314
+ ],
315
+ stateMutability: "nonpayable",
316
+ type: "function",
317
+ },
318
+
319
+ /** swapExactPtForToken — PT to token via SY. Pin pendleSwap=0/swapType=NONE, limitRouter=0. */
320
+ {
321
+ inputs: [
322
+ { internalType: "address", name: "receiver", type: "address" },
323
+ { internalType: "address", name: "market", type: "address" },
324
+ { internalType: "uint256", name: "exactPtIn", type: "uint256" },
325
+ {
326
+ internalType: "struct TokenOutput",
327
+ name: "output",
328
+ type: "tuple",
329
+ components: tokenOutputComponents,
330
+ },
331
+ {
332
+ internalType: "struct LimitOrderData",
333
+ name: "limit",
334
+ type: "tuple",
335
+ components: limitOrderDataComponents,
336
+ },
337
+ ],
338
+ name: "swapExactPtForToken",
339
+ outputs: [
340
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
341
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
342
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
343
+ ],
344
+ stateMutability: "nonpayable",
345
+ type: "function",
346
+ },
347
+
348
+ /** swapExactPtForSy — PT to SY. No aggregator struct. Pin limitRouter=0. */
349
+ {
350
+ inputs: [
351
+ { internalType: "address", name: "receiver", type: "address" },
352
+ { internalType: "address", name: "market", type: "address" },
353
+ { internalType: "uint256", name: "exactPtIn", type: "uint256" },
354
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
355
+ {
356
+ internalType: "struct LimitOrderData",
357
+ name: "limit",
358
+ type: "tuple",
359
+ components: limitOrderDataComponents,
360
+ },
361
+ ],
362
+ name: "swapExactPtForSy",
363
+ outputs: [
364
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
365
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
366
+ ],
367
+ stateMutability: "nonpayable",
368
+ type: "function",
369
+ },
370
+
371
+ // =========================================================================
372
+ // ActionSwapYTV3 — YT swaps
373
+ // =========================================================================
374
+
375
+ /** swapExactTokenForYt — token to YT via SY. Pin pendleSwap=0/swapType=NONE, limitRouter=0. */
376
+ {
377
+ inputs: [
378
+ { internalType: "address", name: "receiver", type: "address" },
379
+ { internalType: "address", name: "market", type: "address" },
380
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
381
+ {
382
+ internalType: "struct ApproxParams",
383
+ name: "guess",
384
+ type: "tuple",
385
+ components: approxParamsComponents,
386
+ },
387
+ {
388
+ internalType: "struct TokenInput",
389
+ name: "input",
390
+ type: "tuple",
391
+ components: tokenInputComponents,
392
+ },
393
+ {
394
+ internalType: "struct LimitOrderData",
395
+ name: "limit",
396
+ type: "tuple",
397
+ components: limitOrderDataComponents,
398
+ },
399
+ ],
400
+ name: "swapExactTokenForYt",
401
+ outputs: [
402
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
403
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
404
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
405
+ ],
406
+ stateMutability: "payable",
407
+ type: "function",
408
+ },
409
+
410
+ /** swapExactSyForYt — SY to YT. No aggregator struct. Pin limitRouter=0. */
411
+ {
412
+ inputs: [
413
+ { internalType: "address", name: "receiver", type: "address" },
414
+ { internalType: "address", name: "market", type: "address" },
415
+ { internalType: "uint256", name: "exactSyIn", type: "uint256" },
416
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
417
+ {
418
+ internalType: "struct ApproxParams",
419
+ name: "guess",
420
+ type: "tuple",
421
+ components: approxParamsComponents,
422
+ },
423
+ {
424
+ internalType: "struct LimitOrderData",
425
+ name: "limit",
426
+ type: "tuple",
427
+ components: limitOrderDataComponents,
428
+ },
429
+ ],
430
+ name: "swapExactSyForYt",
431
+ outputs: [
432
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
433
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
434
+ ],
435
+ stateMutability: "nonpayable",
436
+ type: "function",
437
+ },
438
+
439
+ /** swapExactYtForToken — YT to token via SY. Pin pendleSwap=0/swapType=NONE, limitRouter=0. */
440
+ {
441
+ inputs: [
442
+ { internalType: "address", name: "receiver", type: "address" },
443
+ { internalType: "address", name: "market", type: "address" },
444
+ { internalType: "uint256", name: "exactYtIn", type: "uint256" },
445
+ {
446
+ internalType: "struct TokenOutput",
447
+ name: "output",
448
+ type: "tuple",
449
+ components: tokenOutputComponents,
450
+ },
451
+ {
452
+ internalType: "struct LimitOrderData",
453
+ name: "limit",
454
+ type: "tuple",
455
+ components: limitOrderDataComponents,
456
+ },
457
+ ],
458
+ name: "swapExactYtForToken",
459
+ outputs: [
460
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
461
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
462
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
463
+ ],
464
+ stateMutability: "nonpayable",
465
+ type: "function",
466
+ },
467
+
468
+ /** swapExactYtForSy — YT to SY. No aggregator struct. Pin limitRouter=0. */
469
+ {
470
+ inputs: [
471
+ { internalType: "address", name: "receiver", type: "address" },
472
+ { internalType: "address", name: "market", type: "address" },
473
+ { internalType: "uint256", name: "exactYtIn", type: "uint256" },
474
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
475
+ {
476
+ internalType: "struct LimitOrderData",
477
+ name: "limit",
478
+ type: "tuple",
479
+ components: limitOrderDataComponents,
480
+ },
481
+ ],
482
+ name: "swapExactYtForSy",
483
+ outputs: [
484
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
485
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
486
+ ],
487
+ stateMutability: "nonpayable",
488
+ type: "function",
489
+ },
490
+
491
+ // =========================================================================
492
+ // ActionAddRemoveLiqV3 — add liquidity
493
+ // =========================================================================
494
+
495
+ /** addLiquiditySingleToken — token to LP. Pin pendleSwap=0/swapType=NONE, limitRouter=0. */
496
+ {
497
+ inputs: [
498
+ { internalType: "address", name: "receiver", type: "address" },
499
+ { internalType: "address", name: "market", type: "address" },
500
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
501
+ {
502
+ internalType: "struct ApproxParams",
503
+ name: "guess",
504
+ type: "tuple",
505
+ components: approxParamsComponents,
506
+ },
507
+ {
508
+ internalType: "struct TokenInput",
509
+ name: "input",
510
+ type: "tuple",
511
+ components: tokenInputComponents,
512
+ },
513
+ {
514
+ internalType: "struct LimitOrderData",
515
+ name: "limit",
516
+ type: "tuple",
517
+ components: limitOrderDataComponents,
518
+ },
519
+ ],
520
+ name: "addLiquiditySingleToken",
521
+ outputs: [
522
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
523
+ { internalType: "uint256", name: "netPtFromSwap", type: "uint256" },
524
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
525
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
526
+ ],
527
+ stateMutability: "payable",
528
+ type: "function",
529
+ },
530
+
531
+ /** addLiquiditySingleSy — SY to LP. No aggregator struct. Pin limitRouter=0. */
532
+ {
533
+ inputs: [
534
+ { internalType: "address", name: "receiver", type: "address" },
535
+ { internalType: "address", name: "market", type: "address" },
536
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
537
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
538
+ {
539
+ internalType: "struct ApproxParams",
540
+ name: "guess",
541
+ type: "tuple",
542
+ components: approxParamsComponents,
543
+ },
544
+ {
545
+ internalType: "struct LimitOrderData",
546
+ name: "limit",
547
+ type: "tuple",
548
+ components: limitOrderDataComponents,
549
+ },
550
+ ],
551
+ name: "addLiquiditySingleSy",
552
+ outputs: [
553
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
554
+ { internalType: "uint256", name: "netPtFromSwap", type: "uint256" },
555
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
556
+ ],
557
+ stateMutability: "nonpayable",
558
+ type: "function",
559
+ },
560
+
561
+ /** addLiquiditySinglePt — PT to LP. No aggregator struct. Pin limitRouter=0. */
562
+ {
563
+ inputs: [
564
+ { internalType: "address", name: "receiver", type: "address" },
565
+ { internalType: "address", name: "market", type: "address" },
566
+ { internalType: "uint256", name: "netPtIn", type: "uint256" },
567
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
568
+ {
569
+ internalType: "struct ApproxParams",
570
+ name: "guess",
571
+ type: "tuple",
572
+ components: approxParamsComponents,
573
+ },
574
+ {
575
+ internalType: "struct LimitOrderData",
576
+ name: "limit",
577
+ type: "tuple",
578
+ components: limitOrderDataComponents,
579
+ },
580
+ ],
581
+ name: "addLiquiditySinglePt",
582
+ outputs: [
583
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
584
+ { internalType: "uint256", name: "netSyFromSwap", type: "uint256" },
585
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
586
+ ],
587
+ stateMutability: "nonpayable",
588
+ type: "function",
589
+ },
590
+
591
+ /**
592
+ * addLiquiditySingleTokenKeepYt — ZPI mode: token to LP + YT.
593
+ * Mints PT+YT from SY (off-curve), adds PT+SY as LP, returns YT to receiver.
594
+ * Pin pendleSwap=0/swapType=NONE in TokenInput. No LimitOrderData param.
595
+ */
596
+ {
597
+ inputs: [
598
+ { internalType: "address", name: "receiver", type: "address" },
599
+ { internalType: "address", name: "market", type: "address" },
600
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
601
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
602
+ {
603
+ internalType: "struct TokenInput",
604
+ name: "input",
605
+ type: "tuple",
606
+ components: tokenInputComponents,
607
+ },
608
+ ],
609
+ name: "addLiquiditySingleTokenKeepYt",
610
+ outputs: [
611
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
612
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
613
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
614
+ ],
615
+ stateMutability: "payable",
616
+ type: "function",
617
+ },
618
+
619
+ /**
620
+ * addLiquiditySingleSyKeepYt — ZPI mode: SY to LP + YT.
621
+ * The cleanest ZPI scope target: no aggregator struct, no LimitOrderData at all.
622
+ * Signal to Hosted API: outputs=[market(LP), YT].
623
+ */
624
+ {
625
+ inputs: [
626
+ { internalType: "address", name: "receiver", type: "address" },
627
+ { internalType: "address", name: "market", type: "address" },
628
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
629
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
630
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
631
+ ],
632
+ name: "addLiquiditySingleSyKeepYt",
633
+ outputs: [
634
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
635
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
636
+ ],
637
+ stateMutability: "nonpayable",
638
+ type: "function",
639
+ },
640
+
641
+ /** addLiquidityDualTokenAndPt — token + PT to LP. Pin pendleSwap=0/swapType=NONE in TokenInput. */
642
+ {
643
+ inputs: [
644
+ { internalType: "address", name: "receiver", type: "address" },
645
+ { internalType: "address", name: "market", type: "address" },
646
+ {
647
+ internalType: "struct TokenInput",
648
+ name: "input",
649
+ type: "tuple",
650
+ components: tokenInputComponents,
651
+ },
652
+ { internalType: "uint256", name: "netPtDesired", type: "uint256" },
653
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
654
+ ],
655
+ name: "addLiquidityDualTokenAndPt",
656
+ outputs: [
657
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
658
+ { internalType: "uint256", name: "netSyUsed", type: "uint256" },
659
+ { internalType: "uint256", name: "netPtUsed", type: "uint256" },
660
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
661
+ ],
662
+ stateMutability: "payable",
663
+ type: "function",
664
+ },
665
+
666
+ /** addLiquidityDualSyAndPt — SY + PT to LP. No aggregator struct at all. */
667
+ {
668
+ inputs: [
669
+ { internalType: "address", name: "receiver", type: "address" },
670
+ { internalType: "address", name: "market", type: "address" },
671
+ { internalType: "uint256", name: "netSyDesired", type: "uint256" },
672
+ { internalType: "uint256", name: "netPtDesired", type: "uint256" },
673
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
674
+ ],
675
+ name: "addLiquidityDualSyAndPt",
676
+ outputs: [
677
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
678
+ { internalType: "uint256", name: "netSyUsed", type: "uint256" },
679
+ { internalType: "uint256", name: "netPtUsed", type: "uint256" },
680
+ ],
681
+ stateMutability: "nonpayable",
682
+ type: "function",
683
+ },
684
+
685
+ // =========================================================================
686
+ // ActionAddRemoveLiqV3 — remove liquidity
687
+ // =========================================================================
688
+
689
+ /** removeLiquiditySingleToken — LP to token via SY. Pin pendleSwap=0/swapType=NONE, limitRouter=0. */
690
+ {
691
+ inputs: [
692
+ { internalType: "address", name: "receiver", type: "address" },
693
+ { internalType: "address", name: "market", type: "address" },
694
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
695
+ {
696
+ internalType: "struct TokenOutput",
697
+ name: "output",
698
+ type: "tuple",
699
+ components: tokenOutputComponents,
700
+ },
701
+ {
702
+ internalType: "struct LimitOrderData",
703
+ name: "limit",
704
+ type: "tuple",
705
+ components: limitOrderDataComponents,
706
+ },
707
+ ],
708
+ name: "removeLiquiditySingleToken",
709
+ outputs: [
710
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
711
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
712
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
713
+ ],
714
+ stateMutability: "nonpayable",
715
+ type: "function",
716
+ },
717
+
718
+ /** removeLiquiditySingleSy — LP to SY. No aggregator struct. Pin limitRouter=0. */
719
+ {
720
+ inputs: [
721
+ { internalType: "address", name: "receiver", type: "address" },
722
+ { internalType: "address", name: "market", type: "address" },
723
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
724
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
725
+ {
726
+ internalType: "struct LimitOrderData",
727
+ name: "limit",
728
+ type: "tuple",
729
+ components: limitOrderDataComponents,
730
+ },
731
+ ],
732
+ name: "removeLiquiditySingleSy",
733
+ outputs: [
734
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
735
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
736
+ ],
737
+ stateMutability: "nonpayable",
738
+ type: "function",
739
+ },
740
+
741
+ /** removeLiquiditySinglePt — LP to PT. No aggregator struct. Pin limitRouter=0. */
742
+ {
743
+ inputs: [
744
+ { internalType: "address", name: "receiver", type: "address" },
745
+ { internalType: "address", name: "market", type: "address" },
746
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
747
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
748
+ {
749
+ internalType: "struct ApproxParams",
750
+ name: "guess",
751
+ type: "tuple",
752
+ components: approxParamsComponents,
753
+ },
754
+ {
755
+ internalType: "struct LimitOrderData",
756
+ name: "limit",
757
+ type: "tuple",
758
+ components: limitOrderDataComponents,
759
+ },
760
+ ],
761
+ name: "removeLiquiditySinglePt",
762
+ outputs: [
763
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
764
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
765
+ ],
766
+ stateMutability: "nonpayable",
767
+ type: "function",
768
+ },
769
+
770
+ /** removeLiquidityDualTokenAndPt — LP to token + PT. Pin pendleSwap=0/swapType=NONE. */
771
+ {
772
+ inputs: [
773
+ { internalType: "address", name: "receiver", type: "address" },
774
+ { internalType: "address", name: "market", type: "address" },
775
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
776
+ {
777
+ internalType: "struct TokenOutput",
778
+ name: "output",
779
+ type: "tuple",
780
+ components: tokenOutputComponents,
781
+ },
782
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
783
+ ],
784
+ name: "removeLiquidityDualTokenAndPt",
785
+ outputs: [
786
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
787
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
788
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
789
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" },
790
+ ],
791
+ stateMutability: "nonpayable",
792
+ type: "function",
793
+ },
794
+
795
+ /** removeLiquidityDualSyAndPt — LP to SY + PT. No aggregator struct at all. */
796
+ {
797
+ inputs: [
798
+ { internalType: "address", name: "receiver", type: "address" },
799
+ { internalType: "address", name: "market", type: "address" },
800
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
801
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
802
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
803
+ ],
804
+ name: "removeLiquidityDualSyAndPt",
805
+ outputs: [
806
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
807
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
808
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
809
+ ],
810
+ stateMutability: "nonpayable",
811
+ type: "function",
812
+ },
20
813
  ] as const;