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.
package/dist/index.js CHANGED
@@ -55136,9 +55136,22 @@ var contractsRegistry_default = {
55136
55136
  withdrawManager: "0x14dd163386553b23267c097dbde868559b9bcbd2"
55137
55137
  },
55138
55138
  pendle: {
55139
- routerV4: "0x888888888889758f76e7103c6cbf23abbf58f946",
55139
+ routerV4: "0x888888888889758F76e7103c6CbF23ABbF58F946",
55140
+ routerV4ActionSwapPTV3: "0xd8D200d9A713A1c71cF1e7F694B14E5F1D948b15",
55141
+ routerV4ActionSwapYTV3: "0x4a03Ce0a268951d04E187B1CF48075eE69266e27",
55142
+ routerV4ActionAddRemoveLiqV3: "0x663C21103915B68e9dA797CfdF3cAb01a037D5Ff",
55143
+ routerV4ActionMiscV3: "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
55140
55144
  routerV4ActionMisc: "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
55141
- merkleDistributor: "0x33305665f69b4642d1275f4ce81c23651674d21c"
55145
+ limitRouter: "0x000000000000c9B3E2C3Ec88B1B4c0cD853f4321",
55146
+ pendleSwap: "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
55147
+ merkleDistributor: "0x33305665f69B4642D1275f4Ce81c23651674D21C",
55148
+ markets: {
55149
+ usdat: "0x9aFe7a057A09cF5da748d952078C9C99938b4329",
55150
+ usdatPT: "0x1D69402390657308C91179aa184bF992908c1e08",
55151
+ usdatSY: "0x7a7dE491e1BE5287874904e2b7c8488249A4D0a9",
55152
+ usdatYT: "0x076A3ea71e83Ca09319B161E40F5FB3BB943d3C6",
55153
+ usdatUnderlying: "0x23238f20b894f29041f48D88eE91131C395Aaa71"
55154
+ }
55142
55155
  }
55143
55156
  },
55144
55157
  unichain: {
@@ -55474,6 +55487,23 @@ var contractsRegistry_default = {
55474
55487
  },
55475
55488
  enso: {
55476
55489
  routerV2: "0xCfBAa9Cfce952Ca4F4069874fF1Df8c05e37a3c7"
55490
+ },
55491
+ pendle: {
55492
+ routerV4: "0x888888888889758F76e7103c6CbF23ABbF58F946",
55493
+ routerV4ActionSwapPTV3: "0xbb0Dd79794e58795b08b599297ec55a6Afb6AB58",
55494
+ routerV4ActionSwapYTV3: "0x171B480B1A2ebc1acE52e46E0Bd73e7E08413ec2",
55495
+ routerV4ActionAddRemoveLiqV3: "0x2fb6d0753602Bf397fcE38Ec8Ee3a811cA07B3FD",
55496
+ routerV4ActionMiscV3: "0xac1700293346b0bEFC71bCB7E14Bf1c38a5c2a97",
55497
+ limitRouter: "0x000000000000c9B3E2C3Ec88B1B4c0cD853f4321",
55498
+ pendleSwap: "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
55499
+ merkleDistributor: "0x33305665f69B4642D1275f4Ce81c23651674D21C",
55500
+ markets: {
55501
+ ausd: "0x6f99CF00ee7290aE78a072Bb6910eF72D1129fE7",
55502
+ ausdPT: "0x9FC74f8Ed616B5BaF52a170caa97d6d3898602d1",
55503
+ ausdSY: "0xBA3d60f5000f472aef947FB8020a3E6319F9a0B7",
55504
+ ausdYT: "0xEdDeE9C0B56248d70A9BFdD103f8bD97C35DfD89",
55505
+ ausdUnderlying: "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a"
55506
+ }
55477
55507
  }
55478
55508
  },
