damm-sdk 1.4.37 → 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.cjs CHANGED
@@ -44618,6 +44618,22 @@ __export(exports_src, {
44618
44618
  transferFromERC20Trx: () => transferFromERC20Trx,
44619
44619
  transferERC20Trx: () => transferERC20Trx,
44620
44620
  swapOwner: () => swapOwner,
44621
+ swapExactYtForTokenTrx: () => swapExactYtForTokenTrx,
44622
+ swapExactYtForTokenCalldata: () => swapExactYtForTokenCalldata,
44623
+ swapExactYtForSyTrx: () => swapExactYtForSyTrx,
44624
+ swapExactYtForSyCalldata: () => swapExactYtForSyCalldata,
44625
+ swapExactTokenForYtTrx: () => swapExactTokenForYtTrx,
44626
+ swapExactTokenForYtCalldata: () => swapExactTokenForYtCalldata,
44627
+ swapExactTokenForPtTrx: () => swapExactTokenForPtTrx,
44628
+ swapExactTokenForPtCalldata: () => swapExactTokenForPtCalldata,
44629
+ swapExactSyForYtTrx: () => swapExactSyForYtTrx,
44630
+ swapExactSyForYtCalldata: () => swapExactSyForYtCalldata,
44631
+ swapExactSyForPtTrx: () => swapExactSyForPtTrx,
44632
+ swapExactSyForPtCalldata: () => swapExactSyForPtCalldata,
44633
+ swapExactPtForTokenTrx: () => swapExactPtForTokenTrx,
44634
+ swapExactPtForTokenCalldata: () => swapExactPtForTokenCalldata,
44635
+ swapExactPtForSyTrx: () => swapExactPtForSyTrx,
44636
+ swapExactPtForSyCalldata: () => swapExactPtForSyCalldata,
44621
44637
  supplyToAaveV3Trx: () => supplyToAaveV3Trx,
44622
44638
  supplyMorphoBlueTrx: () => supplyMorphoBlueTrx,
44623
44639
  supplyCollateralMorphoBlueTrx: () => supplyCollateralMorphoBlueTrx,
@@ -44659,6 +44675,22 @@ __export(exports_src, {
44659
44675
  repayToLendleTrx: () => repayToLendleTrx,
44660
44676
  repayToAaveV3Trx: () => repayToAaveV3Trx,
44661
44677
  repayMorphoBlueTrx: () => repayMorphoBlueTrx,
44678
+ removeLiquiditySingleTokenTrx: () => removeLiquiditySingleTokenTrx,
44679
+ removeLiquiditySingleTokenCalldata: () => removeLiquiditySingleTokenCalldata,
44680
+ removeLiquiditySingleSyTrx: () => removeLiquiditySingleSyTrx,
44681
+ removeLiquiditySingleSyCalldata: () => removeLiquiditySingleSyCalldata,
44682
+ removeLiquiditySinglePtTrx: () => removeLiquiditySinglePtTrx,
44683
+ removeLiquiditySinglePtCalldata: () => removeLiquiditySinglePtCalldata,
44684
+ removeLiquidityDualTokenAndPtTrx: () => removeLiquidityDualTokenAndPtTrx,
44685
+ removeLiquidityDualTokenAndPtCalldata: () => removeLiquidityDualTokenAndPtCalldata,
44686
+ removeLiquidityDualSyAndPtTrx: () => removeLiquidityDualSyAndPtTrx,
44687
+ removeLiquidityDualSyAndPtCalldata: () => removeLiquidityDualSyAndPtCalldata,
44688
+ redeemSyToTokenTrx: () => redeemSyToTokenTrx,
44689
+ redeemSyToTokenCalldata: () => redeemSyToTokenCalldata,
44690
+ redeemPyToTokenTrx: () => redeemPyToTokenTrx,
44691
+ redeemPyToTokenCalldata: () => redeemPyToTokenCalldata,
44692
+ redeemPyToSyTrx: () => redeemPyToSyTrx,
44693
+ redeemPyToSyCalldata: () => redeemPyToSyCalldata,
44662
44694
  redeemMorphoVaultTrx: () => redeemMorphoVaultTrx,
44663
44695
  redeemIporFusionTrx: () => redeemIporFusionTrx,
44664
44696
  redeemGearboxVaultTrx: () => redeemGearboxVaultTrx,
@@ -44674,6 +44706,12 @@ __export(exports_src, {
44674
44706
  pauseVaultTrx: () => pauseVaultTrx,
44675
44707
  parseSignedQuote: () => parseSignedQuote,
44676
44708
  normalizeEmitterForVaaLookup: () => normalizeEmitterForVaaLookup,
44709
+ mintSyFromTokenTrx: () => mintSyFromTokenTrx,
44710
+ mintSyFromTokenCalldata: () => mintSyFromTokenCalldata,
44711
+ mintPyFromTokenTrx: () => mintPyFromTokenTrx,
44712
+ mintPyFromTokenCalldata: () => mintPyFromTokenCalldata,
44713
+ mintPyFromSyTrx: () => mintPyFromSyTrx,
44714
+ mintPyFromSyCalldata: () => mintPyFromSyCalldata,
44677
44715
  merklClaimTrx: () => merklClaimTrx,
44678
44716
  merklClaimCalldata: () => merklClaimCalldata,
44679
44717
  merklAbi: () => merkl_distributor_abi_default,
@@ -44788,6 +44826,20 @@ __export(exports_src, {
44788
44826
  approveERC20Trx: () => approveERC20Trx,
44789
44827
  addressToBytes32: () => addressToBytes32,
44790
44828
  addToVaultWhitelistTrx: () => addToVaultWhitelistTrx,
44829
+ addLiquiditySingleTokenTrx: () => addLiquiditySingleTokenTrx,
44830
+ addLiquiditySingleTokenKeepYtTrx: () => addLiquiditySingleTokenKeepYtTrx,
44831
+ addLiquiditySingleTokenKeepYtCalldata: () => addLiquiditySingleTokenKeepYtCalldata,
44832
+ addLiquiditySingleTokenCalldata: () => addLiquiditySingleTokenCalldata,
44833
+ addLiquiditySingleSyTrx: () => addLiquiditySingleSyTrx,
44834
+ addLiquiditySingleSyKeepYtTrx: () => addLiquiditySingleSyKeepYtTrx,
44835
+ addLiquiditySingleSyKeepYtCalldata: () => addLiquiditySingleSyKeepYtCalldata,
44836
+ addLiquiditySingleSyCalldata: () => addLiquiditySingleSyCalldata,
44837
+ addLiquiditySinglePtTrx: () => addLiquiditySinglePtTrx,
44838
+ addLiquiditySinglePtCalldata: () => addLiquiditySinglePtCalldata,
44839
+ addLiquidityDualTokenAndPtTrx: () => addLiquidityDualTokenAndPtTrx,
44840
+ addLiquidityDualTokenAndPtCalldata: () => addLiquidityDualTokenAndPtCalldata,
44841
+ addLiquidityDualSyAndPtTrx: () => addLiquidityDualSyAndPtTrx,
44842
+ addLiquidityDualSyAndPtCalldata: () => addLiquidityDualSyAndPtCalldata,
44791
44843
  ZodiacRolesAbi: () => zodiac_roles_abi_default,
44792
44844
  ZodiacDelayAbi: () => zodiac_delay_abi_default,
44793
44845
  ZERO_ADDRESS: () => ZERO_ADDRESS,
@@ -44912,6 +44964,7 @@ __export(exports_src, {
44912
44964
  NextTxCalldata: () => NextTxCalldata,
44913
44965
  MultisendBuilder: () => MultisendBuilder,
44914
44966
  MorphoVaultAbi: () => morpho_vault_abi_default,
44967
+ MorphoBlueMarketParamsCalldata: () => MorphoBlueMarketParamsCalldata,
44915
44968
  MorphoBlueAbi: () => morpho_blue_abi_default,
44916
44969
  LendlePoolAbi: () => lendle_pool_abi_default,
44917
44970
  LagoonV2UpdateWhitelistManagerCalldata: () => LagoonV2UpdateWhitelistManagerCalldata,
@@ -55576,9 +55629,22 @@ var contractsRegistry_default = {
55576
55629
  withdrawManager: "0x14dd163386553b23267c097dbde868559b9bcbd2"
55577
55630
  },
55578
55631
  pendle: {
55579
- routerV4: "0x888888888889758f76e7103c6cbf23abbf58f946",
55632
+ routerV4: "0x888888888889758F76e7103c6CbF23ABbF58F946",
55633
+ routerV4ActionSwapPTV3: "0xd8D200d9A713A1c71cF1e7F694B14E5F1D948b15",
55634
+ routerV4ActionSwapYTV3: "0x4a03Ce0a268951d04E187B1CF48075eE69266e27",
55635
+ routerV4ActionAddRemoveLiqV3: "0x663C21103915B68e9dA797CfdF3cAb01a037D5Ff",
55636
+ routerV4ActionMiscV3: "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
55580
55637
  routerV4ActionMisc: "0x373Dba2055Ad40cb4815148bC47cd1DC16e92E44",
55581
- merkleDistributor: "0x33305665f69b4642d1275f4ce81c23651674d21c"
55638
+ limitRouter: "0x000000000000c9B3E2C3Ec88B1B4c0cD853f4321",
55639
+ pendleSwap: "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
55640
+ merkleDistributor: "0x33305665f69B4642D1275f4Ce81c23651674D21C",
55641
+ markets: {
55642
+ usdat: "0x9aFe7a057A09cF5da748d952078C9C99938b4329",
55643
+ usdatPT: "0x1D69402390657308C91179aa184bF992908c1e08",
55644
+ usdatSY: "0x7a7dE491e1BE5287874904e2b7c8488249A4D0a9",
55645
+ usdatYT: "0x076A3ea71e83Ca09319B161E40F5FB3BB943d3C6",
55646
+ usdatUnderlying: "0x23238f20b894f29041f48D88eE91131C395Aaa71"
55647
+ }
55582
55648
  }
55583
55649
  },
55584
55650
  unichain: {
@@ -55914,6 +55980,23 @@ var contractsRegistry_default = {
55914
55980
  },
55915
55981
  enso: {
55916
55982
  routerV2: "0xCfBAa9Cfce952Ca4F4069874fF1Df8c05e37a3c7"
55983
+ },
55984
+ pendle: {
55985
+ routerV4: "0x888888888889758F76e7103c6CbF23ABbF58F946",
55986
+ routerV4ActionSwapPTV3: "0xbb0Dd79794e58795b08b599297ec55a6Afb6AB58",
55987
+ routerV4ActionSwapYTV3: "0x171B480B1A2ebc1acE52e46E0Bd73e7E08413ec2",
55988
+ routerV4ActionAddRemoveLiqV3: "0x2fb6d0753602Bf397fcE38Ec8Ee3a811cA07B3FD",
55989
+ routerV4ActionMiscV3: "0xac1700293346b0bEFC71bCB7E14Bf1c38a5c2a97",
55990
+ limitRouter: "0x000000000000c9B3E2C3Ec88B1B4c0cD853f4321",
55991
+ pendleSwap: "0xd4F480965D2347d421F1bEC7F545682E5Ec2151D",
55992
+ merkleDistributor: "0x33305665f69B4642D1275f4Ce81c23651674D21C",
55993
+ markets: {
55994
+ ausd: "0x6f99CF00ee7290aE78a072Bb6910eF72D1129fE7",
55995
+ ausdPT: "0x9FC74f8Ed616B5BaF52a170caa97d6d3898602d1",
55996
+ ausdSY: "0xBA3d60f5000f472aef947FB8020a3E6319F9a0B7",
55997
+ ausdYT: "0xEdDeE9C0B56248d70A9BFdD103f8bD97C35DfD89",
55998
+ ausdUnderlying: "0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a"
55999
+ }
55917
56000
  }
55918
56001
  },
55919
56002
  plasma: {
@@ -79473,7 +79556,7 @@ var vault_abi_default2 = [
79473
79556
  name: "settleDeposit",
79474
79557
  inputs: [
79475
79558
  {
79476
- name: "epoch",
79559
+ name: "newTotalAssets",
79477
79560
  type: "uint256",
79478
79561
  internalType: "uint256"
79479
79562
  }
@@ -79486,7 +79569,7 @@ var vault_abi_default2 = [
79486
79569
  name: "settleRedeem",
79487
79570
  inputs: [
79488
79571
  {
79489
- name: "epoch",
79572
+ name: "newTotalAssets",
79490
79573
  type: "uint256",
79491
79574
  internalType: "uint256"
79492
79575
  }
@@ -79888,34 +79971,56 @@ function validateLagoonV2Rates(rates) {
79888
79971
  throw new Error(`haircutRate ${rates.haircutRate} exceeds max 2000 bps (20%)`);
79889
79972
  }
79890
79973
  }
79891
- var LagoonV2SettleDepositCalldata = ({ epoch }) => {
79974
+ var LagoonV2SettleDepositCalldata = ({
79975
+ newTotalAssets,
79976
+ epoch
79977
+ }) => {
79978
+ const nav = newTotalAssets ?? epoch;
79979
+ if (nav === undefined) {
79980
+ throw new Error("LagoonV2SettleDepositCalldata: `newTotalAssets` is required");
79981
+ }
79892
79982
  return encodeFunctionData({
79893
79983
  abi: vault_abi_default2,
79894
79984
  functionName: "settleDeposit",
79895
- args: [epoch]
79985
+ args: [nav]
79896
79986
  });
79897
79987
  };
79898
- var lagoonV2SettleDepositTrx = ({ vault, epoch }) => {
79988
+ var lagoonV2SettleDepositTrx = ({
79989
+ vault,
79990
+ newTotalAssets,
79991
+ epoch
79992
+ }) => {
79899
79993
  return createCall({
79900
79994
  operation: 0,
79901
79995
  to: vault,
79902
79996
  value: 0n,
79903
- data: LagoonV2SettleDepositCalldata({ epoch })
79997
+ data: LagoonV2SettleDepositCalldata({ newTotalAssets, epoch })
79904
79998
  });
79905
79999
  };
79906
- var LagoonV2SettleRedeemCalldata = ({ epoch }) => {
80000
+ var LagoonV2SettleRedeemCalldata = ({
80001
+ newTotalAssets,
80002
+ epoch
80003
+ }) => {
80004
+ const nav = newTotalAssets ?? epoch;
80005
+ if (nav === undefined) {
80006
+ throw new Error("LagoonV2SettleRedeemCalldata: `newTotalAssets` is required");
80007
+ }
79907
80008
  return encodeFunctionData({
79908
80009
  abi: vault_abi_default2,
79909
80010
  functionName: "settleRedeem",
79910
- args: [epoch]
80011
+ args: [nav]
79911
80012
  });
79912
80013
  };
79913
- var lagoonV2SettleRedeemTrx = ({ vault, epoch }) => {
80014
+ var lagoonV2SettleRedeemTrx = ({
80015
+ vault,
80016
+ newTotalAssets,
80017
+ epoch
80018
+ }) => {
79914
80019
  return createCall({
79915
80020
  operation: 0,
79916
80021
  to: vault,
79917
80022
  value: 0n,
79918
- data: LagoonV2SettleRedeemCalldata({ epoch })
80023
+ data: LagoonV2SettleRedeemCalldata({ newTotalAssets, epoch })
79919
80024
  });
79920
80025
  };
79921
80026
  var LagoonV2UpdateNewTotalAssetsCalldata = ({ newTotalAssets }) => {
@@ -82860,6 +82965,21 @@ var withdrawMorphoBlueTrx = ({
82860
82965
  data: WithdrawMorphoBlueCalldata(args)
82861
82966
  });
82862
82967
  };
82968
+ var MARKET_PARAMS_ABI_COMPONENTS = [
82969
+ {
82970
+ type: "tuple",
82971
+ components: [
82972
+ { name: "loanToken", type: "address" },
82973
+ { name: "collateralToken", type: "address" },
82974
+ { name: "oracle", type: "address" },
82975
+ { name: "irm", type: "address" },
82976
+ { name: "lltv", type: "uint256" }
82977
+ ]
82978
+ }
82979
+ ];
82980
+ var MorphoBlueMarketParamsCalldata = (marketParams) => {
82981
+ return encodeAbiParameters(MARKET_PARAMS_ABI_COMPONENTS, [marketParams]);
82982
+ };
82863
82983
  // src/integrations/erc20/erc20.abi.ts
82864
82984
  var erc20_abi_default = [
82865
82985
  {
@@ -104636,6 +104756,84 @@ var unwrapWethTrx = ({ weth, amount }) => {
104636
104756
  });
104637
104757
  };
104638
104758
  // src/integrations/pendle/pendle.router.abi.ts
104759
+ var swapDataComponents = [
104760
+ { internalType: "enum SwapType", name: "swapType", type: "uint8" },
104761
+ { internalType: "address", name: "extRouter", type: "address" },
104762
+ { internalType: "bytes", name: "extCalldata", type: "bytes" },
104763
+ { internalType: "bool", name: "needScale", type: "bool" }
104764
+ ];
104765
+ var tokenInputComponents = [
104766
+ { internalType: "address", name: "tokenIn", type: "address" },
104767
+ { internalType: "uint256", name: "netTokenIn", type: "uint256" },
104768
+ { internalType: "address", name: "tokenMintSy", type: "address" },
104769
+ { internalType: "address", name: "pendleSwap", type: "address" },
104770
+ {
104771
+ internalType: "struct SwapData",
104772
+ name: "swapData",
104773
+ type: "tuple",
104774
+ components: swapDataComponents
104775
+ }
104776
+ ];
104777
+ var tokenOutputComponents = [
104778
+ { internalType: "address", name: "tokenOut", type: "address" },
104779
+ { internalType: "uint256", name: "minTokenOut", type: "uint256" },
104780
+ { internalType: "address", name: "tokenRedeemSy", type: "address" },
104781
+ { internalType: "address", name: "pendleSwap", type: "address" },
104782
+ {
104783
+ internalType: "struct SwapData",
104784
+ name: "swapData",
104785
+ type: "tuple",
104786
+ components: swapDataComponents
104787
+ }
104788
+ ];
104789
+ var approxParamsComponents = [
104790
+ { internalType: "uint256", name: "guessMin", type: "uint256" },
104791
+ { internalType: "uint256", name: "guessMax", type: "uint256" },
104792
+ { internalType: "uint256", name: "guessOffchain", type: "uint256" },
104793
+ { internalType: "uint256", name: "maxIteration", type: "uint256" },
104794
+ { internalType: "uint256", name: "eps", type: "uint256" }
104795
+ ];
104796
+ var orderComponents = [
104797
+ { internalType: "uint256", name: "salt", type: "uint256" },
104798
+ { internalType: "uint256", name: "expiry", type: "uint256" },
104799
+ { internalType: "uint256", name: "nonce", type: "uint256" },
104800
+ { internalType: "enum OrderType", name: "orderType", type: "uint8" },
104801
+ { internalType: "address", name: "token", type: "address" },
104802
+ { internalType: "address", name: "YT", type: "address" },
104803
+ { internalType: "address", name: "maker", type: "address" },
104804
+ { internalType: "address", name: "receiver", type: "address" },
104805
+ { internalType: "uint256", name: "makingAmount", type: "uint256" },
104806
+ { internalType: "uint256", name: "lnImpliedRate", type: "uint256" },
104807
+ { internalType: "uint256", name: "failSafeRate", type: "uint256" },
104808
+ { internalType: "bytes", name: "permit", type: "bytes" }
104809
+ ];
104810
+ var fillOrderParamsComponents = [
104811
+ {
104812
+ internalType: "struct Order",
104813
+ name: "order",
104814
+ type: "tuple",
104815
+ components: orderComponents
104816
+ },
104817
+ { internalType: "bytes", name: "signature", type: "bytes" },
104818
+ { internalType: "uint256", name: "makingAmount", type: "uint256" }
104819
+ ];
104820
+ var limitOrderDataComponents = [
104821
+ { internalType: "address", name: "limitRouter", type: "address" },
104822
+ { internalType: "uint256", name: "epsSkipMarket", type: "uint256" },
104823
+ {
104824
+ internalType: "struct FillOrderParams[]",
104825
+ name: "normalFills",
104826
+ type: "tuple[]",
104827
+ components: fillOrderParamsComponents
104828
+ },
104829
+ {
104830
+ internalType: "struct FillOrderParams[]",
104831
+ name: "flashFills",
104832
+ type: "tuple[]",
104833
+ components: fillOrderParamsComponents
104834
+ },
104835
+ { internalType: "bytes", name: "optData", type: "bytes" }
104836
+ ];
104639
104837
  var pendle_router_abi_default = [
104640
104838
  {
104641
104839
  inputs: [
@@ -104648,6 +104846,603 @@ var pendle_router_abi_default = [
104648
104846
  outputs: [],
104649
104847
  stateMutability: "nonpayable",
104650
104848
  type: "function"
104849
+ },
104850
+ {
104851
+ inputs: [
104852
+ { internalType: "address", name: "receiver", type: "address" },
104853
+ { internalType: "address", name: "SY", type: "address" },
104854
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
104855
+ {
104856
+ internalType: "struct TokenInput",
104857
+ name: "input",
104858
+ type: "tuple",
104859
+ components: tokenInputComponents
104860
+ }
104861
+ ],
104862
+ name: "mintSyFromToken",
104863
+ outputs: [{ internalType: "uint256", name: "netSyOut", type: "uint256" }],
104864
+ stateMutability: "payable",
104865
+ type: "function"
104866
+ },
104867
+ {
104868
+ inputs: [
104869
+ { internalType: "address", name: "receiver", type: "address" },
104870
+ { internalType: "address", name: "SY", type: "address" },
104871
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
104872
+ {
104873
+ internalType: "struct TokenOutput",
104874
+ name: "output",
104875
+ type: "tuple",
104876
+ components: tokenOutputComponents
104877
+ }
104878
+ ],
104879
+ name: "redeemSyToToken",
104880
+ outputs: [{ internalType: "uint256", name: "netTokenOut", type: "uint256" }],
104881
+ stateMutability: "nonpayable",
104882
+ type: "function"
104883
+ },
104884
+ {
104885
+ inputs: [
104886
+ { internalType: "address", name: "receiver", type: "address" },
104887
+ { internalType: "address", name: "YT", type: "address" },
104888
+ { internalType: "uint256", name: "minPyOut", type: "uint256" },
104889
+ {
104890
+ internalType: "struct TokenInput",
104891
+ name: "input",
104892
+ type: "tuple",
104893
+ components: tokenInputComponents
104894
+ }
104895
+ ],
104896
+ name: "mintPyFromToken",
104897
+ outputs: [
104898
+ { internalType: "uint256", name: "netPyOut", type: "uint256" },
104899
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104900
+ ],
104901
+ stateMutability: "payable",
104902
+ type: "function"
104903
+ },
104904
+ {
104905
+ inputs: [
104906
+ { internalType: "address", name: "receiver", type: "address" },
104907
+ { internalType: "address", name: "YT", type: "address" },
104908
+ { internalType: "uint256", name: "netPyIn", type: "uint256" },
104909
+ {
104910
+ internalType: "struct TokenOutput",
104911
+ name: "output",
104912
+ type: "tuple",
104913
+ components: tokenOutputComponents
104914
+ }
104915
+ ],
104916
+ name: "redeemPyToToken",
104917
+ outputs: [
104918
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
104919
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104920
+ ],
104921
+ stateMutability: "nonpayable",
104922
+ type: "function"
104923
+ },
104924
+ {
104925
+ inputs: [
104926
+ { internalType: "address", name: "receiver", type: "address" },
104927
+ { internalType: "address", name: "YT", type: "address" },
104928
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
104929
+ { internalType: "uint256", name: "minPyOut", type: "uint256" }
104930
+ ],
104931
+ name: "mintPyFromSy",
104932
+ outputs: [{ internalType: "uint256", name: "netPyOut", type: "uint256" }],
104933
+ stateMutability: "nonpayable",
104934
+ type: "function"
104935
+ },
104936
+ {
104937
+ inputs: [
104938
+ { internalType: "address", name: "receiver", type: "address" },
104939
+ { internalType: "address", name: "YT", type: "address" },
104940
+ { internalType: "uint256", name: "netPyIn", type: "uint256" },
104941
+ { internalType: "uint256", name: "minSyOut", type: "uint256" }
104942
+ ],
104943
+ name: "redeemPyToSy",
104944
+ outputs: [{ internalType: "uint256", name: "netSyOut", type: "uint256" }],
104945
+ stateMutability: "nonpayable",
104946
+ type: "function"
104947
+ },
104948
+ {
104949
+ inputs: [
104950
+ { internalType: "address", name: "receiver", type: "address" },
104951
+ { internalType: "address", name: "market", type: "address" },
104952
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
104953
+ {
104954
+ internalType: "struct ApproxParams",
104955
+ name: "guess",
104956
+ type: "tuple",
104957
+ components: approxParamsComponents
104958
+ },
104959
+ {
104960
+ internalType: "struct TokenInput",
104961
+ name: "input",
104962
+ type: "tuple",
104963
+ components: tokenInputComponents
104964
+ },
104965
+ {
104966
+ internalType: "struct LimitOrderData",
104967
+ name: "limit",
104968
+ type: "tuple",
104969
+ components: limitOrderDataComponents
104970
+ }
104971
+ ],
104972
+ name: "swapExactTokenForPt",
104973
+ outputs: [
104974
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
104975
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
104976
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
104977
+ ],
104978
+ stateMutability: "payable",
104979
+ type: "function"
104980
+ },
104981
+ {
104982
+ inputs: [
104983
+ { internalType: "address", name: "receiver", type: "address" },
104984
+ { internalType: "address", name: "market", type: "address" },
104985
+ { internalType: "uint256", name: "exactSyIn", type: "uint256" },
104986
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
104987
+ {
104988
+ internalType: "struct ApproxParams",
104989
+ name: "guess",
104990
+ type: "tuple",
104991
+ components: approxParamsComponents
104992
+ },
104993
+ {
104994
+ internalType: "struct LimitOrderData",
104995
+ name: "limit",
104996
+ type: "tuple",
104997
+ components: limitOrderDataComponents
104998
+ }
104999
+ ],
105000
+ name: "swapExactSyForPt",
105001
+ outputs: [
105002
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
105003
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105004
+ ],
105005
+ stateMutability: "nonpayable",
105006
+ type: "function"
105007
+ },
105008
+ {
105009
+ inputs: [
105010
+ { internalType: "address", name: "receiver", type: "address" },
105011
+ { internalType: "address", name: "market", type: "address" },
105012
+ { internalType: "uint256", name: "exactPtIn", type: "uint256" },
105013
+ {
105014
+ internalType: "struct TokenOutput",
105015
+ name: "output",
105016
+ type: "tuple",
105017
+ components: tokenOutputComponents
105018
+ },
105019
+ {
105020
+ internalType: "struct LimitOrderData",
105021
+ name: "limit",
105022
+ type: "tuple",
105023
+ components: limitOrderDataComponents
105024
+ }
105025
+ ],
105026
+ name: "swapExactPtForToken",
105027
+ outputs: [
105028
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
105029
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
105030
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105031
+ ],
105032
+ stateMutability: "nonpayable",
105033
+ type: "function"
105034
+ },
105035
+ {
105036
+ inputs: [
105037
+ { internalType: "address", name: "receiver", type: "address" },
105038
+ { internalType: "address", name: "market", type: "address" },
105039
+ { internalType: "uint256", name: "exactPtIn", type: "uint256" },
105040
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
105041
+ {
105042
+ internalType: "struct LimitOrderData",
105043
+ name: "limit",
105044
+ type: "tuple",
105045
+ components: limitOrderDataComponents
105046
+ }
105047
+ ],
105048
+ name: "swapExactPtForSy",
105049
+ outputs: [
105050
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
105051
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105052
+ ],
105053
+ stateMutability: "nonpayable",
105054
+ type: "function"
105055
+ },
105056
+ {
105057
+ inputs: [
105058
+ { internalType: "address", name: "receiver", type: "address" },
105059
+ { internalType: "address", name: "market", type: "address" },
105060
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
105061
+ {
105062
+ internalType: "struct ApproxParams",
105063
+ name: "guess",
105064
+ type: "tuple",
105065
+ components: approxParamsComponents
105066
+ },
105067
+ {
105068
+ internalType: "struct TokenInput",
105069
+ name: "input",
105070
+ type: "tuple",
105071
+ components: tokenInputComponents
105072
+ },
105073
+ {
105074
+ internalType: "struct LimitOrderData",
105075
+ name: "limit",
105076
+ type: "tuple",
105077
+ components: limitOrderDataComponents
105078
+ }
105079
+ ],
105080
+ name: "swapExactTokenForYt",
105081
+ outputs: [
105082
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
105083
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
105084
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105085
+ ],
105086
+ stateMutability: "payable",
105087
+ type: "function"
105088
+ },
105089
+ {
105090
+ inputs: [
105091
+ { internalType: "address", name: "receiver", type: "address" },
105092
+ { internalType: "address", name: "market", type: "address" },
105093
+ { internalType: "uint256", name: "exactSyIn", type: "uint256" },
105094
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
105095
+ {
105096
+ internalType: "struct ApproxParams",
105097
+ name: "guess",
105098
+ type: "tuple",
105099
+ components: approxParamsComponents
105100
+ },
105101
+ {
105102
+ internalType: "struct LimitOrderData",
105103
+ name: "limit",
105104
+ type: "tuple",
105105
+ components: limitOrderDataComponents
105106
+ }
105107
+ ],
105108
+ name: "swapExactSyForYt",
105109
+ outputs: [
105110
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
105111
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105112
+ ],
105113
+ stateMutability: "nonpayable",
105114
+ type: "function"
105115
+ },
105116
+ {
105117
+ inputs: [
105118
+ { internalType: "address", name: "receiver", type: "address" },
105119
+ { internalType: "address", name: "market", type: "address" },
105120
+ { internalType: "uint256", name: "exactYtIn", type: "uint256" },
105121
+ {
105122
+ internalType: "struct TokenOutput",
105123
+ name: "output",
105124
+ type: "tuple",
105125
+ components: tokenOutputComponents
105126
+ },
105127
+ {
105128
+ internalType: "struct LimitOrderData",
105129
+ name: "limit",
105130
+ type: "tuple",
105131
+ components: limitOrderDataComponents
105132
+ }
105133
+ ],
105134
+ name: "swapExactYtForToken",
105135
+ outputs: [
105136
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
105137
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
105138
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105139
+ ],
105140
+ stateMutability: "nonpayable",
105141
+ type: "function"
105142
+ },
105143
+ {
105144
+ inputs: [
105145
+ { internalType: "address", name: "receiver", type: "address" },
105146
+ { internalType: "address", name: "market", type: "address" },
105147
+ { internalType: "uint256", name: "exactYtIn", type: "uint256" },
105148
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
105149
+ {
105150
+ internalType: "struct LimitOrderData",
105151
+ name: "limit",
105152
+ type: "tuple",
105153
+ components: limitOrderDataComponents
105154
+ }
105155
+ ],
105156
+ name: "swapExactYtForSy",
105157
+ outputs: [
105158
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
105159
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105160
+ ],
105161
+ stateMutability: "nonpayable",
105162
+ type: "function"
105163
+ },
105164
+ {
105165
+ inputs: [
105166
+ { internalType: "address", name: "receiver", type: "address" },
105167
+ { internalType: "address", name: "market", type: "address" },
105168
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
105169
+ {
105170
+ internalType: "struct ApproxParams",
105171
+ name: "guess",
105172
+ type: "tuple",
105173
+ components: approxParamsComponents
105174
+ },
105175
+ {
105176
+ internalType: "struct TokenInput",
105177
+ name: "input",
105178
+ type: "tuple",
105179
+ components: tokenInputComponents
105180
+ },
105181
+ {
105182
+ internalType: "struct LimitOrderData",
105183
+ name: "limit",
105184
+ type: "tuple",
105185
+ components: limitOrderDataComponents
105186
+ }
105187
+ ],
105188
+ name: "addLiquiditySingleToken",
105189
+ outputs: [
105190
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
105191
+ { internalType: "uint256", name: "netPtFromSwap", type: "uint256" },
105192
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
105193
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105194
+ ],
105195
+ stateMutability: "payable",
105196
+ type: "function"
105197
+ },
105198
+ {
105199
+ inputs: [
105200
+ { internalType: "address", name: "receiver", type: "address" },
105201
+ { internalType: "address", name: "market", type: "address" },
105202
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
105203
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
105204
+ {
105205
+ internalType: "struct ApproxParams",
105206
+ name: "guess",
105207
+ type: "tuple",
105208
+ components: approxParamsComponents
105209
+ },
105210
+ {
105211
+ internalType: "struct LimitOrderData",
105212
+ name: "limit",
105213
+ type: "tuple",
105214
+ components: limitOrderDataComponents
105215
+ }
105216
+ ],
105217
+ name: "addLiquiditySingleSy",
105218
+ outputs: [
105219
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
105220
+ { internalType: "uint256", name: "netPtFromSwap", type: "uint256" },
105221
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105222
+ ],
105223
+ stateMutability: "nonpayable",
105224
+ type: "function"
105225
+ },
105226
+ {
105227
+ inputs: [
105228
+ { internalType: "address", name: "receiver", type: "address" },
105229
+ { internalType: "address", name: "market", type: "address" },
105230
+ { internalType: "uint256", name: "netPtIn", type: "uint256" },
105231
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
105232
+ {
105233
+ internalType: "struct ApproxParams",
105234
+ name: "guess",
105235
+ type: "tuple",
105236
+ components: approxParamsComponents
105237
+ },
105238
+ {
105239
+ internalType: "struct LimitOrderData",
105240
+ name: "limit",
105241
+ type: "tuple",
105242
+ components: limitOrderDataComponents
105243
+ }
105244
+ ],
105245
+ name: "addLiquiditySinglePt",
105246
+ outputs: [
105247
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
105248
+ { internalType: "uint256", name: "netSyFromSwap", type: "uint256" },
105249
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105250
+ ],
105251
+ stateMutability: "nonpayable",
105252
+ type: "function"
105253
+ },
105254
+ {
105255
+ inputs: [
105256
+ { internalType: "address", name: "receiver", type: "address" },
105257
+ { internalType: "address", name: "market", type: "address" },
105258
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
105259
+ { internalType: "uint256", name: "minYtOut", type: "uint256" },
105260
+ {
105261
+ internalType: "struct TokenInput",
105262
+ name: "input",
105263
+ type: "tuple",
105264
+ components: tokenInputComponents
105265
+ }
105266
+ ],
105267
+ name: "addLiquiditySingleTokenKeepYt",
105268
+ outputs: [
105269
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
105270
+ { internalType: "uint256", name: "netYtOut", type: "uint256" },
105271
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105272
+ ],
105273
+ stateMutability: "payable",
105274
+ type: "function"
105275
+ },
105276
+ {
105277
+ inputs: [
105278
+ { internalType: "address", name: "receiver", type: "address" },
105279
+ { internalType: "address", name: "market", type: "address" },
105280
+ { internalType: "uint256", name: "netSyIn", type: "uint256" },
105281
+ { internalType: "uint256", name: "minLpOut", type: "uint256" },
105282
+ { internalType: "uint256", name: "minYtOut", type: "uint256" }
105283
+ ],
105284
+ name: "addLiquiditySingleSyKeepYt",
105285
+ outputs: [
105286
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
105287
+ { internalType: "uint256", name: "netYtOut", type: "uint256" }
105288
+ ],
105289
+ stateMutability: "nonpayable",
105290
+ type: "function"
105291
+ },
105292
+ {
105293
+ inputs: [
105294
+ { internalType: "address", name: "receiver", type: "address" },
105295
+ { internalType: "address", name: "market", type: "address" },
105296
+ {
105297
+ internalType: "struct TokenInput",
105298
+ name: "input",
105299
+ type: "tuple",
105300
+ components: tokenInputComponents
105301
+ },
105302
+ { internalType: "uint256", name: "netPtDesired", type: "uint256" },
105303
+ { internalType: "uint256", name: "minLpOut", type: "uint256" }
105304
+ ],
105305
+ name: "addLiquidityDualTokenAndPt",
105306
+ outputs: [
105307
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
105308
+ { internalType: "uint256", name: "netSyUsed", type: "uint256" },
105309
+ { internalType: "uint256", name: "netPtUsed", type: "uint256" },
105310
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105311
+ ],
105312
+ stateMutability: "payable",
105313
+ type: "function"
105314
+ },
105315
+ {
105316
+ inputs: [
105317
+ { internalType: "address", name: "receiver", type: "address" },
105318
+ { internalType: "address", name: "market", type: "address" },
105319
+ { internalType: "uint256", name: "netSyDesired", type: "uint256" },
105320
+ { internalType: "uint256", name: "netPtDesired", type: "uint256" },
105321
+ { internalType: "uint256", name: "minLpOut", type: "uint256" }
105322
+ ],
105323
+ name: "addLiquidityDualSyAndPt",
105324
+ outputs: [
105325
+ { internalType: "uint256", name: "netLpOut", type: "uint256" },
105326
+ { internalType: "uint256", name: "netSyUsed", type: "uint256" },
105327
+ { internalType: "uint256", name: "netPtUsed", type: "uint256" }
105328
+ ],
105329
+ stateMutability: "nonpayable",
105330
+ type: "function"
105331
+ },
105332
+ {
105333
+ inputs: [
105334
+ { internalType: "address", name: "receiver", type: "address" },
105335
+ { internalType: "address", name: "market", type: "address" },
105336
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
105337
+ {
105338
+ internalType: "struct TokenOutput",
105339
+ name: "output",
105340
+ type: "tuple",
105341
+ components: tokenOutputComponents
105342
+ },
105343
+ {
105344
+ internalType: "struct LimitOrderData",
105345
+ name: "limit",
105346
+ type: "tuple",
105347
+ components: limitOrderDataComponents
105348
+ }
105349
+ ],
105350
+ name: "removeLiquiditySingleToken",
105351
+ outputs: [
105352
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
105353
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
105354
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105355
+ ],
105356
+ stateMutability: "nonpayable",
105357
+ type: "function"
105358
+ },
105359
+ {
105360
+ inputs: [
105361
+ { internalType: "address", name: "receiver", type: "address" },
105362
+ { internalType: "address", name: "market", type: "address" },
105363
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
105364
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
105365
+ {
105366
+ internalType: "struct LimitOrderData",
105367
+ name: "limit",
105368
+ type: "tuple",
105369
+ components: limitOrderDataComponents
105370
+ }
105371
+ ],
105372
+ name: "removeLiquiditySingleSy",
105373
+ outputs: [
105374
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
105375
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105376
+ ],
105377
+ stateMutability: "nonpayable",
105378
+ type: "function"
105379
+ },
105380
+ {
105381
+ inputs: [
105382
+ { internalType: "address", name: "receiver", type: "address" },
105383
+ { internalType: "address", name: "market", type: "address" },
105384
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
105385
+ { internalType: "uint256", name: "minPtOut", type: "uint256" },
105386
+ {
105387
+ internalType: "struct ApproxParams",
105388
+ name: "guess",
105389
+ type: "tuple",
105390
+ components: approxParamsComponents
105391
+ },
105392
+ {
105393
+ internalType: "struct LimitOrderData",
105394
+ name: "limit",
105395
+ type: "tuple",
105396
+ components: limitOrderDataComponents
105397
+ }
105398
+ ],
105399
+ name: "removeLiquiditySinglePt",
105400
+ outputs: [
105401
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
105402
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105403
+ ],
105404
+ stateMutability: "nonpayable",
105405
+ type: "function"
105406
+ },
105407
+ {
105408
+ inputs: [
105409
+ { internalType: "address", name: "receiver", type: "address" },
105410
+ { internalType: "address", name: "market", type: "address" },
105411
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
105412
+ {
105413
+ internalType: "struct TokenOutput",
105414
+ name: "output",
105415
+ type: "tuple",
105416
+ components: tokenOutputComponents
105417
+ },
105418
+ { internalType: "uint256", name: "minPtOut", type: "uint256" }
105419
+ ],
105420
+ name: "removeLiquidityDualTokenAndPt",
105421
+ outputs: [
105422
+ { internalType: "uint256", name: "netTokenOut", type: "uint256" },
105423
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
105424
+ { internalType: "uint256", name: "netSyFee", type: "uint256" },
105425
+ { internalType: "uint256", name: "netSyInterm", type: "uint256" }
105426
+ ],
105427
+ stateMutability: "nonpayable",
105428
+ type: "function"
105429
+ },
105430
+ {
105431
+ inputs: [
105432
+ { internalType: "address", name: "receiver", type: "address" },
105433
+ { internalType: "address", name: "market", type: "address" },
105434
+ { internalType: "uint256", name: "netLpToRemove", type: "uint256" },
105435
+ { internalType: "uint256", name: "minSyOut", type: "uint256" },
105436
+ { internalType: "uint256", name: "minPtOut", type: "uint256" }
105437
+ ],
105438
+ name: "removeLiquidityDualSyAndPt",
105439
+ outputs: [
105440
+ { internalType: "uint256", name: "netSyOut", type: "uint256" },
105441
+ { internalType: "uint256", name: "netPtOut", type: "uint256" },
105442
+ { internalType: "uint256", name: "netSyFee", type: "uint256" }
105443
+ ],
105444
+ stateMutability: "nonpayable",
105445
+ type: "function"
104651
105446
  }
104652
105447
  ];
104653
105448
  // src/integrations/pendle/pendle.merkle-distributor.abi.ts
@@ -104675,47 +105470,398 @@ var pendle_merkle_distributor_abi_default = [
104675
105470
  type: "function"
104676
105471
  }
104677
105472
  ];
104678
- // src/integrations/pendle/pendle.ts
104679
- var routerInterface = new exports_ethers.utils.Interface(pendle_router_abi_default);
104680
- var merkleDistributorInterface = new exports_ethers.utils.Interface(pendle_merkle_distributor_abi_default);
104681
- var pendleRedeemRewardsCalldata = ({ user, sys, yts, markets }) => {
104682
- return routerInterface.encodeFunctionData("redeemDueInterestAndRewards", [user, sys, yts, markets]);
104683
- };
105473
+ // src/integrations/pendle/pendle.router.encoders.ts
105474
+ var ZERO_ADDRESS2 = "0x0000000000000000000000000000000000000000";
105475
+ var CLEAN_SWAP_DATA = {
105476
+ swapType: 0,
105477
+ extRouter: ZERO_ADDRESS2,
105478
+ extCalldata: "0x",
105479
+ needScale: false
105480
+ };
105481
+ var EMPTY_LIMIT_ORDER_DATA = {
105482
+ limitRouter: ZERO_ADDRESS2,
105483
+ epsSkipMarket: 0n,
105484
+ normalFills: [],
105485
+ flashFills: [],
105486
+ optData: "0x"
105487
+ };
105488
+ var makeCleanTokenInput = ({ tokenIn, netTokenIn, tokenMintSy }) => ({
105489
+ tokenIn,
105490
+ netTokenIn,
105491
+ tokenMintSy,
105492
+ pendleSwap: ZERO_ADDRESS2,
105493
+ swapData: CLEAN_SWAP_DATA
105494
+ });
105495
+ var makeCleanTokenOutput = ({ tokenOut, minTokenOut, tokenRedeemSy }) => ({
105496
+ tokenOut,
105497
+ minTokenOut,
105498
+ tokenRedeemSy,
105499
+ pendleSwap: ZERO_ADDRESS2,
105500
+ swapData: CLEAN_SWAP_DATA
105501
+ });
105502
+ var routerTrx = (routerAddress, data) => createCall({ to: routerAddress, data, operation: 0, value: 0n });
105503
+ var distributorTrx = (distributorAddress, data) => createCall({ to: distributorAddress, data, operation: 0, value: 0n });
105504
+ var pendleRedeemRewardsCalldata = ({ user, sys, yts, markets }) => encodeFunctionData({
105505
+ abi: pendle_router_abi_default,
105506
+ functionName: "redeemDueInterestAndRewards",
105507
+ args: [user, sys, yts, markets]
105508
+ });
104684
105509
  var pendleRedeemRewardsTrx = ({
104685
105510
  args,
104686
105511
  routerAddress
104687
- }) => {
104688
- return createCall({
104689
- to: routerAddress,
104690
- data: pendleRedeemRewardsCalldata(args),
104691
- operation: 0,
104692
- value: 0n
104693
- });
104694
- };
105512
+ }) => routerTrx(routerAddress, pendleRedeemRewardsCalldata(args));
104695
105513
  var pendleMerkleClaimCalldata = ({
104696
105514
  receiver,
104697
105515
  tokens,
104698
105516
  totalAccrueds,
104699
105517
  proofs
104700
- }) => {
104701
- return merkleDistributorInterface.encodeFunctionData("claim", [
104702
- receiver,
104703
- tokens,
104704
- totalAccrueds,
104705
- proofs
104706
- ]);
104707
- };
105518
+ }) => encodeFunctionData({
105519
+ abi: pendle_merkle_distributor_abi_default,
105520
+ functionName: "claim",
105521
+ args: [receiver, tokens, totalAccrueds, proofs]
105522
+ });
104708
105523
  var pendleMerkleClaimTrx = ({
104709
105524
  args,
104710
105525
  distributorAddress
104711
- }) => {
104712
- return createCall({
104713
- to: distributorAddress,
104714
- data: pendleMerkleClaimCalldata(args),
104715
- operation: 0,
104716
- value: 0n
104717
- });
104718
- };
105526
+ }) => distributorTrx(distributorAddress, pendleMerkleClaimCalldata(args));
105527
+ var mintSyFromTokenCalldata = ({ receiver, sy, minSyOut, input }) => encodeFunctionData({
105528
+ abi: pendle_router_abi_default,
105529
+ functionName: "mintSyFromToken",
105530
+ args: [receiver, sy, minSyOut, makeCleanTokenInput(input)]
105531
+ });
105532
+ var mintSyFromTokenTrx = ({
105533
+ args,
105534
+ routerAddress
105535
+ }) => routerTrx(routerAddress, mintSyFromTokenCalldata(args));
105536
+ var redeemSyToTokenCalldata = ({ receiver, sy, netSyIn, output }) => encodeFunctionData({
105537
+ abi: pendle_router_abi_default,
105538
+ functionName: "redeemSyToToken",
105539
+ args: [receiver, sy, netSyIn, makeCleanTokenOutput(output)]
105540
+ });
105541
+ var redeemSyToTokenTrx = ({
105542
+ args,
105543
+ routerAddress
105544
+ }) => routerTrx(routerAddress, redeemSyToTokenCalldata(args));
105545
+ var mintPyFromTokenCalldata = ({ receiver, yt, minPyOut, input }) => encodeFunctionData({
105546
+ abi: pendle_router_abi_default,
105547
+ functionName: "mintPyFromToken",
105548
+ args: [receiver, yt, minPyOut, makeCleanTokenInput(input)]
105549
+ });
105550
+ var mintPyFromTokenTrx = ({
105551
+ args,
105552
+ routerAddress
105553
+ }) => routerTrx(routerAddress, mintPyFromTokenCalldata(args));
105554
+ var redeemPyToTokenCalldata = ({ receiver, yt, netPyIn, output }) => encodeFunctionData({
105555
+ abi: pendle_router_abi_default,
105556
+ functionName: "redeemPyToToken",
105557
+ args: [receiver, yt, netPyIn, makeCleanTokenOutput(output)]
105558
+ });
105559
+ var redeemPyToTokenTrx = ({
105560
+ args,
105561
+ routerAddress
105562
+ }) => routerTrx(routerAddress, redeemPyToTokenCalldata(args));
105563
+ var mintPyFromSyCalldata = ({ receiver, yt, netSyIn, minPyOut }) => encodeFunctionData({
105564
+ abi: pendle_router_abi_default,
105565
+ functionName: "mintPyFromSy",
105566
+ args: [receiver, yt, netSyIn, minPyOut]
105567
+ });
105568
+ var mintPyFromSyTrx = ({
105569
+ args,
105570
+ routerAddress
105571
+ }) => routerTrx(routerAddress, mintPyFromSyCalldata(args));
105572
+ var redeemPyToSyCalldata = ({ receiver, yt, netPyIn, minSyOut }) => encodeFunctionData({
105573
+ abi: pendle_router_abi_default,
105574
+ functionName: "redeemPyToSy",
105575
+ args: [receiver, yt, netPyIn, minSyOut]
105576
+ });
105577
+ var redeemPyToSyTrx = ({
105578
+ args,
105579
+ routerAddress
105580
+ }) => routerTrx(routerAddress, redeemPyToSyCalldata(args));
105581
+ var swapExactTokenForPtCalldata = ({
105582
+ receiver,
105583
+ market,
105584
+ minPtOut,
105585
+ guess,
105586
+ input
105587
+ }) => encodeFunctionData({
105588
+ abi: pendle_router_abi_default,
105589
+ functionName: "swapExactTokenForPt",
105590
+ args: [receiver, market, minPtOut, guess, makeCleanTokenInput(input), EMPTY_LIMIT_ORDER_DATA]
105591
+ });
105592
+ var swapExactTokenForPtTrx = ({
105593
+ args,
105594
+ routerAddress
105595
+ }) => routerTrx(routerAddress, swapExactTokenForPtCalldata(args));
105596
+ var swapExactSyForPtCalldata = ({
105597
+ receiver,
105598
+ market,
105599
+ exactSyIn,
105600
+ minPtOut,
105601
+ guess
105602
+ }) => encodeFunctionData({
105603
+ abi: pendle_router_abi_default,
105604
+ functionName: "swapExactSyForPt",
105605
+ args: [receiver, market, exactSyIn, minPtOut, guess, EMPTY_LIMIT_ORDER_DATA]
105606
+ });
105607
+ var swapExactSyForPtTrx = ({
105608
+ args,
105609
+ routerAddress
105610
+ }) => routerTrx(routerAddress, swapExactSyForPtCalldata(args));
105611
+ var swapExactPtForTokenCalldata = ({
105612
+ receiver,
105613
+ market,
105614
+ exactPtIn,
105615
+ output
105616
+ }) => encodeFunctionData({
105617
+ abi: pendle_router_abi_default,
105618
+ functionName: "swapExactPtForToken",
105619
+ args: [receiver, market, exactPtIn, makeCleanTokenOutput(output), EMPTY_LIMIT_ORDER_DATA]
105620
+ });
105621
+ var swapExactPtForTokenTrx = ({
105622
+ args,
105623
+ routerAddress
105624
+ }) => routerTrx(routerAddress, swapExactPtForTokenCalldata(args));
105625
+ var swapExactPtForSyCalldata = ({ receiver, market, exactPtIn, minSyOut }) => encodeFunctionData({
105626
+ abi: pendle_router_abi_default,
105627
+ functionName: "swapExactPtForSy",
105628
+ args: [receiver, market, exactPtIn, minSyOut, EMPTY_LIMIT_ORDER_DATA]
105629
+ });
105630
+ var swapExactPtForSyTrx = ({
105631
+ args,
105632
+ routerAddress
105633
+ }) => routerTrx(routerAddress, swapExactPtForSyCalldata(args));
105634
+ var swapExactTokenForYtCalldata = ({
105635
+ receiver,
105636
+ market,
105637
+ minYtOut,
105638
+ guess,
105639
+ input
105640
+ }) => encodeFunctionData({
105641
+ abi: pendle_router_abi_default,
105642
+ functionName: "swapExactTokenForYt",
105643
+ args: [receiver, market, minYtOut, guess, makeCleanTokenInput(input), EMPTY_LIMIT_ORDER_DATA]
105644
+ });
105645
+ var swapExactTokenForYtTrx = ({
105646
+ args,
105647
+ routerAddress
105648
+ }) => routerTrx(routerAddress, swapExactTokenForYtCalldata(args));
105649
+ var swapExactSyForYtCalldata = ({
105650
+ receiver,
105651
+ market,
105652
+ exactSyIn,
105653
+ minYtOut,
105654
+ guess
105655
+ }) => encodeFunctionData({
105656
+ abi: pendle_router_abi_default,
105657
+ functionName: "swapExactSyForYt",
105658
+ args: [receiver, market, exactSyIn, minYtOut, guess, EMPTY_LIMIT_ORDER_DATA]
105659
+ });
105660
+ var swapExactSyForYtTrx = ({
105661
+ args,
105662
+ routerAddress
105663
+ }) => routerTrx(routerAddress, swapExactSyForYtCalldata(args));
105664
+ var swapExactYtForTokenCalldata = ({
105665
+ receiver,
105666
+ market,
105667
+ exactYtIn,
105668
+ output
105669
+ }) => encodeFunctionData({
105670
+ abi: pendle_router_abi_default,
105671
+ functionName: "swapExactYtForToken",
105672
+ args: [receiver, market, exactYtIn, makeCleanTokenOutput(output), EMPTY_LIMIT_ORDER_DATA]
105673
+ });
105674
+ var swapExactYtForTokenTrx = ({
105675
+ args,
105676
+ routerAddress
105677
+ }) => routerTrx(routerAddress, swapExactYtForTokenCalldata(args));
105678
+ var swapExactYtForSyCalldata = ({ receiver, market, exactYtIn, minSyOut }) => encodeFunctionData({
105679
+ abi: pendle_router_abi_default,
105680
+ functionName: "swapExactYtForSy",
105681
+ args: [receiver, market, exactYtIn, minSyOut, EMPTY_LIMIT_ORDER_DATA]
105682
+ });
105683
+ var swapExactYtForSyTrx = ({
105684
+ args,
105685
+ routerAddress
105686
+ }) => routerTrx(routerAddress, swapExactYtForSyCalldata(args));
105687
+ var addLiquiditySingleTokenCalldata = ({
105688
+ receiver,
105689
+ market,
105690
+ minLpOut,
105691
+ guess,
105692
+ input
105693
+ }) => encodeFunctionData({
105694
+ abi: pendle_router_abi_default,
105695
+ functionName: "addLiquiditySingleToken",
105696
+ args: [receiver, market, minLpOut, guess, makeCleanTokenInput(input), EMPTY_LIMIT_ORDER_DATA]
105697
+ });
105698
+ var addLiquiditySingleTokenTrx = ({
105699
+ args,
105700
+ routerAddress
105701
+ }) => routerTrx(routerAddress, addLiquiditySingleTokenCalldata(args));
105702
+ var addLiquiditySingleSyCalldata = ({
105703
+ receiver,
105704
+ market,
105705
+ netSyIn,
105706
+ minLpOut,
105707
+ guess
105708
+ }) => encodeFunctionData({
105709
+ abi: pendle_router_abi_default,
105710
+ functionName: "addLiquiditySingleSy",
105711
+ args: [receiver, market, netSyIn, minLpOut, guess, EMPTY_LIMIT_ORDER_DATA]
105712
+ });
105713
+ var addLiquiditySingleSyTrx = ({
105714
+ args,
105715
+ routerAddress
105716
+ }) => routerTrx(routerAddress, addLiquiditySingleSyCalldata(args));
105717
+ var addLiquiditySinglePtCalldata = ({
105718
+ receiver,
105719
+ market,
105720
+ netPtIn,
105721
+ minLpOut,
105722
+ guess
105723
+ }) => encodeFunctionData({
105724
+ abi: pendle_router_abi_default,
105725
+ functionName: "addLiquiditySinglePt",
105726
+ args: [receiver, market, netPtIn, minLpOut, guess, EMPTY_LIMIT_ORDER_DATA]
105727
+ });
105728
+ var addLiquiditySinglePtTrx = ({
105729
+ args,
105730
+ routerAddress
105731
+ }) => routerTrx(routerAddress, addLiquiditySinglePtCalldata(args));
105732
+ var addLiquiditySingleTokenKeepYtCalldata = ({
105733
+ receiver,
105734
+ market,
105735
+ minLpOut,
105736
+ minYtOut,
105737
+ input
105738
+ }) => encodeFunctionData({
105739
+ abi: pendle_router_abi_default,
105740
+ functionName: "addLiquiditySingleTokenKeepYt",
105741
+ args: [receiver, market, minLpOut, minYtOut, makeCleanTokenInput(input)]
105742
+ });
105743
+ var addLiquiditySingleTokenKeepYtTrx = ({
105744
+ args,
105745
+ routerAddress
105746
+ }) => routerTrx(routerAddress, addLiquiditySingleTokenKeepYtCalldata(args));
105747
+ var addLiquiditySingleSyKeepYtCalldata = ({
105748
+ receiver,
105749
+ market,
105750
+ netSyIn,
105751
+ minLpOut,
105752
+ minYtOut
105753
+ }) => encodeFunctionData({
105754
+ abi: pendle_router_abi_default,
105755
+ functionName: "addLiquiditySingleSyKeepYt",
105756
+ args: [receiver, market, netSyIn, minLpOut, minYtOut]
105757
+ });
105758
+ var addLiquiditySingleSyKeepYtTrx = ({
105759
+ args,
105760
+ routerAddress
105761
+ }) => routerTrx(routerAddress, addLiquiditySingleSyKeepYtCalldata(args));
105762
+ var addLiquidityDualTokenAndPtCalldata = ({
105763
+ receiver,
105764
+ market,
105765
+ input,
105766
+ netPtDesired,
105767
+ minLpOut
105768
+ }) => encodeFunctionData({
105769
+ abi: pendle_router_abi_default,
105770
+ functionName: "addLiquidityDualTokenAndPt",
105771
+ args: [receiver, market, makeCleanTokenInput(input), netPtDesired, minLpOut]
105772
+ });
105773
+ var addLiquidityDualTokenAndPtTrx = ({
105774
+ args,
105775
+ routerAddress
105776
+ }) => routerTrx(routerAddress, addLiquidityDualTokenAndPtCalldata(args));
105777
+ var addLiquidityDualSyAndPtCalldata = ({
105778
+ receiver,
105779
+ market,
105780
+ netSyDesired,
105781
+ netPtDesired,
105782
+ minLpOut
105783
+ }) => encodeFunctionData({
105784
+ abi: pendle_router_abi_default,
105785
+ functionName: "addLiquidityDualSyAndPt",
105786
+ args: [receiver, market, netSyDesired, netPtDesired, minLpOut]
105787
+ });
105788
+ var addLiquidityDualSyAndPtTrx = ({
105789
+ args,
105790
+ routerAddress
105791
+ }) => routerTrx(routerAddress, addLiquidityDualSyAndPtCalldata(args));
105792
+ var removeLiquiditySingleTokenCalldata = ({
105793
+ receiver,
105794
+ market,
105795
+ netLpToRemove,
105796
+ output
105797
+ }) => encodeFunctionData({
105798
+ abi: pendle_router_abi_default,
105799
+ functionName: "removeLiquiditySingleToken",
105800
+ args: [receiver, market, netLpToRemove, makeCleanTokenOutput(output), EMPTY_LIMIT_ORDER_DATA]
105801
+ });
105802
+ var removeLiquiditySingleTokenTrx = ({
105803
+ args,
105804
+ routerAddress
105805
+ }) => routerTrx(routerAddress, removeLiquiditySingleTokenCalldata(args));
105806
+ var removeLiquiditySingleSyCalldata = ({
105807
+ receiver,
105808
+ market,
105809
+ netLpToRemove,
105810
+ minSyOut
105811
+ }) => encodeFunctionData({
105812
+ abi: pendle_router_abi_default,
105813
+ functionName: "removeLiquiditySingleSy",
105814
+ args: [receiver, market, netLpToRemove, minSyOut, EMPTY_LIMIT_ORDER_DATA]
105815
+ });
105816
+ var removeLiquiditySingleSyTrx = ({
105817
+ args,
105818
+ routerAddress
105819
+ }) => routerTrx(routerAddress, removeLiquiditySingleSyCalldata(args));
105820
+ var removeLiquiditySinglePtCalldata = ({
105821
+ receiver,
105822
+ market,
105823
+ netLpToRemove,
105824
+ minPtOut,
105825
+ guess
105826
+ }) => encodeFunctionData({
105827
+ abi: pendle_router_abi_default,
105828
+ functionName: "removeLiquiditySinglePt",
105829
+ args: [receiver, market, netLpToRemove, minPtOut, guess, EMPTY_LIMIT_ORDER_DATA]
105830
+ });
105831
+ var removeLiquiditySinglePtTrx = ({
105832
+ args,
105833
+ routerAddress
105834
+ }) => routerTrx(routerAddress, removeLiquiditySinglePtCalldata(args));
105835
+ var removeLiquidityDualTokenAndPtCalldata = ({
105836
+ receiver,
105837
+ market,
105838
+ netLpToRemove,
105839
+ output,
105840
+ minPtOut
105841
+ }) => encodeFunctionData({
105842
+ abi: pendle_router_abi_default,
105843
+ functionName: "removeLiquidityDualTokenAndPt",
105844
+ args: [receiver, market, netLpToRemove, makeCleanTokenOutput(output), minPtOut]
105845
+ });
105846
+ var removeLiquidityDualTokenAndPtTrx = ({
105847
+ args,
105848
+ routerAddress
105849
+ }) => routerTrx(routerAddress, removeLiquidityDualTokenAndPtCalldata(args));
105850
+ var removeLiquidityDualSyAndPtCalldata = ({
105851
+ receiver,
105852
+ market,
105853
+ netLpToRemove,
105854
+ minSyOut,
105855
+ minPtOut
105856
+ }) => encodeFunctionData({
105857
+ abi: pendle_router_abi_default,
105858
+ functionName: "removeLiquidityDualSyAndPt",
105859
+ args: [receiver, market, netLpToRemove, minSyOut, minPtOut]
105860
+ });
105861
+ var removeLiquidityDualSyAndPtTrx = ({
105862
+ args,
105863
+ routerAddress
105864
+ }) => routerTrx(routerAddress, removeLiquidityDualSyAndPtCalldata(args));
104719
105865
  // src/integrations/wormhole/wormhole.multi.ntt.abi.ts
104720
105866
  var wormhole_multi_ntt_abi_default = [
104721
105867
  {
@@ -105192,8 +106338,8 @@ var EnsoTokenType;
105192
106338
  EnsoTokenType2[EnsoTokenType2["Native"] = 0] = "Native";
105193
106339
  EnsoTokenType2[EnsoTokenType2["ERC20"] = 1] = "ERC20";
105194
106340
  })(EnsoTokenType ||= {});
105195
- var ZERO_ADDRESS2 = "0x0000000000000000000000000000000000000000";
105196
- var isNativeToken = (token) => token.toLowerCase() === ZERO_ADDRESS2;
106341
+ var ZERO_ADDRESS3 = "0x0000000000000000000000000000000000000000";
106342
+ var isNativeToken = (token) => token.toLowerCase() === ZERO_ADDRESS3;
105197
106343
  var encodeEnsoToken = (token, amount) => {
105198
106344
  if (isNativeToken(token)) {
105199
106345
  return {
@@ -105361,4 +106507,4 @@ var simulateOrThrow = async (env) => {
105361
106507
  };
105362
106508
  };
105363
106509
 
105364
- //# debugId=F7EC22EB720F4D9964756E2164756E21
106510
+ //# debugId=07F7E572A51A678564756E2164756E21