55479
55509
  plasma: {
@@ -79033,7 +79063,7 @@ var vault_abi_default2 = [
79033
79063
  name: "settleDeposit",
79034
79064
  inputs: [
79035
79065
  {
79036
- name: "epoch",
79066
+ name: "newTotalAssets",
79037
79067
  type: "uint256",
79038
79068
  internalType: "uint256"
79039
79069
  }
@@ -79046,7 +79076,7 @@ var vault_abi_default2 = [
79046
79076
  name: "settleRedeem",
79047
79077
  inputs: [
79048
79078
  {
79049
- name: "epoch",
79079
+ name: "newTotalAssets",
79050
79080
  type: "uint256",
79051
79081
  internalType: "uint256"
79052
79082
  }
@@ -79448,34 +79478,56 @@ function validateLagoonV2Rates(rates) {
79448
79478
  throw new Error(`haircutRate ${rates.haircutRate} exceeds max 2000 bps (20%)`);
79449
79479
  }
79450
79480
  }
79451
- var LagoonV2SettleDepositCalldata = ({ epoch }) => {
79481
+ var LagoonV2SettleDepositCalldata = ({
79482
+ newTotalAssets,
79483
+ epoch
79484
+ }) => {
79485
+ const nav = newTotalAssets ?? epoch;
79486
+ if (nav === undefined) {
79487
+ throw new Error("LagoonV2SettleDepositCalldata: `newTotalAssets` is required");
79488
+ }
79452
79489
  return encodeFunctionData({
79453
79490
  abi: vault_abi_default2,
79454
79491
  functionName: "settleDeposit",
79455
- args: [epoch]
79492
+ args: [nav]
79456
79493
  });
79457
79494
  };
79458
- var lagoonV2SettleDepositTrx = ({ vault, epoch }) => {
79495
+ var lagoonV2SettleDepositTrx = ({
79496
+ vault,
79497
+ newTotalAssets,
79498
+ epoch
79499
+ }) => {
79459
79500
  return createCall({
79460
79501
  operation: 0,
79461
79502
  to: vault,
79462
79503
  value: 0n,
79463
- data: LagoonV2SettleDepositCalldata({ epoch })
79504
+ data: LagoonV2SettleDepositCalldata({ newTotalAssets, epoch })
79464
79505
  });
79465
79506
  };
79466
- var LagoonV2SettleRedeemCalldata = ({ epoch }) => {
79507
+ var LagoonV2SettleRedeemCalldata = ({
79508
+ newTotalAssets,
79509
+ epoch
79510
+ }) => {
79511
+ const nav = newTotalAssets ?? epoch;
79512
+ if (nav === undefined) {
79513
+ throw new Error("LagoonV2SettleRedeemCalldata: `newTotalAssets` is required");
79514
+ }
79467
79515
  return encodeFunctionData({
79468
79516
  abi: vault_abi_default2,
79469
79517
  functionName: "settleRedeem",
79470
- args: [epoch]
79518
+ args: [nav]
79471
79519
  });
79472
79520
  };
79473
- var lagoonV2SettleRedeemTrx = ({ vault, epoch }) => {
79521
+ var lagoonV2SettleRedeemTrx = ({
79522
+ vault,
79523
+ newTotalAssets,
79524
+ epoch
79525
+ }) => {
79474
79526
  return createCall({
79475
79527
  operation: 0,
79476
79528
  to: vault,
79477
79529
  value: 0n,
79478
- data: LagoonV2SettleRedeemCalldata({ epoch })
79530
+ data: LagoonV2SettleRedeemCalldata({ newTotalAssets, epoch })
79479
79531
  });
79480
79532
  };
79481
79533
  var LagoonV2UpdateNewTotalAssetsCalldata = ({ newTotalAssets }) => {
@@ -104211,6 +104263,84 @@ var unwrapWethTrx = ({ weth, amount }) => {
104211
104263
  });
104212
104264
  };
104213
104265
  // src/integrations/pendle/pendle.router.abi.ts
104266
+ var swapDataComponents = [
104267
+ { internalType: "enum SwapType", name: "swapType", type: "uint8" },
104268
+ { internalType: "address", name: "extRouter", type: "address" },
104269
+ { internalType: "bytes", name: "extCalldata", type: "bytes" },
104270
+ { internalType: "bool", name: "needScale", type: "bool" }
104271
+ ];
104272
+ var tokenInputComponents = [
104273
+ { internalType: "address", name: "tokenIn", type: "address" },
104274
+ { internalType: "uint256", name: "netTokenIn", type: "uint256" },
104275
+ { internalType: "address", name: "tokenMintSy", type: "address" },
104276
+ { internalType: "address", name: "pendleSwap", type: "address" },
104277
+ {
104278
+ internalType: "struct SwapData",
104279
+ name: "swapData",
104280
+ type: "tuple",
104281
+ components: swapDataComponents
104282
+ }
104283
+ ];
104284
+ var tokenOutputComponents = [
104285
+ { internalType: "address", name: "tokenOut", type: "address" },
104286
+ { internalType: "uint256", name: "minTokenOut", type: "uint256" },
104287
+ { internalType: "address", name: "tokenRedeemSy", type: "address" },
104288
+ { internalType: "address", name: "pendleSwap", type: "address" },
104289
+ {
104290
+ internalType: "struct SwapData",
104291
+ name: "swapData",
104292
+ type: "tuple",
104293
+ components: swapDataComponents
104294
+ }
104295
+ ];
104296
+ var approxParamsComponents = [
104297
+ { internalType: "uint256", name: "guessMin", type: "uint256" },
104298
+ { internalType: "uint256", name: "guessMax", type: "uint256" },
104299
+ { internalType: "uint256", name: "guessOffchain", type: "uint256" },
104300
+ { internalType: "uint256", name: "maxIteration", type: "uint256" },
104301
+ { internalType: "uint256", name: "eps", type: "uint256" }
104302
+ ];
104303
+ var orderComponents = [
104304
+ { internalType: "uint256", name: "salt", type: "uint256" },
104305
+ { internalType: "uint256", name: "expiry", type: "uint256" },
104306
+ { internalType: "uint256", name: "nonce", type: "uint256" },
104307
+ { internalType: "enum OrderType", name: "orderType", type: "uint8" },
104308
+ { internalType: "address", name: "token", type: "address" },
104309
+ { internalType: "address", name: "YT", type: "address" },
104310
+ { internalType: "address", name: "maker", type: "address" },
104311
+ { internalType: "address", name: "receiver", type: "address" },
104312
+ { internalType: "uint256", name: "makingAmount", type: "uint256" },
104313
+ { internalType: "uint256", name: "lnImpliedRate", type: "uint256" },
104314
+ { internalType: "uint256", name: "failSafeRate", type: "uint256" },
104315
+ { internalType: "bytes", name: "permit", type: "bytes" }
104316
+ ];
104317
+ var fillOrderParamsComponents = [
104318
+ {
104319
+ internalType: "struct Order",
104320
+ name: "order",
104321
+ type: "tuple",
104322
+ components: orderComponents
104323
+ },
104324
+ { internalType: "bytes", name: "signature", type: "bytes" },
104325
+ { internalType: "uint256", name: "makingAmount", type: "uint256" }
104326
+ ];
104327
+ var limitOrderDataComponents = [
104328
+ { internalType: "address", name: "limitRouter", type: "address" },
104329
+ { internalType: "uint256", name: "epsSkipMarket", type: "uint256" },
104330
+ {
104331
+ internalType: "struct FillOrderParams[]",
104332
+ name: "normalFills",
104333
+ type: "tuple[]",
104334
+ components: fillOrderParamsComponents
104335
+ },
104336
+ {
104337
+ internalType: "struct FillOrderParams[]",
104338
+ name: "flashFills",
104339
+ type: "tuple[]",
104340
+ components: fillOrderParamsComponents
104341
+ },
104342
+ { internalType: "bytes", name: "optData", type: "bytes" }
104343
+ ];
104214
104344
  var pendle_router_abi_default = [
104215
104345
  {
104216
104346
  inputs: [
@@ -104223,6 +104353,603 @@ var pendle_router_abi_default = [
104223
104353
  outputs: [],
104224
104354
  stateMutability: "nonpayable",
104225
104355
  type: "function"
104356
+ },
104357
+ {
104358
+ inputs: [
104359
+ { internalType: "address", name: "receiver", type: "address" },
104360
+ { internalType: "address", name: "SY", type: "address" },
104361
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
104362
+ {
104363
+ internalType: "struct TokenInput",
104364
+ name: "input",
104365
+ type: "tuple",
104366
+ components: tokenInputComponents
104367
+ }
104368
+ ],
104369
+ name: "mintSyFromToken",
104370
+ outputs: [{ internalType: "uint256", name: "netSyOut", type: "uint256" }],
104371
+ stateMutability: "payable",
104372
+ type: "function"
104373
+ },
104374
+ {
104375
+ inputs: [
104376
+ { internalType: "address", name: "receiver", type: "address" },
104377
+ { internalType: "address", name: "SY", type: "address" },
104378
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
104379
+ {
104380
+ internalType: "struct TokenOutput",
104381
+ name: "output",
104382
+ type: "tuple",
104383
+ components: tokenOutputComponents
104384
+ }
104385
+ ],
104386
+ name: "redeemSyToToken",
104387
+ outputs: [{ internalType: "uint256", name: "netTokenOut", type: "uint256" }],
104388
+ stateMutability: "nonpayable",
104389
+ type: "function"
104390
+ },
104391
+ {
104392
+ inputs: [
104393
+ { internalType: "address", name: "receiver", type: "address" },
104394
+ { internalType: "address", name: "YT", type: "address" },
104395
+ { internalType: "uint256", name: "minPyOut", type: "uint256" },
104396
+ {
104397
+ internalType: "struct TokenInput",
104398
+ name: "input",
104399
+ type: "tuple",
104400
+ components: tokenInputComponents
104401
+ }
104402
+ ],
104403
+ name: "mintPyFromToken",
104404
+ outputs: [
104405
+ { internalType: "uint256", name: "netPyOut", type: "uint256" },
104406
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104407
+ ],
104408
+ stateMutability: "payable",
104409
+ type: "function"
104410
+ },
104411
+ {
104412
+ inputs: [
104413
+ { internalType: "address", name: "receiver", type: "address" },
104414
+ { internalType: "address", name: "YT", type: "address" },
104415
+ { internalType: "uint256", name: "netPyIn", type: "uint256" },
104416
+ {
104417
+ internalType: "struct TokenOutput",
104418
+ name: "output",
104419
+ type: "tuple",
104420
+ components: tokenOutputComponents
104421
+ }
104422
+ ],
104423
+ name: "redeemPyToToken",
104424
+ outputs: [
104425
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
104426
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104427
+ ],
104428
+ stateMutability: "nonpayable",
104429
+ type: "function"
104430
+ },
104431
+ {
104432
+ inputs: [
104433
+ { internalType: "address", name: "receiver", type: "address" },
104434
+ { internalType: "address", name: "YT", type: "address" },
104435
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
104436
+ { internalType: "uint256", name: "minPyOut", type: "uint256" }
104437
+ ],
104438
+ name: "mintPyFromSy",
104439
+ outputs: [{ internalType: "uint256", name: "netPyOut", type: "uint256" }],
104440
+ stateMutability: "nonpayable",
104441
+ type: "function"
104442
+ },
104443
+ {
104444
+ inputs: [
104445
+ { internalType: "address", name: "receiver", type: "address" },
104446
+ { internalType: "address", name: "YT", type: "address" },
104447
+ { internalType: "uint256", name: "netPyIn", type: "uint256" },
104448
+ { internalType: "uint256", name: "minSyOut", type: "uint256" }
104449
+ ],
104450
+ name: "redeemPyToSy",
104451
+ outputs: [{ internalType: "uint256", name: "netSyOut", type: "uint256" }],
104452
+ stateMutability: "nonpayable",
104453
+ type: "function"
104454
+ },
104455
+ {
104456
+ inputs: [
104457
+ { internalType: "address", name: "receiver", type: "address" },
104458
+ { internalType: "address", name: "market", type: "address" },
104459
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
104460
+ {
104461
+ internalType: "struct ApproxParams",
104462
+ name: "guess",
104463
+ type: "tuple",
104464
+ components: approxParamsComponents
104465
+ },
104466
+ {
104467
+ internalType: "struct TokenInput",
104468
+ name: "input",
104469
+ type: "tuple",
104470
+ components: tokenInputComponents
104471
+ },
104472
+ {
104473
+ internalType: "struct LimitOrderData",
104474
+ name: "limit",
104475
+ type: "tuple",
104476
+ components: limitOrderDataComponents
104477
+ }
104478
+ ],
104479
+ name: "swapExactTokenForPt",
104480
+ outputs: [
104481
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
104482
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104483
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104484
+ ],
104485
+ stateMutability: "payable",
104486
+ type: "function"
104487
+ },
104488
+ {
104489
+ inputs: [
104490
+ { internalType: "address", name: "receiver", type: "address" },
104491
+ { internalType: "address", name: "market", type: "address" },
104492
+ { internalType: "uint256", name: "exactSyIn", type: "uint256" },
104493
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
104494
+ {
104495
+ internalType: "struct ApproxParams",
104496
+ name: "guess",
104497
+ type: "tuple",
104498
+ components: approxParamsComponents
104499
+ },
104500
+ {
104501
+ internalType: "struct LimitOrderData",
104502
+ name: "limit",
104503
+ type: "tuple",
104504
+ components: limitOrderDataComponents
104505
+ }
104506
+ ],
104507
+ name: "swapExactSyForPt",
104508
+ outputs: [
104509
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
104510
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104511
+ ],
104512
+ stateMutability: "nonpayable",
104513
+ type: "function"
104514
+ },
104515
+ {
104516
+ inputs: [
104517
+ { internalType: "address", name: "receiver", type: "address" },
104518
+ { internalType: "address", name: "market", type: "address" },
104519
+ { internalType: "uint256", name: "exactPtIn", type: "uint256" },
104520
+ {
104521
+ internalType: "struct TokenOutput",
104522
+ name: "output",
104523
+ type: "tuple",
104524
+ components: tokenOutputComponents
104525
+ },
104526
+ {
104527
+ internalType: "struct LimitOrderData",
104528
+ name: "limit",
104529
+ type: "tuple",
104530
+ components: limitOrderDataComponents
104531
+ }
104532
+ ],
104533
+ name: "swapExactPtForToken",
104534
+ outputs: [
104535
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
104536
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104537
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104538
+ ],
104539
+ stateMutability: "nonpayable",
104540
+ type: "function"
104541
+ },
104542
+ {
104543
+ inputs: [
104544
+ { internalType: "address", name: "receiver", type: "address" },
104545
+ { internalType: "address", name: "market", type: "address" },
104546
+ { internalType: "uint256", name: "exactPtIn", type: "uint256" },
104547
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
104548
+ {
104549
+ internalType: "struct LimitOrderData",
104550
+ name: "limit",
104551
+ type: "tuple",
104552
+ components: limitOrderDataComponents
104553
+ }
104554
+ ],
104555
+ name: "swapExactPtForSy",
104556
+ outputs: [
104557
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
104558
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104559
+ ],
104560
+ stateMutability: "nonpayable",
104561
+ type: "function"
104562
+ },
104563
+ {
104564
+ inputs: [
104565
+ { internalType: "address", name: "receiver", type: "address" },
104566
+ { internalType: "address", name: "market", type: "address" },
104567
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
104568
+ {
104569
+ internalType: "struct ApproxParams",
104570
+ name: "guess",
104571
+ type: "tuple",
104572
+ components: approxParamsComponents
104573
+ },
104574
+ {
104575
+ internalType: "struct TokenInput",
104576
+ name: "input",
104577
+ type: "tuple",
104578
+ components: tokenInputComponents
104579
+ },
104580
+ {
104581
+ internalType: "struct LimitOrderData",
104582
+ name: "limit",
104583
+ type: "tuple",
104584
+ components: limitOrderDataComponents
104585
+ }
104586
+ ],
104587
+ name: "swapExactTokenForYt",
104588
+ outputs: [
104589
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
104590
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104591
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104592
+ ],
104593
+ stateMutability: "payable",
104594
+ type: "function"
104595
+ },
104596
+ {
104597
+ inputs: [
104598
+ { internalType: "address", name: "receiver", type: "address" },
104599
+ { internalType: "address", name: "market", type: "address" },
104600
+ { internalType: "uint256", name: "exactSyIn", type: "uint256" },
104601
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
104602
+ {
104603
+ internalType: "struct ApproxParams",
104604
+ name: "guess",
104605
+ type: "tuple",
104606
+ components: approxParamsComponents
104607
+ },
104608
+ {
104609
+ internalType: "struct LimitOrderData",
104610
+ name: "limit",
104611
+ type: "tuple",
104612
+ components: limitOrderDataComponents
104613
+ }
104614
+ ],
104615
+ name: "swapExactSyForYt",
104616
+ outputs: [
104617
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
104618
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104619
+ ],
104620
+ stateMutability: "nonpayable",
104621
+ type: "function"
104622
+ },
104623
+ {
104624
+ inputs: [
104625
+ { internalType: "address", name: "receiver", type: "address" },
104626
+ { internalType: "address", name: "market", type: "address" },
104627
+ { internalType: "uint256", name: "exactYtIn", type: "uint256" },
104628
+ {
104629
+ internalType: "struct TokenOutput",
104630
+ name: "output",
104631
+ type: "tuple",
104632
+ components: tokenOutputComponents
104633
+ },
104634
+ {
104635
+ internalType: "struct LimitOrderData",
104636
+ name: "limit",
104637
+ type: "tuple",
104638
+ components: limitOrderDataComponents
104639
+ }
104640
+ ],
104641
+ name: "swapExactYtForToken",
104642
+ outputs: [
104643
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
104644
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104645
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104646
+ ],
104647
+ stateMutability: "nonpayable",
104648
+ type: "function"
104649
+ },
104650
+ {
104651
+ inputs: [
104652
+ { internalType: "address", name: "receiver", type: "address" },
104653
+ { internalType: "address", name: "market", type: "address" },
104654
+ { internalType: "uint256", name: "exactYtIn", type: "uint256" },
104655
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
104656
+ {
104657
+ internalType: "struct LimitOrderData",
104658
+ name: "limit",
104659
+ type: "tuple",
104660
+ components: limitOrderDataComponents
104661
+ }
104662
+ ],
104663
+ name: "swapExactYtForSy",
104664
+ outputs: [
104665
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
104666
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104667
+ ],
104668
+ stateMutability: "nonpayable",
104669
+ type: "function"
104670
+ },
104671
+ {
104672
+ inputs: [
104673
+ { internalType: "address", name: "receiver", type: "address" },
104674
+ { internalType: "address", name: "market", type: "address" },
104675
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
104676
+ {
104677
+ internalType: "struct ApproxParams",
104678
+ name: "guess",
104679
+ type: "tuple",
104680
+ components: approxParamsComponents
104681
+ },
104682
+ {
104683
+ internalType: "struct TokenInput",
104684
+ name: "input",
104685
+ type: "tuple",
104686
+ components: tokenInputComponents
104687
+ },
104688
+ {
104689
+ internalType: "struct LimitOrderData",
104690
+ name: "limit",
104691
+ type: "tuple",
104692
+ components: limitOrderDataComponents
104693
+ }
104694
+ ],
104695
+ name: "addLiquiditySingleToken",
104696
+ outputs: [
104697
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
104698
+ { internalType: "uint256", name: "netPtFromSwap", type: "uint256" },
104699
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104700
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104701
+ ],
104702
+ stateMutability: "payable",
104703
+ type: "function"
104704
+ },
104705
+ {
104706
+ inputs: [
104707
+ { internalType: "address", name: "receiver", type: "address" },
104708
+ { internalType: "address", name: "market", type: "address" },
104709
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
104710
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
104711
+ {
104712
+ internalType: "struct ApproxParams",
104713
+ name: "guess",
104714
+ type: "tuple",
104715
+ components: approxParamsComponents
104716
+ },
104717
+ {
104718
+ internalType: "struct LimitOrderData",
104719
+ name: "limit",
104720
+ type: "tuple",
104721
+ components: limitOrderDataComponents
104722
+ }
104723
+ ],
104724
+ name: "addLiquiditySingleSy",
104725
+ outputs: [
104726
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
104727
+ { internalType: "uint256", name: "netPtFromSwap", type: "uint256" },
104728
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104729
+ ],
104730
+ stateMutability: "nonpayable",
104731
+ type: "function"
104732
+ },
104733
+ {
104734
+ inputs: [
104735
+ { internalType: "address", name: "receiver", type: "address" },
104736
+ { internalType: "address", name: "market", type: "address" },
104737
+ { internalType: "uint256", name: "netPtIn", type: "uint256" },
104738
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
104739
+ {
104740
+ internalType: "struct ApproxParams",
104741
+ name: "guess",
104742
+ type: "tuple",
104743
+ components: approxParamsComponents
104744
+ },
104745
+ {
104746
+ internalType: "struct LimitOrderData",
104747
+ name: "limit",
104748
+ type: "tuple",
104749
+ components: limitOrderDataComponents
104750
+ }
104751
+ ],
104752
+ name: "addLiquiditySinglePt",
104753
+ outputs: [
104754
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
104755
+ { internalType: "uint256", name: "netSyFromSwap", type: "uint256" },
104756
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104757
+ ],
104758
+ stateMutability: "nonpayable",
104759
+ type: "function"
104760
+ },
104761
+ {
104762
+ inputs: [
104763
+ { internalType: "address", name: "receiver", type: "address" },
104764
+ { internalType: "address", name: "market", type: "address" },
104765
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
104766
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
104767
+ {
104768
+ internalType: "struct TokenInput",
104769
+ name: "input",
104770
+ type: "tuple",
104771
+ components: tokenInputComponents
104772
+ }
104773
+ ],
104774
+ name: "addLiquiditySingleTokenKeepYt",
104775
+ outputs: [
104776
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
104777
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
104778
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104779
+ ],
104780
+ stateMutability: "payable",
104781
+ type: "function"
104782
+ },
104783
+ {
104784
+ inputs: [
104785
+ { internalType: "address", name: "receiver", type: "address" },
104786
+ { internalType: "address", name: "market", type: "address" },
104787
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
104788
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
104789
+ { internalType: "uint256", name: "minYtOut", type: "uint256" }
104790
+ ],
104791
+ name: "addLiquiditySingleSyKeepYt",
104792
+ outputs: [
104793
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
104794
+ { internalType: "uint256", name: "netYtOut", type: "uint256" }
104795
+ ],
104796
+ stateMutability: "nonpayable",
104797
+ type: "function"
104798
+ },
104799
+ {
104800
+ inputs: [
104801
+ { internalType: "address", name: "receiver", type: "address" },
104802
+ { internalType: "address", name: "market", type: "address" },
104803
+ {
104804
+ internalType: "struct TokenInput",
104805
+ name: "input",
104806
+ type: "tuple",
104807
+ components: tokenInputComponents
104808
+ },
104809
+ { internalType: "uint256", name: "netPtDesired", type: "uint256" },
104810
+ { internalType: "uint256", name: "minLpOut", type: "uint256" }
104811
+ ],
104812
+ name: "addLiquidityDualTokenAndPt",
104813
+ outputs: [
104814
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
104815
+ { internalType: "uint256", name: "netSyUsed", type: "uint256" },
104816
+ { internalType: "uint256", name: "netPtUsed", type: "uint256" },
104817
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104818
+ ],
104819
+ stateMutability: "payable",
104820
+ type: "function"
104821
+ },
104822
+ {
104823
+ inputs: [
104824
+ { internalType: "address", name: "receiver", type: "address" },
104825
+ { internalType: "address", name: "market", type: "address" },
104826
+ { internalType: "uint256", name: "netSyDesired", type: "uint256" },
104827
+ { internalType: "uint256", name: "netPtDesired", type: "uint256" },
104828
+ { internalType: "uint256", name: "minLpOut", type: "uint256" }
104829
+ ],
104830
+ name: "addLiquidityDualSyAndPt",
104831
+ outputs: [
104832
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
104833
+ { internalType: "uint256", name: "netSyUsed", type: "uint256" },
104834
+ { internalType: "uint256", name: "netPtUsed", type: "uint256" }
104835
+ ],
104836
+ stateMutability: "nonpayable",
104837
+ type: "function"
104838
+ },
104839
+ {
104840
+ inputs: [
104841
+ { internalType: "address", name: "receiver", type: "address" },
104842
+ { internalType: "address", name: "market", type: "address" },
104843
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
104844
+ {
104845
+ internalType: "struct TokenOutput",
104846
+ name: "output",
104847
+ type: "tuple",
104848
+ components: tokenOutputComponents
104849
+ },
104850
+ {
104851
+ internalType: "struct LimitOrderData",
104852
+ name: "limit",
104853
+ type: "tuple",
104854
+ components: limitOrderDataComponents
104855
+ }
104856
+ ],
104857
+ name: "removeLiquiditySingleToken",
104858
+ outputs: [
104859
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
104860
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104861
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104862
+ ],
104863
+ stateMutability: "nonpayable",
104864
+ type: "function"
104865
+ },
104866
+ {
104867
+ inputs: [
104868
+ { internalType: "address", name: "receiver", type: "address" },
104869
+ { internalType: "address", name: "market", type: "address" },
104870
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
104871
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
104872
+ {
104873
+ internalType: "struct LimitOrderData",
104874
+ name: "limit",
104875
+ type: "tuple",
104876
+ components: limitOrderDataComponents
104877
+ }
104878
+ ],
104879
+ name: "removeLiquiditySingleSy",
104880
+ outputs: [
104881
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
104882
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104883
+ ],
104884
+ stateMutability: "nonpayable",
104885
+ type: "function"
104886
+ },
104887
+ {
104888
+ inputs: [
104889
+ { internalType: "address", name: "receiver", type: "address" },
104890
+ { internalType: "address", name: "market", type: "address" },
104891
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
104892
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
104893
+ {
104894
+ internalType: "struct ApproxParams",
104895
+ name: "guess",
104896
+ type: "tuple",
104897
+ components: approxParamsComponents
104898
+ },
104899
+ {
104900
+ internalType: "struct LimitOrderData",
104901
+ name: "limit",
104902
+ type: "tuple",
104903
+ components: limitOrderDataComponents
104904
+ }
104905
+ ],
104906
+ name: "removeLiquiditySinglePt",
104907
+ outputs: [
104908
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
104909
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104910
+ ],
104911
+ stateMutability: "nonpayable",
104912
+ type: "function"
104913
+ },
104914
+ {
104915
+ inputs: [
104916
+ { internalType: "address", name: "receiver", type: "address" },
104917
+ { internalType: "address", name: "market", type: "address" },
104918
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
104919
+ {
104920
+ internalType: "struct TokenOutput",
104921
+ name: "output",
104922
+ type: "tuple",
104923
+ components: tokenOutputComponents
104924
+ },
104925
+ { internalType: "uint256", name: "minPtOut", type: "uint256" }
104926
+ ],
104927
+ name: "removeLiquidityDualTokenAndPt",
104928
+ outputs: [
104929
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
104930
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
104931
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104932
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104933
+ ],
104934
+ stateMutability: "nonpayable",
104935
+ type: "function"
104936
+ },
104937
+ {
104938
+ inputs: [
104939
+ { internalType: "address", name: "receiver", type: "address" },
104940
+ { internalType: "address", name: "market", type: "address" },
104941
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
104942
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
104943
+ { internalType: "uint256", name: "minPtOut", type: "uint256" }
104944
+ ],
104945
+ name: "removeLiquidityDualSyAndPt",
104946
+ outputs: [
104947
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
104948
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
104949
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
104950
+ ],
104951
+ stateMutability: "nonpayable",
104952
+ type: "function"
104226
104953
  }
104227
104954
  ];
104228
104955
  // src/integrations/pendle/pendle.merkle-distributor.abi.ts
@@ -104250,47 +104977,398 @@ var pendle_merkle_distributor_abi_default = [
104250
104977
  type: "function"
104251
104978
  }
104252
104979
  ];
104253
- // src/integrations/pendle/pendle.ts
104254
- var routerInterface = new exports_ethers.utils.Interface(pendle_router_abi_default);
104255
- var merkleDistributorInterface = new exports_ethers.utils.Interface(pendle_merkle_distributor_abi_default);
104256
- var pendleRedeemRewardsCalldata = ({ user, sys, yts, markets }) => {
104257
- return routerInterface.encodeFunctionData("redeemDueInterestAndRewards", [user, sys, yts, markets]);
104258
- };
104980
+ // src/integrations/pendle/pendle.router.encoders.ts
104981
+ var ZERO_ADDRESS2 = "0x0000000000000000000000000000000000000000";
104982
+ var CLEAN_SWAP_DATA = {
104983
+ swapType: 0,
104984
+ extRouter: ZERO_ADDRESS2,
104985
+ extCalldata: "0x",
104986
+ needScale: false
104987
+ };
104988
+ var EMPTY_LIMIT_ORDER_DATA = {
104989
+ limitRouter: ZERO_ADDRESS2,
104990
+ epsSkipMarket: 0n,
104991
+ normalFills: [],
104992
+ flashFills: [],
104993
+ optData: "0x"
104994
+ };
104995
+ var makeCleanTokenInput = ({ tokenIn, netTokenIn, tokenMintSy }) => ({
104996
+ tokenIn,
104997
+ netTokenIn,
104998
+ tokenMintSy,
104999
+ pendleSwap: ZERO_ADDRESS2,
105000
+ swapData: CLEAN_SWAP_DATA
105001
+ });
105002
+ var makeCleanTokenOutput = ({ tokenOut, minTokenOut, tokenRedeemSy }) => ({
105003
+ tokenOut,
105004
+ minTokenOut,
105005
+ tokenRedeemSy,
105006
+ pendleSwap: ZERO_ADDRESS2,
105007
+ swapData: CLEAN_SWAP_DATA
105008
+ });
105009
+ var routerTrx = (routerAddress, data) => createCall({ to: routerAddress, data, operation: 0, value: 0n });
105010
+ var distributorTrx = (distributorAddress, data) => createCall({ to: distributorAddress, data, operation: 0, value: 0n });
105011
+ var pendleRedeemRewardsCalldata = ({ user, sys, yts, markets }) => encodeFunctionData({
105012
+ abi: pendle_router_abi_default,
105013
+ functionName: "redeemDueInterestAndRewards",
105014
+ args: [user, sys, yts, markets]
105015
+ });
104259
105016
  var pendleRedeemRewardsTrx = ({
104260
105017
  args,
104261
105018
  routerAddress
104262
- }) => {
104263
- return createCall({
104264
- to: routerAddress,
104265
- data: pendleRedeemRewardsCalldata(args),
104266
- operation: 0,
104267
- value: 0n
104268
- });
104269
- };
105019
+ }) => routerTrx(routerAddress, pendleRedeemRewardsCalldata(args));
104270
105020
  var pendleMerkleClaimCalldata = ({
104271
105021
  receiver,
104272
105022
  tokens,
104273
105023
  totalAccrueds,
104274
105024
  proofs
104275
- }) => {
104276
- return merkleDistributorInterface.encodeFunctionData("claim", [
104277
- receiver,
104278
- tokens,
104279
- totalAccrueds,
104280
- proofs
104281
- ]);
104282
- };
105025
+ }) => encodeFunctionData({
105026
+ abi: pendle_merkle_distributor_abi_default,
105027
+ functionName: "claim",
105028
+ args: [receiver, tokens, totalAccrueds, proofs]
105029
+ });
104283
105030
  var pendleMerkleClaimTrx = ({
104284
105031
  args,
104285
105032
  distributorAddress
104286
- }) => {
104287
- return createCall({
104288
- to: distributorAddress,
104289
- data: pendleMerkleClaimCalldata(args),
104290
- operation: 0,
104291
- value: 0n
104292
- });
104293
- };
105033
+ }) => distributorTrx(distributorAddress, pendleMerkleClaimCalldata(args));
105034
+ var mintSyFromTokenCalldata = ({ receiver, sy, minSyOut, input }) => encodeFunctionData({
105035
+ abi: pendle_router_abi_default,
105036
+ functionName: "mintSyFromToken",
105037
+ args: [receiver, sy, minSyOut, makeCleanTokenInput(input)]
105038
+ });
105039
+ var mintSyFromTokenTrx = ({
105040
+ args,
105041
+ routerAddress
105042
+ }) => routerTrx(routerAddress, mintSyFromTokenCalldata(args));
105043
+ var redeemSyToTokenCalldata = ({ receiver, sy, netSyIn, output }) => encodeFunctionData({
105044
+ abi: pendle_router_abi_default,
105045
+ functionName: "redeemSyToToken",
105046
+ args: [receiver, sy, netSyIn, makeCleanTokenOutput(output)]
105047
+ });
105048
+ var redeemSyToTokenTrx = ({
105049
+ args,
105050
+ routerAddress
105051
+ }) => routerTrx(routerAddress, redeemSyToTokenCalldata(args));
105052
+ var mintPyFromTokenCalldata = ({ receiver, yt, minPyOut, input }) => encodeFunctionData({
105053
+ abi: pendle_router_abi_default,
105054
+ functionName: "mintPyFromToken",
105055
+ args: [receiver, yt, minPyOut, makeCleanTokenInput(input)]
105056
+ });
105057
+ var mintPyFromTokenTrx = ({
105058
+ args,
105059
+ routerAddress
105060
+ }) => routerTrx(routerAddress, mintPyFromTokenCalldata(args));
105061
+ var redeemPyToTokenCalldata = ({ receiver, yt, netPyIn, output }) => encodeFunctionData({
105062
+ abi: pendle_router_abi_default,
105063
+ functionName: "redeemPyToToken",
105064
+ args: [receiver, yt, netPyIn, makeCleanTokenOutput(output)]
105065
+ });
105066
+ var redeemPyToTokenTrx = ({
105067
+ args,
105068
+ routerAddress
105069
+ }) => routerTrx(routerAddress, redeemPyToTokenCalldata(args));
105070
+ var mintPyFromSyCalldata = ({ receiver, yt, netSyIn, minPyOut }) => encodeFunctionData({
105071
+ abi: pendle_router_abi_default,
105072
+ functionName: "mintPyFromSy",
105073
+ args: [receiver, yt, netSyIn, minPyOut]
105074
+ });
105075
+ var mintPyFromSyTrx = ({
105076
+ args,
105077
+ routerAddress
105078
+ }) => routerTrx(routerAddress, mintPyFromSyCalldata(args));
105079
+ var redeemPyToSyCalldata = ({ receiver, yt, netPyIn, minSyOut }) => encodeFunctionData({
105080
+ abi: pendle_router_abi_default,
105081
+ functionName: "redeemPyToSy",
105082
+ args: [receiver, yt, netPyIn, minSyOut]
105083
+ });
105084
+ var redeemPyToSyTrx = ({
105085
+ args,
105086
+ routerAddress
105087
+ }) => routerTrx(routerAddress, redeemPyToSyCalldata(args));
105088
+ var swapExactTokenForPtCalldata = ({
105089
+ receiver,
105090
+ market,
105091
+ minPtOut,
105092
+ guess,
105093
+ input
105094
+ }) => encodeFunctionData({
105095
+ abi: pendle_router_abi_default,
105096
+ functionName: "swapExactTokenForPt",
105097
+ args: [receiver, market, minPtOut, guess, makeCleanTokenInput(input), EMPTY_LIMIT_ORDER_DATA]
105098
+ });
105099
+ var swapExactTokenForPtTrx = ({
105100
+ args,
105101
+ routerAddress
105102
+ }) => routerTrx(routerAddress, swapExactTokenForPtCalldata(args));
105103
+ var swapExactSyForPtCalldata = ({
105104
+ receiver,
105105
+ market,
105106
+ exactSyIn,
105107
+ minPtOut,
105108
+ guess
105109
+ }) => encodeFunctionData({
105110
+ abi: pendle_router_abi_default,
105111
+ functionName: "swapExactSyForPt",
105112
+ args: [receiver, market, exactSyIn, minPtOut, guess, EMPTY_LIMIT_ORDER_DATA]
105113
+ });
105114
+ var swapExactSyForPtTrx = ({
105115
+ args,
105116
+ routerAddress
105117
+ }) => routerTrx(routerAddress, swapExactSyForPtCalldata(args));
105118
+ var swapExactPtForTokenCalldata = ({
105119
+ receiver,
105120
+ market,
105121
+ exactPtIn,
105122
+ output
105123
+ }) => encodeFunctionData({
105124
+ abi: pendle_router_abi_default,
105125
+ functionName: "swapExactPtForToken",
105126
+ args: [receiver, market, exactPtIn, makeCleanTokenOutput(output), EMPTY_LIMIT_ORDER_DATA]
105127
+ });
105128
+ var swapExactPtForTokenTrx = ({
105129
+ args,
105130
+ routerAddress
105131
+ }) => routerTrx(routerAddress, swapExactPtForTokenCalldata(args));
105132
+ var swapExactPtForSyCalldata = ({ receiver, market, exactPtIn, minSyOut }) => encodeFunctionData({
105133
+ abi: pendle_router_abi_default,
105134
+ functionName: "swapExactPtForSy",
105135
+ args: [receiver, market, exactPtIn, minSyOut, EMPTY_LIMIT_ORDER_DATA]
105136
+ });
105137
+ var swapExactPtForSyTrx = ({
105138
+ args,
105139
+ routerAddress
105140
+ }) => routerTrx(routerAddress, swapExactPtForSyCalldata(args));
105141
+ var swapExactTokenForYtCalldata = ({
105142
+ receiver,
105143
+ market,
105144
+ minYtOut,
105145
+ guess,
105146
+ input
105147
+ }) => encodeFunctionData({
105148
+ abi: pendle_router_abi_default,
105149
+ functionName: "swapExactTokenForYt",
105150
+ args: [receiver, market, minYtOut, guess, makeCleanTokenInput(input), EMPTY_LIMIT_ORDER_DATA]
105151
+ });
105152
+ var swapExactTokenForYtTrx = ({
105153
+ args,
105154
+ routerAddress
105155
+ }) => routerTrx(routerAddress, swapExactTokenForYtCalldata(args));
105156
+ var swapExactSyForYtCalldata = ({
105157
+ receiver,
105158
+ market,
105159
+ exactSyIn,
105160
+ minYtOut,
105161
+ guess
105162
+ }) => encodeFunctionData({
105163
+ abi: pendle_router_abi_default,
105164
+ functionName: "swapExactSyForYt",
105165
+ args: [receiver, market, exactSyIn, minYtOut, guess, EMPTY_LIMIT_ORDER_DATA]
105166
+ });
105167
+ var swapExactSyForYtTrx = ({
105168
+ args,
105169
+ routerAddress
105170
+ }) => routerTrx(routerAddress, swapExactSyForYtCalldata(args));
105171
+ var swapExactYtForTokenCalldata = ({
105172
+ receiver,
105173
+ market,
105174
+ exactYtIn,
105175
+ output
105176
+ }) => encodeFunctionData({
105177
+ abi: pendle_router_abi_default,
105178
+ functionName: "swapExactYtForToken",
105179
+ args: [receiver, market, exactYtIn, makeCleanTokenOutput(output), EMPTY_LIMIT_ORDER_DATA]
105180
+ });
105181
+ var swapExactYtForTokenTrx = ({
105182
+ args,
105183
+ routerAddress
105184
+ }) => routerTrx(routerAddress, swapExactYtForTokenCalldata(args));
105185
+ var swapExactYtForSyCalldata = ({ receiver, market, exactYtIn, minSyOut }) => encodeFunctionData({
105186
+ abi: pendle_router_abi_default,
105187
+ functionName: "swapExactYtForSy",
105188
+ args: [receiver, market, exactYtIn, minSyOut, EMPTY_LIMIT_ORDER_DATA]
105189
+ });
105190
+ var swapExactYtForSyTrx = ({
105191
+ args,
105192
+ routerAddress
105193
+ }) => routerTrx(routerAddress, swapExactYtForSyCalldata(args));
105194
+ var addLiquiditySingleTokenCalldata = ({
105195
+ receiver,
105196
+ market,
105197
+ minLpOut,
105198
+ guess,
105199
+ input
105200
+ }) => encodeFunctionData({
105201
+ abi: pendle_router_abi_default,
105202
+ functionName: "addLiquiditySingleToken",
105203
+ args: [receiver, market, minLpOut, guess, makeCleanTokenInput(input), EMPTY_LIMIT_ORDER_DATA]
105204
+ });
105205
+ var addLiquiditySingleTokenTrx = ({
105206
+ args,
105207
+ routerAddress
105208
+ }) => routerTrx(routerAddress, addLiquiditySingleTokenCalldata(args));
105209
+ var addLiquiditySingleSyCalldata = ({
105210
+ receiver,
105211
+ market,
105212
+ netSyIn,
105213
+ minLpOut,
105214
+ guess
105215
+ }) => encodeFunctionData({
105216
+ abi: pendle_router_abi_default,
105217
+ functionName: "addLiquiditySingleSy",
105218
+ args: [receiver, market, netSyIn, minLpOut, guess, EMPTY_LIMIT_ORDER_DATA]
105219
+ });
105220
+ var addLiquiditySingleSyTrx = ({
105221
+ args,
105222
+ routerAddress
105223
+ }) => routerTrx(routerAddress, addLiquiditySingleSyCalldata(args));
105224
+ var addLiquiditySinglePtCalldata = ({
105225
+ receiver,
105226
+ market,
105227
+ netPtIn,
105228
+ minLpOut,
105229
+ guess
105230
+ }) => encodeFunctionData({
105231
+ abi: pendle_router_abi_default,
105232
+ functionName: "addLiquiditySinglePt",
105233
+ args: [receiver, market, netPtIn, minLpOut, guess, EMPTY_LIMIT_ORDER_DATA]
105234
+ });
105235
+ var addLiquiditySinglePtTrx = ({
105236
+ args,
105237
+ routerAddress
105238
+ }) => routerTrx(routerAddress, addLiquiditySinglePtCalldata(args));
105239
+ var addLiquiditySingleTokenKeepYtCalldata = ({
105240
+ receiver,
105241
+ market,
105242
+ minLpOut,
105243
+ minYtOut,
105244
+ input
105245
+ }) => encodeFunctionData({
105246
+ abi: pendle_router_abi_default,
105247
+ functionName: "addLiquiditySingleTokenKeepYt",
105248
+ args: [receiver, market, minLpOut, minYtOut, makeCleanTokenInput(input)]
105249
+ });
105250
+ var addLiquiditySingleTokenKeepYtTrx = ({
105251
+ args,
105252
+ routerAddress
105253
+ }) => routerTrx(routerAddress, addLiquiditySingleTokenKeepYtCalldata(args));
105254
+ var addLiquiditySingleSyKeepYtCalldata = ({
105255
+ receiver,
105256
+ market,
105257
+ netSyIn,
105258
+ minLpOut,
105259
+ minYtOut
105260
+ }) => encodeFunctionData({
105261
+ abi: pendle_router_abi_default,
105262
+ functionName: "addLiquiditySingleSyKeepYt",
105263
+ args: [receiver, market, netSyIn, minLpOut, minYtOut]
105264
+ });
105265
+ var addLiquiditySingleSyKeepYtTrx = ({
105266
+ args,
105267
+ routerAddress
105268
+ }) => routerTrx(routerAddress, addLiquiditySingleSyKeepYtCalldata(args));
105269
+ var addLiquidityDualTokenAndPtCalldata = ({
105270
+ receiver,
105271
+ market,
105272
+ input,
105273
+ netPtDesired,
105274
+ minLpOut
105275
+ }) => encodeFunctionData({
105276
+ abi: pendle_router_abi_default,
105277
+ functionName: "addLiquidityDualTokenAndPt",
105278
+ args: [receiver, market, makeCleanTokenInput(input), netPtDesired, minLpOut]
105279
+ });
105280
+ var addLiquidityDualTokenAndPtTrx = ({
105281
+ args,
105282
+ routerAddress
105283
+ }) => routerTrx(routerAddress, addLiquidityDualTokenAndPtCalldata(args));
105284
+ var addLiquidityDualSyAndPtCalldata = ({
105285
+ receiver,
105286
+ market,
105287
+ netSyDesired,
105288
+ netPtDesired,
105289
+ minLpOut
105290
+ }) => encodeFunctionData({
105291
+ abi: pendle_router_abi_default,
105292
+ functionName: "addLiquidityDualSyAndPt",
105293
+ args: [receiver, market, netSyDesired, netPtDesired, minLpOut]
105294
+ });
105295
+ var addLiquidityDualSyAndPtTrx = ({
105296
+ args,
105297
+ routerAddress
105298
+ }) => routerTrx(routerAddress, addLiquidityDualSyAndPtCalldata(args));
105299
+ var removeLiquiditySingleTokenCalldata = ({
105300
+ receiver,
105301
+ market,
105302
+ netLpToRemove,
105303
+ output
105304
+ }) => encodeFunctionData({
105305
+ abi: pendle_router_abi_default,
105306
+ functionName: "removeLiquiditySingleToken",
105307
+ args: [receiver, market, netLpToRemove, makeCleanTokenOutput(output), EMPTY_LIMIT_ORDER_DATA]
105308
+ });
105309
+ var removeLiquiditySingleTokenTrx = ({
105310
+ args,
105311
+ routerAddress
105312
+ }) => routerTrx(routerAddress, removeLiquiditySingleTokenCalldata(args));
105313
+ var removeLiquiditySingleSyCalldata = ({
105314
+ receiver,
105315
+ market,
105316
+ netLpToRemove,
105317
+ minSyOut
105318
+ }) => encodeFunctionData({
105319
+ abi: pendle_router_abi_default,
105320
+ functionName: "removeLiquiditySingleSy",
105321
+ args: [receiver, market, netLpToRemove, minSyOut, EMPTY_LIMIT_ORDER_DATA]
105322
+ });
105323
+ var removeLiquiditySingleSyTrx = ({
105324
+ args,
105325
+ routerAddress
105326
+ }) => routerTrx(routerAddress, removeLiquiditySingleSyCalldata(args));
105327
+ var removeLiquiditySinglePtCalldata = ({
105328
+ receiver,
105329
+ market,
105330
+ netLpToRemove,
105331
+ minPtOut,
105332
+ guess
105333
+ }) => encodeFunctionData({
105334
+ abi: pendle_router_abi_default,
105335
+ functionName: "removeLiquiditySinglePt",
105336
+ args: [receiver, market, netLpToRemove, minPtOut, guess, EMPTY_LIMIT_ORDER_DATA]
105337
+ });
105338
+ var removeLiquiditySinglePtTrx = ({
105339
+ args,
105340
+ routerAddress
105341
+ }) => routerTrx(routerAddress, removeLiquiditySinglePtCalldata(args));
105342
+ var removeLiquidityDualTokenAndPtCalldata = ({
105343
+ receiver,
105344
+ market,
105345
+ netLpToRemove,
105346
+ output,
105347
+ minPtOut
105348
+ }) => encodeFunctionData({
105349
+ abi: pendle_router_abi_default,
105350
+ functionName: "removeLiquidityDualTokenAndPt",
105351
+ args: [receiver, market, netLpToRemove, makeCleanTokenOutput(output), minPtOut]
105352
+ });
105353
+ var removeLiquidityDualTokenAndPtTrx = ({
105354
+ args,
105355
+ routerAddress
105356
+ }) => routerTrx(routerAddress, removeLiquidityDualTokenAndPtCalldata(args));
105357
+ var removeLiquidityDualSyAndPtCalldata = ({
105358
+ receiver,
105359
+ market,
105360
+ netLpToRemove,
105361
+ minSyOut,
105362
+ minPtOut
105363
+ }) => encodeFunctionData({
105364
+ abi: pendle_router_abi_default,
105365
+ functionName: "removeLiquidityDualSyAndPt",
105366
+ args: [receiver, market, netLpToRemove, minSyOut, minPtOut]
105367
+ });
105368
+ var removeLiquidityDualSyAndPtTrx = ({
105369
+ args,
105370
+ routerAddress
105371
+ }) => routerTrx(routerAddress, removeLiquidityDualSyAndPtCalldata(args));
104294
105372
  // src/integrations/wormhole/wormhole.multi.ntt.abi.ts
104295
105373
  var wormhole_multi_ntt_abi_default = [
104296
105374
  {
@@ -104767,8 +105845,8 @@ var EnsoTokenType;
104767
105845
  EnsoTokenType2[EnsoTokenType2["Native"] = 0] = "Native";
104768
105846
  EnsoTokenType2[EnsoTokenType2["ERC20"] = 1] = "ERC20";
104769
105847
  })(EnsoTokenType ||= {});
104770
- var ZERO_ADDRESS2 = "0x0000000000000000000000000000000000000000";
104771
- var isNativeToken = (token) => token.toLowerCase() === ZERO_ADDRESS2;
105848
+ var ZERO_ADDRESS3 = "0x0000000000000000000000000000000000000000";
105849
+ var isNativeToken = (token) => token.toLowerCase() === ZERO_ADDRESS3;
104772
105850
  var encodeEnsoToken = (token, amount) => {
104773
105851
  if (isNativeToken(token)) {
104774
105852
  return {
@@ -104979,6 +106057,22 @@ export {
104979
106057
  transferFromERC20Trx,
104980
106058
  transferERC20Trx,
104981
106059
  swapOwner,
106060
+ swapExactYtForTokenTrx,
106061
+ swapExactYtForTokenCalldata,
106062
+ swapExactYtForSyTrx,
106063
+ swapExactYtForSyCalldata,
106064
+ swapExactTokenForYtTrx,
106065
+ swapExactTokenForYtCalldata,
106066
+ swapExactTokenForPtTrx,
106067
+ swapExactTokenForPtCalldata,
106068
+ swapExactSyForYtTrx,
106069
+ swapExactSyForYtCalldata,
106070
+ swapExactSyForPtTrx,
106071
+ swapExactSyForPtCalldata,
106072
+ swapExactPtForTokenTrx,
106073
+ swapExactPtForTokenCalldata,
106074
+ swapExactPtForSyTrx,
106075
+ swapExactPtForSyCalldata,
104982
106076
  supplyToAaveV3Trx,
104983
106077
  supplyMorphoBlueTrx,
104984
106078
  supplyCollateralMorphoBlueTrx,
@@ -105020,6 +106114,22 @@ export {
105020
106114
  repayToLendleTrx,
105021
106115
  repayToAaveV3Trx,
105022
106116
  repayMorphoBlueTrx,
106117
+ removeLiquiditySingleTokenTrx,
106118
+ removeLiquiditySingleTokenCalldata,
106119
+ removeLiquiditySingleSyTrx,
106120
+ removeLiquiditySingleSyCalldata,
106121
+ removeLiquiditySinglePtTrx,
106122
+ removeLiquiditySinglePtCalldata,
106123
+ removeLiquidityDualTokenAndPtTrx,
106124
+ removeLiquidityDualTokenAndPtCalldata,
106125
+ removeLiquidityDualSyAndPtTrx,
106126
+ removeLiquidityDualSyAndPtCalldata,
106127
+ redeemSyToTokenTrx,
106128
+ redeemSyToTokenCalldata,
106129
+ redeemPyToTokenTrx,
106130
+ redeemPyToTokenCalldata,
106131
+ redeemPyToSyTrx,
106132
+ redeemPyToSyCalldata,
105023
106133
  redeemMorphoVaultTrx,
105024
106134
  redeemIporFusionTrx,
105025
106135
  redeemGearboxVaultTrx,
@@ -105035,6 +106145,12 @@ export {
105035
106145
  pauseVaultTrx,
105036
106146
  parseSignedQuote,
105037
106147
  normalizeEmitterForVaaLookup,
106148
+ mintSyFromTokenTrx,
106149
+ mintSyFromTokenCalldata,
106150
+ mintPyFromTokenTrx,
106151
+ mintPyFromTokenCalldata,
106152
+ mintPyFromSyTrx,
106153
+ mintPyFromSyCalldata,
105038
106154
  merklClaimTrx,
105039
106155
  merklClaimCalldata,
105040
106156
  merkl_distributor_abi_default as merklAbi,
@@ -105149,6 +106265,20 @@ export {
105149
106265
  approveERC20Trx,
105150
106266
  addressToBytes32,
105151
106267
  addToVaultWhitelistTrx,
106268
+ addLiquiditySingleTokenTrx,
106269
+ addLiquiditySingleTokenKeepYtTrx,
106270
+ addLiquiditySingleTokenKeepYtCalldata,
106271
+ addLiquiditySingleTokenCalldata,
106272
+ addLiquiditySingleSyTrx,
106273
+ addLiquiditySingleSyKeepYtTrx,
106274
+ addLiquiditySingleSyKeepYtCalldata,
106275
+ addLiquiditySingleSyCalldata,
106276
+ addLiquiditySinglePtTrx,
106277
+ addLiquiditySinglePtCalldata,
106278
+ addLiquidityDualTokenAndPtTrx,
106279
+ addLiquidityDualTokenAndPtCalldata,
106280
+ addLiquidityDualSyAndPtTrx,
106281
+ addLiquidityDualSyAndPtCalldata,
105152
106282
  zodiac_roles_abi_default as ZodiacRolesAbi,
105153
106283
  zodiac_delay_abi_default as ZodiacDelayAbi,
105154
106284
  ZERO_ADDRESS,
@@ -105380,4 +106510,4 @@ export {
105380
106510
  AXELAR_GMP_API_MAINNET
105381
106511
  };
105382
106512
 
105383
- //# debugId=6C565714BBFB812364756E2164756E21
106513
+ //# debugId=1893E20CF8582FA264756E2164756E21